Explore Cognitive Structure for Working Memory

structure
wm
Author

Liang Zhang

Published

May 9, 2022

Code
pivot_wider_indices <- function(data) {
  data |>
    add_count(user_id, game_name) |>
    mutate(
      game_index = if_else(
        n == 1,
        game_name,
        str_c(game_name, index_name, sep = "-")
      )
    ) |>
    pivot_wider(
      id_cols = user_id,
      names_from = game_index,
      values_from = test
    )
}
Code
targets::tar_load(users, store = here::here("preproc/_targets"))
ind_filt <- readxl::read_excel(here::here("config/indices_filtering.xlsx"))
dim_order <- c("attention", "multitask", "switching", "inhibition",
               "reasoning", "complex span", "working memory", "short term memory",
               "long term memory", "probability learning",
               "speeded IP", "strategic IP",
               "perception", "math", "language")
indices_clean <- targets::tar_read(indices_clean, store = here::here("preproc/_targets")) |>
  full_join(ind_filt, by = c("game_name", "index_name")) |>
  anti_join(
    filter(users, grade == "20220303级"),
    by = "user_id"
  ) |> 
  filter(
    !is.na(check_result) & check_result != "target-stash",
    !game_name %in% c("文字推理", "数字推理")
  ) |>
  arrange(factor(dimension, dim_order)) |>
  mutate(test = if_else(reversed, -test, test)) |>
  group_by(game_name, index_name) |>
  mutate(test = if_else(test %in% boxplot.stats(test)$out, NA_real_, test)) |>
  ungroup()
indices_memory <- indices_clean |>
  filter(
    dimension %in% c("complex span", "working memory", "short term memory"),
    !game_name %in% c("魔术师终极", "人工语言-中级", "欢乐餐厅", "过目不忘PRO", "连续再认")
  )

The include tasks:

Code
indices_memory |>
  pivot_wider_indices() |>
  select(-user_id) |>
  correlate(quiet = TRUE) |>
  rearrange(method = "HC") |>
  stretch() |>
  mutate(across(c(x, y), as_factor)) |>
  ggplot(aes(x, y)) +
  geom_tile(aes(fill = r)) +
  scico::scale_fill_scico(palette = "bam", midpoint = 0, direction = -1) +
  coord_fixed() +
  theme_minimal(base_size = 18) +
  labs(x = "", y = "", fill = "Pearson's", color = "") +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Default Index selection

All span tasks use mean_span_pcu index, and all n-back tasks use dprime index.

Code
indices_memory <- indices_clean |>
  filter(
    dimension %in% c("complex span", "working memory", "short term memory"),
    !game_name %in% c("魔术师终极", "人工语言-中级", "欢乐餐厅", "过目不忘PRO", "连续再认")
  )
indices_selected <- indices_memory |>
  filter(index_name %in% c("mean_span_pcu", "dprime")) |>
  pivot_wider_indices() |>
  select(-user_id)

Correlation Matrix

Code
correlate(indices_selected, quiet = TRUE) |> 
  rearrange(method = "HC") |>
  stretch() |> 
  mutate(across(c(x, y), as_factor)) |>
  ggplot(aes(x, y)) +
  geom_tile(aes(fill = r)) +
  scico::scale_fill_scico(palette = "bam", midpoint = 0, direction = -1) +
  coord_fixed() +
  theme_minimal(base_size = 18) +
  labs(x = "", y = "", fill = "Pearson's", color = "") +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Multidimensional Scaling

Code
mds <- indices_selected |> 
  cor(use = "pairwise") |> 
  smacof::sim2diss(to.dist = TRUE) |> 
  smacof::mds(ndim = 2, type = "mspline")
Registered S3 methods overwritten by 'proxy':
  method               from    
  print.registry_field registry
  print.registry_entry registry
Code
plot(mds)

Exploratory Factor Analysis

Traditional

