Explore Cognitive Structure

structure
efa
2023
Author

Liang Zhang

Published

April 29, 2023

Code
library(tidyverse)
library(corrr)
library(showtext)
library(gt)
library(formattable)
library(patchwork)
library(psych)
requireNamespace("bit64")
Code
summary_data <- function(data) {
  data |>
    select(-user_id) |>
    psych::describe() |>
    as_tibble(rownames = "game_index_name") |>
    select(game_index_name, n, mean, sd, min, max, skew, kurtosis) |>
    separate(game_index_name, c("game_name", "index_name"), sep = "\\.") |>
    mutate(
      skew_status = case_when(
        abs(skew) > 1 ~ "highly",
        abs(skew) > 0.5 ~ "moderately",
        TRUE ~ "acceptable"
      )
    )
}

show_normality <- function(data, game_name, index_name, skew, ...,
                           name_value = "test") {
  p_hist <- ggplot(data, aes_string(name_value)) +
    geom_histogram(bins = 30) +
    labs(x = "Raw Score", y = "Count") +
    theme_bw()
  p_qq <- ggplot(data, aes_string(sample = name_value)) +
    geom_qq() +
    geom_qq_line() +
    labs(x = "Expected Quantile", y = "Observed Quantile") +
    theme_bw()
  wrap_elements(grid::textGrob(
    str_glue("{game_name}\n{index_name}\nskewness = {round(skew, 2)}"),
    rot = 90
  )) + p_hist + p_qq +
    plot_layout(widths = c(0.1, 0.45, 0.45))
}

transform_indices <- function(x, game_name, index_name) {
  if (game_name == "小狗回家" & index_name == "mean_score") {
    return(-log10(1 - x))
  }
  if (game_name == "各得其所" & index_name == "mrt_init") {
    return(log10(x))
  }
  if (game_name == "数字推理") {
    return(sqrt(x))
  }
  if (game_name == "塔罗牌") {
    return(-sqrt(max(x, na.rm = TRUE) - x))
  }
  if (game_name == "人工语言-中级") {
    return(-sqrt(max(x, na.rm = TRUE) - x))
  }
  if (game_name == "语义判断") {
    return(-log10(max(x, na.rm = TRUE) + 1 - x))
  }
  if (game_name == "数感") {
    return(log10(x))
  }
  if (game_name == "时长分辨") {
    return(log10(x))
  }
  if (game_name == "节奏感知") {
   return(sqrt(x))
  }
  return(x)
}

vis_cor <- function(x, ...) {
  x |> 
    correlate(...) |>
    autoplot(
      triangular = "full",
      low = "blue",
      high = "red"
    ) +
    theme(aspect.ratio = 1)
}

format_n_factors <- function(n_factor_result) {
  checks <- c("BIC", "SABIC", "eBIC", "MAP")
  n_factor_result$vss.stats |>
    as_tibble() |>
    select(BIC, SABIC, eBIC) |>
    mutate(n_factor = seq_len(n()), .before = 1L) |>
    add_column(MAP = n_factor_result$map) |>
    gt() |>
    fmt_number(
      -c(n_factor, MAP),
      decimals = 0
    ) |>
    fmt_scientific(MAP) |>
    tab_style(
      style = cell_text(weight = "bold"),
      locations = map(
        checks,
        ~ cells_body(
          columns = all_of(.x),
          rows = !!sym(.x) == min(!!sym(.x))
        )
      )
    ) |>
    as_raw_html()
}

plotly_efa <- function(model) {
  heatmaply::heatmaply_cor(
    t(unclass(model$loadings)),
    dendrogram = "column",
    k_col = NA,
    label_format_fun = function(...) round(..., digits = 2),
    margin = c(50, 50, 50, 0)
  )
}
Code
store_2023 <- targets::tar_config_get("store", project = "2023")
store_g_invariance <- targets::tar_config_get("store", project = "g_invariance")
targets::tar_load(users, store = store_2023)
targets::tar_load(config_indices, store = store_2023)
targets::tar_load(indices_of_interest, store = store_2023)
targets::tar_load(data, store = store_g_invariance)
targets::tar_load(scores_g_cor_pairwise, store = store_g_invariance)
targets::tar_load(scores_g_cor_rapm, store = store_g_invariance)

G Score Estimation

Estimation stability

Code
scores_g_cor_pairwise |> 
  mutate(r = abs(r)) |> 
  ggplot(aes(num_vars, r)) +
  ggdist::stat_slabinterval() +
  ggdist::stat_dots(side = "left") +
  scale_x_continuous(breaks = scales::breaks_pretty(n = 10)) +
  scale_y_continuous(breaks = scales::breaks_pretty(n = 10)) +
  ggpubr::theme_pubclean() +
  labs(x = "Number of Tasks", y = "Correlation Between Pairs")

