Note This is an R Markdown document detailing the data analysis of the psychological tests Brief-Spec A (RABEsp-A) and Brief-Spec F (RABEsp-F). Data and code are available at https://osf.io/gqmkd/. For questions, contact:

Last updated: r format(Sys.time(), ‘%d %B, %Y’)

DA

CFA best items

Packages

pacman::p_load(tidyverse, janitor, stringr, psych, corrr, ggcorrplot, gmodels, arsenal,rsvd, lavaan)
load("C:/Users/luisf/Dropbox/Puc-Rio/Consultoria - Lucas Fortaleza/Producao de manuscritos/Artigo 2 - CVC e Analise Fatorial/R base - Lucas Fortaleza EFA e Criterio.RData")

Data TEAD

items_tead5 <- c(
  "tead_8", "tead_35", "tead_36", "tead_38", "tead_33",      # soc_com
  "tead_9", "tead_3", "tead_5", "tead_28", "tead_29",        # soc_inter
  "tead_70", "tead_69", "tead_4", "tead_73", "tead_66",      # sensorial
  "tead_52", "tead_59", "tead_60", "tead_63", "tead_56"      # rep_beh
)
items_team4 <- c(
  "team_6", "team_11", "team_1", "team_9",      # cam
  "team_5", "team_3", "team_4", "team_25",      # gender
  "team_14", "team_22", "team_7", "team_21",    # cam2
  "team_36", "team_37", "team_32", "team_35"    # sensory
)
set.seed(123)
n_total <- 700

# Eligible males and others
males <- df_tead %>%
  mutate(rowid = row_number()) %>%
  filter(complete.cases(across(all_of(items_tead5))), genero == "Masculino", aq_total <= 8)

others <- df_tead %>%
  mutate(rowid = row_number()) %>%
  filter(complete.cases(across(all_of(items_tead5))), genero != "Masculino", aq_total <= 8)

n_male <- min(n_total %/% 2, nrow(males))
n_other <- n_total - n_male

idx_tead  <- bind_rows(
  males %>% slice_sample(n = n_male),
  others %>% slice_sample(n = n_other)
) %>%
  sample_frac(1) %>%
  pull(rowid)

summary(tableby(
  ~ idade + genero + escolaridade + aq_total + aq_score,
  data = df_tead[idx_tead , ]
), text = TRUE) %>% 
  data.frame() %>%
  print.data.frame()
##                    Var.1 Overall..N.700.
## 1                  idade                
## 2           -  Mean (SD) 37.556 (11.710)
## 3               -  Range 18.000 - 78.000
## 4                 genero                
## 5            -  Feminino     343 (49.0%)
## 6           -  Masculino     350 (50.0%)
## 7              -  Outros        7 (1.0%)
## 8           escolaridade                
## 9  -  Ensino Fundamental       19 (2.7%)
## 10       -  Ensino Médio      87 (12.4%)
## 11    -  Ensino Superior     306 (43.7%)
## 12             -  Outros       26 (3.7%)
## 13      -  Pós graduação     262 (37.4%)
## 14              aq_total                
## 15          -  Mean (SD)   5.240 (2.157)
## 16              -  Range   0.000 - 8.000
## 17              aq_score                
## 18       -  0 - 6 points     351 (50.1%)
## 19      -  6 or + points     349 (49.9%)

Data TEAM

set.seed(123)
idx_team <- df_team %>%
  mutate(rowid = row_number()) %>%
  filter(complete.cases(across(all_of(items_team4))), aq_total <= 6) %>%
  slice_sample(n = 700) %>%
  pull(rowid)

summary(tableby(
  ~ idade + genero + escolaridade + aq_total + aq_score,
  data = df_team[idx_team, ]
), text = TRUE) %>%
  data.frame() %>%
  print.data.frame()
##                    Var.1 Overall..N.700.
## 1                  idade                
## 2           -  Mean (SD) 40.286 (10.277)
## 3               -  Range 18.000 - 73.000
## 4                 genero                
## 5            -  Feminino     695 (99.3%)
## 6              -  Outros        5 (0.7%)
## 7           escolaridade                
## 8  -  Ensino Fundamental        7 (1.0%)
## 9        -  Ensino Médio       69 (9.9%)
## 10    -  Ensino Superior     271 (38.7%)
## 11             -  Outros       19 (2.7%)
## 12      -  Pós graduação     334 (47.7%)
## 13              aq_total                
## 14          -  Mean (SD)   3.736 (1.699)
## 15              -  Range   0.000 - 6.000
## 16              aq_score                
## 17       -  0 - 6 points     576 (82.3%)
## 18      -  6 or + points     124 (17.7%)

TEAD

Descriptive TEAD (RABESP - A)

df_tead[idx_tead, ] %>%
  select(all_of(items_tead5)) %>%
  tableby(~., data = ., 
          control=tableby.control(total=TRUE, numeric.simplify=TRUE,
                  numeric.stats=c("meansd", "median", "iqr"),digits=1)
          ) %>%
  summary(text = TRUE) %>%
  as.data.frame(.) %>%
  print.data.frame(.) 
##                 Overall (N=700)
## 1        tead_8                
## 2  -  Mean (SD)       2.6 (1.2)
## 3     -  Median             2.0
## 4        -  IQR             2.0
## 5       tead_35                
## 6  -  Mean (SD)       2.8 (1.3)
## 7     -  Median             3.0
## 8        -  IQR             2.0
## 9       tead_36                
## 10 -  Mean (SD)       3.4 (1.2)
## 11    -  Median             4.0
## 12       -  IQR             2.0
## 13      tead_38                
## 14 -  Mean (SD)       3.8 (1.2)
## 15    -  Median             4.0
## 16       -  IQR             2.0
## 17      tead_33                
## 18 -  Mean (SD)       2.7 (1.3)
## 19    -  Median             2.0
## 20       -  IQR             2.0
## 21       tead_9                
## 22 -  Mean (SD)       4.2 (1.1)
## 23    -  Median             4.0
## 24       -  IQR             1.0
## 25       tead_3                
## 26 -  Mean (SD)       4.1 (1.1)
## 27    -  Median             4.0
## 28       -  IQR             1.0
## 29       tead_5                
## 30 -  Mean (SD)       3.6 (1.3)
## 31    -  Median             4.0
## 32       -  IQR             3.0
## 33      tead_28                
## 34 -  Mean (SD)       3.9 (1.2)
## 35    -  Median             4.0
## 36       -  IQR             1.0
## 37      tead_29                
## 38 -  Mean (SD)       3.7 (1.3)
## 39    -  Median             4.0
## 40       -  IQR             2.0
## 41      tead_70                
## 42 -  Mean (SD)       3.9 (1.2)
## 43    -  Median             4.0
## 44       -  IQR             2.0
## 45      tead_69                
## 46 -  Mean (SD)       3.8 (1.2)
## 47    -  Median             4.0
## 48       -  IQR             2.0
## 49       tead_4                
## 50 -  Mean (SD)       3.2 (1.4)
## 51    -  Median             4.0
## 52       -  IQR             2.0
## 53      tead_73                
## 54 -  Mean (SD)       3.7 (1.3)
## 55    -  Median             4.0
## 56       -  IQR             2.0
## 57      tead_66                
## 58 -  Mean (SD)       3.9 (1.2)
## 59    -  Median             4.0
## 60       -  IQR             2.0
## 61      tead_52                
## 62 -  Mean (SD)       3.8 (1.2)
## 63    -  Median             4.0
## 64       -  IQR             2.0
## 65      tead_59                
## 66 -  Mean (SD)       3.6 (1.3)
## 67    -  Median             4.0
## 68       -  IQR             2.0
## 69      tead_60                
## 70 -  Mean (SD)       4.1 (1.1)
## 71    -  Median             4.0
## 72       -  IQR             1.0
## 73      tead_63                
## 74 -  Mean (SD)       3.6 (1.2)
## 75    -  Median             4.0
## 76       -  IQR             2.0
## 77      tead_56                
## 78 -  Mean (SD)       3.7 (1.2)
## 79    -  Median             4.0
## 80       -  IQR             2.0