Code
nfactors_test <- psych::nfactors(indices_selected)
Warning in fac(r = r, nfactors = nfactors, n.obs = n.obs, rotate = rotate, : An
ultra-Heywood case was detected. Examine the results carefully

  • Correlated latent factors
Code
fit <- psych::fa(indices_selected, 3)
Loading required namespace: GPArotation
Code
psych::fa.diagram(fit)

  • Bifactor model
Code
fit_bifac <- psych::omega(indices_selected, 3, plot = FALSE)
psych::omega.diagram(fit_bifac)

Bayesian Factor Analysis

Code
mcmc <- indices_selected |> 
  mutate(across(.fns = ~ scale(.)[, 1])) |> 
  befa(verbose = FALSE) |> 
  post.column.switch() |> 
  post.sign.switch()
Code
hppm <- summary(mcmc, what = "hppm")
hppm |> 
  pluck("alpha", "m1") |> 
  as_tibble(rownames = "alpha_term") |> 
  separate(alpha_term, c(NA, "game_index"), sep = ":") |> 
  mutate(game_index = reorder(game_index, dedic)) |> 
  ggplot(aes(game_index, dedic)) +
  geom_tile(aes(fill = mean)) +
  geom_text(aes(label = round(mean, 2)), color = "white") +
  scico::scale_fill_scico(palette = "bam", midpoint = 0, direction = -1) +
  coord_fixed() +
  theme_minimal(base_size = 18) +
  labs(x = "Term", y = "Factor", 
       title = str_c("Posterior Probability: ", round(hppm$hppm$prob, 2), 
                     ", with ", hppm$hppm$nfac, " factors")) +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Confirmatory Factor Analysis

Model from EFA

Firstly, the model from EFA is tested.

Spatial-object association test (宇宙黑洞) included

  1. Correlated latent factor model:
Code
fitted1 <- lavaan::cfa(
  'Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted1, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 15 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        36
                                                      
  Number of observations                           469
  Number of missing patterns                        55
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                115.266     114.149
  Degrees of freedom                                 41          41
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   1.010
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1347.235    1273.996
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.057

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.943       0.940
  Tucker-Lewis Index (TLI)                       0.923       0.920
                                                                  
  Robust Comparative Fit Index (CFI)                         0.943
  Robust Tucker-Lewis Index (TLI)                            0.923

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6185.158   -6185.158
  Scaling correction factor                                  1.041
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6127.525   -6127.525
  Scaling correction factor                                  1.024
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12442.315   12442.315
  Bayesian (BIC)                             12591.737   12591.737
  Sample-size adjusted Bayesian (BIC)        12477.480   12477.480

Root Mean Square Error of Approximation:

  RMSEA                                          0.062       0.062
  90 Percent confidence interval - lower         0.049       0.048
  90 Percent confidence interval - upper         0.076       0.075
  P-value RMSEA <= 0.05                          0.065       0.072
                                                                  
  Robust RMSEA                                               0.062
  90 Percent confidence interval - lower                     0.049
  90 Percent confidence interval - upper                     0.076

Standardized Root Mean Square Residual:

  SRMR                                           0.037       0.037
Code
fitted1_alt <- lavaan::cfa(
  'Updating1 =~ `美术卡片` + `数字卡片`
  Updating2 =~ `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1_alt, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted1_alt, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 20 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        39
                                                      
  Number of observations                           469
  Number of missing patterns                        55
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 64.777      63.925
  Degrees of freedom                                 38          38
  P-value (Chi-square)                            0.004       0.005
  Scaling correction factor                                   1.013
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1347.235    1273.996
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.057

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.979       0.979
  Tucker-Lewis Index (TLI)                       0.970       0.969
                                                                  
  Robust Comparative Fit Index (CFI)                         0.980
  Robust Tucker-Lewis Index (TLI)                            0.971

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6159.913   -6159.913
  Scaling correction factor                                  1.035
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6127.525   -6127.525
  Scaling correction factor                                  1.024
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12397.826   12397.826
  Bayesian (BIC)                             12559.700   12559.700
  Sample-size adjusted Bayesian (BIC)        12435.922   12435.922

Root Mean Square Error of Approximation:

  RMSEA                                          0.039       0.038
  90 Percent confidence interval - lower         0.022       0.021
  90 Percent confidence interval - upper         0.055       0.054
  P-value RMSEA <= 0.05                          0.872       0.886
                                                                  
  Robust RMSEA                                               0.038
  90 Percent confidence interval - lower                     0.021
  90 Percent confidence interval - upper                     0.054

Standardized Root Mean Square Residual:

  SRMR                                           0.031       0.031
Code
fitted1_alt2 <- lavaan::cfa(
  'Updating =~ Updating1 + Updating2
  Updating1 =~ `美术卡片` + `数字卡片`
  Updating2 =~ `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1_alt2, what = "std", edge.color = "black",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted1_alt2, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 32 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        38
                                                      
  Number of observations                           469
  Number of missing patterns                        55
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 64.918      64.130
  Degrees of freedom                                 39          39
  P-value (Chi-square)                            0.006       0.007
  Scaling correction factor                                   1.012
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1347.235    1273.996
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.057

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.980       0.979
  Tucker-Lewis Index (TLI)                       0.972       0.971
                                                                  
  Robust Comparative Fit Index (CFI)                         0.980
  Robust Tucker-Lewis Index (TLI)                            0.972

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6159.984   -6159.984
  Scaling correction factor                                  1.037
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6127.525   -6127.525
  Scaling correction factor                                  1.024
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12395.967   12395.967
  Bayesian (BIC)                             12553.690   12553.690
  Sample-size adjusted Bayesian (BIC)        12433.086   12433.086

Root Mean Square Error of Approximation:

  RMSEA                                          0.038       0.037
  90 Percent confidence interval - lower         0.020       0.020
  90 Percent confidence interval - upper         0.053       0.053
  P-value RMSEA <= 0.05                          0.897       0.908
                                                                  
  Robust RMSEA                                               0.037
  90 Percent confidence interval - lower                     0.020
  90 Percent confidence interval - upper                     0.053

Standardized Root Mean Square Residual:

  SRMR                                           0.031       0.031
  1. Bifactor model:
Code
fitted1_bifac <- lavaan::cfa(
  'Common =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片` + `幸运小球` + `密码箱` + `顺背数PRO` + `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`
  Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE, orthogonal = TRUE, 
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1_bifac, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0,
  bifactor = "Common"
)

Code
lavaan::summary(fitted1_bifac, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 45 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        44
                                                      
  Number of observations                           469
  Number of missing patterns                        55
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 68.845      74.976
  Degrees of freedom                                 33          33
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   0.918
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1347.235    1273.996
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.057

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.972       0.966
  Tucker-Lewis Index (TLI)                       0.954       0.943
                                                                  
  Robust Comparative Fit Index (CFI)                         0.970
  Robust Tucker-Lewis Index (TLI)                            0.950

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6161.947   -6161.947
  Scaling correction factor                                  1.104
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6127.525   -6127.525
  Scaling correction factor                                  1.024
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12411.894   12411.894
  Bayesian (BIC)                             12594.521   12594.521
  Sample-size adjusted Bayesian (BIC)        12454.873   12454.873

Root Mean Square Error of Approximation:

  RMSEA                                          0.048       0.052
  90 Percent confidence interval - lower         0.032       0.036
  90 Percent confidence interval - upper         0.064       0.068
  P-value RMSEA <= 0.05                          0.553       0.393
                                                                  
  Robust RMSEA                                               0.050
  90 Percent confidence interval - lower                     0.035
  90 Percent confidence interval - upper                     0.065

Standardized Root Mean Square Residual:

  SRMR                                           0.041       0.041
  1. Hierarchical model:
Code
fitted1_higher <- lavaan::cfa(
  'Common =~ Updating + VerbalSTM + SpatialSTM
  Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1_higher, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0,
  bifactor = "Common"
)

Code
lavaan::summary(fitted1_higher, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 35 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        36
                                                      
  Number of observations                           469
  Number of missing patterns                        55
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                115.266     114.149
  Degrees of freedom                                 41          41
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   1.010
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1347.235    1273.996
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.057

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.943       0.940
  Tucker-Lewis Index (TLI)                       0.923       0.920
                                                                  
  Robust Comparative Fit Index (CFI)                         0.943
  Robust Tucker-Lewis Index (TLI)                            0.923

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6185.158   -6185.158
  Scaling correction factor                                  1.041
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6127.525   -6127.525
  Scaling correction factor                                  1.024
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12442.315   12442.315
  Bayesian (BIC)                             12591.737   12591.737
  Sample-size adjusted Bayesian (BIC)        12477.480   12477.480

Root Mean Square Error of Approximation:

  RMSEA                                          0.062       0.062
  90 Percent confidence interval - lower         0.049       0.048
  90 Percent confidence interval - upper         0.076       0.075
  P-value RMSEA <= 0.05                          0.065       0.072
                                                                  
  Robust RMSEA                                               0.062
  90 Percent confidence interval - lower                     0.049
  90 Percent confidence interval - upper                     0.076

Standardized Root Mean Square Residual:

  SRMR                                           0.037       0.037

Spatial-object association test (宇宙黑洞) excluded

  1. Correlated latent factor model:
Code
fitted2 <- lavaan::cfa(
  'Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted2, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted2, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 15 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        33
                                                      
  Number of observations                           469
  Number of missing patterns                        50
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 97.634      97.382
  Degrees of freedom                                 32          32
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   1.003
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1251.825    1191.197
  Degrees of freedom                                45          45
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.051

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.946       0.943
  Tucker-Lewis Index (TLI)                       0.924       0.920
                                                                  
  Robust Comparative Fit Index (CFI)                         0.946
  Robust Tucker-Lewis Index (TLI)                            0.923

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -5595.957   -5595.957
  Scaling correction factor                                  1.030
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -5547.140   -5547.140
  Scaling correction factor                                  1.017
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               11257.914   11257.914
  Bayesian (BIC)                             11394.884   11394.884
  Sample-size adjusted Bayesian (BIC)        11290.148   11290.148

Root Mean Square Error of Approximation:

  RMSEA                                          0.066       0.066
  90 Percent confidence interval - lower         0.051       0.051
  90 Percent confidence interval - upper         0.081       0.081
  P-value RMSEA <= 0.05                          0.037       0.038
                                                                  
  Robust RMSEA                                               0.066
  90 Percent confidence interval - lower                     0.051
  90 Percent confidence interval - upper                     0.081

Standardized Root Mean Square Residual:

  SRMR                                           0.037       0.037
Code
fitted2_alt <- lavaan::cfa(
  'Updating1 =~ `美术卡片` + `数字卡片`
  Updating2 =~ `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1_alt, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted1_alt, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 20 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        39
                                                      
  Number of observations                           469
  Number of missing patterns                        55
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 64.777      63.925
  Degrees of freedom                                 38          38
  P-value (Chi-square)                            0.004       0.005
  Scaling correction factor                                   1.013
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1347.235    1273.996
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.057

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.979       0.979
  Tucker-Lewis Index (TLI)                       0.970       0.969
                                                                  
  Robust Comparative Fit Index (CFI)                         0.980
  Robust Tucker-Lewis Index (TLI)                            0.971

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6159.913   -6159.913
  Scaling correction factor                                  1.035
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6127.525   -6127.525
  Scaling correction factor                                  1.024
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12397.826   12397.826
  Bayesian (BIC)                             12559.700   12559.700
  Sample-size adjusted Bayesian (BIC)        12435.922   12435.922

Root Mean Square Error of Approximation:

  RMSEA                                          0.039       0.038
  90 Percent confidence interval - lower         0.022       0.021
  90 Percent confidence interval - upper         0.055       0.054
  P-value RMSEA <= 0.05                          0.872       0.886
                                                                  
  Robust RMSEA                                               0.038
  90 Percent confidence interval - lower                     0.021
  90 Percent confidence interval - upper                     0.054

Standardized Root Mean Square Residual:

  SRMR                                           0.031       0.031
Code
fitted2_alt2 <- lavaan::cfa(
  'Updating =~ Updating1 + Updating2
  Updating1 =~ `美术卡片` + `数字卡片`
  Updating2 =~ `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted2_alt2, what = "std", edge.color = "black",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted2_alt2, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 33 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        35
                                                      
  Number of observations                           469
  Number of missing patterns                        50
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 47.237      46.994
  Degrees of freedom                                 30          30
  P-value (Chi-square)                            0.024       0.025
  Scaling correction factor                                   1.005
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1251.825    1191.197
  Degrees of freedom                                45          45
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.051

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.986       0.985
  Tucker-Lewis Index (TLI)                       0.979       0.978
                                                                  
  Robust Comparative Fit Index (CFI)                         0.986
  Robust Tucker-Lewis Index (TLI)                            0.979

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -5570.758   -5570.758
  Scaling correction factor                                  1.027
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -5547.140   -5547.140
  Scaling correction factor                                  1.017
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               11211.517   11211.517
  Bayesian (BIC)                             11356.788   11356.788
  Sample-size adjusted Bayesian (BIC)        11245.705   11245.705

Root Mean Square Error of Approximation:

  RMSEA                                          0.035       0.035
  90 Percent confidence interval - lower         0.013       0.013
  90 Percent confidence interval - upper         0.053       0.053
  P-value RMSEA <= 0.05                          0.906       0.911
                                                                  
  Robust RMSEA                                               0.035
  90 Percent confidence interval - lower                     0.013
  90 Percent confidence interval - upper                     0.053

Standardized Root Mean Square Residual:

  SRMR                                           0.029       0.029
  1. Bifactor model:
Code
fitted2_bifac <- lavaan::cfa(
  'Common =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片` + `幸运小球` + `密码箱` + `顺背数PRO` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`
  Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE, orthogonal = TRUE, 
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted2_bifac, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0,
  bifactor = "Common"
)

Code
lavaan::summary(fitted2_bifac, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 45 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        40
                                                      
  Number of observations                           469
  Number of missing patterns                        50
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 53.281      61.852
  Degrees of freedom                                 25          25
  P-value (Chi-square)                            0.001       0.000
  Scaling correction factor                                   0.861
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1251.825    1191.197
  Degrees of freedom                                45          45
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.051

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.977       0.968
  Tucker-Lewis Index (TLI)                       0.958       0.942
                                                                  
  Robust Comparative Fit Index (CFI)                         0.974
  Robust Tucker-Lewis Index (TLI)                            0.953

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -5573.780   -5573.780
  Scaling correction factor                                  1.114
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -5547.140   -5547.140
  Scaling correction factor                                  1.017
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               11227.561   11227.561
  Bayesian (BIC)                             11393.585   11393.585
  Sample-size adjusted Bayesian (BIC)        11266.633   11266.633

Root Mean Square Error of Approximation:

  RMSEA                                          0.049       0.056
  90 Percent confidence interval - lower         0.031       0.037
  90 Percent confidence interval - upper         0.067       0.075
  P-value RMSEA <= 0.05                          0.504       0.276
                                                                  
  Robust RMSEA                                               0.052
  90 Percent confidence interval - lower                     0.036
  90 Percent confidence interval - upper                     0.069

Standardized Root Mean Square Residual:

  SRMR                                           0.040       0.040
  1. Hierarchical Model:
Code
fitted2_higher <- lavaan::cfa(
  'Common =~ Updating + VerbalSTM + SpatialSTM
  Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted2_higher, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0,
  bifactor = "Common"
)

Code
lavaan::summary(fitted2_higher, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 34 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        33
                                                      
  Number of observations                           469
  Number of missing patterns                        50
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 97.634      97.382
  Degrees of freedom                                 32          32
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   1.003
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1251.825    1191.197
  Degrees of freedom                                45          45
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.051

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.946       0.943
  Tucker-Lewis Index (TLI)                       0.924       0.920
                                                                  
  Robust Comparative Fit Index (CFI)                         0.946
  Robust Tucker-Lewis Index (TLI)                            0.923

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -5595.957   -5595.957
  Scaling correction factor                                  1.030
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -5547.140   -5547.140
  Scaling correction factor                                  1.017
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               11257.914   11257.914
  Bayesian (BIC)                             11394.884   11394.884
  Sample-size adjusted Bayesian (BIC)        11290.148   11290.148

Root Mean Square Error of Approximation:

  RMSEA                                          0.066       0.066
  90 Percent confidence interval - lower         0.051       0.051
  90 Percent confidence interval - upper         0.081       0.081
  P-value RMSEA <= 0.05                          0.037       0.038
                                                                  
  Robust RMSEA                                               0.066
  90 Percent confidence interval - lower                     0.051
  90 Percent confidence interval - upper                     0.081

Standardized Root Mean Square Residual:

  SRMR                                           0.037       0.037

Task Structure Model

The covariance estimate for latent variables is not correct. The estimated correlation between “Simple” and “Complex” is larger than 1.

Code
fitted3 <- lavaan::cfa(
  'Complex =~ `打靶场` + `蝴蝶照相机` + `幸运小球`
  Nback =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  Simple =~ `密码箱` + `顺背数PRO` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE, 
  estimator = "MLR", missing = "ml"
)
Warning in lav_object_post_check(object): lavaan WARNING: covariance matrix of latent variables
                is not positive definite;
                use lavInspect(fit, "cov.lv") to investigate.
Code
semPlot::semPaths(
  fitted3, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted3, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 17 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        33
                                                      
  Number of observations                           469
  Number of missing patterns                        50
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                171.820     173.236
  Degrees of freedom                                 32          32
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   0.992
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1251.825    1191.197
  Degrees of freedom                                45          45
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.051

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.884       0.877
  Tucker-Lewis Index (TLI)                       0.837       0.827
                                                                  
  Robust Comparative Fit Index (CFI)                         0.884
  Robust Tucker-Lewis Index (TLI)                            0.836

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -5633.050   -5633.050
  Scaling correction factor                                  1.041
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -5547.140   -5547.140
  Scaling correction factor                                  1.017
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               11332.100   11332.100
  Bayesian (BIC)                             11469.070   11469.070
  Sample-size adjusted Bayesian (BIC)        11364.335   11364.335

Root Mean Square Error of Approximation:

  RMSEA                                          0.097       0.097
  90 Percent confidence interval - lower         0.083       0.083
  90 Percent confidence interval - upper         0.111       0.111
  P-value RMSEA <= 0.05                          0.000       0.000
                                                                  
  Robust RMSEA                                               0.097
  90 Percent confidence interval - lower                     0.083
  90 Percent confidence interval - upper                     0.111

Standardized Root Mean Square Residual:

  SRMR                                           0.054       0.054

Input Material Model

Not fitted well.

Code
fitted4 <- lavaan::cfa(
  'Verbal =~ 数字卡片 + 文字卡片 + 幸运小球 + 密码箱 + 顺背数PRO
  Spatial =~ 格子卡片 + 打靶场 + 蝴蝶照相机 + 位置记忆PRO
  Object =~ 美术卡片 + 宇宙黑洞',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted4, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted4, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 19 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        36
                                                      
  Number of observations                           469
  Number of missing patterns                        55
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                286.789     289.021
  Degrees of freedom                                 41          41
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   0.992
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1347.235    1273.996
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.057

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.810       0.797
  Tucker-Lewis Index (TLI)                       0.745       0.727
                                                                  
  Robust Comparative Fit Index (CFI)                         0.809
  Robust Tucker-Lewis Index (TLI)                            0.744

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6270.919   -6270.919
  Scaling correction factor                                  1.061
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6127.525   -6127.525
  Scaling correction factor                                  1.024
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12613.838   12613.838
  Bayesian (BIC)                             12763.259   12763.259
  Sample-size adjusted Bayesian (BIC)        12649.003   12649.003

Root Mean Square Error of Approximation:

  RMSEA                                          0.113       0.114
  90 Percent confidence interval - lower         0.101       0.101
  90 Percent confidence interval - upper         0.126       0.126
  P-value RMSEA <= 0.05                          0.000       0.000
                                                                  
  Robust RMSEA                                               0.113
  90 Percent confidence interval - lower                     0.101
  90 Percent confidence interval - upper                     0.126

Standardized Root Mean Square Residual:

  SRMR                                           0.066       0.066

Mix N back indices

All span tasks use mean_span_pcu index, but n-back tasks use mixed dprime and pc index.

  • 美术卡片、数字卡片:dprime
  • 文字卡片、格子卡片:pc
Code
indices_selected <- indices_memory |>
  filter(index_name == "mean_span_pcu" |
           (game_name %in% c("美术卡片", "格子卡片") & index_name == "dprime") |
           (game_name %in% c("文字卡片", "数字卡片") & index_name == "pc")) |>
  pivot_wider_indices() |>
  select(-user_id)

Correlation Matrix

Code
correlate(indices_selected, quiet = TRUE) |> 
  rearrange(method = "HC") |>
  stretch() |> 
  mutate(across(c(x, y), as_factor)) |>
  ggplot(aes(x, y)) +
  geom_tile(aes(fill = r)) +
  scico::scale_fill_scico(palette = "bam", midpoint = 0, direction = -1) +
  coord_fixed() +
  theme_minimal(base_size = 18) +
  labs(x = "", y = "", fill = "Pearson's", color = "") +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Multidimensional Scaling

Code
mds <- indices_selected |> 
  cor(use = "pairwise") |> 
  smacof::sim2diss(to.dist = TRUE) |> 
  smacof::mds(ndim = 2, type = "mspline")
plot(mds)

Exploratory Factor Analysis

Traditional

Code
nfactors_test <- psych::nfactors(indices_selected)

  • Correlated latent factors
Code
fit <- psych::fa(indices_selected, 3)
psych::fa.diagram(fit)

  • Bifactor model
Code
fit_bifac <- psych::omega(indices_selected, 3, plot = FALSE)
psych::omega.diagram(fit_bifac)

Bayesian Factor Analysis

Code
mcmc <- indices_selected |> 
  mutate(across(.fns = ~ scale(.)[, 1])) |> 
  befa(verbose = FALSE) |> 
  post.column.switch() |> 
  post.sign.switch()
Code
hppm <- summary(mcmc, what = "hppm")
hppm |> 
  pluck("alpha", "m1") |> 
  as_tibble(rownames = "alpha_term") |> 
  separate(alpha_term, c(NA, "game_index"), sep = ":") |> 
  mutate(game_index = reorder(game_index, dedic)) |> 
  ggplot(aes(game_index, dedic)) +
  geom_tile(aes(fill = mean)) +
  geom_text(aes(label = round(mean, 2)), color = "white") +
  scico::scale_fill_scico(palette = "bam", midpoint = 0, direction = -1) +
  coord_fixed() +
  theme_minimal(base_size = 18) +
  labs(x = "Term", y = "Factor", 
       title = str_c("Posterior Probability: ", round(hppm$hppm$prob, 2), 
                     ", with ", hppm$hppm$nfac, " factors")) +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Confirmatory Factor Analysis

Model from EFA

Firstly, the model from EFA is tested.

Spatial-object association test (宇宙黑洞) included

  1. Correlated latent factor model:
Code
fitted1 <- lavaan::cfa(
  'Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted1, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 16 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        36
                                                      
  Number of observations                           469
  Number of missing patterns                        47
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                117.168     115.187
  Degrees of freedom                                 41          41
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   1.017
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1397.256    1319.621
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.059

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.943       0.941
  Tucker-Lewis Index (TLI)                       0.924       0.921
                                                                  
  Robust Comparative Fit Index (CFI)                         0.944
  Robust Tucker-Lewis Index (TLI)                            0.924

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6192.315   -6192.315
  Scaling correction factor                                  1.024
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6133.731   -6133.731
  Scaling correction factor                                  1.020
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12456.630   12456.630
  Bayesian (BIC)                             12606.051   12606.051
  Sample-size adjusted Bayesian (BIC)        12491.794   12491.794

Root Mean Square Error of Approximation:

  RMSEA                                          0.063       0.062
  90 Percent confidence interval - lower         0.050       0.049
  90 Percent confidence interval - upper         0.076       0.076
  P-value RMSEA <= 0.05                          0.053       0.064
                                                                  
  Robust RMSEA                                               0.063
  90 Percent confidence interval - lower                     0.049
  90 Percent confidence interval - upper                     0.076

Standardized Root Mean Square Residual:

  SRMR                                           0.036       0.036
Code
fitted1_alt <- lavaan::cfa(
  'Updating1 =~ `美术卡片` + `数字卡片`
  Updating2 =~ `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1_alt, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted1_alt, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 20 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        39
                                                      
  Number of observations                           469
  Number of missing patterns                        47
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 65.040      63.632
  Degrees of freedom                                 38          38
  P-value (Chi-square)                            0.004       0.006
  Scaling correction factor                                   1.022
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1397.256    1319.621
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.059

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.980       0.980
  Tucker-Lewis Index (TLI)                       0.971       0.971
                                                                  
  Robust Comparative Fit Index (CFI)                         0.980
  Robust Tucker-Lewis Index (TLI)                            0.972

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6166.251   -6166.251
  Scaling correction factor                                  1.019
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6133.731   -6133.731
  Scaling correction factor                                  1.020
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12410.501   12410.501
  Bayesian (BIC)                             12572.375   12572.375
  Sample-size adjusted Bayesian (BIC)        12448.597   12448.597

Root Mean Square Error of Approximation:

  RMSEA                                          0.039       0.038
  90 Percent confidence interval - lower         0.022       0.021
  90 Percent confidence interval - upper         0.055       0.054
  P-value RMSEA <= 0.05                          0.868       0.891
                                                                  
  Robust RMSEA                                               0.038
  90 Percent confidence interval - lower                     0.021
  90 Percent confidence interval - upper                     0.054

Standardized Root Mean Square Residual:

  SRMR                                           0.030       0.030
Code
fitted1_alt2 <- lavaan::cfa(
  'Updating =~ Updating1 + Updating2
  Updating1 =~ `美术卡片` + `数字卡片`
  Updating2 =~ `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1_alt2, what = "std", edge.color = "black",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted1_alt2, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 33 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        38
                                                      
  Number of observations                           469
  Number of missing patterns                        47
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 65.067      63.695
  Degrees of freedom                                 39          39
  P-value (Chi-square)                            0.005       0.008
  Scaling correction factor                                   1.022
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1397.256    1319.621
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.059

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.981       0.980
  Tucker-Lewis Index (TLI)                       0.973       0.972
                                                                  
  Robust Comparative Fit Index (CFI)                         0.981
  Robust Tucker-Lewis Index (TLI)                            0.973

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6166.264   -6166.264
  Scaling correction factor                                  1.019
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6133.731   -6133.731
  Scaling correction factor                                  1.020
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12408.528   12408.528
  Bayesian (BIC)                             12566.251   12566.251
  Sample-size adjusted Bayesian (BIC)        12445.647   12445.647

Root Mean Square Error of Approximation:

  RMSEA                                          0.038       0.037
  90 Percent confidence interval - lower         0.021       0.019
  90 Percent confidence interval - upper         0.053       0.052
  P-value RMSEA <= 0.05                          0.895       0.915
                                                                  
  Robust RMSEA                                               0.037
  90 Percent confidence interval - lower                     0.019
  90 Percent confidence interval - upper                     0.053

Standardized Root Mean Square Residual:

  SRMR                                           0.030       0.030
  1. Bifactor model:
Code
fitted1_bifac <- lavaan::cfa(
  'Common =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片` + `幸运小球` + `密码箱` + `顺背数PRO` + `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`
  Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE, orthogonal = TRUE, 
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1_bifac, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0,
  bifactor = "Common"
)

Code
lavaan::summary(fitted1_bifac, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 47 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        44
                                                      
  Number of observations                           469
  Number of missing patterns                        47
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 72.027      77.580
  Degrees of freedom                                 33          33
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   0.928
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1397.256    1319.621
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.059

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.971       0.965
  Tucker-Lewis Index (TLI)                       0.952       0.941
                                                                  
  Robust Comparative Fit Index (CFI)                         0.969
  Robust Tucker-Lewis Index (TLI)                            0.948

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6169.744   -6169.744
  Scaling correction factor                                  1.089
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6133.731   -6133.731
  Scaling correction factor                                  1.020
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12427.488   12427.488
  Bayesian (BIC)                             12610.115   12610.115
  Sample-size adjusted Bayesian (BIC)        12470.467   12470.467

Root Mean Square Error of Approximation:

  RMSEA                                          0.050       0.054
  90 Percent confidence interval - lower         0.034       0.038
  90 Percent confidence interval - upper         0.066       0.070
  P-value RMSEA <= 0.05                          0.467       0.332
                                                                  
  Robust RMSEA                                               0.052
  90 Percent confidence interval - lower                     0.037
  90 Percent confidence interval - upper                     0.067

Standardized Root Mean Square Residual:

  SRMR                                           0.042       0.042
  1. Hierarchical model:
Code
fitted1_higher <- lavaan::cfa(
  'Common =~ Updating + VerbalSTM + SpatialSTM
  Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1_higher, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0,
  bifactor = "Common"
)

Code
lavaan::summary(fitted1_higher, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 34 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        36
                                                      
  Number of observations                           469
  Number of missing patterns                        47
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                117.168     115.187
  Degrees of freedom                                 41          41
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   1.017
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1397.256    1319.621
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.059

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.943       0.941
  Tucker-Lewis Index (TLI)                       0.924       0.921
                                                                  
  Robust Comparative Fit Index (CFI)                         0.944
  Robust Tucker-Lewis Index (TLI)                            0.924

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6192.315   -6192.315
  Scaling correction factor                                  1.024
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6133.731   -6133.731
  Scaling correction factor                                  1.020
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12456.630   12456.630
  Bayesian (BIC)                             12606.051   12606.051
  Sample-size adjusted Bayesian (BIC)        12491.794   12491.794

Root Mean Square Error of Approximation:

  RMSEA                                          0.063       0.062
  90 Percent confidence interval - lower         0.050       0.049
  90 Percent confidence interval - upper         0.076       0.076
  P-value RMSEA <= 0.05                          0.053       0.064
                                                                  
  Robust RMSEA                                               0.063
  90 Percent confidence interval - lower                     0.049
  90 Percent confidence interval - upper                     0.076

Standardized Root Mean Square Residual:

  SRMR                                           0.036       0.036

Spatial-object association test (宇宙黑洞) excluded

  1. Correlated latent factor model:
Code
fitted2 <- lavaan::cfa(
  'Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted2, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted2, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 17 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        33
                                                      
  Number of observations                           469
  Number of missing patterns                        43
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 99.969      98.539
  Degrees of freedom                                 32          32
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   1.015
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1301.556    1234.105
  Degrees of freedom                                45          45
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.055

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.946       0.944
  Tucker-Lewis Index (TLI)                       0.924       0.921
                                                                  
  Robust Comparative Fit Index (CFI)                         0.946
  Robust Tucker-Lewis Index (TLI)                            0.924

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -5603.476   -5603.476
  Scaling correction factor                                  1.013
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -5553.491   -5553.491
  Scaling correction factor                                  1.014
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               11272.952   11272.952
  Bayesian (BIC)                             11409.921   11409.921
  Sample-size adjusted Bayesian (BIC)        11305.186   11305.186

Root Mean Square Error of Approximation:

  RMSEA                                          0.067       0.067
  90 Percent confidence interval - lower         0.053       0.052
  90 Percent confidence interval - upper         0.082       0.082
  P-value RMSEA <= 0.05                          0.027       0.032
                                                                  
  Robust RMSEA                                               0.067
  90 Percent confidence interval - lower                     0.052
  90 Percent confidence interval - upper                     0.082

Standardized Root Mean Square Residual:

  SRMR                                           0.036       0.036
Code
fitted2_alt <- lavaan::cfa(
  'Updating1 =~ `美术卡片` + `数字卡片`
  Updating2 =~ `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1_alt, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted1_alt, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 20 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        39
                                                      
  Number of observations                           469
  Number of missing patterns                        47
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 65.040      63.632
  Degrees of freedom                                 38          38
  P-value (Chi-square)                            0.004       0.006
  Scaling correction factor                                   1.022
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1397.256    1319.621
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.059

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.980       0.980
  Tucker-Lewis Index (TLI)                       0.971       0.971
                                                                  
  Robust Comparative Fit Index (CFI)                         0.980
  Robust Tucker-Lewis Index (TLI)                            0.972

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6166.251   -6166.251
  Scaling correction factor                                  1.019
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6133.731   -6133.731
  Scaling correction factor                                  1.020
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12410.501   12410.501
  Bayesian (BIC)                             12572.375   12572.375
  Sample-size adjusted Bayesian (BIC)        12448.597   12448.597

Root Mean Square Error of Approximation:

  RMSEA                                          0.039       0.038
  90 Percent confidence interval - lower         0.022       0.021
  90 Percent confidence interval - upper         0.055       0.054
  P-value RMSEA <= 0.05                          0.868       0.891
                                                                  
  Robust RMSEA                                               0.038
  90 Percent confidence interval - lower                     0.021
  90 Percent confidence interval - upper                     0.054

Standardized Root Mean Square Residual:

  SRMR                                           0.030       0.030
Code
fitted2_alt2 <- lavaan::cfa(
  'Updating =~ Updating1 + Updating2
  Updating1 =~ `美术卡片` + `数字卡片`
  Updating2 =~ `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted2_alt2, what = "std", edge.color = "black",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted2_alt2, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 34 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        35
                                                      
  Number of observations                           469
  Number of missing patterns                        43
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 47.868      46.942
  Degrees of freedom                                 30          30
  P-value (Chi-square)                            0.020       0.025
  Scaling correction factor                                   1.020
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1301.556    1234.105
  Degrees of freedom                                45          45
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.055

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.986       0.986
  Tucker-Lewis Index (TLI)                       0.979       0.979
                                                                  
  Robust Comparative Fit Index (CFI)                         0.986
  Robust Tucker-Lewis Index (TLI)                            0.979

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -5577.425   -5577.425
  Scaling correction factor                                  1.009
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -5553.491   -5553.491
  Scaling correction factor                                  1.014
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               11224.851   11224.851
  Bayesian (BIC)                             11370.122   11370.122
  Sample-size adjusted Bayesian (BIC)        11259.039   11259.039

Root Mean Square Error of Approximation:

  RMSEA                                          0.036       0.035
  90 Percent confidence interval - lower         0.014       0.013
  90 Percent confidence interval - upper         0.054       0.053
  P-value RMSEA <= 0.05                          0.897       0.913
                                                                  
  Robust RMSEA                                               0.035
  90 Percent confidence interval - lower                     0.013
  90 Percent confidence interval - upper                     0.054

Standardized Root Mean Square Residual:

  SRMR                                           0.029       0.029
  1. Bifactor model:
Code
fitted2_bifac <- lavaan::cfa(
  'Common =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片` + `幸运小球` + `密码箱` + `顺背数PRO` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`
  Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE, orthogonal = TRUE, 
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted2_bifac, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0,
  bifactor = "Common"
)

Code
lavaan::summary(fitted2_bifac, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 49 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        40
                                                      
  Number of observations                           469
  Number of missing patterns                        43
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 57.251      80.402
  Degrees of freedom                                 25          25
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   0.712
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1301.556    1234.105
  Degrees of freedom                                45          45
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.055

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.974       0.953
  Tucker-Lewis Index (TLI)                       0.954       0.916
                                                                  
  Robust Comparative Fit Index (CFI)                         0.969
  Robust Tucker-Lewis Index (TLI)                            0.943

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -5582.117   -5582.117
  Scaling correction factor                                  1.202
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -5553.491   -5553.491
  Scaling correction factor                                  1.014
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               11244.234   11244.234
  Bayesian (BIC)                             11410.258   11410.258
  Sample-size adjusted Bayesian (BIC)        11283.306   11283.306

Root Mean Square Error of Approximation:

  RMSEA                                          0.052       0.069
  90 Percent confidence interval - lower         0.035       0.049
  90 Percent confidence interval - upper         0.070       0.089
  P-value RMSEA <= 0.05                          0.385       0.056
                                                                  
  Robust RMSEA                                               0.058
  90 Percent confidence interval - lower                     0.044
  90 Percent confidence interval - upper                     0.072

Standardized Root Mean Square Residual:

  SRMR                                           0.042       0.042
  1. Hierarchical Model:
Code
fitted2_higher <- lavaan::cfa(
  'Common =~ Updating + VerbalSTM + SpatialSTM
  Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted2_higher, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0,
  bifactor = "Common"
)

Code
lavaan::summary(fitted2_higher, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 33 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        33
                                                      
  Number of observations                           469
  Number of missing patterns                        43
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 99.969      98.539
  Degrees of freedom                                 32          32
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   1.015
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1301.556    1234.105
  Degrees of freedom                                45          45
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.055

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.946       0.944
  Tucker-Lewis Index (TLI)                       0.924       0.921
                                                                  
  Robust Comparative Fit Index (CFI)                         0.946
  Robust Tucker-Lewis Index (TLI)                            0.924

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -5603.476   -5603.476
  Scaling correction factor                                  1.013
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -5553.491   -5553.491
  Scaling correction factor                                  1.014
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               11272.952   11272.952
  Bayesian (BIC)                             11409.921   11409.921
  Sample-size adjusted Bayesian (BIC)        11305.186   11305.186

Root Mean Square Error of Approximation:

  RMSEA                                          0.067       0.067
  90 Percent confidence interval - lower         0.053       0.052
  90 Percent confidence interval - upper         0.082       0.082
  P-value RMSEA <= 0.05                          0.027       0.032
                                                                  
  Robust RMSEA                                               0.067
  90 Percent confidence interval - lower                     0.052
  90 Percent confidence interval - upper                     0.082

Standardized Root Mean Square Residual:

  SRMR                                           0.036       0.036

Task Structure Model

The covariance estimate for latent variables is not correct. The estimated correlation between “Simple” and “Complex” is larger than 1.

Code
fitted3 <- lavaan::cfa(
  'Complex =~ `打靶场` + `蝴蝶照相机` + `幸运小球`
  Nback =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  Simple =~ `密码箱` + `顺背数PRO` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE, 
  estimator = "MLR", missing = "ml"
)
Warning in lav_object_post_check(object): lavaan WARNING: covariance matrix of latent variables
                is not positive definite;
                use lavInspect(fit, "cov.lv") to investigate.
Code
semPlot::semPaths(
  fitted3, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted3, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 17 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        33
                                                      
  Number of observations                           469
  Number of missing patterns                        43
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                173.487     172.308
  Degrees of freedom                                 32          32
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   1.007
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1301.556    1234.105
  Degrees of freedom                                45          45
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.055

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.887       0.882
  Tucker-Lewis Index (TLI)                       0.842       0.834
                                                                  
  Robust Comparative Fit Index (CFI)                         0.887
  Robust Tucker-Lewis Index (TLI)                            0.842

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -5640.235   -5640.235
  Scaling correction factor                                  1.020
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -5553.491   -5553.491
  Scaling correction factor                                  1.014
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               11346.470   11346.470
  Bayesian (BIC)                             11483.440   11483.440
  Sample-size adjusted Bayesian (BIC)        11378.704   11378.704

Root Mean Square Error of Approximation:

  RMSEA                                          0.097       0.097
  90 Percent confidence interval - lower         0.083       0.083
  90 Percent confidence interval - upper         0.112       0.111
  P-value RMSEA <= 0.05                          0.000       0.000
                                                                  
  Robust RMSEA                                               0.097
  90 Percent confidence interval - lower                     0.083
  90 Percent confidence interval - upper                     0.111

Standardized Root Mean Square Residual:

  SRMR                                           0.053       0.053

Input Material Model

Not fitted well.

Code
fitted4 <- lavaan::cfa(
  'Verbal =~ 数字卡片 + 文字卡片 + 幸运小球 + 密码箱 + 顺背数PRO
  Spatial =~ 格子卡片 + 打靶场 + 蝴蝶照相机 + 位置记忆PRO
  Object =~ 美术卡片 + 宇宙黑洞',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
Warning in lav_object_post_check(object): lavaan WARNING: covariance matrix of latent variables
                is not positive definite;
                use lavInspect(fit, "cov.lv") to investigate.
Code
semPlot::semPaths(
  fitted4, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted4, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 20 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        36
                                                      
  Number of observations                           469
  Number of missing patterns                        47
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                296.008     298.012
  Degrees of freedom                                 41          41
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   0.993
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1397.256    1319.621
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.059

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.810       0.797
  Tucker-Lewis Index (TLI)                       0.745       0.727
                                                                  
  Robust Comparative Fit Index (CFI)                         0.809
  Robust Tucker-Lewis Index (TLI)                            0.744

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6281.735   -6281.735
  Scaling correction factor                                  1.051
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6133.731   -6133.731
  Scaling correction factor                                  1.020
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12635.470   12635.470
  Bayesian (BIC)                             12784.891   12784.891
  Sample-size adjusted Bayesian (BIC)        12670.634   12670.634

Root Mean Square Error of Approximation:

  RMSEA                                          0.115       0.116
  90 Percent confidence interval - lower         0.103       0.103
  90 Percent confidence interval - upper         0.128       0.128
  P-value RMSEA <= 0.05                          0.000       0.000
                                                                  
  Robust RMSEA                                               0.115
  90 Percent confidence interval - lower                     0.103
  90 Percent confidence interval - upper                     0.128

Standardized Root Mean Square Residual:

  SRMR                                           0.068       0.068

N back all pc index

All span tasks use mean_span_pcu index, but n-back tasks all use pc index.

Code
indices_selected <- indices_memory |>
  filter(index_name %in% c("mean_span_pcu", "pc")) |>
  pivot_wider_indices() |>
  select(-user_id)

Correlation Matrix

Code
correlate(indices_selected, quiet = TRUE) |> 
  rearrange(method = "HC") |>
  stretch() |> 
  mutate(across(c(x, y), as_factor)) |>
  ggplot(aes(x, y)) +
  geom_tile(aes(fill = r)) +
  scico::scale_fill_scico(palette = "bam", midpoint = 0, direction = -1) +
  coord_fixed() +
  theme_minimal(base_size = 18) +
  labs(x = "", y = "", fill = "Pearson's", color = "") +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Multidimensional Scaling

Code
mds <- indices_selected |> 
  cor(use = "pairwise") |> 
  smacof::sim2diss(to.dist = TRUE) |> 
  smacof::mds(ndim = 2, type = "mspline")
plot(mds)

Exploratory Factor Analysis

Traditional

Code
nfactors_test <- psych::nfactors(indices_selected)

  • Correlated latent factors
Code
fit <- psych::fa(indices_selected, 3)
psych::fa.diagram(fit)

  • Bifactor model
Code
fit_bifac <- psych::omega(indices_selected, 3, plot = FALSE)
psych::omega.diagram(fit_bifac)

Bayesian Factor Analysis

Code
mcmc <- indices_selected |> 
  mutate(across(.fns = ~ scale(.)[, 1])) |> 
  befa(verbose = FALSE) |> 
  post.column.switch() |> 
  post.sign.switch()
Code
hppm <- summary(mcmc, what = "hppm")
hppm |> 
  pluck("alpha", "m1") |> 
  as_tibble(rownames = "alpha_term") |> 
  separate(alpha_term, c(NA, "game_index"), sep = ":") |> 
  mutate(game_index = reorder(game_index, dedic)) |> 
  ggplot(aes(game_index, dedic)) +
  geom_tile(aes(fill = mean)) +
  geom_text(aes(label = round(mean, 2)), color = "white") +
  scico::scale_fill_scico(palette = "bam", midpoint = 0, direction = -1) +
  coord_fixed() +
  theme_minimal(base_size = 18) +
  labs(x = "Term", y = "Factor", 
       title = str_c("Posterior Probability: ", round(hppm$hppm$prob, 2), 
                     ", with ", hppm$hppm$nfac, " factors")) +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Confirmatory Factor Analysis

Model from EFA

Firstly, the model from EFA is tested.

Spatial-object association test (宇宙黑洞) included

  1. Correlated latent factor model:
Code
fitted1 <- lavaan::cfa(
  'Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted1, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 18 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        36
                                                      
  Number of observations                           469
  Number of missing patterns                        45
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                119.456     116.993
  Degrees of freedom                                 41          41
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   1.021
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1417.507    1333.075
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.063

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.942       0.941
  Tucker-Lewis Index (TLI)                       0.923       0.920
                                                                  
  Robust Comparative Fit Index (CFI)                         0.943
  Robust Tucker-Lewis Index (TLI)                            0.923

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6197.522   -6197.522
  Scaling correction factor                                  1.025
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6137.794   -6137.794
  Scaling correction factor                                  1.023
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12467.044   12467.044
  Bayesian (BIC)                             12616.466   12616.466
  Sample-size adjusted Bayesian (BIC)        12502.209   12502.209

Root Mean Square Error of Approximation:

  RMSEA                                          0.064       0.063
  90 Percent confidence interval - lower         0.051       0.050
  90 Percent confidence interval - upper         0.077       0.076
  P-value RMSEA <= 0.05                          0.042       0.053
                                                                  
  Robust RMSEA                                               0.064
  90 Percent confidence interval - lower                     0.050
  90 Percent confidence interval - upper                     0.077

Standardized Root Mean Square Residual:

  SRMR                                           0.037       0.037
Code
fitted1_alt <- lavaan::cfa(
  'Updating1 =~ `美术卡片` + `数字卡片`
  Updating2 =~ `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1_alt, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted1_alt, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 21 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        39
                                                      
  Number of observations                           469
  Number of missing patterns                        45
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 67.870      66.281
  Degrees of freedom                                 38          38
  P-value (Chi-square)                            0.002       0.003
  Scaling correction factor                                   1.024
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1417.507    1333.075
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.063

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.978       0.978
  Tucker-Lewis Index (TLI)                       0.968       0.968
                                                                  
  Robust Comparative Fit Index (CFI)                         0.979
  Robust Tucker-Lewis Index (TLI)                            0.969

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6171.729   -6171.729
  Scaling correction factor                                  1.021
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6137.794   -6137.794
  Scaling correction factor                                  1.023
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12421.459   12421.459
  Bayesian (BIC)                             12583.332   12583.332
  Sample-size adjusted Bayesian (BIC)        12459.554   12459.554

Root Mean Square Error of Approximation:

  RMSEA                                          0.041       0.040
  90 Percent confidence interval - lower         0.025       0.023
  90 Percent confidence interval - upper         0.056       0.055
  P-value RMSEA <= 0.05                          0.820       0.851
                                                                  
  Robust RMSEA                                               0.040
  90 Percent confidence interval - lower                     0.023
  90 Percent confidence interval - upper                     0.056

Standardized Root Mean Square Residual:

  SRMR                                           0.031       0.031
Code
fitted1_alt2 <- lavaan::cfa(
  'Updating =~ Updating1 + Updating2
  Updating1 =~ `美术卡片` + `数字卡片`
  Updating2 =~ `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1_alt2, what = "std", edge.color = "black",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted1_alt2, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 33 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        38
                                                      
  Number of observations                           469
  Number of missing patterns                        45
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 68.030      66.505
  Degrees of freedom                                 39          39
  P-value (Chi-square)                            0.003       0.004
  Scaling correction factor                                   1.023
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1417.507    1333.075
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.063

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.979       0.978
  Tucker-Lewis Index (TLI)                       0.970       0.970
                                                                  
  Robust Comparative Fit Index (CFI)                         0.979
  Robust Tucker-Lewis Index (TLI)                            0.971

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6171.809   -6171.809
  Scaling correction factor                                  1.022
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6137.794   -6137.794
  Scaling correction factor                                  1.023
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12419.618   12419.618
  Bayesian (BIC)                             12577.341   12577.341
  Sample-size adjusted Bayesian (BIC)        12456.737   12456.737

Root Mean Square Error of Approximation:

  RMSEA                                          0.040       0.039
  90 Percent confidence interval - lower         0.023       0.022
  90 Percent confidence interval - upper         0.055       0.054
  P-value RMSEA <= 0.05                          0.851       0.878
                                                                  
  Robust RMSEA                                               0.039
  90 Percent confidence interval - lower                     0.022
  90 Percent confidence interval - upper                     0.055

Standardized Root Mean Square Residual:

  SRMR                                           0.031       0.031
  1. Bifactor model:
Code
fitted1_bifac <- lavaan::cfa(
  'Common =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片` + `幸运小球` + `密码箱` + `顺背数PRO` + `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`
  Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE, orthogonal = TRUE, 
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1_bifac, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0,
  bifactor = "Common"
)

Code
lavaan::summary(fitted1_bifac, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 42 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        44
                                                      
  Number of observations                           469
  Number of missing patterns                        45
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 76.215      86.440
  Degrees of freedom                                 33          33
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   0.882
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1417.507    1333.075
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.063

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.968       0.958
  Tucker-Lewis Index (TLI)                       0.947       0.930
                                                                  
  Robust Comparative Fit Index (CFI)                         0.965
  Robust Tucker-Lewis Index (TLI)                            0.942

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6175.902   -6175.902
  Scaling correction factor                                  1.128
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6137.794   -6137.794
  Scaling correction factor                                  1.023
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12439.804   12439.804
  Bayesian (BIC)                             12622.430   12622.430
  Sample-size adjusted Bayesian (BIC)        12482.783   12482.783

Root Mean Square Error of Approximation:

  RMSEA                                          0.053       0.059
  90 Percent confidence interval - lower         0.037       0.043
  90 Percent confidence interval - upper         0.068       0.075
  P-value RMSEA <= 0.05                          0.360       0.173
                                                                  
  Robust RMSEA                                               0.055
  90 Percent confidence interval - lower                     0.041
  90 Percent confidence interval - upper                     0.070

Standardized Root Mean Square Residual:

  SRMR                                           0.046       0.046
  1. Hierarchical model:
Code
fitted1_higher <- lavaan::cfa(
  'Common =~ Updating + VerbalSTM + SpatialSTM
  Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1_higher, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0,
  bifactor = "Common"
)

Code
lavaan::summary(fitted1_higher, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 34 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        36
                                                      
  Number of observations                           469
  Number of missing patterns                        45
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                119.456     116.993
  Degrees of freedom                                 41          41
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   1.021
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1417.507    1333.075
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.063

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.942       0.941
  Tucker-Lewis Index (TLI)                       0.923       0.920
                                                                  
  Robust Comparative Fit Index (CFI)                         0.943
  Robust Tucker-Lewis Index (TLI)                            0.923

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6197.522   -6197.522
  Scaling correction factor                                  1.025
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6137.794   -6137.794
  Scaling correction factor                                  1.023
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12467.044   12467.044
  Bayesian (BIC)                             12616.466   12616.466
  Sample-size adjusted Bayesian (BIC)        12502.209   12502.209

Root Mean Square Error of Approximation:

  RMSEA                                          0.064       0.063
  90 Percent confidence interval - lower         0.051       0.050
  90 Percent confidence interval - upper         0.077       0.076
  P-value RMSEA <= 0.05                          0.042       0.053
                                                                  
  Robust RMSEA                                               0.064
  90 Percent confidence interval - lower                     0.050
  90 Percent confidence interval - upper                     0.077

Standardized Root Mean Square Residual:

  SRMR                                           0.037       0.037

Spatial-object association test (宇宙黑洞) excluded

  1. Correlated latent factor model:
Code
fitted2 <- lavaan::cfa(
  'Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted2, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted2, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 17 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        33
                                                      
  Number of observations                           469
  Number of missing patterns                        40
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                102.626     100.460
  Degrees of freedom                                 32          32
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   1.022
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1322.205    1245.873
  Degrees of freedom                                45          45
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.061

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.945       0.943
  Tucker-Lewis Index (TLI)                       0.922       0.920
                                                                  
  Robust Comparative Fit Index (CFI)                         0.945
  Robust Tucker-Lewis Index (TLI)                            0.923

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -5608.669   -5608.669
  Scaling correction factor                                  1.013
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -5557.356   -5557.356
  Scaling correction factor                                  1.017
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               11283.338   11283.338
  Bayesian (BIC)                             11420.308   11420.308
  Sample-size adjusted Bayesian (BIC)        11315.573   11315.573

Root Mean Square Error of Approximation:

  RMSEA                                          0.069       0.068
  90 Percent confidence interval - lower         0.054       0.053
  90 Percent confidence interval - upper         0.084       0.083
  P-value RMSEA <= 0.05                          0.019       0.024
                                                                  
  Robust RMSEA                                               0.068
  90 Percent confidence interval - lower                     0.053
  90 Percent confidence interval - upper                     0.084

Standardized Root Mean Square Residual:

  SRMR                                           0.036       0.036
Code
fitted2_alt <- lavaan::cfa(
  'Updating1 =~ `美术卡片` + `数字卡片`
  Updating2 =~ `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted1_alt, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted1_alt, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 21 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        39
                                                      
  Number of observations                           469
  Number of missing patterns                        45
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 67.870      66.281
  Degrees of freedom                                 38          38
  P-value (Chi-square)                            0.002       0.003
  Scaling correction factor                                   1.024
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1417.507    1333.075
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.063

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.978       0.978
  Tucker-Lewis Index (TLI)                       0.968       0.968
                                                                  
  Robust Comparative Fit Index (CFI)                         0.979
  Robust Tucker-Lewis Index (TLI)                            0.969

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6171.729   -6171.729
  Scaling correction factor                                  1.021
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6137.794   -6137.794
  Scaling correction factor                                  1.023
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12421.459   12421.459
  Bayesian (BIC)                             12583.332   12583.332
  Sample-size adjusted Bayesian (BIC)        12459.554   12459.554

Root Mean Square Error of Approximation:

  RMSEA                                          0.041       0.040
  90 Percent confidence interval - lower         0.025       0.023
  90 Percent confidence interval - upper         0.056       0.055
  P-value RMSEA <= 0.05                          0.820       0.851
                                                                  
  Robust RMSEA                                               0.040
  90 Percent confidence interval - lower                     0.023
  90 Percent confidence interval - upper                     0.056

Standardized Root Mean Square Residual:

  SRMR                                           0.031       0.031
Code
fitted2_alt2 <- lavaan::cfa(
  'Updating =~ Updating1 + Updating2
  Updating1 =~ `美术卡片` + `数字卡片`
  Updating2 =~ `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted2_alt2, what = "std", edge.color = "black",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted2_alt2, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 35 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        35
                                                      
  Number of observations                           469
  Number of missing patterns                        40
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 51.226      50.023
  Degrees of freedom                                 30          30
  P-value (Chi-square)                            0.009       0.012
  Scaling correction factor                                   1.024
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1322.205    1245.873
  Degrees of freedom                                45          45
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.061

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.983       0.983
  Tucker-Lewis Index (TLI)                       0.975       0.975
                                                                  
  Robust Comparative Fit Index (CFI)                         0.984
  Robust Tucker-Lewis Index (TLI)                            0.976

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -5582.969   -5582.969
  Scaling correction factor                                  1.011
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -5557.356   -5557.356
  Scaling correction factor                                  1.017
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               11235.937   11235.937
  Bayesian (BIC)                             11381.209   11381.209
  Sample-size adjusted Bayesian (BIC)        11270.126   11270.126

Root Mean Square Error of Approximation:

  RMSEA                                          0.039       0.038
  90 Percent confidence interval - lower         0.019       0.018
  90 Percent confidence interval - upper         0.057       0.055
  P-value RMSEA <= 0.05                          0.838       0.865
                                                                  
  Robust RMSEA                                               0.038
  90 Percent confidence interval - lower                     0.018
  90 Percent confidence interval - upper                     0.056

Standardized Root Mean Square Residual:

  SRMR                                           0.029       0.029
  1. Bifactor model:
Code
fitted2_bifac <- lavaan::cfa(
  'Common =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片` + `幸运小球` + `密码箱` + `顺背数PRO` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`
  Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE, orthogonal = TRUE, 
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted2_bifac, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0,
  bifactor = "Common"
)

Code
lavaan::summary(fitted2_bifac, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 46 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        40
                                                      
  Number of observations                           469
  Number of missing patterns                        40
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                 62.874      72.175
  Degrees of freedom                                 25          25
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   0.871
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1322.205    1245.873
  Degrees of freedom                                45          45
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.061

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.970       0.961
  Tucker-Lewis Index (TLI)                       0.947       0.929
                                                                  
  Robust Comparative Fit Index (CFI)                         0.968
  Robust Tucker-Lewis Index (TLI)                            0.942

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -5588.793   -5588.793
  Scaling correction factor                                  1.108
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -5557.356   -5557.356
  Scaling correction factor                                  1.017
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               11257.586   11257.586
  Bayesian (BIC)                             11423.610   11423.610
  Sample-size adjusted Bayesian (BIC)        11296.659   11296.659

Root Mean Square Error of Approximation:

  RMSEA                                          0.057       0.063
  90 Percent confidence interval - lower         0.039       0.045
  90 Percent confidence interval - upper         0.075       0.082
  P-value RMSEA <= 0.05                          0.241       0.105
                                                                  
  Robust RMSEA                                               0.059
  90 Percent confidence interval - lower                     0.044
  90 Percent confidence interval - upper                     0.075

Standardized Root Mean Square Residual:

  SRMR                                           0.046       0.046
  1. Hierarchical Model:
Code
fitted2_higher <- lavaan::cfa(
  'Common =~ Updating + VerbalSTM + SpatialSTM
  Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fitted2_higher, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0,
  bifactor = "Common"
)

Code
lavaan::summary(fitted2_higher, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 34 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        33
                                                      
  Number of observations                           469
  Number of missing patterns                        40
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                102.626     100.460
  Degrees of freedom                                 32          32
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   1.022
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1322.205    1245.873
  Degrees of freedom                                45          45
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.061

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.945       0.943
  Tucker-Lewis Index (TLI)                       0.922       0.920
                                                                  
  Robust Comparative Fit Index (CFI)                         0.945
  Robust Tucker-Lewis Index (TLI)                            0.923

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -5608.669   -5608.669
  Scaling correction factor                                  1.013
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -5557.356   -5557.356
  Scaling correction factor                                  1.017
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               11283.338   11283.338
  Bayesian (BIC)                             11420.308   11420.308
  Sample-size adjusted Bayesian (BIC)        11315.573   11315.573

Root Mean Square Error of Approximation:

  RMSEA                                          0.069       0.068
  90 Percent confidence interval - lower         0.054       0.053
  90 Percent confidence interval - upper         0.084       0.083
  P-value RMSEA <= 0.05                          0.019       0.024
                                                                  
  Robust RMSEA                                               0.068
  90 Percent confidence interval - lower                     0.053
  90 Percent confidence interval - upper                     0.084

Standardized Root Mean Square Residual:

  SRMR                                           0.036       0.036

Task Structure Model

The covariance estimate for latent variables is not correct. The estimated correlation between “Simple” and “Complex” is larger than 1.

Code
fitted3 <- lavaan::cfa(
  'Complex =~ `打靶场` + `蝴蝶照相机` + `幸运小球`
  Nback =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  Simple =~ `密码箱` + `顺背数PRO` + `位置记忆PRO`',
  indices_selected, std.lv = TRUE, std.ov = TRUE, 
  estimator = "MLR", missing = "ml"
)
Warning in lav_object_post_check(object): lavaan WARNING: covariance matrix of latent variables
                is not positive definite;
                use lavInspect(fit, "cov.lv") to investigate.
Code
semPlot::semPaths(
  fitted3, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted3, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 18 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        33
                                                      
  Number of observations                           469
  Number of missing patterns                        40
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                175.560     172.586
  Degrees of freedom                                 32          32
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   1.017
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1322.205    1245.873
  Degrees of freedom                                45          45
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.061

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.888       0.883
  Tucker-Lewis Index (TLI)                       0.842       0.835
                                                                  
  Robust Comparative Fit Index (CFI)                         0.888
  Robust Tucker-Lewis Index (TLI)                            0.842

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -5645.136   -5645.136
  Scaling correction factor                                  1.017
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -5557.356   -5557.356
  Scaling correction factor                                  1.017
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               11356.271   11356.271
  Bayesian (BIC)                             11493.241   11493.241
  Sample-size adjusted Bayesian (BIC)        11388.506   11388.506

Root Mean Square Error of Approximation:

  RMSEA                                          0.098       0.097
  90 Percent confidence interval - lower         0.084       0.083
  90 Percent confidence interval - upper         0.112       0.111
  P-value RMSEA <= 0.05                          0.000       0.000
                                                                  
  Robust RMSEA                                               0.098
  90 Percent confidence interval - lower                     0.084
  90 Percent confidence interval - upper                     0.112

Standardized Root Mean Square Residual:

  SRMR                                           0.054       0.054

Input Material Model

Not fitted well.

Code
fitted4 <- lavaan::cfa(
  'Verbal =~ 数字卡片 + 文字卡片 + 幸运小球 + 密码箱 + 顺背数PRO
  Spatial =~ 格子卡片 + 打靶场 + 蝴蝶照相机 + 位置记忆PRO
  Object =~ 美术卡片 + 宇宙黑洞',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
Warning in lav_object_post_check(object): lavaan WARNING: covariance matrix of latent variables
                is not positive definite;
                use lavInspect(fit, "cov.lv") to investigate.
Code
semPlot::semPaths(
  fitted4, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fitted4, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 20 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        36
                                                      
  Number of observations                           469
  Number of missing patterns                        45
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                318.493     323.033
  Degrees of freedom                                 41          41
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   0.986
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1417.507    1333.075
  Degrees of freedom                                55          55
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.063

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.796       0.779
  Tucker-Lewis Index (TLI)                       0.727       0.704
                                                                  
  Robust Comparative Fit Index (CFI)                         0.795
  Robust Tucker-Lewis Index (TLI)                            0.726

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -6297.041   -6297.041
  Scaling correction factor                                  1.065
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -6137.794   -6137.794
  Scaling correction factor                                  1.023
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               12666.082   12666.082
  Bayesian (BIC)                             12815.503   12815.503
  Sample-size adjusted Bayesian (BIC)        12701.247   12701.247

Root Mean Square Error of Approximation:

  RMSEA                                          0.120       0.121
  90 Percent confidence interval - lower         0.108       0.109
  90 Percent confidence interval - upper         0.133       0.134
  P-value RMSEA <= 0.05                          0.000       0.000
                                                                  
  Robust RMSEA                                               0.120
  90 Percent confidence interval - lower                     0.108
  90 Percent confidence interval - upper                     0.133

Standardized Root Mean Square Residual:

  SRMR                                           0.070       0.070

Add reasoning tasks

Code
indices_selected <- indices_clean |>
  filter(
    check_result == "target",
    dimension %in% c("reasoning", "complex span", "working memory", "short term memory"),
    !game_name %in% c("远距离联想", "人工语言-中级", "各得其所", "魔术师终极")
  ) |>
  pivot_wider_indices() |>
  select(-user_id)

The included tasks:

  • 图形推理
  • 三维心理旋转测试
  • 图形折叠
  • 蝴蝶照相机
  • 打靶场
  • 幸运小球
  • 数字卡片
  • 格子卡片
  • 美术卡片
  • 文字卡片
  • 密码箱
  • 位置记忆PRO
  • 顺背数PRO
  • 宇宙黑洞

Correlation Matrix

Code
correlate(indices_selected, quiet = TRUE) |>
  rearrange(method = "HC") |>
  stretch() |>
  mutate(across(c(x, y), as_factor)) |>
  ggplot(aes(x, y)) +
  geom_tile(aes(fill = r)) +
  scico::scale_fill_scico(palette = "bam", midpoint = 0, direction = -1) +
  coord_fixed() +
  theme_minimal(base_size = 18) +
  labs(x = "", y = "", fill = "Pearson's", color = "") +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Code
mds <- indices_selected |>
  cor(use = "pairwise") |>
  smacof::sim2diss(to.dist = TRUE) |>
  smacof::mds(ndim = 2, type = "mspline")
# plot(mds, plot.type = "Shepard", main = "Shepard Diagram (Ratio Transformation)")
# par(family = "SimHei")
plot(mds)

Exploratory Factor Analysis

Traditional

Code
nfactors_test <- psych::nfactors(indices_selected)

Code
fit <- psych::fa(indices_selected, 4)
psych::fa.diagram(fit)

Code
fit_bifac <- psych::omega(indices_selected, 4, plot = FALSE)
psych::omega.diagram(fit_bifac)

Bayesian Factor Analysis

Code
mcmc <- indices_selected |>
  mutate(across(.fns = ~ scale(.)[, 1])) |>
  befa(verbose = FALSE) |>
  post.column.switch() |>
  post.sign.switch()
Code
hppm <- summary(mcmc, what = "hppm")
hppm |>
  pluck("alpha", "m1") |>
  as_tibble(rownames = "alpha_term") |>
  separate(alpha_term, c(NA, "game_index"), sep = ":") |>
  mutate(game_index = reorder(game_index, dedic)) |>
  ggplot(aes(game_index, dedic)) +
  geom_tile(aes(fill = mean)) +
  geom_text(aes(label = round(mean, 2)), color = "white") +
  scico::scale_fill_scico(palette = "bam", midpoint = 0, direction = -1) +
  coord_fixed() +
  theme_minimal(base_size = 18) +
  labs(x = "Term", y = "Factor",
       title = str_c("Posterior Probability: ", round(hppm$hppm$prob, 2),
                     ", with ", hppm$hppm$nfac, " factors")) +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Confirmatory Factor Analysis

Code
fit_result <- lavaan::cfa(
  'Updating =~ `美术卡片` + `数字卡片` + `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`
  Reasoning =~ 三维心理旋转测试 + 图形推理 + 图形折叠',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fit_result, what = "std", edge.color = "black", layout = "tree2",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fit_result, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 21 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        48
                                                      
  Number of observations                           469
  Number of missing patterns                        72
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                172.314     172.556
  Degrees of freedom                                 71          71
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   0.999
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1615.500    1546.634
  Degrees of freedom                                91          91
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.045

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.934       0.930
  Tucker-Lewis Index (TLI)                       0.915       0.911
                                                                  
  Robust Comparative Fit Index (CFI)                         0.933
  Robust Tucker-Lewis Index (TLI)                            0.915

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -7811.990   -7811.990
  Scaling correction factor                                  1.051
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -7725.833   -7725.833
  Scaling correction factor                                  1.020
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               15719.980   15719.980
  Bayesian (BIC)                             15919.209   15919.209
  Sample-size adjusted Bayesian (BIC)        15766.867   15766.867

Root Mean Square Error of Approximation:

  RMSEA                                          0.055       0.055
  90 Percent confidence interval - lower         0.045       0.045
  90 Percent confidence interval - upper         0.066       0.066
  P-value RMSEA <= 0.05                          0.200       0.197
                                                                  
  Robust RMSEA                                               0.055
  90 Percent confidence interval - lower                     0.045
  90 Percent confidence interval - upper                     0.066

Standardized Root Mean Square Residual:

  SRMR                                           0.040       0.040
Code
fit_result_alt <- lavaan::cfa(
  'Updating =~ Updating1 + Updating2
  Updating1 =~ `美术卡片` + `数字卡片`
  Updating2 =~ `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `宇宙黑洞` + `打靶场` + `蝴蝶照相机` + `位置记忆PRO`
  Reasoning =~ 三维心理旋转测试 + 图形推理 + 图形折叠',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fit_result_alt, what = "std", edge.color = "black",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fit_result_alt, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 35 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        50
                                                      
  Number of observations                           469
  Number of missing patterns                        72
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                121.402     121.672
  Degrees of freedom                                 69          69
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   0.998
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1615.500    1546.634
  Degrees of freedom                                91          91
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.045

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.966       0.964
  Tucker-Lewis Index (TLI)                       0.955       0.952
                                                                  
  Robust Comparative Fit Index (CFI)                         0.965
  Robust Tucker-Lewis Index (TLI)                            0.954

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -7786.534   -7786.534
  Scaling correction factor                                  1.050
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -7725.833   -7725.833
  Scaling correction factor                                  1.020
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               15673.068   15673.068
  Bayesian (BIC)                             15880.598   15880.598
  Sample-size adjusted Bayesian (BIC)        15721.908   15721.908

Root Mean Square Error of Approximation:

  RMSEA                                          0.040       0.040
  90 Percent confidence interval - lower         0.028       0.028
  90 Percent confidence interval - upper         0.052       0.052
  P-value RMSEA <= 0.05                          0.914       0.911
                                                                  
  Robust RMSEA                                               0.040
  90 Percent confidence interval - lower                     0.028
  90 Percent confidence interval - upper                     0.052

Standardized Root Mean Square Residual:

  SRMR                                           0.036       0.036
Code
fit_result_high_order <- lavaan::cfa(
  'WM =~ Updating + VerbalSTM + SpatialSTM
  Updating =~ Updating1 + Updating2
  Updating1 =~ `美术卡片` + `数字卡片`
  Updating2 =~ `格子卡片` + `文字卡片`
  # AscMem =~ `人工语言-中级` + `欢乐餐厅` + 图片记忆
  VerbalSTM =~ `幸运小球` + `密码箱` + `顺背数PRO`
  SpatialSTM =~ `打靶场` + `蝴蝶照相机` + `位置记忆PRO`
  Reasoning =~ 三维心理旋转测试 + 图形推理 + 图形折叠',
  indices_selected, std.lv = TRUE, std.ov = TRUE,
  estimator = "MLR", missing = "ml"
)
semPlot::semPaths(
  fit_result_high_order, what = "std", edge.color = "black",
  sizeMan = 6, sizeLat = 8, edge.label.cex = 0.6, intercepts = FALSE,
  nCharEdges = 5, esize = 1, trans = 1, nCharNodes = 0
)

Code
lavaan::summary(fit_result_high_order, fit.measures = TRUE, estimates = FALSE)
lavaan 0.6-11 ended normally after 49 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        45
                                                      
  Number of observations                           469
  Number of missing patterns                        68
                                                      
Model Test User Model:
                                               Standard      Robust
  Test Statistic                                109.216     109.773
  Degrees of freedom                                 59          59
  P-value (Chi-square)                            0.000       0.000
  Scaling correction factor                                   0.995
       Yuan-Bentler correction (Mplus variant)                     

Model Test Baseline Model:

  Test statistic                              1511.617    1452.531
  Degrees of freedom                                78          78
  P-value                                        0.000       0.000
  Scaling correction factor                                  1.041

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.965       0.963
  Tucker-Lewis Index (TLI)                       0.954       0.951
                                                                  
  Robust Comparative Fit Index (CFI)                         0.965
  Robust Tucker-Lewis Index (TLI)                            0.953

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -7204.293   -7204.293
  Scaling correction factor                                  1.041
      for the MLR correction                                      
  Loglikelihood unrestricted model (H1)      -7149.685   -7149.685
  Scaling correction factor                                  1.015
      for the MLR correction                                      
                                                                  
  Akaike (AIC)                               14498.586   14498.586
  Bayesian (BIC)                             14685.363   14685.363
  Sample-size adjusted Bayesian (BIC)        14542.543   14542.543

Root Mean Square Error of Approximation:

  RMSEA                                          0.043       0.043
  90 Percent confidence interval - lower         0.030       0.030
  90 Percent confidence interval - upper         0.055       0.055
  P-value RMSEA <= 0.05                          0.830       0.821
                                                                  
  Robust RMSEA                                               0.043
  90 Percent confidence interval - lower                     0.030
  90 Percent confidence interval - upper                     0.055

Standardized Root Mean Square Residual:

  SRMR                                           0.039       0.039