Figure 1: The g score estimation is more stable when number of variables used increases.

Correlation between g and Raven’s Advanced Progressive Matrices (RAPM)

Code
scores_g_cor_rapm |> 
  mutate(r = abs(r_rapm)) |> 
  ggplot(aes(num_vars, r)) +
  ggdist::stat_slabinterval() +
  ggdist::stat_dots(side = "left") +
  scale_x_continuous(breaks = scales::breaks_pretty(n = 10)) +
  scale_y_continuous(breaks = scales::breaks_pretty(n = 10)) +
  ggpubr::theme_pubclean() +
  labs(x = "Number of Tasks", y = "Correlation with RAPM")

Figure 2: The estimated g scores are more correlated with RAPM when number of variables used increases.

Exploratory Factor Analysis

Code
data_efa <- indices_of_interest |> 
  mutate(game_index = str_c(game_name, ".", index_name)) |> 
  pivot_wider(
    id_cols = user_id,
    names_from = game_index,
    values_from = score_adj
  ) |> 
  select(-user_id)

Determining Number of Factors

Code
n_factor_tests <- psych::nfactors(data_efa)
Code
format_n_factors(n_factor_tests)
Table 1:

Number of Factors Tests

n_factor BIC SABIC eBIC MAP
1 −9,212 75 −290 7.85 × 10−3
2 −10,200 −1,158 −6,062 6.31 × 10−3
3 −10,786 −1,985 −9,188 5.27 × 10−3
4 −11,004 −2,442 −10,195 4.90 × 10−3
5 −10,990 −2,662 −10,713 4.94 × 10−3
6 −11,025 −2,929 −11,063 4.90 × 10−3
7 −10,996 −3,129 −11,400 4.83 × 10−3
8 −10,910 −3,268 −11,529 4.84 × 10−3
9 −10,823 −3,404 −11,611 4.82 × 10−3
10 −10,694 −3,494 −11,544 4.92 × 10−3
11 −10,483 −3,498 −11,423 4.95 × 10−3
12 −10,275 −3,503 −11,244 5.12 × 10−3
13 −10,020 −3,457 −11,026 5.32 × 10−3
14 −9,808 −3,452 −10,807 5.55 × 10−3
15 −9,557 −3,404 −10,558 5.79 × 10−3
16 −9,302 −3,349 −10,316 5.98 × 10−3
17 −9,048 −3,292 −10,066 6.21 × 10−3
18 −8,780 −3,218 −9,792 6.49 × 10−3
19 −8,518 −3,146 −9,515 6.75 × 10−3
20 −8,236 −3,051 −9,235 7.01 × 10−3

From Table 1, we noticed inconsistencies. So we try factor numbers as 12, 9 and 6.

Results of 12 factors

Code
fitted <- fa(data_efa, 12)
plotly_efa(fitted)
Figure 3: 12 Factors Result
Code
parameters::model_parameters(fitted, sort = TRUE, threshold = "max")
# Rotated loadings from Factor Analysis (oblimin-rotation)