CFA TEAD (RABESP - A)

model_tead5 <- '
# First-order factors
soc_com =~ tead_8 + tead_35 + tead_36 + tead_38 + tead_33
soc_inter =~ tead_9 + tead_3 + tead_5 + tead_28 + tead_29
sensorial =~ tead_70 + tead_69 + tead_4 + tead_73 + tead_66
rep_beh =~ tead_52 + tead_59 + tead_60 + tead_63 + tead_56

# Second-order factor
general =~ soc_com + soc_inter + sensorial + rep_beh
'
fit_tead5 <- cfa(
  model_tead5,
  data = df_tead[idx_tead , items_tead5],
  estimator = "WLSMV",
  ordered = items_tead5
)
summary(fit_tead5, fit.measures = TRUE, standardized = TRUE)
## lavaan 0.6-18 ended normally after 37 iterations
## 
##   Estimator                                       DWLS
##   Optimization method                           NLMINB
##   Number of model parameters                       104
## 
##   Number of observations                           700
## 
## Model Test User Model:
##                                               Standard      Scaled
##   Test Statistic                               582.101     913.189
##   Degrees of freedom                               166         166
##   P-value (Chi-square)                           0.000       0.000
##   Scaling correction factor                                  0.675
##   Shift parameter                                           50.579
##     simple second-order correction                                
## 
## Model Test Baseline Model:
## 
##   Test statistic                             59065.078   16804.697
##   Degrees of freedom                               190         190
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  3.544
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.993       0.955
##   Tucker-Lewis Index (TLI)                       0.992       0.949
##                                                                   
##   Robust Comparative Fit Index (CFI)                         0.915
##   Robust Tucker-Lewis Index (TLI)                            0.903
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.060       0.080
##   90 Percent confidence interval - lower         0.055       0.075
##   90 Percent confidence interval - upper         0.065       0.085
##   P-value H_0: RMSEA <= 0.050                    0.001       0.000
##   P-value H_0: RMSEA >= 0.080                    0.000       0.538
##                                                                   
##   Robust RMSEA                                               0.085
##   90 Percent confidence interval - lower                     0.079
##   90 Percent confidence interval - upper                     0.092
##   P-value H_0: Robust RMSEA <= 0.050                         0.000
##   P-value H_0: Robust RMSEA >= 0.080                         0.911
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.048       0.048
## 
## Parameter Estimates:
## 
##   Parameterization                               Delta
##   Standard errors                           Robust.sem
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   soc_com =~                                                            
##     tead_8            1.000                               0.888    0.888
##     tead_35           0.960    0.022   43.227    0.000    0.852    0.852
##     tead_36           0.951    0.022   43.265    0.000    0.844    0.844
##     tead_38           0.906    0.029   31.072    0.000    0.804    0.804
##     tead_33           0.823    0.025   32.773    0.000    0.731    0.731
##   soc_inter =~                                                          
##     tead_9            1.000                               0.823    0.823
##     tead_3            0.960    0.033   28.886    0.000    0.790    0.790
##     tead_5            0.932    0.032   29.574    0.000    0.767    0.767
##     tead_28           0.956    0.033   29.343    0.000    0.787    0.787
##     tead_29           0.973    0.030   31.943    0.000    0.801    0.801
##   sensorial =~                                                          
##     tead_70           1.000                               0.820    0.820
##     tead_69           0.995    0.029   34.263    0.000    0.816    0.816
##     tead_4            0.880    0.032   27.763    0.000    0.722    0.722
##     tead_73           0.871    0.033   26.271    0.000    0.715    0.715
##     tead_66           0.952    0.030   31.818    0.000    0.781    0.781
##   rep_beh =~                                                            
##     tead_52           1.000                               0.845    0.845
##     tead_59           0.945    0.027   35.561    0.000    0.798    0.798
##     tead_60           0.982    0.026   37.959    0.000    0.830    0.830
##     tead_63           0.878    0.030   29.455    0.000    0.742    0.742
##     tead_56           0.919    0.028   32.324    0.000    0.777    0.777
##   general =~                                                            
##     soc_com           1.000                               0.776    0.776
##     soc_inter         1.063    0.045   23.651    0.000    0.889    0.889
##     sensorial         1.089    0.043   25.414    0.000    0.914    0.914
##     rep_beh           1.030    0.041   24.923    0.000    0.840    0.840
## 
## Thresholds:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     tead_8|t1        -1.012    0.057  -17.641    0.000   -1.012   -1.012
##     tead_8|t2         0.140    0.048    2.945    0.003    0.140    0.140
##     tead_8|t3         0.604    0.051   11.920    0.000    0.604    0.604
##     tead_8|t4         1.435    0.070   20.441    0.000    1.435    1.435
##     tead_35|t1       -1.061    0.059  -18.140    0.000   -1.061   -1.061
##     tead_35|t2       -0.007    0.047   -0.151    0.880   -0.007   -0.007
##     tead_35|t3        0.397    0.049    8.136    0.000    0.397    0.397
##     tead_35|t4        1.197    0.062   19.283    0.000    1.197    1.197
##     tead_36|t1       -1.396    0.069  -20.326    0.000   -1.396   -1.396
##     tead_36|t2       -0.635    0.051  -12.432    0.000   -0.635   -0.635
##     tead_36|t3       -0.075    0.047   -1.586    0.113   -0.075   -0.075
##     tead_36|t4        0.857    0.054   15.781    0.000    0.857    0.857
##     tead_38|t1       -1.543    0.075  -20.613    0.000   -1.543   -1.543
##     tead_38|t2       -0.787    0.053  -14.805    0.000   -0.787   -0.787
##     tead_38|t3       -0.508    0.050  -10.223    0.000   -0.508   -0.508
##     tead_38|t4        0.424    0.049    8.659    0.000    0.424    0.424
##     tead_33|t1       -0.816    0.054  -15.226    0.000   -0.816   -0.816
##     tead_33|t2        0.065    0.047    1.360    0.174    0.065    0.065
##     tead_33|t3        0.355    0.049    7.312    0.000    0.355    0.355
##     tead_33|t4        1.189    0.062   19.230    0.000    1.189    1.189
##     tead_9|t1        -1.821    0.091  -20.104    0.000   -1.821   -1.821
##     tead_9|t2        -1.211    0.062  -19.387    0.000   -1.211   -1.211
##     tead_9|t3        -0.977    0.057  -17.256    0.000   -0.977   -0.977
##     tead_9|t4         0.079    0.047    1.662    0.097    0.079    0.079
##     tead_3|t1        -1.688    0.082  -20.510    0.000   -1.688   -1.688
##     tead_3|t2        -1.154    0.061  -18.959    0.000   -1.154   -1.154
##     tead_3|t3        -0.926    0.056  -16.663    0.000   -0.926   -0.926
##     tead_3|t4         0.039    0.047    0.831    0.406    0.039    0.039
##     tead_5|t1        -1.396    0.069  -20.326    0.000   -1.396   -1.396
##     tead_5|t2        -0.666    0.051  -12.942    0.000   -0.666   -0.666
##     tead_5|t3        -0.347    0.048   -7.162    0.000   -0.347   -0.347
##     tead_5|t4         0.626    0.051   12.286    0.000    0.626    0.626
##     tead_28|t1       -1.543    0.075  -20.613    0.000   -1.543   -1.543
##     tead_28|t2       -0.977    0.057  -17.256    0.000   -0.977   -0.977
##     tead_28|t3       -0.711    0.052  -13.664    0.000   -0.711   -0.711
##     tead_28|t4        0.302    0.048    6.260    0.000    0.302    0.302
##     tead_29|t1       -1.368    0.068  -20.225    0.000   -1.368   -1.368
##     tead_29|t2       -0.763    0.053  -14.451    0.000   -0.763   -0.763
##     tead_29|t3       -0.488    0.050   -9.851    0.000   -0.488   -0.488
##     tead_29|t4        0.444    0.049    9.032    0.000    0.444    0.444
##     tead_70|t1       -1.605    0.078  -20.615    0.000   -1.605   -1.605
##     tead_70|t2       -0.932    0.056  -16.730    0.000   -0.932   -0.932
##     tead_70|t3       -0.608    0.051  -11.993    0.000   -0.608   -0.608
##     tead_70|t4        0.283    0.048    5.884    0.000    0.283    0.283
##     tead_69|t1       -1.567    0.076  -20.622    0.000   -1.567   -1.567
##     tead_69|t2       -0.826    0.054  -15.365    0.000   -0.826   -0.826
##     tead_69|t3       -0.488    0.050   -9.851    0.000   -0.488   -0.488
##     tead_69|t4        0.436    0.049    8.883    0.000    0.436    0.436
##     tead_4|t1        -1.000    0.057  -17.514    0.000   -1.000   -1.000
##     tead_4|t2        -0.351    0.048   -7.237    0.000   -0.351   -0.351
##     tead_4|t3        -0.011    0.047   -0.227    0.821   -0.011   -0.011
##     tead_4|t4         0.720    0.052   13.808    0.000    0.720    0.720
##     tead_73|t1       -1.435    0.070  -20.441    0.000   -1.435   -1.435
##     tead_73|t2       -0.782    0.053  -14.734    0.000   -0.782   -0.782
##     tead_73|t3       -0.436    0.049   -8.883    0.000   -0.436   -0.436
##     tead_73|t4        0.420    0.049    8.584    0.000    0.420    0.420
##     tead_66|t1       -1.618    0.079  -20.606    0.000   -1.618   -1.618
##     tead_66|t2       -0.983    0.057  -17.321    0.000   -0.983   -0.983
##     tead_66|t3       -0.670    0.051  -13.014    0.000   -0.670   -0.670
##     tead_66|t4        0.339    0.048    7.011    0.000    0.339    0.339
##     tead_52|t1       -1.631    0.079  -20.594    0.000   -1.631   -1.631
##     tead_52|t2       -0.873    0.055  -15.987    0.000   -0.873   -0.873
##     tead_52|t3       -0.596    0.051  -11.773    0.000   -0.596   -0.596
##     tead_52|t4        0.496    0.050   10.000    0.000    0.496    0.496
##     tead_59|t1       -1.435    0.070  -20.441    0.000   -1.435   -1.435
##     tead_59|t2       -0.697    0.052  -13.448    0.000   -0.697   -0.697
##     tead_59|t3       -0.401    0.049   -8.211    0.000   -0.401   -0.401
##     tead_59|t4        0.608    0.051   11.993    0.000    0.608    0.608
##     tead_60|t1       -1.881    0.095  -19.834    0.000   -1.881   -1.881
##     tead_60|t2       -1.182    0.062  -19.177    0.000   -1.182   -1.182
##     tead_60|t3       -0.915    0.055  -16.529    0.000   -0.915   -0.915
##     tead_60|t4        0.162    0.048    3.398    0.001    0.162    0.162
##     tead_63|t1       -1.425    0.070  -20.415    0.000   -1.425   -1.425
##     tead_63|t2       -0.706    0.052  -13.593    0.000   -0.706   -0.706
##     tead_63|t3       -0.351    0.048   -7.237    0.000   -0.351   -0.351
##     tead_63|t4        0.630    0.051   12.359    0.000    0.630    0.630
##     tead_56|t1       -1.520    0.074  -20.595    0.000   -1.520   -1.520
##     tead_56|t2       -0.787    0.053  -14.805    0.000   -0.787   -0.787
##     tead_56|t3       -0.476    0.049   -9.628    0.000   -0.476   -0.476
##     tead_56|t4        0.574    0.050   11.406    0.000    0.574    0.574
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .tead_8            0.212                               0.212    0.212
##    .tead_35           0.275                               0.275    0.275
##    .tead_36           0.288                               0.288    0.288
##    .tead_38           0.354                               0.354    0.354
##    .tead_33           0.466                               0.466    0.466
##    .tead_9            0.323                               0.323    0.323
##    .tead_3            0.376                               0.376    0.376
##    .tead_5            0.411                               0.411    0.411
##    .tead_28           0.380                               0.380    0.380
##    .tead_29           0.359                               0.359    0.359
##    .tead_70           0.328                               0.328    0.328
##    .tead_69           0.334                               0.334    0.334
##    .tead_4            0.479                               0.479    0.479
##    .tead_73           0.489                               0.489    0.489
##    .tead_66           0.390                               0.390    0.390
##    .tead_52           0.286                               0.286    0.286
##    .tead_59           0.363                               0.363    0.363
##    .tead_60           0.311                               0.311    0.311
##    .tead_63           0.449                               0.449    0.449
##    .tead_56           0.396                               0.396    0.396
##    .soc_com           0.313    0.023   13.336    0.000    0.398    0.398
##    .soc_inter         0.142    0.019    7.300    0.000    0.209    0.209
##    .sensorial         0.110    0.017    6.488    0.000    0.164    0.164
##    .rep_beh           0.210    0.021   10.118    0.000    0.295    0.295
##     general           0.474    0.029   16.138    0.000    1.000    1.000