Variable                        | MR1  | MR6  | MR4  | MR7  | MR8  | MR11 | MR9  |  MR3  | MR10 | MR2  | MR12 | MR5  | Complexity | Uniqueness
----------------------------------------------------------------------------------------------------------------------------------------------
图形折叠.nc                     | 0.67 |      |      |      |      |      |      |       |      |      |      |      |    1.18    |    0.50   
图形推理.nc                     | 0.64 |      |      |      |      |      |      |       |      |      |      |      |    1.34    |    0.40   
三维心理旋转测试A.nc            | 0.61 |      |      |      |      |      |      |       |      |      |      |      |    1.42    |    0.45   
物体旋转.nc                     | 0.60 |      |      |      |      |      |      |       |      |      |      |      |    1.34    |    0.47   
平面展开.nc                     | 0.55 |      |      |      |      |      |      |       |      |      |      |      |    1.52    |    0.56   
瑞文高级推理.nc_test            | 0.50 |      |      |      |      |      |      |       |      |      |      |      |    1.84    |    0.53   
数字推理.nc                     | 0.44 |      |      |      |      |      |      |       |      |      |      |      |    2.05    |    0.65   
视角判断.nc                     | 0.43 |      |      |      |      |      |      |       |      |      |      |      |    1.71    |    0.67   
文字推理.nc                     | 0.38 |      |      |      |      |      |      |       |      |      |      |      |    3.80    |    0.72   
登陆月球(中级).mean_log_err   | 0.32 |      |      |      |      |      |      |       |      |      |      |      |    2.45    |    0.73   
阅读判断.nc                     | 0.30 |      |      |      |      |      |      |       |      |      |      |      |    4.82    |    0.69   
塔罗牌.nc                       | 0.21 |      |      |      |      |      |      |       |      |      |      |      |    5.89    |    0.68   
强化学习.pc_test                | 0.14 |      |      |      |      |      |      |       |      |      |      |      |    5.71    |    0.88   
文字卡片.dprime                 |      | 0.74 |      |      |      |      |      |       |      |      |      |      |    1.07    |    0.42   
数字卡片PRO.dprime              |      | 0.67 |      |      |      |      |      |       |      |      |      |      |    1.24    |    0.45   
格子卡片.dprime                 |      | 0.54 |      |      |      |      |      |       |      |      |      |      |    1.47    |    0.44   
美术卡片.dprime                 |      | 0.47 |      |      |      |      |      |       |      |      |      |      |    3.23    |    0.35   
方向检测.k                      |      | 0.21 |      |      |      |      |      |       |      |      |      |      |    5.23    |    0.64   
社交达人.fntotal                |      |      | 0.66 |      |      |      |      |       |      |      |      |      |    1.16    |    0.49   
词汇学习.nc                     |      |      | 0.51 |      |      |      |      |       |      |      |      |      |    2.02    |    0.53   
过目不忘PRO.nc                  |      |      | 0.42 |      |      |      |      |       |      |      |      |      |    2.38    |    0.56   
万花筒.nc                       |      |      | 0.41 |      |      |      |      |       |      |      |      |      |    2.78    |    0.55   
事件记忆.nc                     |      |      | 0.36 |      |      |      |      |       |      |      |      |      |    2.95    |    0.65   
图片记忆A.bps_score             |      |      | 0.33 |      |      |      |      |       |      |      |      |      |    3.86    |    0.61   
视觉记忆测试.nc                 |      |      | 0.31 |      |      |      |      |       |      |      |      |      |    3.35    |    0.72   
色彩检测.k                      |      |      | 0.30 |      |      |      |      |       |      |      |      |      |    5.16    |    0.62   
远距离联想A.nc                  |      |      | 0.23 |      |      |      |      |       |      |      |      |      |    3.85    |    0.83   
顺背数PRO.nc                    |      |      |      | 0.61 |      |      |      |       |      |      |      |      |    1.28    |    0.56   
幸运小球PRO.nc                  |      |      |      | 0.58 |      |      |      |       |      |      |      |      |    1.28    |    0.49   
井然有序.nc                     |      |      |      | 0.52 |      |      |      |       |      |      |      |      |    1.91    |    0.55   
欢乐餐厅PRO.nc                  |      |      |      | 0.41 |      |      |      |       |      |      |      |      |    3.41    |    0.47   
蝴蝶照相机.nc                   |      |      |      | 0.32 |      |      |      |       |      |      |      |      |    4.60    |    0.46   
人工语言-高级.nc                |      |      |      | 0.29 |      |      |      |       |      |      |      |      |    4.71    |    0.60   
专注大师_中级.nc                |      |      |      |      | 0.74 |      |      |       |      |      |      |      |    1.11    |    0.40   
速算师(中级).nc               |      |      |      |      | 0.67 |      |      |       |      |      |      |      |    1.24    |    0.41   
声调判断.nc                     |      |      |      |      | 0.49 |      |      |       |      |      |      |      |    1.91    |    0.63   
词语判断.nc                     |      |      |      |      | 0.37 |      |      |       |      |      |      |      |    4.67    |    0.52   
候鸟迁徙PRO.cong_eff_ies        |      |      |      |      |      | 0.55 |      |       |      |      |      |      |    1.35    |    0.56   
多彩文字PRO.cong_eff_ies        |      |      |      |      |      | 0.41 |      |       |      |      |      |      |    1.41    |    0.80   
数感.w                          |      |      |      |      |      | 0.39 |      |       |      |      |      |      |    2.42    |    0.72   
魔术师终极.dprime               |      |      |      |      |      | 0.37 |      |       |      |      |      |      |    2.02    |    0.71   
捉虫高级简版.dprime             |      |      |      |      |      | 0.35 |      |       |      |      |      |      |    3.07    |    0.66   
变色魔块PRO.ssrt                |      |      |      |      |      | 0.26 |      |       |      |      |      |      |    4.54    |    0.75   
卡片分类PRO.switch_cost_ies     |      |      |      |      |      | 0.23 |      |       |      |      |      |      |    5.15    |    0.80   
超级秒表PRO.mrt                 |      |      |      |      |      |      | 0.40 |       |      |      |      |      |    1.48    |    0.73   
时长分辨.thresh_peak_valley     |      |      |      |      |      |      | 0.38 |       |      |      |      |      |    2.67    |    0.78   
节奏感知.thresh_peak_valley     |      |      |      |      |      |      | 0.37 |       |      |      |      |      |    2.57    |    0.71   
变戏法.nc                       |      |      |      |      |      |      | 0.36 |       |      |      |      |      |    2.69    |    0.65   
小狗回家.mean_score             |      |      |      |      |      |      | 0.36 |       |      |      |      |      |    2.73    |    0.70   
快速归类PRO.ies                 |      |      |      |      |      |      | 0.28 |       |      |      |      |      |    5.88    |    0.46   
时间顺序判断.thresh_peak_valley |      |      |      |      |      |      | 0.21 |       |      |      |      |      |    6.25    |    0.68   
位置记忆PRO.nc                  |      |      |      |      |      |      |      | 0.58  |      |      |      |      |    1.75    |    0.37   
萤火虫PRO.nc                    |      |      |      |      |      |      |      | 0.37  |      |      |      |      |    2.52    |    0.69   
一心二用PRO.nc                  |      |      |      |      |      |      |      | 0.34  |      |      |      |      |    4.24    |    0.59   
连点成画PRO.nc                  |      |      |      |      |      |      |      | 0.33  |      |      |      |      |    2.88    |    0.69   
言语记忆A.tm_dprime             |      |      |      |      |      |      |      | -0.32 |      |      |      |      |    5.31    |    0.55   
我是大厨.score_total            |      |      |      |      |      |      |      | 0.27  |      |      |      |      |    4.05    |    0.69   
密码箱.nc                       |      |      |      |      |      |      |      | 0.27  |      |      |      |      |    4.63    |    0.62   
按图索骥.mean_log_err_both      |      |      |      |      |      |      |      | 0.23  |      |      |      |      |    7.12    |    0.65   
太空飞船PRO.cong_eff_ies        |      |      |      |      |      |      |      | -0.22 |      |      |      |      |    4.24    |    0.87   
各得其所.prop_perfect           |      |      |      |      |      |      |      | 0.21  |      |      |      |      |    3.65    |    0.87   
语义判断.nc                     |      |      |      |      |      |      |      |       | 0.52 |      |      |      |    2.41    |    0.37   
随机应变.switch_cost_ies        |      |      |      |      |      |      |      |       | 0.51 |      |      |      |    1.80    |    0.65   
多变计数师.switch_cost_ies      |      |      |      |      |      |      |      |       | 0.43 |      |      |      |    2.22    |    0.68   
候鸟迁徙PRO.switch_cost_ies     |      |      |      |      |      |      |      |       | 0.40 |      |      |      |    1.66    |    0.79   
察颜观色PRO.switch_cost_ies     |      |      |      |      |      |      |      |       | 0.39 |      |      |      |    2.53    |    0.73   
雪花收藏家.nc_cor               |      |      |      |      |      |      |      |       |      | 0.50 |      |      |    1.35    |    0.60   
火眼金睛.nc                     |      |      |      |      |      |      |      |       |      | 0.39 |      |      |    3.32    |    0.54   
连续再认PRO.dprime              |      |      |      |      |      |      |      |       |      | 0.32 |      |      |    3.52    |    0.64   
舒尔特方格(中级).nc_cor       |      |      |      |      |      |      |      |       |      | 0.28 |      |      |    4.91    |    0.68   
方向临摹.mean_log_err           |      |      |      |      |      |      |      |       |      | 0.27 |      |      |    4.70    |    0.79   
宇宙黑洞A.nc                    |      |      |      |      |      |      |      |       |      |      | 0.53 |      |    1.73    |    0.45   
路径学习.nc                     |      |      |      |      |      |      |      |       |      |      | 0.52 |      |    1.76    |    0.50   
城市导航.nc                     |      |      |      |      |      |      |      |       |      |      | 0.38 |      |    3.22    |    0.48   
打靶场.nc                       |      |      |      |      |      |      |      |       |      |      | 0.28 |      |    3.71    |    0.57   
注意警觉.cong_eff_ies           |      |      |      |      |      |      |      |       |      |      |      | 0.90 |    1.03    |    0.21   
注意指向.cong_eff_ies           |      |      |      |      |      |      |      |       |      |      |      | 0.75 |    1.07    |    0.42   
注意警觉.alert_ies              |      |      |      |      |      |      |      |       |      |      |      | 0.12 |    5.43    |    0.94   