Item-total Rel TEAD

df_tead[idx_tead, ] %>%
  select(all_of(items_tead5)) %>% psych::alpha()
## 
## Reliability analysis   
## Call: psych::alpha(x = .)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N    ase mean   sd median_r
##       0.94      0.94    0.95      0.43  15 0.0035  3.6 0.83     0.42
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.93  0.94  0.94
## Duhachek  0.93  0.94  0.94
## 
##  Reliability if an item is dropped:
##         raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r med.r
## tead_8       0.93      0.94    0.94      0.43  14   0.0036 0.0062  0.42
## tead_35      0.93      0.94    0.94      0.43  15   0.0036 0.0059  0.42
## tead_36      0.93      0.93    0.94      0.43  14   0.0037 0.0069  0.42
## tead_38      0.93      0.93    0.95      0.43  14   0.0036 0.0071  0.42
## tead_33      0.94      0.94    0.95      0.44  15   0.0035 0.0065  0.43
## tead_9       0.93      0.93    0.95      0.43  14   0.0037 0.0071  0.41
## tead_3       0.93      0.94    0.95      0.43  14   0.0036 0.0068  0.42
## tead_5       0.93      0.94    0.95      0.43  14   0.0036 0.0070  0.42
## tead_28      0.93      0.94    0.94      0.43  14   0.0036 0.0067  0.42
## tead_29      0.93      0.93    0.95      0.43  14   0.0037 0.0071  0.42
## tead_70      0.93      0.93    0.95      0.43  14   0.0037 0.0072  0.41
## tead_69      0.93      0.93    0.94      0.43  14   0.0037 0.0069  0.42
## tead_4       0.94      0.94    0.95      0.43  15   0.0036 0.0073  0.42
## tead_73      0.93      0.94    0.95      0.43  15   0.0036 0.0071  0.42
## tead_66      0.93      0.94    0.95      0.43  14   0.0036 0.0069  0.42
## tead_52      0.93      0.93    0.94      0.43  14   0.0037 0.0067  0.42
## tead_59      0.93      0.94    0.95      0.43  14   0.0036 0.0069  0.42
## tead_60      0.93      0.94    0.95      0.43  14   0.0036 0.0066  0.42
## tead_63      0.93      0.94    0.95      0.43  15   0.0036 0.0070  0.42
## tead_56      0.93      0.94    0.95      0.43  14   0.0036 0.0073  0.42
## 
##  Item statistics 
##           n raw.r std.r r.cor r.drop mean  sd
## tead_8  700  0.67  0.66  0.65   0.62  2.6 1.2
## tead_35 700  0.64  0.64  0.63   0.60  2.8 1.3
## tead_36 700  0.73  0.72  0.71   0.69  3.4 1.2
## tead_38 700  0.69  0.69  0.67   0.64  3.8 1.2
## tead_33 700  0.61  0.61  0.58   0.56  2.7 1.3
## tead_9  700  0.71  0.72  0.70   0.68  4.2 1.1
## tead_3  700  0.67  0.67  0.65   0.63  4.1 1.1
## tead_5  700  0.68  0.68  0.66   0.64  3.6 1.3
## tead_28 700  0.67  0.68  0.66   0.63  3.9 1.2
## tead_29 700  0.72  0.72  0.70   0.68  3.7 1.3
## tead_70 700  0.72  0.72  0.70   0.68  3.9 1.2
## tead_69 700  0.70  0.70  0.69   0.66  3.8 1.2
## tead_4  700  0.65  0.64  0.61   0.59  3.2 1.4
## tead_73 700  0.65  0.65  0.63   0.61  3.7 1.3
## tead_66 700  0.67  0.67  0.65   0.63  3.9 1.2
## tead_52 700  0.72  0.72  0.71   0.68  3.8 1.2
## tead_59 700  0.67  0.68  0.66   0.63  3.6 1.3
## tead_60 700  0.67  0.67  0.66   0.63  4.1 1.1
## tead_63 700  0.64  0.64  0.62   0.60  3.6 1.2
## tead_56 700  0.67  0.68  0.65   0.63  3.7 1.2
## 
## Non missing response frequency for each item
##            1    2    3    4    5 miss
## tead_8  0.16 0.40 0.17 0.20 0.08    0
## tead_35 0.14 0.35 0.16 0.23 0.12    0
## tead_36 0.08 0.18 0.21 0.33 0.20    0
## tead_38 0.06 0.15 0.09 0.36 0.34    0
## tead_33 0.21 0.32 0.11 0.24 0.12    0
## tead_9  0.03 0.08 0.05 0.37 0.47    0
## tead_3  0.05 0.08 0.05 0.34 0.48    0
## tead_5  0.08 0.17 0.11 0.37 0.27    0
## tead_28 0.06 0.10 0.07 0.38 0.38    0
## tead_29 0.09 0.14 0.09 0.36 0.33    0
## tead_70 0.05 0.12 0.10 0.34 0.39    0
## tead_69 0.06 0.15 0.11 0.36 0.33    0
## tead_4  0.16 0.20 0.13 0.27 0.24    0
## tead_73 0.08 0.14 0.11 0.33 0.34    0
## tead_66 0.05 0.11 0.09 0.38 0.37    0
## tead_52 0.05 0.14 0.08 0.41 0.31    0
## tead_59 0.08 0.17 0.10 0.38 0.27    0
## tead_60 0.03 0.09 0.06 0.38 0.44    0
## tead_63 0.08 0.16 0.12 0.37 0.26    0
## tead_56 0.06 0.15 0.10 0.40 0.28    0