The 12 latent factors (oblimin rotation) accounted for 39.49% of the total variance of the original data (MR1 = 6.05%, MR6 = 4.16%, MR4 = 4.01%, MR7 = 3.27%, MR8 = 3.19%, MR11 = 3.05%, MR9 = 2.90%, MR3 = 2.75%, MR10 = 2.66%, MR2 = 2.60%, MR12 = 2.57%, MR5 = 2.27%).

Results of 9 factors

Code
fitted <- fa(data_efa, 9)
plotly_efa(fitted)
Figure 4: Eight Factors Result
Code
parameters::model_parameters(fitted, sort = TRUE, threshold = "max")
# Rotated loadings from Factor Analysis (oblimin-rotation)

Variable                        | MR1  | MR4  | MR6  |  MR2  | MR3  | MR9  | MR8  | MR5  | MR7  | Complexity | Uniqueness
-------------------------------------------------------------------------------------------------------------------------
图形折叠.nc                     | 0.71 |      |      |       |      |      |      |      |      |    1.11    |    0.50   
三维心理旋转测试A.nc            | 0.63 |      |      |       |      |      |      |      |      |    1.09    |    0.49   
图形推理.nc                     | 0.61 |      |      |       |      |      |      |      |      |    1.28    |    0.45   
物体旋转.nc                     | 0.57 |      |      |       |      |      |      |      |      |    1.37    |    0.49   
平面展开.nc                     | 0.56 |      |      |       |      |      |      |      |      |    1.20    |    0.59   
瑞文高级推理.nc_test            | 0.50 |      |      |       |      |      |      |      |      |    1.48    |    0.57   
视角判断.nc                     | 0.48 |      |      |       |      |      |      |      |      |    1.34    |    0.67   
数字推理.nc                     | 0.48 |      |      |       |      |      |      |      |      |    1.64    |    0.66   
文字推理.nc                     | 0.43 |      |      |       |      |      |      |      |      |    2.45    |    0.75   
登陆月球(中级).mean_log_err   | 0.31 |      |      |       |      |      |      |      |      |    2.21    |    0.74   
远距离联想A.nc                  | 0.20 |      |      |       |      |      |      |      |      |    3.90    |    0.85   
强化学习.pc_test                | 0.16 |      |      |       |      |      |      |      |      |    3.33    |    0.91   
欢乐餐厅PRO.nc                  |      | 0.63 |      |       |      |      |      |      |      |    1.14    |    0.50   
词汇学习.nc                     |      | 0.60 |      |       |      |      |      |      |      |    1.45    |    0.54   
社交达人.fntotal                |      | 0.56 |      |       |      |      |      |      |      |    1.38    |    0.59   
万花筒.nc                       |      | 0.51 |      |       |      |      |      |      |      |    1.61    |    0.57   
事件记忆.nc                     |      | 0.51 |      |       |      |      |      |      |      |    1.36    |    0.65   
人工语言-高级.nc                |      | 0.45 |      |       |      |      |      |      |      |    1.97    |    0.62   
过目不忘PRO.nc                  |      | 0.44 |      |       |      |      |      |      |      |    1.79    |    0.60   
幸运小球PRO.nc                  |      | 0.42 |      |       |      |      |      |      |      |    3.23    |    0.52   
井然有序.nc                     |      | 0.39 |      |       |      |      |      |      |      |    2.36    |    0.65   
宇宙黑洞A.nc                    |      | 0.38 |      |       |      |      |      |      |      |    3.37    |    0.52   
城市导航.nc                     |      | 0.36 |      |       |      |      |      |      |      |    3.84    |    0.50   
顺背数PRO.nc                    |      | 0.35 |      |       |      |      |      |      |      |    5.09    |    0.61   
视觉记忆测试.nc                 |      | 0.31 |      |       |      |      |      |      |      |    3.79    |    0.72   
雪花收藏家.nc_cor               |      | 0.22 |      |       |      |      |      |      |      |    4.54    |    0.71   
塔罗牌.nc                       |      | 0.20 |      |       |      |      |      |      |      |    4.95    |    0.69   
文字卡片.dprime                 |      |      | 0.73 |       |      |      |      |      |      |    1.06    |    0.45   
数字卡片PRO.dprime              |      |      | 0.64 |       |      |      |      |      |      |    1.17    |    0.50   
格子卡片.dprime                 |      |      | 0.55 |       |      |      |      |      |      |    1.50    |    0.45   
美术卡片.dprime                 |      |      | 0.52 |       |      |      |      |      |      |    2.16    |    0.39   
方向检测.k                      |      |      | 0.30 |       |      |      |      |      |      |    2.90    |    0.66   
色彩检测.k                      |      |      | 0.29 |       |      |      |      |      |      |    3.18    |    0.70   
阅读判断.nc                     |      |      | 0.28 |       |      |      |      |      |      |    3.58    |    0.73   
时间顺序判断.thresh_peak_valley |      |      | 0.20 |       |      |      |      |      |      |    4.63    |    0.71   
语义判断.nc                     |      |      |      | 0.53  |      |      |      |      |      |    2.24    |    0.41   
一心二用PRO.nc                  |      |      |      | 0.49  |      |      |      |      |      |    1.75    |    0.60   
小狗回家.mean_score             |      |      |      | 0.46  |      |      |      |      |      |    1.72    |    0.69   
连点成画PRO.nc                  |      |      |      | 0.43  |      |      |      |      |      |    2.15    |    0.70   
变戏法.nc                       |      |      |      | 0.38  |      |      |      |      |      |    2.46    |    0.67   
词语判断.nc                     |      |      |      | 0.38  |      |      |      |      |      |    3.57    |    0.57   
我是大厨.score_total            |      |      |      | 0.36  |      |      |      |      |      |    1.82    |    0.72   
快速归类PRO.ies                 |      |      |      | 0.35  |      |      |      |      |      |    3.64    |    0.49   
超级秒表PRO.mrt                 |      |      |      | 0.30  |      |      |      |      |      |    2.36    |    0.78   
火眼金睛.nc                     |      |      |      | 0.28  |      |      |      |      |      |    4.14    |    0.62   
太空飞船PRO.cong_eff_ies        |      |      |      | -0.23 |      |      |      |      |      |    3.11    |    0.89   
位置记忆PRO.nc                  |      |      |      |       | 0.63 |      |      |      |      |    1.30    |    0.42   
蝴蝶照相机.nc                   |      |      |      |       | 0.47 |      |      |      |      |    1.93    |    0.46   
打靶场.nc                       |      |      |      |       | 0.44 |      |      |      |      |    1.90    |    0.57   
路径学习.nc                     |      |      |      |       | 0.43 |      |      |      |      |    2.62    |    0.57   
按图索骥.mean_log_err_both      |      |      |      |       | 0.29 |      |      |      |      |    4.34    |    0.65   
密码箱.nc                       |      |      |      |       | 0.27 |      |      |      |      |    4.55    |    0.63   
萤火虫PRO.nc                    |      |      |      |       | 0.25 |      |      |      |      |    3.86    |    0.75   
各得其所.prop_perfect           |      |      |      |       | 0.21 |      |      |      |      |    3.48    |    0.87   
候鸟迁徙PRO.cong_eff_ies        |      |      |      |       |      | 0.49 |      |      |      |    1.85    |    0.59   
连续再认PRO.dprime              |      |      |      |       |      | 0.36 |      |      |      |    2.36    |    0.68   
捉虫高级简版.dprime             |      |      |      |       |      | 0.33 |      |      |      |    3.21    |    0.68   
变色魔块PRO.ssrt                |      |      |      |       |      | 0.32 |      |      |      |    3.78    |    0.75   
多彩文字PRO.cong_eff_ies        |      |      |      |       |      | 0.31 |      |      |      |    2.64    |    0.82   
图片记忆A.bps_score             |      |      |      |       |      | 0.31 |      |      |      |    4.02    |    0.64   
数感.w                          |      |      |      |       |      | 0.31 |      |      |      |    3.93    |    0.74   
魔术师终极.dprime               |      |      |      |       |      | 0.28 |      |      |      |    4.24    |    0.71   
言语记忆A.tm_dprime             |      |      |      |       |      | 0.27 |      |      |      |    5.34    |    0.60   
时长分辨.thresh_peak_valley     |      |      |      |       |      | 0.27 |      |      |      |    2.91    |    0.87   
方向临摹.mean_log_err           |      |      |      |       |      | 0.24 |      |      |      |    5.01    |    0.80   
节奏感知.thresh_peak_valley     |      |      |      |       |      | 0.24 |      |      |      |    3.42    |    0.77   
卡片分类PRO.switch_cost_ies     |      |      |      |       |      | 0.22 |      |      |      |    5.33    |    0.81   
专注大师_中级.nc                |      |      |      |       |      |      | 0.69 |      |      |    1.26    |    0.45   
速算师(中级).nc               |      |      |      |       |      |      | 0.63 |      |      |    1.41    |    0.45   
声调判断.nc                     |      |      |      |       |      |      | 0.46 |      |      |    2.04    |    0.65   
舒尔特方格(中级).nc_cor       |      |      |      |       |      |      | 0.26 |      |      |    3.03    |    0.80   
注意警觉.cong_eff_ies           |      |      |      |       |      |      |      | 0.88 |      |    1.03    |    0.25   
注意指向.cong_eff_ies           |      |      |      |       |      |      |      | 0.73 |      |    1.10    |    0.45   
注意警觉.alert_ies              |      |      |      |       |      |      |      | 0.13 |      |    4.82    |    0.94   
随机应变.switch_cost_ies        |      |      |      |       |      |      |      |      | 0.50 |    1.84    |    0.65   
察颜观色PRO.switch_cost_ies     |      |      |      |       |      |      |      |      | 0.43 |    1.85    |    0.73   
多变计数师.switch_cost_ies      |      |      |      |       |      |      |      |      | 0.38 |    2.40    |    0.72   
候鸟迁徙PRO.switch_cost_ies     |      |      |      |       |      |      |      |      | 0.36 |    2.27    |    0.79   