TEAM

Descriptive TEAM (RABESP - F)

df_team[idx_team, ] %>%
  select(all_of(items_team4)) %>%
  tableby(~., data = ., 
          control=tableby.control(total=TRUE, numeric.simplify=TRUE,
                  numeric.stats=c("meansd", "median", "iqr"),digits=1)
          ) %>%
  summary(text = TRUE) %>%
  as.data.frame(.) %>%
  print.data.frame(.) 
##                 Overall (N=700)
## 1        team_6                
## 2  -  Mean (SD)       2.7 (1.3)
## 3     -  Median             2.0
## 4        -  IQR             2.0
## 5       team_11                
## 6  -  Mean (SD)       3.0 (1.3)
## 7     -  Median             3.0
## 8        -  IQR             2.0
## 9        team_1                
## 10 -  Mean (SD)       2.7 (1.3)
## 11    -  Median             3.0
## 12       -  IQR             2.0
## 13       team_9                
## 14 -  Mean (SD)       2.3 (1.2)
## 15    -  Median             2.0
## 16       -  IQR             2.0
## 17       team_5                
## 18 -  Mean (SD)       3.3 (1.3)
## 19    -  Median             4.0
## 20       -  IQR             2.0
## 21       team_3                
## 22 -  Mean (SD)       2.6 (1.4)
## 23    -  Median             2.0
## 24       -  IQR             3.0
## 25       team_4                
## 26 -  Mean (SD)       2.5 (1.4)
## 27    -  Median             2.0
## 28       -  IQR             3.0
## 29      team_25                
## 30 -  Mean (SD)       1.8 (1.1)
## 31    -  Median             1.0
## 32       -  IQR             1.0
## 33      team_14                
## 34 -  Mean (SD)       3.3 (1.3)
## 35    -  Median             4.0
## 36       -  IQR             2.0
## 37      team_22                
## 38 -  Mean (SD)       3.3 (1.3)
## 39    -  Median             4.0
## 40       -  IQR             2.0
## 41       team_7                
## 42 -  Mean (SD)       3.5 (1.3)
## 43    -  Median             4.0
## 44       -  IQR             2.0
## 45      team_21                
## 46 -  Mean (SD)       3.4 (1.3)
## 47    -  Median             4.0
## 48       -  IQR             2.0
## 49      team_36                
## 50 -  Mean (SD)       2.8 (1.4)
## 51    -  Median             3.0
## 52       -  IQR             2.0
## 53      team_37                
## 54 -  Mean (SD)       2.8 (1.4)
## 55    -  Median             3.0
## 56       -  IQR             2.0
## 57      team_32                
## 58 -  Mean (SD)       3.8 (1.3)
## 59    -  Median             4.0
## 60       -  IQR             2.0
## 61      team_35                
## 62 -  Mean (SD)       3.5 (1.3)
## 63    -  Median             4.0
## 64       -  IQR             3.0

CFA TEAM (RABESP - F)

model_team4 <- '
cam =~ team_6 + team_11 + team_1 + team_9
gender =~ team_5 + team_3 + team_4 + team_25
cam2 =~ team_14 + team_22 + team_7 + team_21
sensory =~ team_36 + team_37 + team_32 + team_35

general =~ cam + gender + cam2 + sensory
'

fit_team4 <- cfa(
  model_team4,
  data = df_team[idx_team, items_team4],
  estimator = "WLSMV",
  ordered = items_team4
)
summary(fit_team4, fit.measures = TRUE, standardized = TRUE)
## lavaan 0.6-18 ended normally after 45 iterations
## 
##   Estimator                                       DWLS
##   Optimization method                           NLMINB
##   Number of model parameters                        84
## 
##   Number of observations                           700
## 
## Model Test User Model:
##                                               Standard      Scaled
##   Test Statistic                               608.270     887.953
##   Degrees of freedom                               100         100
##   P-value (Chi-square)                           0.000       0.000
##   Scaling correction factor                                  0.713
##   Shift parameter                                           34.814
##     simple second-order correction                                
## 
## Model Test Baseline Model:
## 
##   Test statistic                             59050.149   19378.404
##   Degrees of freedom                               120         120
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  3.060
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.991       0.959
##   Tucker-Lewis Index (TLI)                       0.990       0.951
##                                                                   
##   Robust Comparative Fit Index (CFI)                         0.922
##   Robust Tucker-Lewis Index (TLI)                            0.907
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.085       0.106
##   90 Percent confidence interval - lower         0.079       0.100
##   90 Percent confidence interval - upper         0.092       0.113
##   P-value H_0: RMSEA <= 0.050                    0.000       0.000
##   P-value H_0: RMSEA >= 0.080                    0.911       1.000
##                                                                   
##   Robust RMSEA                                               0.098
##   90 Percent confidence interval - lower                     0.089
##   90 Percent confidence interval - upper                     0.106
##   P-value H_0: Robust RMSEA <= 0.050                         0.000
##   P-value H_0: Robust RMSEA >= 0.080                         1.000
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.067       0.067
## 
## Parameter Estimates:
## 
##   Parameterization                               Delta
##   Standard errors                           Robust.sem
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   cam =~                                                                
##     team_6            1.000                               0.895    0.895
##     team_11           0.968    0.016   58.956    0.000    0.866    0.866
##     team_1            0.968    0.017   57.451    0.000    0.866    0.866
##     team_9            0.933    0.020   47.324    0.000    0.835    0.835
##   gender =~                                                             
##     team_5            1.000                               0.807    0.807
##     team_3            1.139    0.036   31.872    0.000    0.919    0.919
##     team_4            1.065    0.035   30.165    0.000    0.859    0.859
##     team_25           0.823    0.047   17.657    0.000    0.664    0.664
##   cam2 =~                                                               
##     team_14           1.000                               0.903    0.903
##     team_22           1.000    0.014   72.096    0.000    0.904    0.904
##     team_7            0.919    0.016   55.800    0.000    0.830    0.830
##     team_21           0.935    0.016   58.335    0.000    0.844    0.844
##   sensory =~                                                            
##     team_36           1.000                               0.836    0.836
##     team_37           1.008    0.033   30.405    0.000    0.843    0.843
##     team_32           0.856    0.037   22.864    0.000    0.716    0.716
##     team_35           0.837    0.038   22.127    0.000    0.699    0.699
##   general =~                                                            
##     cam               1.000                               0.868    0.868
##     gender            0.642    0.034   18.668    0.000    0.618    0.618
##     cam2              1.107    0.036   30.588    0.000    0.952    0.952
##     sensory           0.847    0.034   24.842    0.000    0.787    0.787
## 
## Thresholds:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     team_6|t1        -0.688    0.052  -13.304    0.000   -0.688   -0.688
##     team_6|t2         0.090    0.047    1.888    0.059    0.090    0.090
##     team_6|t3         0.424    0.049    8.659    0.000    0.424    0.424
##     team_6|t4         1.258    0.064   19.683    0.000    1.258    1.258
##     team_11|t1       -0.977    0.057  -17.256    0.000   -0.977   -0.977
##     team_11|t2       -0.291    0.048   -6.035    0.000   -0.291   -0.291
##     team_11|t3        0.155    0.048    3.247    0.001    0.155    0.155
##     team_11|t4        1.204    0.062   19.335    0.000    1.204    1.204
##     team_1|t1        -0.842    0.054  -15.574    0.000   -0.842   -0.842
##     team_1|t2        -0.011    0.047   -0.227    0.821   -0.011   -0.011
##     team_1|t3         0.389    0.049    7.986    0.000    0.389    0.389
##     team_1|t4         1.359    0.067   20.189    0.000    1.359    1.359
##     team_9|t1        -0.529    0.050  -10.593    0.000   -0.529   -0.529
##     team_9|t2         0.339    0.048    7.011    0.000    0.339    0.339
##     team_9|t3         0.826    0.054   15.365    0.000    0.826    0.826
##     team_9|t4         1.734    0.085   20.401    0.000    1.734    1.734
##     team_5|t1        -1.197    0.062  -19.283    0.000   -1.197   -1.197
##     team_5|t2        -0.460    0.049   -9.331    0.000   -0.460   -0.460
##     team_5|t3        -0.082    0.047   -1.737    0.082   -0.082   -0.082
##     team_5|t4         0.782    0.053   14.734    0.000    0.782    0.782
##     team_3|t1        -0.652    0.051  -12.724    0.000   -0.652   -0.652
##     team_3|t2         0.151    0.048    3.172    0.002    0.151    0.151
##     team_3|t3         0.472    0.049    9.554    0.000    0.472    0.472
##     team_3|t4         1.161    0.061   19.014    0.000    1.161    1.161
##     team_4|t1        -0.579    0.050  -11.479    0.000   -0.579   -0.579
##     team_4|t2         0.257    0.048    5.358    0.000    0.257    0.257
##     team_4|t3         0.524    0.050   10.519    0.000    0.524    0.524
##     team_4|t4         1.234    0.063   19.538    0.000    1.234    1.234
##     team_25|t1        0.206    0.048    4.303    0.000    0.206    0.206
##     team_25|t2        0.831    0.054   15.435    0.000    0.831    0.831
##     team_25|t3        1.126    0.060   18.733    0.000    1.126    1.126
##     team_25|t4        1.785    0.088   20.243    0.000    1.785    1.785
##     team_14|t1       -1.161    0.061  -19.014    0.000   -1.161   -1.161
##     team_14|t2       -0.460    0.049   -9.331    0.000   -0.460   -0.460
##     team_14|t3       -0.184    0.048   -3.850    0.000   -0.184   -0.184
##     team_14|t4        0.797    0.053   14.946    0.000    0.797    0.797
##     team_22|t1       -1.126    0.060  -18.733    0.000   -1.126   -1.126
##     team_22|t2       -0.428    0.049   -8.734    0.000   -0.428   -0.428
##     team_22|t3       -0.129    0.048   -2.719    0.007   -0.129   -0.129
##     team_22|t4        0.847    0.054   15.643    0.000    0.847    0.847
##     team_7|t1        -1.258    0.064  -19.683    0.000   -1.258   -1.258
##     team_7|t2        -0.630    0.051  -12.359    0.000   -0.630   -0.630
##     team_7|t3        -0.355    0.049   -7.312    0.000   -0.355   -0.355
##     team_7|t4         0.787    0.053   14.805    0.000    0.787    0.787
##     team_21|t1       -1.211    0.062  -19.387    0.000   -1.211   -1.211
##     team_21|t2       -0.579    0.050  -11.479    0.000   -0.579   -0.579
##     team_21|t3       -0.287    0.048   -5.960    0.000   -0.287   -0.287
##     team_21|t4        0.763    0.053   14.451    0.000    0.763    0.763
##     team_36|t1       -0.716    0.052  -13.736    0.000   -0.716   -0.716
##     team_36|t2       -0.032    0.047   -0.680    0.497   -0.032   -0.032
##     team_36|t3        0.228    0.048    4.755    0.000    0.228    0.228
##     team_36|t4        1.175    0.061   19.123    0.000    1.175    1.175
##     team_37|t1       -0.758    0.053  -14.380    0.000   -0.758   -0.758
##     team_37|t2       -0.025    0.047   -0.529    0.597   -0.025   -0.025
##     team_37|t3        0.202    0.048    4.227    0.000    0.202    0.202
##     team_37|t4        1.080    0.059   18.321    0.000    1.080    1.080
##     team_32|t1       -1.405    0.069  -20.357    0.000   -1.405   -1.405
##     team_32|t2       -0.831    0.054  -15.435    0.000   -0.831   -0.831
##     team_32|t3       -0.591    0.051  -11.700    0.000   -0.591   -0.591
##     team_32|t4        0.420    0.049    8.584    0.000    0.420    0.420
##     team_35|t1       -1.227    0.063  -19.488    0.000   -1.227   -1.227
##     team_35|t2       -0.608    0.051  -11.993    0.000   -0.608   -0.608
##     team_35|t3       -0.217    0.048   -4.529    0.000   -0.217   -0.217
##     team_35|t4        0.596    0.051   11.773    0.000    0.596    0.596
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .team_6            0.199                               0.199    0.199
##    .team_11           0.250                               0.250    0.250
##    .team_1            0.250                               0.250    0.250
##    .team_9            0.304                               0.304    0.304
##    .team_5            0.349                               0.349    0.349
##    .team_3            0.156                               0.156    0.156
##    .team_4            0.261                               0.261    0.261
##    .team_25           0.559                               0.559    0.559
##    .team_14           0.184                               0.184    0.184
##    .team_22           0.183                               0.183    0.183
##    .team_7            0.311                               0.311    0.311
##    .team_21           0.287                               0.287    0.287
##    .team_36           0.302                               0.302    0.302
##    .team_37           0.290                               0.290    0.290
##    .team_32           0.488                               0.488    0.488
##    .team_35           0.511                               0.511    0.511
##    .cam               0.197    0.024    8.263    0.000    0.247    0.247
##    .gender            0.402    0.031   13.121    0.000    0.618    0.618
##    .cam2              0.077    0.021    3.673    0.000    0.095    0.095
##    .sensory           0.266    0.021   12.755    0.000    0.381    0.381
##     general           0.603    0.030   19.827    0.000    1.000    1.000