The 9 latent factors (oblimin rotation) accounted for 36.29% of the total variance of the original data (MR1 = 6.71%, MR4 = 5.91%, MR6 = 4.78%, MR2 = 3.95%, MR3 = 3.60%, MR9 = 3.60%, MR8 = 3.37%, MR5 = 2.33%, MR7 = 2.03%).

Results of 6 factors

Code
fitted <- fa(data_efa, 6)
plotly_efa(fitted)
Figure 5: Three Factors Result
Code
parameters::model_parameters(fitted, sort = TRUE, threshold = "max")
# Rotated loadings from Factor Analysis (oblimin-rotation)

Variable                        | MR4  | MR1  | MR2  | MR6  |  MR3  | MR5  | Complexity | Uniqueness
----------------------------------------------------------------------------------------------------
词汇学习.nc                     | 0.66 |      |      |      |       |      |    1.10    |    0.57   
社交达人.fntotal                | 0.62 |      |      |      |       |      |    1.14    |    0.59   
欢乐餐厅PRO.nc                  | 0.61 |      |      |      |       |      |    1.15    |    0.55   
宇宙黑洞A.nc                    | 0.55 |      |      |      |       |      |    1.29    |    0.58   
事件记忆.nc                     | 0.55 |      |      |      |       |      |    1.04    |    0.67   
万花筒.nc                       | 0.51 |      |      |      |       |      |    1.45    |    0.59   
城市导航.nc                     | 0.48 |      |      |      |       |      |    1.87    |    0.53   
过目不忘PRO.nc                  | 0.46 |      |      |      |       |      |    1.35    |    0.63   
人工语言-高级.nc                | 0.41 |      |      |      |       |      |    1.80    |    0.67   
井然有序.nc                     | 0.37 |      |      |      |       |      |    2.02    |    0.69   
视觉记忆测试.nc                 | 0.37 |      |      |      |       |      |    2.02    |    0.74   
路径学习.nc                     | 0.30 |      |      |      |       |      |    2.82    |    0.66   
幸运小球PRO.nc                  | 0.30 |      |      |      |       |      |    3.01    |    0.67   
魔术师终极.dprime               | 0.29 |      |      |      |       |      |    2.79    |    0.76   
连续再认PRO.dprime              | 0.27 |      |      |      |       |      |    3.15    |    0.73   
塔罗牌.nc                       | 0.25 |      |      |      |       |      |    3.80    |    0.69   
时长分辨.thresh_peak_valley     | 0.14 |      |      |      |       |      |    3.30    |    0.93   
图形折叠.nc                     |      | 0.73 |      |      |       |      |    1.07    |    0.50   
三维心理旋转测试A.nc            |      | 0.63 |      |      |       |      |    1.05    |    0.50   
图形推理.nc                     |      | 0.61 |      |      |       |      |    1.28    |    0.46   
平面展开.nc                     |      | 0.58 |      |      |       |      |    1.16    |    0.59   
物体旋转.nc                     |      | 0.57 |      |      |       |      |    1.46    |    0.49   
瑞文高级推理.nc_test            |      | 0.50 |      |      |       |      |    1.30    |    0.58   
视角判断.nc                     |      | 0.50 |      |      |       |      |    1.09    |    0.69   
数字推理.nc                     |      | 0.47 |      |      |       |      |    1.17    |    0.71   
文字推理.nc                     |      | 0.41 |      |      |       |      |    1.70    |    0.80   
登陆月球(中级).mean_log_err   |      | 0.33 |      |      |       |      |    1.71    |    0.75   
阅读判断.nc                     |      | 0.25 |      |      |       |      |    3.66    |    0.75   
远距离联想A.nc                  |      | 0.21 |      |      |       |      |    2.91    |    0.86   
雪花收藏家.nc_cor               |      | 0.21 |      |      |       |      |    3.37    |    0.75   
方向临摹.mean_log_err           |      | 0.17 |      |      |       |      |    2.57    |    0.90   
强化学习.pc_test                |      | 0.16 |      |      |       |      |    2.77    |    0.91   
注意警觉.alert_ies              |      | 0.12 |      |      |       |      |    2.85    |    0.95   
语义判断.nc                     |      |      | 0.67 |      |       |      |    1.14    |    0.48   
专注大师_中级.nc                |      |      | 0.61 |      |       |      |    1.15    |    0.62   
快速归类PRO.ies                 |      |      | 0.55 |      |       |      |    1.53    |    0.49   
词语判断.nc                     |      |      | 0.54 |      |       |      |    1.13    |    0.70   
声调判断.nc                     |      |      | 0.53 |      |       |      |    1.03    |    0.73   
速算师(中级).nc               |      |      | 0.53 |      |       |      |    1.89    |    0.58   
随机应变.switch_cost_ies        |      |      | 0.46 |      |       |      |    1.95    |    0.74   
察颜观色PRO.switch_cost_ies     |      |      | 0.45 |      |       |      |    1.77    |    0.78   
多变计数师.switch_cost_ies      |      |      | 0.41 |      |       |      |    1.95    |    0.78   
候鸟迁徙PRO.switch_cost_ies     |      |      | 0.38 |      |       |      |    2.31    |    0.83   
时间顺序判断.thresh_peak_valley |      |      | 0.36 |      |       |      |    1.91    |    0.71   
变色魔块PRO.ssrt                |      |      | 0.35 |      |       |      |    3.14    |    0.76   
一心二用PRO.nc                  |      |      | 0.35 |      |       |      |    2.73    |    0.66   
变戏法.nc                       |      |      | 0.34 |      |       |      |    2.01    |    0.72   
卡片分类PRO.switch_cost_ies     |      |      | 0.31 |      |       |      |    3.50    |    0.80   
火眼金睛.nc                     |      |      | 0.31 |      |       |      |    3.09    |    0.65   
我是大厨.score_total            |      |      | 0.28 |      |       |      |    2.83    |    0.75   
超级秒表PRO.mrt                 |      |      | 0.26 |      |       |      |    2.11    |    0.82   
舒尔特方格(中级).nc_cor       |      |      | 0.22 |      |       |      |    3.13    |    0.83   
美术卡片.dprime                 |      |      |      | 0.68 |       |      |    1.12    |    0.39   
数字卡片PRO.dprime              |      |      |      | 0.58 |       |      |    1.23    |    0.57   
文字卡片.dprime                 |      |      |      | 0.56 |       |      |    1.11    |    0.61   
格子卡片.dprime                 |      |      |      | 0.52 |       |      |    1.41    |    0.50   
方向检测.k                      |      |      |      | 0.33 |       |      |    2.56    |    0.67   
数感.w                          |      |      |      | 0.30 |       |      |    2.56    |    0.81   
候鸟迁徙PRO.cong_eff_ies        |      |      |      | 0.29 |       |      |    3.50    |    0.71   
色彩检测.k                      |      |      |      | 0.29 |       |      |    3.49    |    0.71   
捉虫高级简版.dprime             |      |      |      | 0.28 |       |      |    3.79    |    0.69   
位置记忆PRO.nc                  |      |      |      |      | 0.57  |      |    1.28    |    0.50   
蝴蝶照相机.nc                   |      |      |      |      | 0.48  |      |    2.05    |    0.48   
打靶场.nc                       |      |      |      |      | 0.44  |      |    2.04    |    0.57   
密码箱.nc                       |      |      |      |      | 0.40  |      |    1.93    |    0.63   
连点成画PRO.nc                  |      |      |      |      | 0.36  |      |    2.83    |    0.75   
顺背数PRO.nc                    |      |      |      |      | 0.35  |      |    2.37    |    0.77   
言语记忆A.tm_dprime             |      |      |      |      | -0.35 |      |    3.20    |    0.61   
按图索骥.mean_log_err_both      |      |      |      |      | 0.33  |      |    2.34    |    0.70   
图片记忆A.bps_score             |      |      |      |      | -0.29 |      |    3.58    |    0.65   
萤火虫PRO.nc                    |      |      |      |      | 0.25  |      |    2.97    |    0.78   
小狗回家.mean_score             |      |      |      |      | 0.23  |      |    3.80    |    0.80   
各得其所.prop_perfect           |      |      |      |      | 0.20  |      |    3.06    |    0.89   
注意警觉.cong_eff_ies           |      |      |      |      |       | 0.79 |    1.07    |    0.39   
注意指向.cong_eff_ies           |      |      |      |      |       | 0.73 |    1.02    |    0.49   
节奏感知.thresh_peak_valley     |      |      |      |      |       | 0.25 |    2.85    |    0.80   
太空飞船PRO.cong_eff_ies        |      |      |      |      |       | 0.24 |    3.04    |    0.89   
多彩文字PRO.cong_eff_ies        |      |      |      |      |       | 0.15 |    5.06    |    0.90   

The 6 latent factors (oblimin rotation) accounted for 31.86% of the total variance of the original data (MR4 = 6.93%, MR1 = 6.81%, MR2 = 5.96%, MR6 = 5.83%, MR3 = 3.86%, MR5 = 2.47%).

Additional Analysis

One might be interested which tasks will have the highest loading if we fit only one latent factor:

Code
model_one_fac <- fa(data_efa, 1)
model_one_fac$loadings |> 
  unclass() |> 
  as_tibble(rownames = "variable") |> 
  mutate(variable = fct_reorder(variable, MR1)) |>  
  ggplot(aes(variable, MR1)) +
  geom_col() +
  coord_flip() +
  theme_bw() +
  labs(y = "Loading") +
  theme(axis.title.y = element_blank())

Figure 6: Loadings on One Factor Model