Item-total Rel TEAD

df_team[idx_team, ] %>%
  select(all_of(items_team4)) %>% psych::alpha()
## 
## Reliability analysis   
## Call: psych::alpha(x = .)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N    ase mean   sd median_r
##       0.92      0.92    0.94      0.42  12 0.0044    3 0.89     0.39
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.91  0.92  0.93
## Duhachek  0.91  0.92  0.93
## 
##  Reliability if an item is dropped:
##         raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## team_6       0.91      0.91    0.93      0.41  11   0.0048 0.019  0.39
## team_11      0.91      0.91    0.93      0.41  11   0.0048 0.019  0.39
## team_1       0.91      0.91    0.93      0.42  11   0.0047 0.018  0.39
## team_9       0.91      0.91    0.93      0.41  11   0.0047 0.020  0.38
## team_5       0.92      0.92    0.94      0.42  11   0.0046 0.022  0.40
## team_3       0.92      0.92    0.93      0.43  11   0.0045 0.019  0.40
## team_4       0.92      0.92    0.93      0.44  12   0.0044 0.017  0.40
## team_25      0.92      0.92    0.94      0.44  12   0.0044 0.019  0.41
## team_14      0.91      0.91    0.93      0.41  10   0.0049 0.018  0.38
## team_22      0.91      0.91    0.93      0.41  10   0.0049 0.018  0.38
## team_7       0.91      0.91    0.93      0.42  11   0.0048 0.019  0.38
## team_21      0.91      0.91    0.93      0.41  11   0.0048 0.019  0.38
## team_36      0.92      0.92    0.93      0.42  11   0.0046 0.021  0.39
## team_37      0.92      0.92    0.93      0.42  11   0.0046 0.021  0.39
## team_32      0.92      0.92    0.94      0.43  11   0.0045 0.021  0.39
## team_35      0.92      0.92    0.94      0.43  11   0.0046 0.021  0.39
## 
##  Item statistics 
##           n raw.r std.r r.cor r.drop mean  sd
## team_6  700  0.76  0.76  0.75   0.71  2.7 1.3
## team_11 700  0.73  0.73  0.72   0.68  3.0 1.3
## team_1  700  0.72  0.72  0.71   0.67  2.7 1.3
## team_9  700  0.72  0.73  0.71   0.68  2.3 1.2
## team_5  700  0.64  0.64  0.60   0.58  3.3 1.3
## team_3  700  0.60  0.60  0.58   0.53  2.6 1.4
## team_4  700  0.53  0.53  0.51   0.46  2.5 1.4
## team_25 700  0.48  0.49  0.43   0.42  1.8 1.1
## team_14 700  0.80  0.80  0.80   0.76  3.3 1.3
## team_22 700  0.79  0.79  0.79   0.75  3.3 1.3
## team_7  700  0.72  0.72  0.71   0.67  3.5 1.3
## team_21 700  0.76  0.76  0.74   0.71  3.4 1.3
## team_36 700  0.67  0.66  0.64   0.61  2.8 1.4
## team_37 700  0.68  0.67  0.65   0.62  2.8 1.4
## team_32 700  0.60  0.60  0.56   0.54  3.8 1.3
## team_35 700  0.61  0.61  0.57   0.55  3.5 1.3
## 
## Non missing response frequency for each item
##            1    2    3    4    5 miss
## team_6  0.25 0.29 0.13 0.23 0.10    0
## team_11 0.16 0.22 0.18 0.32 0.11    0
## team_1  0.20 0.30 0.16 0.26 0.09    0
## team_9  0.30 0.33 0.16 0.16 0.04    0
## team_5  0.12 0.21 0.14 0.32 0.22    0
## team_3  0.26 0.30 0.12 0.20 0.12    0
## team_4  0.28 0.32 0.10 0.19 0.11    0
## team_25 0.58 0.22 0.07 0.09 0.04    0
## team_14 0.12 0.20 0.10 0.36 0.21    0
## team_22 0.13 0.20 0.11 0.35 0.20    0
## team_7  0.10 0.16 0.10 0.42 0.22    0
## team_21 0.11 0.17 0.11 0.39 0.22    0
## team_36 0.24 0.25 0.10 0.29 0.12    0
## team_37 0.22 0.27 0.09 0.28 0.14    0
## team_32 0.08 0.12 0.07 0.39 0.34    0
## team_35 0.11 0.16 0.14 0.31 0.28    0

Reliability

# For Brief-Spec-A (fit_tead5)
list("team 20",semTools::reliability(fit_tead5),
     "tead 16",semTools::reliability(fit_team4))
## For constructs with categorical indicators, Zumbo et al.`s (2007) "ordinal alpha" is calculated in addition to the standard alpha, which treats ordinal variables as numeric. See Chalmers (2018) for a critique of "alpha.ord" and the response by Zumbo & Kroc (2019). Likewise, average variance extracted is calculated from polychoric (polyserial) not Pearson correlations.
## 
## For constructs with categorical indicators, Zumbo et al.`s (2007) "ordinal alpha" is calculated in addition to the standard alpha, which treats ordinal variables as numeric. See Chalmers (2018) for a critique of "alpha.ord" and the response by Zumbo & Kroc (2019). Likewise, average variance extracted is calculated from polychoric (polyserial) not Pearson correlations.
## [[1]]
## [1] "team 20"
## 
## [[2]]
##             soc_com soc_inter sensorial   rep_beh
## alpha     0.8679975 0.8605879 0.8307374 0.8568766
## alpha.ord 0.8995426 0.8926398 0.8685952 0.8922951
## omega     0.8857457 0.8564335 0.8444639 0.8641581
## omega2    0.8857457 0.8564335 0.8444639 0.8641581
## omega3    0.9180544 0.8610669 0.8711119 0.8792135
## avevar    0.6809998 0.6301366 0.5959756 0.6389393
## 
## [[3]]
## [1] "tead 16"
## 
## [[4]]
##                 cam    gender      cam2   sensory
## alpha     0.8915353 0.7903861 0.8976807 0.7825448
## alpha.ord 0.9199460 0.8362149 0.9257882 0.8174303
## omega     0.8987770 0.8600699 0.8993120 0.8231042
## omega2    0.8987770 0.8600699 0.8993120 0.8231042
## omega3    0.9037434 0.9411507 0.8992852 0.8812163
## avevar    0.7491958 0.6686843 0.7584719 0.6024564

Norms

TEAD

df_tead <- df_tead %>%
  mutate(
    brief_soc_com   = tead_8 + tead_35 + tead_36 + tead_38 + tead_33,
    brief_soc_inter = tead_9 + tead_3 + tead_5 + tead_28 + tead_29,
    brief_sensorial = tead_70 + tead_69 + tead_4 + tead_73 + tead_66,
    brief_rep_beh   = tead_52 + tead_59 + tead_60 + tead_63 + tead_56,
    brief_total     = brief_soc_com + brief_soc_inter + brief_sensorial + brief_rep_beh
  )
summary(tableby(
  ~ idade + escolaridade + genero + brief_soc_com + brief_soc_inter + brief_sensorial + brief_rep_beh + brief_total,
  data = df_tead[idx_tead, ]
), text = TRUE) %>%
  data.frame() %>%
  print.data.frame()
##                    Var.1  Overall..N.700.
## 1                  idade                 
## 2           -  Mean (SD)  37.556 (11.710)
## 3               -  Range  18.000 - 78.000
## 4           escolaridade                 
## 5  -  Ensino Fundamental        19 (2.7%)
## 6        -  Ensino Médio       87 (12.4%)
## 7     -  Ensino Superior      306 (43.7%)
## 8              -  Outros        26 (3.7%)
## 9       -  Pós graduação      262 (37.4%)
## 10                genero                 
## 11           -  Feminino      343 (49.0%)
## 12          -  Masculino      350 (50.0%)
## 13             -  Outros         7 (1.0%)
## 14         brief_soc_com                 
## 15          -  Mean (SD)   15.337 (5.053)
## 16              -  Range   5.000 - 25.000
## 17       brief_soc_inter                 
## 18          -  Mean (SD)   19.486 (4.756)
## 19              -  Range   5.000 - 25.000
## 20       brief_sensorial                 
## 21          -  Mean (SD)   18.474 (4.862)
## 22              -  Range   5.000 - 25.000
## 23         brief_rep_beh                 
## 24          -  Mean (SD)   18.777 (4.749)
## 25              -  Range   5.000 - 25.000
## 26           brief_total                 
## 27          -  Mean (SD)  72.074 (16.512)
## 28              -  Range 20.000 - 100.000
df_tead[idx_tead, ] %>%
  summarise(
    brief_soc_com_p60   = quantile(brief_soc_com,   0.60, na.rm = TRUE),
    brief_soc_inter_p60 = quantile(brief_soc_inter, 0.60, na.rm = TRUE),
    brief_sensorial_p60 = quantile(brief_sensorial, 0.60, na.rm = TRUE),
    brief_rep_beh_p60   = quantile(brief_rep_beh,   0.60, na.rm = TRUE),
    brief_total_p60     = quantile(brief_total,     0.60, na.rm = TRUE)
  ) %>% t()
##                     [,1]
## brief_soc_com_p60     17
## brief_soc_inter_p60   22
## brief_sensorial_p60   21
## brief_rep_beh_p60     21
## brief_total_p60       79
df_tead[idx_tead, ] %>%
  select(brief_soc_com, brief_soc_inter, brief_sensorial, brief_rep_beh, brief_total, aq_total) %>%
  correlation::correlation() %>% 
  as.data.frame() %>%
  filter(Parameter2 %in% ("aq_total"))
##        Parameter1 Parameter2         r   CI    CI_low   CI_high        t
## 1   brief_soc_com   aq_total 0.6855058 0.95 0.6441231 0.7228875 24.87525
## 2 brief_soc_inter   aq_total 0.5608157 0.95 0.5078167 0.6095853 17.89570
## 3 brief_sensorial   aq_total 0.5984113 0.95 0.5486373 0.6439585 19.73297
## 4   brief_rep_beh   aq_total 0.5406884 0.95 0.4860603 0.5911076 16.98102
## 5     brief_total   aq_total 0.7030005 0.95 0.6634601 0.7386251 26.11548
##   df_error             p              Method n_Obs
## 1      698  2.746686e-97 Pearson correlation   700
## 2      698  9.338547e-59 Pearson correlation   700
## 3      698  1.613433e-68 Pearson correlation   700
## 4      698  2.154638e-54 Pearson correlation   700
## 5      698 2.287577e-104 Pearson correlation   700

TEAM

df_team <- df_team %>%
  mutate(
    brief_cam      = team_6 + team_11 + team_1 + team_9,
    brief_gender   = team_5 + team_3 + team_4 + team_25,
    brief_cam2     = team_14 + team_22 + team_7 + team_21,
    brief_sensory  = team_36 + team_37 + team_32 + team_35,
    brief_total    = brief_cam + brief_gender + brief_cam2 + brief_sensory
  )
summary(tableby(
  ~ idade + escolaridade + genero + brief_cam + brief_gender + brief_cam2 + brief_sensory + brief_total,
  data = df_team[idx_team, ]
), text = TRUE) %>%
  data.frame() %>%
  print.data.frame()
##                    Var.1 Overall..N.700.
## 1                  idade                
## 2           -  Mean (SD) 40.286 (10.277)
## 3               -  Range 18.000 - 73.000
## 4           escolaridade                
## 5  -  Ensino Fundamental        7 (1.0%)
## 6        -  Ensino Médio       69 (9.9%)
## 7     -  Ensino Superior     271 (38.7%)
## 8              -  Outros       19 (2.7%)
## 9       -  Pós graduação     334 (47.7%)
## 10                genero                
## 11           -  Feminino     695 (99.3%)
## 12             -  Outros        5 (0.7%)
## 13             brief_cam                
## 14          -  Mean (SD)  10.716 (4.429)
## 15              -  Range  4.000 - 20.000
## 16          brief_gender                
## 17          -  Mean (SD)  10.250 (4.088)
## 18              -  Range  4.000 - 20.000
## 19            brief_cam2                
## 20          -  Mean (SD)  13.553 (4.602)
## 21              -  Range  4.000 - 20.000
## 22         brief_sensory                
## 23          -  Mean (SD)  12.909 (4.197)
## 24              -  Range  4.000 - 20.000
## 25           brief_total                
## 26          -  Mean (SD) 47.427 (14.174)
## 27              -  Range 16.000 - 80.000
df_team[idx_team, ] %>%
  summarise(
    brief_cam_p60      = quantile(brief_cam,      0.60, na.rm = TRUE),
    brief_gender_p60   = quantile(brief_gender,   0.60, na.rm = TRUE),
    brief_cam2_p60     = quantile(brief_cam2,     0.60, na.rm = TRUE),
    brief_sensory_p60  = quantile(brief_sensory,  0.60, na.rm = TRUE),
    brief_total_p60    = quantile(brief_total,    0.60, na.rm = TRUE)
  ) %>% t()
##                   [,1]
## brief_cam_p60       12
## brief_gender_p60    11
## brief_cam2_p60      16
## brief_sensory_p60   14
## brief_total_p60     52

Criterion

df_team[idx_team, ] %>%
  select(brief_cam, brief_gender, brief_cam2, brief_sensory, brief_total, aq_total) %>%
  correlation::correlation() %>% 
  as.data.frame() %>%
  filter(Parameter2 %in% ("aq_total"))
##      Parameter1 Parameter2         r   CI    CI_low   CI_high         t
## 1     brief_cam   aq_total 0.4432212 0.95 0.3816534 0.5008734 13.062925
## 2  brief_gender   aq_total 0.2984622 0.95 0.2294337 0.3645034  8.261842
## 3    brief_cam2   aq_total 0.4828456 0.95 0.4239104 0.5377091 14.567261
## 4 brief_sensory   aq_total 0.4700173 0.95 0.4102017 0.5258065 14.068556
## 5   brief_total   aq_total 0.5205238 0.95 0.4643312 0.5725423 16.106015
##   df_error            p              Method n_Obs
## 1      698 1.439785e-34 Pearson correlation   700
## 2      698 7.202651e-16 Pearson correlation   700
## 3      698 2.178330e-41 Pearson correlation   700
## 4      698 4.649548e-39 Pearson correlation   700
## 5      698 5.864073e-49 Pearson correlation   700

! Done (July 21, 2025 - Goducks!)