Banco de dados

library(readxl)
library(tidyverse)

# Read dataset
database <- read.csv("C:/Dropbox/Laboratorio/Fernanda Gomes/Baseline.csv")

# See names
colnames(database)
##   [1] "ID"                     "Group"                  "Age"                   
##   [4] "Race"                   "Education"              "Type"                  
##   [7] "carac_abuso"            "profilaxia"             "q1"                    
##  [10] "q2"                     "q3"                     "q4"                    
##  [13] "q5"                     "q6"                     "q7"                    
##  [16] "q8"                     "q9"                     "q10"                   
##  [19] "q11"                    "q12"                    "q13"                   
##  [22] "q14"                    "q15"                    "q16"                   
##  [25] "q17"                    "q18"                    "q19"                   
##  [28] "q20"                    "q21"                    "q22"                   
##  [31] "q23"                    "q24"                    "q25"                   
##  [34] "q26"                    "q27"                    "q28"                   
##  [37] "Quesi"                  "CAPS.A"                 "CAPS.B"                
##  [40] "CAPS.C"                 "CAPS.D"                 "CAPS.E"                
##  [43] "CAPS.BE"                "CAPS.G"                 "Depersonalization"     
##  [46] "Derealization"          "Dissociation"           "Vocabulary"            
##  [49] "Matrix.Reasoning"       "IQ"                     "A1"                    
##  [52] "A2"                     "A3"                     "A4"                    
##  [55] "A5"                     "B1"                     "A6"                    
##  [58] "A7"                     "Recog.A"                "Recog.B"               
##  [61] "erro_fa"                "erro_fb"                "erro_sa"               
##  [64] "erro_sb"                "int_proativa"           "int_retroativa"        
##  [67] "Intrusion"              "Perseverance"           "Primacy"               
##  [70] "Recency"                "Total.RAVLT"            "Forgetfulness.Rate"    
##  [73] "n_cat"                  "n_erro"                 "perda_set"             
##  [76] "tempo_c"                "Time.CW"                "Time.C"                
##  [79] "acertos_cw"             "total_erros_c"          "total_erros_cw"        
##  [82] "cw_c"                   "Digits.forward"         "Digits.backward"       
##  [85] "total_digitos"          "digitos_direto_inverso" "Span.forward"          
##  [88] "Span.backward"          "Corsi.forward"          "Corsi.backward"        
##  [91] "corsi_total"            "corsi_direto_inverso"   "corsi_span_direto"     
##  [94] "corsi_span_inverso"     "lembra_espontanea"      "lembra_dica"           
##  [97] "nao_lembra"             "d2.RB"                  "d2.RL"                 
## [100] "d2_ao"                  "d2_porcentagem_erros"   "d2_erro1"              
## [103] "d2_erro2"               "d2_1_4"                 "d2_5_1."               
## [106] "d2_11_14"               "d2_erro_total"          "fdt_lei_tempo1"        
## [109] "fdt_lei_erro1"          "fdt_lei_tempo2"         "fdt_lei_erro2"         
## [112] "Reading.time"           "fdt_lei_erro_total"     "fdt_con_tempo1"        
## [115] "fdt_con_erro1"          "fdt_con_tempo2"         "fdt_con_erro2"         
## [118] "Count.time"             "fdt_con_erro_total"     "fdt_esc_tempo1"        
## [121] "fdt_esc_erro1"          "fdt_esc_tempo2"         "fdt_esc_erro2"         
## [124] "Choice.time"            "fdt_esc_erro_total"     "fdt_alt_tempo1"        
## [127] "fdt_alt_erro1"          "fdt_alt_tempo2"         "fdt_alt_erro2"         
## [130] "Alternation.time"       "fdt_alt_erro_total"     "Inhibition"            
## [133] "Flexibility"
# Select variables
red <- database %>% select(Group, Age, Education, Type, Quesi, Depersonalization:Matrix.Reasoning,
                           IQ:Recog.B,Intrusion:Forgetfulness.Rate, Time.CW, Time.C, Digits.forward, Digits.backward,
                           Span.forward:Corsi.backward, d2.RB, d2.RL, Reading.time, Count.time, Choice.time,
                           Alternation.time, Inhibition, Flexibility, n_cat, n_erro, perda_set, Time.C, Time.CW)
# See variables
red %>% glimpse()
## Rows: 45
## Columns: 46
## $ Group              <chr> "Case", "Case", "Case", "Case", "Case", "Case", ...
## $ Age                <int> 16, 14, 14, 17, 17, 17, 14, 14, 14, 14, 15, 14, ...
## $ Education          <int> 11, 10, 8, 12, 12, 12, 10, 10, 9, 8, 11, 9, 11, ...
## $ Type               <chr> "Once", "Once", "Once", "Once", "Once", "Once", ...
## $ Quesi              <int> 55, 67, 49, 40, 42, 54, 50, 53, 57, 42, 39, 88, ...
## $ Depersonalization  <int> 2, 0, 0, 1, 0, 0, 4, 0, 0, 1, 2, 4, 1, 0, 0, 2, ...
## $ Derealization      <int> 2, 1, 0, 2, 0, 0, 4, 0, 0, 0, 0, 4, 1, 2, 0, 2, ...
## $ Dissociation       <int> 4, 1, 0, 3, 0, 0, 8, 0, 0, 1, 2, 8, 2, 2, 0, 4, ...
## $ Vocabulary         <int> 44, 30, 48, 39, 42, 28, 22, 42, 55, 41, 56, 44, ...
## $ Matrix.Reasoning   <int> 18, 16, 27, 14, 25, 25, 24, 21, 24, 29, 28, 27, ...
## $ IQ                 <int> 80, 70, 99, 72, 89, 80, 77, 87, 101, 98, 104, 95...
## $ A1                 <int> 7, 4, 6, 7, 6, 7, 5, 5, 5, 5, 9, 8, 5, 7, 6, 7, ...
## $ A2                 <int> 11, 4, 9, 8, 8, 8, 6, 7, 6, 5, 11, 8, 7, 8, 8, 5...
## $ A3                 <int> 10, 4, 3, 8, 9, 10, 4, 7, 8, 4, 13, 10, 8, 9, 11...
## $ A4                 <int> 11, 4, 9, 9, 9, 12, 6, 8, 9, 11, 11, 12, 8, 11, ...
## $ A5                 <int> 11, 4, 6, 10, 9, 10, 8, 9, 12, 10, 14, 13, 12, 9...
## $ B1                 <int> 5, 3, 6, 6, 6, 6, 3, 4, 4, 5, 6, 5, 13, 5, 5, 5,...
## $ A6                 <int> 6, 4, 7, 7, 9, 8, 9, 6, 10, 6, 11, 12, 10, 9, 7,...
## $ A7                 <int> 5, 6, 8, 8, 7, 10, 6, 6, 9, 8, 15, 12, 9, 7, 9, ...
## $ Recog.A            <int> 10, 11, 14, 15, 12, 15, 15, 11, 12, 15, 15, 15, ...
## $ Recog.B            <int> 6, 3, 8, 12, 9, 12, 6, 10, 7, 6, 12, 10, 4, 7, 1...
## $ Intrusion          <int> 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, ...
## $ Perseverance       <int> 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, ...
## $ Primacy            <int> 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, ...
## $ Recency            <int> 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, ...
## $ Total.RAVLT        <int> 50, 20, 33, 42, 63, 47, 29, 36, 40, 35, 58, 51, ...
## $ Forgetfulness.Rate <dbl> 0.8, 1.5, 1.1, 1.1, 0.8, 1.3, 0.7, 1.0, 0.9, 1.3...
## $ Time.CW            <int> 158, 108, 125, 182, 110, 136, 167, 136, 127, 142...
## $ Time.C             <int> 116, 116, 116, 115, 116, 116, 116, 116, 116, 116...
## $ Digits.forward     <int> 8, 7, 6, 6, 7, 5, 4, 5, 10, 6, 8, 2, 8, 6, 8, 5,...
## $ Digits.backward    <int> 6, 7, 8, 3, 5, 4, 0, 5, 6, 9, 11, 4, 6, 1, 5, 1,...
## $ Span.forward       <int> 6, 5, 4, 4, 6, 4, 3, 4, 6, 5, 5, 2, 5, 5, 7, 4, ...
## $ Span.backward      <int> 3, 4, 5, 3, 4, 4, 0, 3, 4, 5, 7, 4, 3, 2, 3, 2, ...
## $ Corsi.forward      <int> 4, 8, 9, 6, 10, 7, 6, 7, 9, 8, 10, 7, 8, 5, 7, 5...
## $ Corsi.backward     <int> 2, 4, 5, 5, 6, 7, 5, 4, 4, 7, 7, 4, 8, 5, 3, 3, ...
## $ d2.RB              <int> 374, 343, 388, 310, 402, 477, 208, 263, 396, 330...
## $ d2.RL              <int> 360, 318, 378, 282, 393, 457, 189, 225, 382, 319...
## $ Reading.time       <int> 29, 19, 17, 30, 24, 25, 25, 23, 22, 26, 17, 41, ...
## $ Count.time         <int> 30, 25, 22, 43, 26, 25, 32, 30, 31, 31, 28, 47, ...
## $ Choice.time        <int> 50, 40, 36, 64, 36, 44, 46, 40, 36, 55, 47, 96, ...
## $ Alternation.time   <int> 59, 48, 53, 69, 44, 89, 56, 66, 52, 66, 56, 91, ...
## $ Inhibition         <int> 21, 21, 19, 34, 12, 19, 21, 17, 14, 29, 30, 55, ...
## $ Flexibility        <int> 30, 29, 36, 39, 20, 64, 31, 43, 30, 40, 39, 50, ...
## $ n_cat              <int> 1, 3, 4, 4, 5, 3, 1, 0, 4, 3, 4, 3, 3, 2, 0, 2, ...
## $ n_erro             <int> 12, 15, 6, 6, 4, 10, 16, 22, 7, 13, 10, 17, 15, ...
## $ perda_set          <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, ...

Descritivas (Caso vs Controle)

# Describe by Groups (Case vs. Control)
psych::describeBy(red[,c(2,3,9:19,26,27,30:46)], red$Group, tr=.2)
## 
##  Descriptive statistics by group 
## group: Case
##                    vars  n   mean    sd median trimmed   mad   min   max range
## Age                   1 31  15.13  1.12     15   14.95  1.48  14.0  17.0   3.0
## Education             2 31  10.45  1.31     11   10.63  1.48   8.0  12.0   4.0
## Vocabulary            3 31  38.84  8.55     40   39.00  7.41  22.0  56.0  34.0
## Matrix.Reasoning      4 31  21.71  4.74     22   21.89  4.45  12.0  29.0  17.0
## IQ                    5 31  83.55 10.30     81   82.42 11.86  70.0 104.0  34.0
## A1                    6 31   6.23  1.59      6    6.05  1.48   3.0  10.0   7.0
## A2                    7 31   7.68  1.68      8    7.68  1.48   4.0  11.0   7.0
## A3                    8 31   8.52  2.66      9    8.84  1.48   3.0  13.0  10.0
## A4                    9 31   9.81  2.15     10   10.00  2.97   4.0  13.0   9.0
## A5                   10 31  10.00  2.45     10   10.26  1.48   3.0  14.0  11.0
## B1                   11 31   4.97  1.99      5    4.95  1.48   1.0  13.0  12.0
## A6                   12 31   8.65  2.30      9    8.74  2.97   4.0  12.0   8.0
## A7                   13 31   8.61  2.62      9    8.58  2.97   4.0  15.0  11.0
## Total.RAVLT          14 31  42.90  9.22     43   43.37  8.90  20.0  63.0  43.0
## Forgetfulness.Rate   15 31   1.01  0.20      1    0.98  0.15   0.7   1.5   0.8
## Digits.forward       16 31   6.26  2.07      6    6.47  1.48   2.0  10.0   8.0
## Digits.backward      17 31   5.61  2.40      6    5.74  1.48   0.0  11.0  11.0
## Span.forward         18 31   4.55  1.26      5    4.63  1.48   2.0   7.0   5.0
## Span.backward        19 31   3.52  1.21      3    3.42  1.48   0.0   7.0   7.0
## Corsi.forward        20 31   6.94  1.48      7    6.84  1.48   4.0  10.0   6.0
## Corsi.backward       21 31   4.84  1.75      5    4.84  1.48   1.0   9.0   8.0
## d2.RB                22 31 361.48 82.24    374  357.89 94.89 208.0 531.0 323.0
## d2.RL                23 31 335.74 82.66    338  338.05 87.47 189.0 480.0 291.0
## Reading.time         24 31  24.26  5.01     24   23.74  4.45  17.0  41.0  24.0
## Count.time           25 31  30.84  5.77     30   29.95  2.97  22.0  47.0  25.0
## Choice.time          26 31  50.32 11.91     49   48.58  8.90  36.0  96.0  60.0
## Alternation.time     27 31  63.52 13.06     61   61.74 11.86  44.0 105.0  61.0
## Inhibition           28 31  26.06  9.01     26   25.58  7.41  10.0  55.0  45.0
## Flexibility          29 31  39.26 11.39     39   37.95 11.86  20.0  75.0  55.0
## n_cat                30 31   2.65  1.40      3    2.74  1.48   0.0   5.0   5.0
## n_erro               31 31  10.26  5.26      9   10.00  5.93   0.0  22.0  22.0
## perda_set            32 31   0.32  0.75      0    0.00  0.00   0.0   3.0   3.0
##                     skew kurtosis    se
## Age                 0.45    -1.26  0.20
## Education          -0.50    -0.82  0.24
## Vocabulary          0.00    -0.70  1.54
## Matrix.Reasoning   -0.28    -0.95  0.85
## IQ                  0.38    -1.13  1.85
## A1                  0.47    -0.11  0.28
## A2                 -0.03    -0.41  0.30
## A3                 -0.62    -0.37  0.48
## A4                 -0.65    -0.03  0.39
## A5                 -0.97     1.18  0.44
## B1                  1.76     6.27  0.36
## A6                 -0.20    -1.08  0.41
## A7                  0.20    -0.39  0.47
## Total.RAVLT        -0.29     0.09  1.66
## Forgetfulness.Rate  0.58    -0.42  0.04
## Digits.forward     -0.42    -0.31  0.37
## Digits.backward    -0.32     0.12  0.43
## Span.forward       -0.30    -0.13  0.23
## Span.backward       0.07     2.03  0.22
## Corsi.forward       0.29    -0.51  0.27
## Corsi.backward      0.09    -0.07  0.31
## d2.RB               0.14    -1.04 14.77
## d2.RL              -0.08    -1.14 14.85
## Reading.time        1.08     1.78  0.90
## Count.time          1.14     1.00  1.04
## Choice.time         1.79     4.58  2.14
## Alternation.time    1.28     1.76  2.34
## Inhibition          0.78     1.42  1.62
## Flexibility         1.04     1.48  2.05
## n_cat              -0.22    -0.68  0.25
## n_erro              0.23    -0.85  0.94
## perda_set           2.22     4.03  0.13
## ------------------------------------------------------------ 
## group: Control
##                    vars  n   mean    sd median trimmed   mad   min   max range
## Age                   1 14  16.00  1.18   16.5   16.20  0.74  14.0  17.0   3.0
## Education             2 14  11.07  1.38   11.5   11.30  0.74   8.0  13.0   5.0
## Vocabulary            3 14  46.29  6.96   47.0   47.10  6.67  31.0  55.0  24.0
## Matrix.Reasoning      4 14  27.57  2.56   27.0   27.70  3.71  23.0  31.0   8.0
## IQ                    5 14  96.86  7.81   97.0   97.30  9.64  84.0 109.0  25.0
## A1                    6 14   6.64  1.60    7.0    6.80  1.48   4.0   9.0   5.0
## A2                    7 14   8.64  1.91    9.0    8.80  2.22   5.0  11.0   6.0
## A3                    8 14  10.14  2.07   11.0   10.60  0.74   4.0  12.0   8.0
## A4                    9 14  11.79  0.89   12.0   11.80  1.48  10.0  13.0   3.0
## A5                   10 14  12.00  1.47   11.5   11.80  0.74  10.0  15.0   5.0
## B1                   11 14   4.71  1.73    4.5    4.60  2.22   2.0   8.0   6.0
## A6                   12 14  11.07  1.90   11.0   11.30  1.48   7.0  14.0   7.0
## A7                   13 14  10.29  1.98   10.0   10.20  2.22   7.0  14.0   7.0
## Total.RAVLT          14 14  49.21  6.13   51.0   50.50  4.45  35.0  55.0  20.0
## Forgetfulness.Rate   15 14   0.94  0.12    1.0    0.95  0.15   0.7   1.1   0.4
## Digits.forward       16 14   8.21  1.85    8.0    8.20  1.48   5.0  11.0   6.0
## Digits.backward      17 14   6.29  1.94    6.5    6.30  2.22   3.0  10.0   7.0
## Span.forward         18 14   5.71  1.07    5.5    5.60  0.74   4.0   8.0   4.0
## Span.backward        19 14   4.36  0.84    4.0    4.40  1.48   3.0   6.0   3.0
## Corsi.forward        20 14   7.86  1.51    8.0    8.00  1.48   4.0  10.0   6.0
## Corsi.backward       21 14   6.71  1.90    6.0    6.70  1.48   3.0  10.0   7.0
## d2.RB                22 14 417.50 68.34  408.5  417.20 37.81 259.0 549.0 290.0
## d2.RL                23 14 406.07 69.72  400.0  408.30 44.48 251.0 527.0 276.0
## Reading.time         24 14  23.21  5.92   22.5   22.40  3.71  16.0  39.0  23.0
## Count.time           25 14  27.07  4.73   26.0   26.50  5.19  21.0  37.0  16.0
## Choice.time          26 14  39.86  7.23   38.0   39.00  7.41  32.0  52.0  20.0
## Alternation.time     27 14  50.50  9.67   49.5   50.10 13.34  38.0  66.0  28.0
## Inhibition           28 14  16.64  5.51   17.5   16.60  6.67   8.0  25.0  17.0
## Flexibility          29 14  27.29  7.47   27.5   27.80  6.67  14.0  39.0  25.0
## n_cat                30 14   3.36  1.01    3.0    3.30  1.48   2.0   5.0   3.0
## n_erro               31 14   7.71  2.67    7.0    7.70  2.97   4.0  12.0   8.0
## perda_set            32 14   0.43  0.65    0.0    0.30  0.00   0.0   2.0   2.0
##                     skew kurtosis    se
## Age                -0.53    -1.44  0.31
## Education          -0.76    -0.51  0.37
## Vocabulary         -0.62    -0.66  1.86
## Matrix.Reasoning   -0.14    -1.58  0.69
## IQ                 -0.20    -1.35  2.09
## A1                 -0.61    -0.95  0.43
## A2                 -0.33    -1.16  0.51
## A3                 -1.82     2.73  0.55
## A4                 -0.22    -0.95  0.24
## A5                  0.68    -0.91  0.39
## B1                  0.24    -1.14  0.46
## A6                 -0.59    -0.42  0.51
## A7                  0.19    -0.96  0.53
## Total.RAVLT        -0.94    -0.33  1.64
## Forgetfulness.Rate -0.53    -0.77  0.03
## Digits.forward      0.19    -1.04  0.49
## Digits.backward     0.04    -1.01  0.52
## Span.forward        0.53    -0.65  0.29
## Span.backward       0.06    -0.86  0.23
## Corsi.forward      -0.89     0.47  0.40
## Corsi.backward      0.01    -0.88  0.51
## d2.RB              -0.22     0.30 18.26
## d2.RL              -0.27    -0.16 18.63
## Reading.time        1.18     1.08  1.58
## Count.time          0.56    -0.81  1.26
## Choice.time         0.45    -1.48  1.93
## Alternation.time    0.20    -1.58  2.58
## Inhibition         -0.05    -1.51  1.47
## Flexibility        -0.20    -1.00  2.00
## n_cat               0.15    -1.24  0.27
## n_erro              0.08    -1.47  0.71
## perda_set           1.04    -0.20  0.17

Descritivas (Tipos de Abuso)

# Describe by Types (Multiple, Once, Control)
psych::describeBy(red[,c(2,3,9:19,26,27,30:46)], red$Type, tr=.2)
## 
##  Descriptive statistics by group 
## group: Control
##                    vars  n   mean    sd median trimmed   mad   min   max range
## Age                   1 14  16.00  1.18   16.5   16.20  0.74  14.0  17.0   3.0
## Education             2 14  11.07  1.38   11.5   11.30  0.74   8.0  13.0   5.0
## Vocabulary            3 14  46.29  6.96   47.0   47.10  6.67  31.0  55.0  24.0
## Matrix.Reasoning      4 14  27.57  2.56   27.0   27.70  3.71  23.0  31.0   8.0
## IQ                    5 14  96.86  7.81   97.0   97.30  9.64  84.0 109.0  25.0
## A1                    6 14   6.64  1.60    7.0    6.80  1.48   4.0   9.0   5.0
## A2                    7 14   8.64  1.91    9.0    8.80  2.22   5.0  11.0   6.0
## A3                    8 14  10.14  2.07   11.0   10.60  0.74   4.0  12.0   8.0
## A4                    9 14  11.79  0.89   12.0   11.80  1.48  10.0  13.0   3.0
## A5                   10 14  12.00  1.47   11.5   11.80  0.74  10.0  15.0   5.0
## B1                   11 14   4.71  1.73    4.5    4.60  2.22   2.0   8.0   6.0
## A6                   12 14  11.07  1.90   11.0   11.30  1.48   7.0  14.0   7.0
## A7                   13 14  10.29  1.98   10.0   10.20  2.22   7.0  14.0   7.0
## Total.RAVLT          14 14  49.21  6.13   51.0   50.50  4.45  35.0  55.0  20.0
## Forgetfulness.Rate   15 14   0.94  0.12    1.0    0.95  0.15   0.7   1.1   0.4
## Digits.forward       16 14   8.21  1.85    8.0    8.20  1.48   5.0  11.0   6.0
## Digits.backward      17 14   6.29  1.94    6.5    6.30  2.22   3.0  10.0   7.0
## Span.forward         18 14   5.71  1.07    5.5    5.60  0.74   4.0   8.0   4.0
## Span.backward        19 14   4.36  0.84    4.0    4.40  1.48   3.0   6.0   3.0
## Corsi.forward        20 14   7.86  1.51    8.0    8.00  1.48   4.0  10.0   6.0
## Corsi.backward       21 14   6.71  1.90    6.0    6.70  1.48   3.0  10.0   7.0
## d2.RB                22 14 417.50 68.34  408.5  417.20 37.81 259.0 549.0 290.0
## d2.RL                23 14 406.07 69.72  400.0  408.30 44.48 251.0 527.0 276.0
## Reading.time         24 14  23.21  5.92   22.5   22.40  3.71  16.0  39.0  23.0
## Count.time           25 14  27.07  4.73   26.0   26.50  5.19  21.0  37.0  16.0
## Choice.time          26 14  39.86  7.23   38.0   39.00  7.41  32.0  52.0  20.0
## Alternation.time     27 14  50.50  9.67   49.5   50.10 13.34  38.0  66.0  28.0
## Inhibition           28 14  16.64  5.51   17.5   16.60  6.67   8.0  25.0  17.0
## Flexibility          29 14  27.29  7.47   27.5   27.80  6.67  14.0  39.0  25.0
## n_cat                30 14   3.36  1.01    3.0    3.30  1.48   2.0   5.0   3.0
## n_erro               31 14   7.71  2.67    7.0    7.70  2.97   4.0  12.0   8.0
## perda_set            32 14   0.43  0.65    0.0    0.30  0.00   0.0   2.0   2.0
##                     skew kurtosis    se
## Age                -0.53    -1.44  0.31
## Education          -0.76    -0.51  0.37
## Vocabulary         -0.62    -0.66  1.86
## Matrix.Reasoning   -0.14    -1.58  0.69
## IQ                 -0.20    -1.35  2.09
## A1                 -0.61    -0.95  0.43
## A2                 -0.33    -1.16  0.51
## A3                 -1.82     2.73  0.55
## A4                 -0.22    -0.95  0.24
## A5                  0.68    -0.91  0.39
## B1                  0.24    -1.14  0.46
## A6                 -0.59    -0.42  0.51
## A7                  0.19    -0.96  0.53
## Total.RAVLT        -0.94    -0.33  1.64
## Forgetfulness.Rate -0.53    -0.77  0.03
## Digits.forward      0.19    -1.04  0.49
## Digits.backward     0.04    -1.01  0.52
## Span.forward        0.53    -0.65  0.29
## Span.backward       0.06    -0.86  0.23
## Corsi.forward      -0.89     0.47  0.40
## Corsi.backward      0.01    -0.88  0.51
## d2.RB              -0.22     0.30 18.26
## d2.RL              -0.27    -0.16 18.63
## Reading.time        1.18     1.08  1.58
## Count.time          0.56    -0.81  1.26
## Choice.time         0.45    -1.48  1.93
## Alternation.time    0.20    -1.58  2.58
## Inhibition         -0.05    -1.51  1.47
## Flexibility        -0.20    -1.00  2.00
## n_cat               0.15    -1.24  0.27
## n_erro              0.08    -1.47  0.71
## perda_set           1.04    -0.20  0.17
## ------------------------------------------------------------ 
## group: Multiple
##                    vars  n   mean    sd median trimmed    mad   min   max range
## Age                   1 15  15.20  0.94     15   15.22   1.48  14.0  17.0   3.0
## Education             2 15  10.73  1.16     11   10.78   1.48   8.0  12.0   4.0
## Vocabulary            3 15  37.00  7.47     36   36.89   5.93  25.0  51.0  26.0
## Matrix.Reasoning      4 15  20.80  4.89     21   20.89   4.45  12.0  29.0  17.0
## IQ                    5 15  81.00  8.90     80   79.56  10.38  71.0 100.0  29.0
## A1                    6 15   6.27  1.87      6    6.00   1.48   3.0  10.0   7.0
## A2                    7 15   7.93  1.33      8    8.00   1.48   6.0  10.0   4.0
## A3                    8 15   8.93  2.22      9    9.11   1.48   3.0  12.0   9.0
## A4                    9 15  10.27  1.98     10   10.44   2.97   6.0  13.0   7.0
## A5                   10 15  10.27  2.46     11   10.67   1.48   3.0  14.0  11.0
## B1                   11 15   4.47  1.60      4    4.56   1.48   1.0   7.0   6.0
## A6                   12 15   9.20  2.43      9    9.56   2.97   5.0  12.0   7.0
## A7                   13 15   8.93  2.79     10    9.44   1.48   4.0  13.0   9.0
## Total.RAVLT          14 15  43.67  7.65     44   44.22   5.93  25.0  53.0  28.0
## Forgetfulness.Rate   15 15   0.96  0.14      1    0.97   0.15   0.7   1.2   0.5
## Digits.forward       16 15   6.20  2.27      7    6.56   1.48   2.0  10.0   8.0
## Digits.backward      17 15   6.20  1.52      6    6.22   1.48   3.0   9.0   6.0
## Span.forward         18 15   4.40  1.30      5    4.67   0.00   2.0   7.0   5.0
## Span.backward        19 15   3.53  0.74      3    3.33   0.00   3.0   5.0   2.0
## Corsi.forward        20 15   6.60  1.06      7    6.56   1.48   5.0   9.0   4.0
## Corsi.backward       21 15   4.73  1.87      5    4.89   1.48   1.0   9.0   8.0
## d2.RB                22 15 381.93 88.50    377  380.11 123.06 265.0 531.0 266.0
## d2.RL                23 15 351.53 86.20    368  355.00  88.96 192.0 480.0 288.0
## Reading.time         24 15  23.93  3.90     24   23.56   4.45  19.0  30.0  11.0
## Count.time           25 15  30.20  4.00     30   30.22   2.97  24.0  38.0  14.0
## Choice.time          26 15  51.33  8.16     50   50.78   7.41  40.0  68.0  28.0
## Alternation.time     27 15  61.53  7.10     61   61.67   8.90  51.0  72.0  21.0
## Inhibition           28 15  27.40  7.88     28   28.22   8.90  10.0  38.0  28.0
## Flexibility          29 15  37.60  8.23     38   37.67   8.90  25.0  52.0  27.0
## n_cat                30 15   2.67  1.35      3    2.56   1.48   0.0   5.0   5.0
## n_erro               31 15   9.93  5.02      9    9.44   5.93   4.0  19.0  15.0
## perda_set            32 15   0.47  0.74      0    0.22   0.00   0.0   2.0   2.0
##                     skew kurtosis    se
## Age                 0.12    -1.23  0.24
## Education          -0.53    -0.43  0.30
## Vocabulary          0.20    -0.89  1.93
## Matrix.Reasoning   -0.13    -0.91  1.26
## IQ                  0.60    -0.92  2.30
## A1                  0.43    -0.54  0.48
## A2                 -0.06    -1.24  0.34
## A3                 -0.95     1.03  0.57
## A4                 -0.40    -0.72  0.51
## A5                 -1.46     2.51  0.64
## B1                 -0.34    -0.73  0.41
## A6                 -0.47    -1.18  0.63
## A7                 -0.58    -0.97  0.72
## Total.RAVLT        -0.72     0.01  1.98
## Forgetfulness.Rate -0.19    -1.11  0.04
## Digits.forward     -0.47    -0.75  0.59
## Digits.backward    -0.20    -0.34  0.39
## Span.forward       -0.34    -0.25  0.34
## Span.backward       0.87    -0.78  0.19
## Corsi.forward       0.44    -0.27  0.27
## Corsi.backward      0.06     0.27  0.48
## d2.RB               0.07    -1.56 22.85
## d2.RL              -0.19    -1.23 22.26
## Reading.time        0.25    -1.48  1.01
## Count.time          0.16    -0.92  1.03
## Choice.time         0.50    -0.52  2.11
## Alternation.time   -0.09    -1.59  1.83
## Inhibition         -0.58    -0.65  2.03
## Flexibility         0.03    -1.11  2.12
## n_cat               0.08    -0.52  0.35
## n_erro              0.31    -1.44  1.30
## perda_set           1.08    -0.43  0.19
## ------------------------------------------------------------ 
## group: Once
##                    vars  n   mean    sd median trimmed    mad   min   max range
## Age                   1 16  15.06  1.29   14.5   14.80   0.74  14.0  17.0   3.0
## Education             2 16  10.19  1.42   10.5   10.30   1.48   8.0  12.0   4.0
## Vocabulary            3 16  40.56  9.35   42.0   41.10   4.45  22.0  56.0  34.0
## Matrix.Reasoning      4 16  22.56  4.59   24.0   23.00   4.45  14.0  29.0  15.0
## IQ                    5 16  85.94 11.20   87.0   85.90  14.08  70.0 104.0  34.0
## A1                    6 16   6.19  1.33    6.0    6.10   1.48   4.0   9.0   5.0
## A2                    7 16   7.44  1.97    8.0    7.40   1.48   4.0  11.0   7.0
## A3                    8 16   8.12  3.03    8.5    8.30   2.22   3.0  13.0  10.0
## A4                    9 16   9.38  2.28    9.0    9.60   2.97   4.0  12.0   8.0
## A5                   10 16   9.75  2.49   10.0    9.90   1.48   4.0  14.0  10.0
## B1                   11 16   5.44  2.25    5.0    5.20   1.48   3.0  13.0  10.0
## A6                   12 16   8.12  2.13    8.5    8.10   2.22   4.0  12.0   8.0
## A7                   13 16   8.31  2.50    8.0    7.90   1.48   5.0  15.0  10.0
## Total.RAVLT          14 16  42.19 10.69   41.5   42.10   8.90  20.0  63.0  43.0
## Forgetfulness.Rate   15 16   1.05  0.24    1.0    1.03   0.30   0.7   1.5   0.8
## Digits.forward       16 16   6.31  1.92    6.0    6.40   1.48   2.0  10.0   8.0
## Digits.backward      17 16   5.06  2.95    5.0    5.10   2.22   0.0  11.0  11.0
## Span.forward         18 16   4.69  1.25    5.0    4.70   1.48   2.0   7.0   5.0
## Span.backward        19 16   3.50  1.55    3.5    3.50   0.74   0.0   7.0   7.0
## Corsi.forward        20 16   7.25  1.77    7.0    7.30   1.48   4.0  10.0   6.0
## Corsi.backward       21 16   4.94  1.69    5.0    4.90   1.48   2.0   8.0   6.0
## d2.RB                22 16 342.31 73.54  336.5  344.00  92.66 208.0 477.0 269.0
## d2.RL                23 16 320.94 79.03  318.5  323.70 102.30 189.0 457.0 268.0
## Reading.time         24 16  24.56  5.98   23.5   23.90   4.45  17.0  41.0  24.0
## Count.time           25 16  31.44  7.13   30.0   29.70   2.97  22.0  47.0  25.0
## Choice.time          26 16  49.38 14.82   46.5   46.30   9.64  36.0  96.0  60.0
## Alternation.time     27 16  65.38 16.92   62.5   61.70  12.60  44.0 105.0  61.0
## Inhibition           28 16  24.81 10.04   23.0   23.50   7.41  12.0  55.0  43.0
## Flexibility          29 16  40.81 13.82   39.0   38.50  11.86  20.0  75.0  55.0
## n_cat                30 16   2.62  1.50    3.0    2.80   1.48   0.0   5.0   5.0
## n_erro               31 16  10.56  5.62   10.0   10.40   5.93   0.0  22.0  22.0
## perda_set            32 16   0.19  0.75    0.0    0.00   0.00   0.0   3.0   3.0
##                     skew kurtosis    se
## Age                 0.59    -1.48  0.32
## Education          -0.31    -1.37  0.36
## Vocabulary         -0.29    -0.73  2.34
## Matrix.Reasoning   -0.37    -1.27  1.15
## IQ                  0.07    -1.43  2.80
## A1                  0.32    -0.82  0.33
## A2                  0.16    -0.71  0.49
## A3                 -0.29    -1.18  0.76
## A4                 -0.69    -0.34  0.57
## A5                 -0.46    -0.08  0.62
## B1                  2.18     5.17  0.56
## A6                 -0.04    -0.93  0.53
## A7                  1.11     0.88  0.62
## Total.RAVLT        -0.02    -0.39  2.67
## Forgetfulness.Rate  0.34    -1.33  0.06
## Digits.forward     -0.26    -0.25  0.48
## Digits.backward     0.07    -0.71  0.74
## Span.forward       -0.21    -0.47  0.31
## Span.backward       0.00     0.48  0.39
## Corsi.forward      -0.08    -1.08  0.44
## Corsi.backward      0.17    -1.10  0.42
## d2.RB              -0.06    -1.07 18.38
## d2.RL              -0.05    -1.35 19.76
## Reading.time        1.08     1.07  1.49
## Count.time          0.98    -0.24  1.78
## Choice.time         1.85     3.34  3.71
## Alternation.time    0.89    -0.25  4.23
## Inhibition          1.49     2.45  2.51
## Flexibility         0.92     0.27  3.46
## n_cat              -0.39    -1.08  0.38
## n_erro              0.13    -0.75  1.41
## perda_set           3.28     9.36  0.19

Comparacao entre os Tipos

## Robust statistics
library(WRS2)

# Function to calculate 20% trimmed mean
tmean <- function(x,tr=.2,na.rm=FALSE,STAND=NULL){
  if(na.rm)x<-x[!is.na(x)]
  val<-mean(x,tr)
  val
}

# Function to calculate 20% trimmed standard deviation (SD)
sd_trim <- function(x,trim=0.2, const=TRUE){
  # trimmed sd, where x is a matrix (column-wise)
  x <- as.matrix(x)
  if (const){
    if (trim==0.1){const <- 0.7892}
    else if (trim==0.2){const <- 0.6615}
    else {warning("Did you specify the correct consistency constant for trimming?")}
  }
  else{const <- 1}
  m <- apply(x,2,mean,trim)
  res <- x-rep(1,nrow(x))%*%t(m)
  qu <- apply(abs(res),2,quantile,1-trim)
  sdtrim <- apply(matrix(res[t(abs(t(res))<=qu)]^2,ncol=ncol(x),byrow=FALSE),2,sum)
  sdtrim <- sqrt(sdtrim/((nrow(x)*(1-trim)-1)))/const
  return(sdtrim)
}

# Select variables to compare Types (Some vars were not collected in Control)
# Depersonalization, Derealization, Dissociation
BD <- red[,c(2:3,4,9:46)]

psych::describeBy(BD, BD$Type, tr=.2)
## 
##  Descriptive statistics by group 
## group: Control
##                    vars  n   mean    sd median trimmed   mad   min   max range
## Age                   1 14  16.00  1.18   16.5   16.20  0.74  14.0  17.0   3.0
## Education             2 14  11.07  1.38   11.5   11.30  0.74   8.0  13.0   5.0
## Type*                 3 14   1.00  0.00    1.0    1.00  0.00   1.0   1.0   0.0
## Vocabulary            4 14  46.29  6.96   47.0   47.10  6.67  31.0  55.0  24.0
## Matrix.Reasoning      5 14  27.57  2.56   27.0   27.70  3.71  23.0  31.0   8.0
## IQ                    6 14  96.86  7.81   97.0   97.30  9.64  84.0 109.0  25.0
## A1                    7 14   6.64  1.60    7.0    6.80  1.48   4.0   9.0   5.0
## A2                    8 14   8.64  1.91    9.0    8.80  2.22   5.0  11.0   6.0
## A3                    9 14  10.14  2.07   11.0   10.60  0.74   4.0  12.0   8.0
## A4                   10 14  11.79  0.89   12.0   11.80  1.48  10.0  13.0   3.0
## A5                   11 14  12.00  1.47   11.5   11.80  0.74  10.0  15.0   5.0
## B1                   12 14   4.71  1.73    4.5    4.60  2.22   2.0   8.0   6.0
## A6                   13 14  11.07  1.90   11.0   11.30  1.48   7.0  14.0   7.0
## A7                   14 14  10.29  1.98   10.0   10.20  2.22   7.0  14.0   7.0
## Recog.A              15 14  14.50  0.85   15.0   14.70  0.00  12.0  15.0   3.0
## Recog.B              16 14   9.50  2.07   10.0    9.60  2.97   6.0  12.0   6.0
## Intrusion            17 14   0.57  0.51    1.0    0.60  0.00   0.0   1.0   1.0
## Perseverance         18 14   1.00  0.00    1.0    1.00  0.00   1.0   1.0   0.0
## Primacy              19 14   0.36  0.50    0.0    0.30  0.00   0.0   1.0   1.0
## Recency              20 14   0.14  0.36    0.0    0.00  0.00   0.0   1.0   1.0
## Total.RAVLT          21 14  49.21  6.13   51.0   50.50  4.45  35.0  55.0  20.0
## Forgetfulness.Rate   22 14   0.94  0.12    1.0    0.95  0.15   0.7   1.1   0.4
## Time.CW              23 14 122.86 29.06  122.0  121.80 28.91  75.0 177.0 102.0
## Time.C               24 14 115.71  0.47  116.0  115.80  0.00 115.0 116.0   1.0
## Digits.forward       25 14   8.21  1.85    8.0    8.20  1.48   5.0  11.0   6.0
## Digits.backward      26 14   6.29  1.94    6.5    6.30  2.22   3.0  10.0   7.0
## Span.forward         27 14   5.71  1.07    5.5    5.60  0.74   4.0   8.0   4.0
## Span.backward        28 14   4.36  0.84    4.0    4.40  1.48   3.0   6.0   3.0
## Corsi.forward        29 14   7.86  1.51    8.0    8.00  1.48   4.0  10.0   6.0
## Corsi.backward       30 14   6.71  1.90    6.0    6.70  1.48   3.0  10.0   7.0
## d2.RB                31 14 417.50 68.34  408.5  417.20 37.81 259.0 549.0 290.0
## d2.RL                32 14 406.07 69.72  400.0  408.30 44.48 251.0 527.0 276.0
## Reading.time         33 14  23.21  5.92   22.5   22.40  3.71  16.0  39.0  23.0
## Count.time           34 14  27.07  4.73   26.0   26.50  5.19  21.0  37.0  16.0
## Choice.time          35 14  39.86  7.23   38.0   39.00  7.41  32.0  52.0  20.0
## Alternation.time     36 14  50.50  9.67   49.5   50.10 13.34  38.0  66.0  28.0
## Inhibition           37 14  16.64  5.51   17.5   16.60  6.67   8.0  25.0  17.0
## Flexibility          38 14  27.29  7.47   27.5   27.80  6.67  14.0  39.0  25.0
## n_cat                39 14   3.36  1.01    3.0    3.30  1.48   2.0   5.0   3.0
## n_erro               40 14   7.71  2.67    7.0    7.70  2.97   4.0  12.0   8.0
## perda_set            41 14   0.43  0.65    0.0    0.30  0.00   0.0   2.0   2.0
##                     skew kurtosis    se
## Age                -0.53    -1.44  0.31
## Education          -0.76    -0.51  0.37
## Type*                NaN      NaN  0.00
## Vocabulary         -0.62    -0.66  1.86
## Matrix.Reasoning   -0.14    -1.58  0.69
## IQ                 -0.20    -1.35  2.09
## A1                 -0.61    -0.95  0.43
## A2                 -0.33    -1.16  0.51
## A3                 -1.82     2.73  0.55
## A4                 -0.22    -0.95  0.24
## A5                  0.68    -0.91  0.39
## B1                  0.24    -1.14  0.46
## A6                 -0.59    -0.42  0.51
## A7                  0.19    -0.96  0.53
## Recog.A            -1.72     2.33  0.23
## Recog.B            -0.15    -1.45  0.55
## Intrusion          -0.26    -2.07  0.14
## Perseverance         NaN      NaN  0.00
## Primacy             0.53    -1.83  0.13
## Recency             1.83     1.45  0.10
## Total.RAVLT        -0.94    -0.33  1.64
## Forgetfulness.Rate -0.53    -0.77  0.03
## Time.CW             0.22    -0.94  7.77
## Time.C             -0.85    -1.36  0.13
## Digits.forward      0.19    -1.04  0.49
## Digits.backward     0.04    -1.01  0.52
## Span.forward        0.53    -0.65  0.29
## Span.backward       0.06    -0.86  0.23
## Corsi.forward      -0.89     0.47  0.40
## Corsi.backward      0.01    -0.88  0.51
## d2.RB              -0.22     0.30 18.26
## d2.RL              -0.27    -0.16 18.63
## Reading.time        1.18     1.08  1.58
## Count.time          0.56    -0.81  1.26
## Choice.time         0.45    -1.48  1.93
## Alternation.time    0.20    -1.58  2.58
## Inhibition         -0.05    -1.51  1.47
## Flexibility        -0.20    -1.00  2.00
## n_cat               0.15    -1.24  0.27
## n_erro              0.08    -1.47  0.71
## perda_set           1.04    -0.20  0.17
## ------------------------------------------------------------ 
## group: Multiple
##                    vars  n   mean    sd median trimmed    mad   min   max range
## Age                   1 15  15.20  0.94     15   15.22   1.48  14.0  17.0   3.0
## Education             2 15  10.73  1.16     11   10.78   1.48   8.0  12.0   4.0
## Type*                 3 15   1.00  0.00      1    1.00   0.00   1.0   1.0   0.0
## Vocabulary            4 15  37.00  7.47     36   36.89   5.93  25.0  51.0  26.0
## Matrix.Reasoning      5 15  20.80  4.89     21   20.89   4.45  12.0  29.0  17.0
## IQ                    6 15  81.00  8.90     80   79.56  10.38  71.0 100.0  29.0
## A1                    7 15   6.27  1.87      6    6.00   1.48   3.0  10.0   7.0
## A2                    8 15   7.93  1.33      8    8.00   1.48   6.0  10.0   4.0
## A3                    9 15   8.93  2.22      9    9.11   1.48   3.0  12.0   9.0
## A4                   10 15  10.27  1.98     10   10.44   2.97   6.0  13.0   7.0
## A5                   11 15  10.27  2.46     11   10.67   1.48   3.0  14.0  11.0
## B1                   12 15   4.47  1.60      4    4.56   1.48   1.0   7.0   6.0
## A6                   13 15   9.20  2.43      9    9.56   2.97   5.0  12.0   7.0
## A7                   14 15   8.93  2.79     10    9.44   1.48   4.0  13.0   9.0
## Recog.A              15 15  13.73  1.39     14   14.00   1.48  11.0  15.0   4.0
## Recog.B              16 15   8.53  2.13      9    8.67   1.48   3.0  12.0   9.0
## Intrusion            17 15   0.60  0.51      1    0.67   0.00   0.0   1.0   1.0
## Perseverance         18 15   0.93  0.26      1    1.00   0.00   0.0   1.0   1.0
## Primacy              19 15   0.27  0.46      0    0.11   0.00   0.0   1.0   1.0
## Recency              20 15   0.07  0.26      0    0.00   0.00   0.0   1.0   1.0
## Total.RAVLT          21 15  43.67  7.65     44   44.22   5.93  25.0  53.0  28.0
## Forgetfulness.Rate   22 15   0.96  0.14      1    0.97   0.15   0.7   1.2   0.5
## Time.CW              23 15 143.07 25.19    141  142.89  35.58 108.0 179.0  71.0
## Time.C               24 15 115.73  0.46    116  115.89   0.00 115.0 116.0   1.0
## Digits.forward       25 15   6.20  2.27      7    6.56   1.48   2.0  10.0   8.0
## Digits.backward      26 15   6.20  1.52      6    6.22   1.48   3.0   9.0   6.0
## Span.forward         27 15   4.40  1.30      5    4.67   0.00   2.0   7.0   5.0
## Span.backward        28 15   3.53  0.74      3    3.33   0.00   3.0   5.0   2.0
## Corsi.forward        29 15   6.60  1.06      7    6.56   1.48   5.0   9.0   4.0
## Corsi.backward       30 15   4.73  1.87      5    4.89   1.48   1.0   9.0   8.0
## d2.RB                31 15 381.93 88.50    377  380.11 123.06 265.0 531.0 266.0
## d2.RL                32 15 351.53 86.20    368  355.00  88.96 192.0 480.0 288.0
## Reading.time         33 15  23.93  3.90     24   23.56   4.45  19.0  30.0  11.0
## Count.time           34 15  30.20  4.00     30   30.22   2.97  24.0  38.0  14.0
## Choice.time          35 15  51.33  8.16     50   50.78   7.41  40.0  68.0  28.0
## Alternation.time     36 15  61.53  7.10     61   61.67   8.90  51.0  72.0  21.0
## Inhibition           37 15  27.40  7.88     28   28.22   8.90  10.0  38.0  28.0
## Flexibility          38 15  37.60  8.23     38   37.67   8.90  25.0  52.0  27.0
## n_cat                39 15   2.67  1.35      3    2.56   1.48   0.0   5.0   5.0
## n_erro               40 15   9.93  5.02      9    9.44   5.93   4.0  19.0  15.0
## perda_set            41 15   0.47  0.74      0    0.22   0.00   0.0   2.0   2.0
##                     skew kurtosis    se
## Age                 0.12    -1.23  0.24
## Education          -0.53    -0.43  0.30
## Type*                NaN      NaN  0.00
## Vocabulary          0.20    -0.89  1.93
## Matrix.Reasoning   -0.13    -0.91  1.26
## IQ                  0.60    -0.92  2.30
## A1                  0.43    -0.54  0.48
## A2                 -0.06    -1.24  0.34
## A3                 -0.95     1.03  0.57
## A4                 -0.40    -0.72  0.51
## A5                 -1.46     2.51  0.64
## B1                 -0.34    -0.73  0.41
## A6                 -0.47    -1.18  0.63
## A7                 -0.58    -0.97  0.72
## Recog.A            -0.75    -0.69  0.36
## Recog.B            -0.78     0.70  0.55
## Intrusion          -0.37    -1.98  0.13
## Perseverance       -3.13     8.39  0.07
## Primacy             0.95    -1.16  0.12
## Recency             3.13     8.39  0.07
## Total.RAVLT        -0.72     0.01  1.98
## Forgetfulness.Rate -0.19    -1.11  0.04
## Time.CW             0.03    -1.69  6.51
## Time.C             -0.95    -1.16  0.12
## Digits.forward     -0.47    -0.75  0.59
## Digits.backward    -0.20    -0.34  0.39
## Span.forward       -0.34    -0.25  0.34
## Span.backward       0.87    -0.78  0.19
## Corsi.forward       0.44    -0.27  0.27
## Corsi.backward      0.06     0.27  0.48
## d2.RB               0.07    -1.56 22.85
## d2.RL              -0.19    -1.23 22.26
## Reading.time        0.25    -1.48  1.01
## Count.time          0.16    -0.92  1.03
## Choice.time         0.50    -0.52  2.11
## Alternation.time   -0.09    -1.59  1.83
## Inhibition         -0.58    -0.65  2.03
## Flexibility         0.03    -1.11  2.12
## n_cat               0.08    -0.52  0.35
## n_erro              0.31    -1.44  1.30
## perda_set           1.08    -0.43  0.19
## ------------------------------------------------------------ 
## group: Once
##                    vars  n   mean    sd median trimmed    mad   min   max range
## Age                   1 16  15.06  1.29   14.5   14.80   0.74  14.0  17.0   3.0
## Education             2 16  10.19  1.42   10.5   10.30   1.48   8.0  12.0   4.0
## Type*                 3 16   1.00  0.00    1.0    1.00   0.00   1.0   1.0   0.0
## Vocabulary            4 16  40.56  9.35   42.0   41.10   4.45  22.0  56.0  34.0
## Matrix.Reasoning      5 16  22.56  4.59   24.0   23.00   4.45  14.0  29.0  15.0
## IQ                    6 16  85.94 11.20   87.0   85.90  14.08  70.0 104.0  34.0
## A1                    7 16   6.19  1.33    6.0    6.10   1.48   4.0   9.0   5.0
## A2                    8 16   7.44  1.97    8.0    7.40   1.48   4.0  11.0   7.0
## A3                    9 16   8.12  3.03    8.5    8.30   2.22   3.0  13.0  10.0
## A4                   10 16   9.38  2.28    9.0    9.60   2.97   4.0  12.0   8.0
## A5                   11 16   9.75  2.49   10.0    9.90   1.48   4.0  14.0  10.0
## B1                   12 16   5.44  2.25    5.0    5.20   1.48   3.0  13.0  10.0
## A6                   13 16   8.12  2.13    8.5    8.10   2.22   4.0  12.0   8.0
## A7                   14 16   8.31  2.50    8.0    7.90   1.48   5.0  15.0  10.0
## Recog.A              15 16  13.31  2.12   14.5   13.80   0.74   9.0  15.0   6.0
## Recog.B              16 16   8.12  2.78    8.0    8.10   2.97   3.0  12.0   9.0
## Intrusion            17 16   0.44  0.51    0.0    0.40   0.00   0.0   1.0   1.0
## Perseverance         18 16   0.75  0.45    1.0    0.90   0.00   0.0   1.0   1.0
## Primacy              19 16   0.25  0.45    0.0    0.10   0.00   0.0   1.0   1.0
## Recency              20 16   0.12  0.34    0.0    0.00   0.00   0.0   1.0   1.0
## Total.RAVLT          21 16  42.19 10.69   41.5   42.10   8.90  20.0  63.0  43.0
## Forgetfulness.Rate   22 16   1.05  0.24    1.0    1.03   0.30   0.7   1.5   0.8
## Time.CW              23 16 144.62 29.33  136.0  143.50  35.58 101.0 191.0  90.0
## Time.C               24 16 115.62  1.02  116.0  116.00   0.00 112.0 116.0   4.0
## Digits.forward       25 16   6.31  1.92    6.0    6.40   1.48   2.0  10.0   8.0
## Digits.backward      26 16   5.06  2.95    5.0    5.10   2.22   0.0  11.0  11.0
## Span.forward         27 16   4.69  1.25    5.0    4.70   1.48   2.0   7.0   5.0
## Span.backward        28 16   3.50  1.55    3.5    3.50   0.74   0.0   7.0   7.0
## Corsi.forward        29 16   7.25  1.77    7.0    7.30   1.48   4.0  10.0   6.0
## Corsi.backward       30 16   4.94  1.69    5.0    4.90   1.48   2.0   8.0   6.0
## d2.RB                31 16 342.31 73.54  336.5  344.00  92.66 208.0 477.0 269.0
## d2.RL                32 16 320.94 79.03  318.5  323.70 102.30 189.0 457.0 268.0
## Reading.time         33 16  24.56  5.98   23.5   23.90   4.45  17.0  41.0  24.0
## Count.time           34 16  31.44  7.13   30.0   29.70   2.97  22.0  47.0  25.0
## Choice.time          35 16  49.38 14.82   46.5   46.30   9.64  36.0  96.0  60.0
## Alternation.time     36 16  65.38 16.92   62.5   61.70  12.60  44.0 105.0  61.0
## Inhibition           37 16  24.81 10.04   23.0   23.50   7.41  12.0  55.0  43.0
## Flexibility          38 16  40.81 13.82   39.0   38.50  11.86  20.0  75.0  55.0
## n_cat                39 16   2.62  1.50    3.0    2.80   1.48   0.0   5.0   5.0
## n_erro               40 16  10.56  5.62   10.0   10.40   5.93   0.0  22.0  22.0
## perda_set            41 16   0.19  0.75    0.0    0.00   0.00   0.0   3.0   3.0
##                     skew kurtosis    se
## Age                 0.59    -1.48  0.32
## Education          -0.31    -1.37  0.36
## Type*                NaN      NaN  0.00
## Vocabulary         -0.29    -0.73  2.34
## Matrix.Reasoning   -0.37    -1.27  1.15
## IQ                  0.07    -1.43  2.80
## A1                  0.32    -0.82  0.33
## A2                  0.16    -0.71  0.49
## A3                 -0.29    -1.18  0.76
## A4                 -0.69    -0.34  0.57
## A5                 -0.46    -0.08  0.62
## B1                  2.18     5.17  0.56
## A6                 -0.04    -0.93  0.53
## A7                  1.11     0.88  0.62
## Recog.A            -0.70    -1.16  0.53
## Recog.B            -0.12    -1.15  0.69
## Intrusion           0.23    -2.07  0.13
## Perseverance       -1.05    -0.95  0.11
## Primacy             1.05    -0.95  0.11
## Recency             2.06     2.40  0.09
## Total.RAVLT        -0.02    -0.39  2.67
## Forgetfulness.Rate  0.34    -1.33  0.06
## Time.CW             0.23    -1.41  7.33
## Time.C             -2.76     6.82  0.26
## Digits.forward     -0.26    -0.25  0.48
## Digits.backward     0.07    -0.71  0.74
## Span.forward       -0.21    -0.47  0.31
## Span.backward       0.00     0.48  0.39
## Corsi.forward      -0.08    -1.08  0.44
## Corsi.backward      0.17    -1.10  0.42
## d2.RB              -0.06    -1.07 18.38
## d2.RL              -0.05    -1.35 19.76
## Reading.time        1.08     1.07  1.49
## Count.time          0.98    -0.24  1.78
## Choice.time         1.85     3.34  3.71
## Alternation.time    0.89    -0.25  4.23
## Inhibition          1.49     2.45  2.51
## Flexibility         0.92     0.27  3.46
## n_cat              -0.39    -1.08  0.38
## n_erro              0.13    -0.75  1.41
## perda_set           3.28     9.36  0.19

Outra comparacao entre os Tipos

library(compareGroups)
categ <- compareGroups(Type ~ ., data = red, method = 4) # 4 which performs a Shapiro-Wilks test to decide between normal or non-normal
categ
## 
## 
## -------- Summary of results by groups of 'Type'---------
## 
## 
##    var                N  p.value  method                selection
## 1  Group              45 <0.001** categorical           ALL      
## 2  Age                45 0.073*   continuous non-normal ALL      
## 3  Education          45 0.192    continuous non-normal ALL      
## 4  Quesi              45 <0.001** continuous non-normal ALL      
## 5  Depersonalization  45 0.010**  continuous non-normal ALL      
## 6  Derealization      45 0.010**  continuous non-normal ALL      
## 7  Dissociation       45 0.002**  continuous non-normal ALL      
## 8  Vocabulary         45 0.007**  continuous non-normal ALL      
## 9  Matrix.Reasoning   45 <0.001** continuous non-normal ALL      
## 10 IQ                 45 0.001**  continuous non-normal ALL      
## 11 A1                 45 0.456    continuous non-normal ALL      
## 12 A2                 45 0.188    continuous non-normal ALL      
## 13 A3                 45 0.050*   continuous non-normal ALL      
## 14 A4                 45 0.004**  continuous non-normal ALL      
## 15 A5                 45 0.011**  continuous non-normal ALL      
## 16 B1                 45 0.544    continuous non-normal ALL      
## 17 A6                 45 0.003**  continuous non-normal ALL      
## 18 A7                 45 0.046**  continuous non-normal ALL      
## 19 Recog.A            45 0.238    continuous non-normal ALL      
## 20 Recog.B            45 0.325    continuous non-normal ALL      
## 21 Intrusion          45 0.632    continuous non-normal ALL      
## 22 Perseverance       45 0.080*   continuous non-normal ALL      
## 23 Primacy            45 0.794    continuous non-normal ALL      
## 24 Recency            45 0.793    continuous non-normal ALL      
## 25 Total.RAVLT        45 0.035**  continuous non-normal ALL      
## 26 Forgetfulness.Rate 45 0.571    continuous non-normal ALL      
## 27 Time.CW            45 0.101    continuous non-normal ALL      
## 28 Time.C             45 0.866    continuous non-normal ALL      
## 29 Digits.forward     45 0.023**  continuous non-normal ALL      
## 30 Digits.backward    45 0.278    continuous non-normal ALL      
## 31 Span.forward       45 0.016**  continuous non-normal ALL      
## 32 Span.backward      45 0.032**  continuous non-normal ALL      
## 33 Corsi.forward      45 0.041**  continuous non-normal ALL      
## 34 Corsi.backward     45 0.011**  continuous non-normal ALL      
## 35 d2.RB              45 0.054*   continuous non-normal ALL      
## 36 d2.RL              45 0.017**  continuous non-normal ALL      
## 37 Reading.time       45 0.665    continuous non-normal ALL      
## 38 Count.time         45 0.100*   continuous non-normal ALL      
## 39 Choice.time        45 0.003**  continuous non-normal ALL      
## 40 Alternation.time   45 0.006**  continuous non-normal ALL      
## 41 Inhibition         45 0.001**  continuous non-normal ALL      
## 42 Flexibility        45 0.002**  continuous non-normal ALL      
## 43 n_cat              45 0.280    continuous non-normal ALL      
## 44 n_erro             45 0.295    continuous non-normal ALL      
## 45 perda_set          45 0.162    continuous non-normal ALL      
## -----
## Signif. codes:  0 '**' 0.05 '*' 0.1 ' ' 1
restab <- createTable(categ, show.ratio = TRUE, hide.no = 'no')
update(restab, x = update(categ, ~ . ))
## 
## --------Summary descriptives table ---------
## 
## ______________________________________ 
##                         [ALL]       N  
##                          N=45          
## ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ 
## Group:                                 
##     Case              31 (68.9%)    45 
##     Control           14 (31.1%)       
## Age                15.0 [14.0;17.0] 45 
## Education          11.0 [10.0;12.0] 45 
## Type:                                  
##     Control           14 (31.1%)    45 
##     Multiple          15 (33.3%)       
##     Once              16 (35.6%)       
## Quesi              50.0 [44.0;60.0] 45 
## Depersonalization  0.00 [0.00;1.00] 45 
## Derealization      0.00 [0.00;1.00] 45 
## Dissociation       0.00 [0.00;2.00] 45 
## Vocabulary         42.0 [35.0;48.0] 45 
## Matrix.Reasoning   25.0 [20.0;27.0] 45 
## IQ                 87.0 [78.0;98.0] 45 
## A1                 6.00 [5.00;7.00] 45 
## A2                 8.00 [7.00;9.00] 45 
## A3                 9.00 [8.00;11.0] 45 
## A4                 11.0 [9.00;12.0] 45 
## A5                 11.0 [10.0;12.0] 45 
## B1                 5.00 [4.00;6.00] 45 
## A6                 10.0 [8.00;11.0] 45 
## A7                 9.00 [8.00;10.0] 45 
## Recog.A            15.0 [13.0;15.0] 45 
## Recog.B            9.00 [7.00;10.0] 45 
## Intrusion          1.00 [0.00;1.00] 45 
## Perseverance       1.00 [1.00;1.00] 45 
## Primacy            0.00 [0.00;1.00] 45 
## Recency            0.00 [0.00;0.00] 45 
## Total.RAVLT        45.0 [40.0;52.0] 45 
## Forgetfulness.Rate 1.00 [0.90;1.10] 45 
## Time.CW             135 [114;165]   45 
## Time.C              116 [116;116]   45 
## Digits.forward     7.00 [6.00;8.00] 45 
## Digits.backward    6.00 [5.00;7.00] 45 
## Span.forward       5.00 [4.00;6.00] 45 
## Span.backward      4.00 [3.00;4.00] 45 
## Corsi.forward      7.00 [6.00;8.00] 45 
## Corsi.backward     5.00 [4.00;6.00] 45 
## d2.RB               388 [312;426]   45 
## d2.RL               381 [282;406]   45 
## Reading.time       23.0 [20.0;26.0] 45 
## Count.time         30.0 [25.0;32.0] 45 
## Choice.time        46.0 [40.0;52.0] 45 
## Alternation.time   58.0 [51.0;66.0] 45 
## Inhibition         21.0 [17.0;29.0] 45 
## Flexibility        36.0 [29.0;41.0] 45 
## n_cat              3.00 [2.00;4.00] 45 
## n_erro             9.00 [6.00;13.0] 45 
## perda_set          0.00 [0.00;0.00] 45 
## ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
update(restab, show.n=TRUE)
## 
## --------Summary descriptives table by 'Type'---------
## 
## __________________________________________________________________________________ 
##                        Control          Multiple           Once       p.overall N  
##                          N=14             N=15             N=16                    
## ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ 
## Group:                                                                 <0.001   45 
##     Case              0 (0.00%)        15 (100%)        16 (100%)                  
##     Control           14 (100%)        0 (0.00%)        0 (0.00%)                  
## Age                16.5 [15.0;17.0] 15.0 [14.5;16.0] 14.5 [14.0;16.2]   0.073   45 
## Education          11.5 [10.2;12.0] 11.0 [10.0;12.0] 10.5 [9.00;11.0]   0.192   45 
## Quesi              45.0 [43.0;45.8] 61.0 [53.5;75.0] 51.5 [41.5;57.8]  <0.001   45 
## Depersonalization  0.00 [0.00;0.00] 0.00 [0.00;1.00] 0.50 [0.00;2.00]   0.010   45 
## Derealization      0.00 [0.00;0.00] 0.00 [0.00;1.00] 0.50 [0.00;2.00]   0.010   45 
## Dissociation       0.00 [0.00;0.00] 1.00 [0.00;2.00] 1.50 [0.00;3.25]   0.002   45 
## Vocabulary         47.0 [43.2;51.8] 36.0 [33.5;41.0] 42.0 [36.8;44.2]   0.007   45 
## Matrix.Reasoning   27.0 [26.0;30.0] 21.0 [17.5;23.5] 24.0 [18.8;25.5]  <0.001   45 
## IQ                 97.0 [90.8;103]  80.0 [73.0;87.0] 87.0 [77.8;95.8]   0.001   45 
## A1                 7.00 [6.25;7.75] 6.00 [5.50;6.50] 6.00 [5.00;7.00]   0.456   45 
## A2                 9.00 [7.25;10.0] 8.00 [7.00;9.00] 8.00 [6.00;8.00]   0.188   45 
## A3                 11.0 [10.0;11.0] 9.00 [8.50;10.0] 8.50 [6.25;10.0]   0.050   45 
## A4                 12.0 [11.0;12.0] 10.0 [9.50;12.0] 9.00 [8.00;11.0]   0.004   45 
## A5                 11.5 [11.0;12.8] 11.0 [10.0;11.5] 10.0 [9.00;11.2]   0.011   45 
## B1                 4.50 [3.25;6.00] 4.00 [3.50;6.00] 5.00 [4.75;6.00]   0.544   45 
## A6                 11.0 [10.2;12.0] 9.00 [8.00;11.0] 8.50 [6.75;9.25]   0.003   45 
## A7                 10.0 [9.25;11.8] 10.0 [7.50;10.5] 8.00 [6.75;9.00]   0.046   45 
## Recog.A            15.0 [14.0;15.0] 14.0 [13.0;15.0] 14.5 [11.8;15.0]   0.238   45 
## Recog.B            10.0 [8.00;11.5] 9.00 [7.50;10.0] 8.00 [6.00;10.0]   0.325   45 
## Intrusion          1.00 [0.00;1.00] 1.00 [0.00;1.00] 0.00 [0.00;1.00]   0.632   45 
## Perseverance       1.00 [1.00;1.00] 1.00 [1.00;1.00] 1.00 [0.75;1.00]   0.080   45 
## Primacy            0.00 [0.00;1.00] 0.00 [0.00;0.50] 0.00 [0.00;0.25]   0.794   45 
## Recency            0.00 [0.00;0.00] 0.00 [0.00;0.00] 0.00 [0.00;0.00]   0.793   45 
## Total.RAVLT        51.0 [46.5;54.0] 44.0 [40.0;50.0] 41.5 [35.8;47.8]   0.035   45 
## Forgetfulness.Rate 1.00 [0.90;1.00] 1.00 [0.85;1.05] 1.00 [0.88;1.30]   0.571   45 
## Time.CW             122 [105;141]    141 [122;166]    136 [126;170]     0.101   45 
## Time.C              116 [115;116]    116 [116;116]    116 [116;116]     0.866   45 
## Digits.forward     8.00 [7.00;9.00] 7.00 [5.00;8.00] 6.00 [5.00;8.00]   0.023   45 
## Digits.backward    6.50 [5.00;7.75] 6.00 [6.00;7.00] 5.00 [3.75;6.25]   0.278   45 
## Span.forward       5.50 [5.00;6.00] 5.00 [4.00;5.00] 5.00 [4.00;5.25]   0.016   45 
## Span.backward      4.00 [4.00;5.00] 3.00 [3.00;4.00] 3.50 [3.00;4.00]   0.032   45 
## Corsi.forward      8.00 [7.00;9.00] 7.00 [6.00;7.00] 7.00 [6.00;8.25]   0.041   45 
## Corsi.backward     6.00 [6.00;8.00] 5.00 [4.00;5.50] 5.00 [4.00;6.25]   0.011   45 
## d2.RB               408 [390;446]    377 [291;458]    336 [299;398]     0.054   45 
## d2.RL               400 [387;431]    368 [280;412]    318 [259;385]     0.017   45 
## Reading.time       22.5 [20.2;24.5] 24.0 [20.5;26.5] 23.5 [21.5;26.8]   0.665   45 
## Count.time         26.0 [23.5;29.8] 30.0 [27.5;32.0] 30.0 [27.5;31.2]   0.100   45 
## Choice.time        38.0 [33.2;45.2] 50.0 [46.5;55.0] 46.5 [40.0;51.2]   0.003   45 
## Alternation.time   49.5 [42.0;59.2] 61.0 [55.0;67.5] 62.5 [53.0;69.2]   0.006   45 
## Inhibition         17.5 [12.2;20.8] 28.0 [23.0;32.5] 23.0 [19.0;29.0]   0.001   45 
## Flexibility        27.5 [23.2;32.8] 38.0 [31.0;42.5] 39.0 [30.8;47.0]   0.002   45 
## n_cat              3.00 [3.00;4.00] 3.00 [2.00;3.00] 3.00 [1.75;4.00]   0.280   45 
## n_erro             7.00 [5.50;9.75] 9.00 [5.00;14.0] 10.0 [6.75;15.0]   0.295   45 
## perda_set          0.00 [0.00;1.00] 0.00 [0.00;1.00] 0.00 [0.00;0.00]   0.162   45 
## ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Descritivas da Amostra

# Some variables are not important or had a very low variance
# perda_set, Primacy, Recency, Forgetfulness.Rate
BD <- red[,c(2,3,4,9:19,26,27,30:46)]

## CALCULATE ROBUST DESCRIPTIVE ANALYSIS ##

# TOTAL sample (all Types)
media <- round(sapply(BD[-3], function(i) tmean(i)), 2)
dp <- round(sapply(BD[-3], function(i) sd(i)), 2)
total <- cbind(media,dp)
total
##                     media    dp
## Age                 15.33  1.19
## Education           10.85  1.35
## Vocabulary          41.59  8.73
## Matrix.Reasoning    24.07  4.98
## IQ                  87.67 11.37
## A1                   6.30  1.58
## A2                   7.96  1.79
## A3                   9.52  2.58
## A4                  10.78  2.06
## A5                  10.81  2.37
## B1                   4.85  1.90
## A6                   9.59  2.44
## A7                   9.15  2.54
## Total.RAVLT         45.67  8.82
## Forgetfulness.Rate   0.97  0.18
## Digits.forward       6.96  2.18
## Digits.backward      5.93  2.27
## Span.forward         4.93  1.31
## Span.backward        3.70  1.17
## Corsi.forward        7.22  1.54
## Corsi.backward       5.33  1.98
## d2.RB              380.96 81.73
## d2.RL              362.81 84.73
## Reading.time        23.22  5.26
## Count.time          28.96  5.69
## Choice.time         45.78 11.67
## Alternation.time    58.63 13.45
## Inhibition          22.67  9.15
## Flexibility         34.52 11.68
## n_cat                2.93  1.32
## n_erro               8.93  4.73
## perda_set            0.07  0.71

Descritivas dos Tipos

# ONCE
Once <- BD[which(BD$Type == "Once"),]
media <- round(sapply(Once[-3], function(i) tmean(i)), 2)
dp <- round(sapply(BD[-3], function(i) sd(i)), 2)
once <- cbind(media,dp)

# Multiple
Multiple <- BD[which(BD$Type == "Multiple"),]
media <- round(sapply(Multiple[-3], function(i) tmean(i)), 2)
dp <- round(sapply(BD[-3], function(i) sd(i)), 2)
multiple <- cbind(media,dp)

# Control
Control <- BD[which(BD$Type == "Control"),]
media <- round(sapply(Control[-3], function(i) tmean(i)), 2)
dp <- round(sapply(BD[-3], function(i) sd(i)), 2)
control <- cbind(media,dp)

cbind(once, multiple, control, total)
##                     media    dp  media    dp  media    dp  media    dp
## Age                 14.80  1.19  15.22  1.19  16.20  1.19  15.33  1.19
## Education           10.30  1.35  10.78  1.35  11.30  1.35  10.85  1.35
## Vocabulary          41.10  8.73  36.89  8.73  47.10  8.73  41.59  8.73
## Matrix.Reasoning    23.00  4.98  20.89  4.98  27.70  4.98  24.07  4.98
## IQ                  85.90 11.37  79.56 11.37  97.30 11.37  87.67 11.37
## A1                   6.10  1.58   6.00  1.58   6.80  1.58   6.30  1.58
## A2                   7.40  1.79   8.00  1.79   8.80  1.79   7.96  1.79
## A3                   8.30  2.58   9.11  2.58  10.60  2.58   9.52  2.58
## A4                   9.60  2.06  10.44  2.06  11.80  2.06  10.78  2.06
## A5                   9.90  2.37  10.67  2.37  11.80  2.37  10.81  2.37
## B1                   5.20  1.90   4.56  1.90   4.60  1.90   4.85  1.90
## A6                   8.10  2.44   9.56  2.44  11.30  2.44   9.59  2.44
## A7                   7.90  2.54   9.44  2.54  10.20  2.54   9.15  2.54
## Total.RAVLT         42.10  8.82  44.22  8.82  50.50  8.82  45.67  8.82
## Forgetfulness.Rate   1.03  0.18   0.97  0.18   0.95  0.18   0.97  0.18
## Digits.forward       6.40  2.18   6.56  2.18   8.20  2.18   6.96  2.18
## Digits.backward      5.10  2.27   6.22  2.27   6.30  2.27   5.93  2.27
## Span.forward         4.70  1.31   4.67  1.31   5.60  1.31   4.93  1.31
## Span.backward        3.50  1.17   3.33  1.17   4.40  1.17   3.70  1.17
## Corsi.forward        7.30  1.54   6.56  1.54   8.00  1.54   7.22  1.54
## Corsi.backward       4.90  1.98   4.89  1.98   6.70  1.98   5.33  1.98
## d2.RB              344.00 81.73 380.11 81.73 417.20 81.73 380.96 81.73
## d2.RL              323.70 84.73 355.00 84.73 408.30 84.73 362.81 84.73
## Reading.time        23.90  5.26  23.56  5.26  22.40  5.26  23.22  5.26
## Count.time          29.70  5.69  30.22  5.69  26.50  5.69  28.96  5.69
## Choice.time         46.30 11.67  50.78 11.67  39.00 11.67  45.78 11.67
## Alternation.time    61.70 13.45  61.67 13.45  50.10 13.45  58.63 13.45
## Inhibition          23.50  9.15  28.22  9.15  16.60  9.15  22.67  9.15
## Flexibility         38.50 11.68  37.67 11.68  27.80 11.68  34.52 11.68
## n_cat                2.80  1.32   2.56  1.32   3.30  1.32   2.93  1.32
## n_erro              10.40  4.73   9.44  4.73   7.70  4.73   8.93  4.73
## perda_set            0.00  0.71   0.22  0.71   0.30  0.71   0.07  0.71

ANOVA robusta Tipos

# Robust one-way ANOVA (20% trimmed) among Types
type3.p <- round(sapply(red[,c(2,3,9:19,26,27,30:45)], function(i) t1way(i ~ red$Type)$p.value), 3)
# Effect Size (using Boostrap)
type3.EffSize <- round(sapply(red[,c(2,3,9:19,26,27,30:45)], function(i) t1waybt(i ~ red$Type)$Effect.Size), 3)
# Print results
cbind(type3.p, type3.EffSize)
##                    type3.p type3.EffSize
## Age                  0.081         0.371
## Education            0.178         0.403
## Vocabulary           0.004         0.574
## Matrix.Reasoning     0.001         0.639
## IQ                   0.001         0.635
## A1                   0.499         0.257
## A2                   0.170         0.352
## A3                   0.012         0.559
## A4                   0.007         0.563
## A5                   0.046         0.571
## B1                   0.481         0.205
## A6                   0.003         0.540
## A7                   0.026         0.480
## Total.RAVLT          0.019         0.522
## Forgetfulness.Rate   0.688         0.244
## Digits.forward       0.081         0.531
## Digits.backward      0.288         0.341
## Span.forward         0.072         0.468
## Span.backward        0.004         0.445
## Corsi.forward        0.014         0.416
## Corsi.backward       0.046         0.593
## d2.RB                0.056         0.388
## d2.RL                0.036         0.472
## Reading.time         0.681         0.186
## Count.time           0.101         0.477
## Choice.time          0.007         0.567
## Alternation.time     0.031         0.610
## Inhibition           0.004         0.616
## Flexibility          0.007         0.569
## n_cat                0.190         0.295
## n_erro               0.318         0.274
# YUEN robust t-test between Groups (Case N=31 vs Control N=14)
CaseControl.p <- round(sapply(red[,c(2,3,9:19,26,27,30:45)], function(i) yuen(i ~ red$Group)$p.value), 3)
# Effec size (with bootstrap), results may differ because of resampling
CaseControl.EffSize <- round(sapply(red[,c(2,3,9:19,26,27,30:45)], function(i) yuen.effect.ci(i ~ red$Group)$effsize), 3)
# Print results (Multiple vs Once)
cbind(CaseControl.p, CaseControl.EffSize)
##                    CaseControl.p CaseControl.EffSize
## Age                        0.011               0.466
## Education                  0.130               0.369
## Vocabulary                 0.004               0.598
## Matrix.Reasoning           0.000               0.743
## IQ                         0.000               0.748
## A1                         0.253               0.287
## A2                         0.123               0.369
## A3                         0.001               0.653
## A4                         0.003               0.751
## A5                         0.017               0.646
## B1                         0.539               0.115
## A6                         0.001               0.655
## A7                         0.042               0.451
## Total.RAVLT                0.005               0.573
## Forgetfulness.Rate         0.554               0.165
## Digits.forward             0.025               0.639
## Digits.backward            0.429               0.201
## Span.forward               0.015               0.605
## Span.backward              0.001               0.515
## Corsi.forward              0.017               0.453
## Corsi.backward             0.012               0.604
## d2.RB                      0.018               0.516
## d2.RL                      0.007               0.576
## Reading.time               0.389               0.206
## Count.time                 0.038               0.534
## Choice.time                0.005               0.643
## Alternation.time           0.009               0.629
## Inhibition                 0.001               0.724
## Flexibility                0.001               0.739
## n_cat                      0.164               0.317
## n_erro                     0.136               0.365
# Data without Control group
OnceMulti <- red[ which(red$Type !='Control'), ]

# YUEN robust t-test between Groups (Once N=15 vs Multiple N=16)
OnceMultiple.p <- round(sapply(OnceMulti[,c(2,3,9:19,26,27,30:45)], function(i) yuen(i ~ OnceMulti$Type)$p.value), 3)
# Effec size (with bootstrap), results may differ because of resampling
set.seed(7)
OnceMultiple.EffSize <- round(sapply(OnceMulti[,c(2,3,9:19,26,27,30:45)], function(i) yuen.effect.ci(i ~ OnceMulti$Type)$effsize), 3)
# Print results (Multiple vs Once)
cbind(OnceMultiple.p, OnceMultiple.EffSize)
##                    OnceMultiple.p OnceMultiple.EffSize
## Age                         0.520                0.174
## Education                   0.396                0.294
## Vocabulary                  0.181                0.332
## Matrix.Reasoning            0.298                0.289
## IQ                          0.172                0.354
## A1                          0.845                0.059
## A2                          0.275                0.260
## A3                          0.461                0.287
## A4                          0.296                0.223
## A5                          0.248                0.290
## B1                          0.332                0.340
## A6                          0.120                0.348
## A7                          0.099                0.463
## Total.RAVLT                 0.516                0.154
## Forgetfulness.Rate          0.532                0.244
## Digits.forward              0.843                0.039
## Digits.backward             0.125                0.426
## Span.forward                0.936                0.100
## Span.backward               0.595                0.100
## Corsi.forward               0.193                0.418
## Corsi.backward              0.986                0.061
## d2.RB                       0.384                0.295
## d2.RL                       0.412                0.238
## Reading.time                0.860                0.043
## Count.time                  0.707                0.104
## Choice.time                 0.169                0.354
## Alternation.time            0.993                0.060
## Inhibition                  0.140                0.438
## Flexibility                 0.828                0.052
## n_cat                       0.658                0.121
## n_erro                      0.688                0.110
# Print ALL Robust results
cbind(type3.p, type3.EffSize, CaseControl.p, CaseControl.EffSize, OnceMultiple.p, OnceMultiple.EffSize)
##                    type3.p type3.EffSize CaseControl.p CaseControl.EffSize
## Age                  0.081         0.371         0.011               0.466
## Education            0.178         0.403         0.130               0.369
## Vocabulary           0.004         0.574         0.004               0.598
## Matrix.Reasoning     0.001         0.639         0.000               0.743
## IQ                   0.001         0.635         0.000               0.748
## A1                   0.499         0.257         0.253               0.287
## A2                   0.170         0.352         0.123               0.369
## A3                   0.012         0.559         0.001               0.653
## A4                   0.007         0.563         0.003               0.751
## A5                   0.046         0.571         0.017               0.646
## B1                   0.481         0.205         0.539               0.115
## A6                   0.003         0.540         0.001               0.655
## A7                   0.026         0.480         0.042               0.451
## Total.RAVLT          0.019         0.522         0.005               0.573
## Forgetfulness.Rate   0.688         0.244         0.554               0.165
## Digits.forward       0.081         0.531         0.025               0.639
## Digits.backward      0.288         0.341         0.429               0.201
## Span.forward         0.072         0.468         0.015               0.605
## Span.backward        0.004         0.445         0.001               0.515
## Corsi.forward        0.014         0.416         0.017               0.453
## Corsi.backward       0.046         0.593         0.012               0.604
## d2.RB                0.056         0.388         0.018               0.516
## d2.RL                0.036         0.472         0.007               0.576
## Reading.time         0.681         0.186         0.389               0.206
## Count.time           0.101         0.477         0.038               0.534
## Choice.time          0.007         0.567         0.005               0.643
## Alternation.time     0.031         0.610         0.009               0.629
## Inhibition           0.004         0.616         0.001               0.724
## Flexibility          0.007         0.569         0.001               0.739
## n_cat                0.190         0.295         0.164               0.317
## n_erro               0.318         0.274         0.136               0.365
##                    OnceMultiple.p OnceMultiple.EffSize
## Age                         0.520                0.174
## Education                   0.396                0.294
## Vocabulary                  0.181                0.332
## Matrix.Reasoning            0.298                0.289
## IQ                          0.172                0.354
## A1                          0.845                0.059
## A2                          0.275                0.260
## A3                          0.461                0.287
## A4                          0.296                0.223
## A5                          0.248                0.290
## B1                          0.332                0.340
## A6                          0.120                0.348
## A7                          0.099                0.463
## Total.RAVLT                 0.516                0.154
## Forgetfulness.Rate          0.532                0.244
## Digits.forward              0.843                0.039
## Digits.backward             0.125                0.426
## Span.forward                0.936                0.100
## Span.backward               0.595                0.100
## Corsi.forward               0.193                0.418
## Corsi.backward              0.986                0.061
## d2.RB                       0.384                0.295
## d2.RL                       0.412                0.238
## Reading.time                0.860                0.043
## Count.time                  0.707                0.104
## Choice.time                 0.169                0.354
## Alternation.time            0.993                0.060
## Inhibition                  0.140                0.438
## Flexibility                 0.828                0.052
## n_cat                       0.658                0.121
## n_erro                      0.688                0.110

Pos-hoc Lincon

# pos-hoc LINCON method (20% trimmed one-way ANOVA)
type3.poshoc <- round(sapply(red[,c(2,3,9:19,26,27,30:45)], function(i) lincon(i ~ red$Type)$comp), 3)
# Select variables
testDF <- red[c(2,3,4,9:19,26,27,30:46)]

# Run LINCON pos-hoc with all variables
varListTest <- names(testDF)[-3]

#creates a model for each of the variables in question
model <- lapply(varListTest, function(x) {
  WRS2::lincon(substitute(i ~ Type, list(i = as.name(x))), data = testDF)})

# Print results
model
## [[1]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                       psihat ci.lower ci.upper p.value
## Control vs. Multiple 0.97778 -0.37989  2.33545 0.14978
## Control vs. Once     1.40000 -0.29193  3.09193 0.13030
## Multiple vs. Once    0.42222 -1.28254  2.12699 0.52032
## 
## 
## [[2]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                       psihat ci.lower ci.upper p.value
## Control vs. Multiple 0.52222 -0.87392  1.91836 0.39633
## Control vs. Once     1.00000 -0.31956  2.31956 0.18746
## Multiple vs. Once    0.47778 -0.97055  1.92611 0.39633
## 
## 
## [[3]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                        psihat  ci.lower ci.upper p.value
## Control vs. Multiple 10.21111   3.45344 16.96878 0.00292
## Control vs. Once      6.00000  -2.30302 14.30302 0.14807
## Multiple vs. Once    -4.21111 -12.19795  3.77573 0.18058
## 
## 
## [[4]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                        psihat ci.lower ci.upper p.value
## Control vs. Multiple  6.81111  2.66914 10.95308 0.00171
## Control vs. Once      4.70000  0.10883  9.29117 0.03099
## Multiple vs. Once    -2.11111 -7.28771  3.06549 0.29751
## 
## 
## [[5]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                        psihat  ci.lower ci.upper p.value
## Control vs. Multiple 17.74444   8.19462 27.29427 0.00043
## Control vs. Once     11.40000   0.02507 22.77493 0.03453
## Multiple vs. Once    -6.34444 -18.09840  5.40951 0.17222
## 
## 
## [[6]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                      psihat ci.lower ci.upper p.value
## Control vs. Multiple    0.8 -0.97606  2.57606 0.64628
## Control vs. Once        0.7 -1.12269  2.52269 0.64628
## Multiple vs. Once      -0.1 -1.43042  1.23042 0.84534
## 
## 
## [[7]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                      psihat ci.lower ci.upper p.value
## Control vs. Multiple    0.8 -1.07203  2.67203 0.27534
## Control vs. Once        1.4 -0.47668  3.27668 0.19562
## Multiple vs. Once       0.6 -0.80232  2.00232 0.27534
## 
## 
## [[8]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                       psihat ci.lower ci.upper p.value
## Control vs. Multiple 1.48889  0.22631  2.75147 0.01936
## Control vs. Once     2.30000 -0.63538  5.23538 0.10374
## Multiple vs. Once    0.81111 -2.13692  3.75914 0.46105
## 
## 
## [[9]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                       psihat ci.lower ci.upper p.value
## Control vs. Multiple 1.35556 -0.34994  3.06105 0.09917
## Control vs. Once     2.20000  0.50059  3.89941 0.01111
## Multiple vs. Once    0.84444 -1.21709  2.90598 0.29561
## 
## 
## [[10]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                       psihat ci.lower ci.upper p.value
## Control vs. Multiple 1.13333 -0.46533  2.73200 0.15795
## Control vs. Once     1.90000  0.07206  3.72794 0.04186
## Multiple vs. Once    0.76667 -0.92546  2.45879 0.24757
## 
## 
## [[11]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                        psihat ci.lower ci.upper p.value
## Control vs. Multiple  0.04444 -1.89700  1.98589 0.95250
## Control vs. Once     -0.60000 -2.16198  0.96198 0.66465
## Multiple vs. Once    -0.64444 -2.38023  1.09134 0.66465
## 
## 
## [[12]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                       psihat ci.lower ci.upper p.value
## Control vs. Multiple 1.74444 -0.23190  3.72079 0.06506
## Control vs. Once     3.20000  1.10197  5.29803 0.00289
## Multiple vs. Once    1.45556 -0.88607  3.79718 0.11991
## 
## 
## [[13]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                       psihat ci.lower ci.upper p.value
## Control vs. Multiple 0.75556 -1.68104  3.19215 0.42284
## Control vs. Once     2.30000  0.29188  4.30812 0.02309
## Multiple vs. Once    1.54444 -0.80019  3.88908 0.19774
## 
## 
## [[14]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                       psihat ci.lower ci.upper p.value
## Control vs. Multiple 6.27778 -0.67326 13.22882 0.05856
## Control vs. Once     8.40000  0.59664 16.20336 0.03468
## Multiple vs. Once    2.12222 -6.32025 10.56469 0.51634
## 
## 
## [[15]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                        psihat ci.lower ci.upper p.value
## Control vs. Multiple -0.01667 -0.18220  0.14886 0.78952
## Control vs. Once     -0.08000 -0.32877  0.16877 0.78952
## Multiple vs. Once    -0.06333 -0.32801  0.20135 0.78952
## 
## 
## [[16]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                       psihat ci.lower ci.upper p.value
## Control vs. Multiple 1.64444 -0.52603  3.81492 0.12448
## Control vs. Once     1.80000 -0.25840  3.85840 0.10263
## Multiple vs. Once    0.15556 -1.88273  2.19385 0.84272
## 
## 
## [[17]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                       psihat ci.lower ci.upper p.value
## Control vs. Multiple 0.07778 -1.68796  1.84351 0.90498
## Control vs. Once     1.20000 -1.09987  3.49987 0.37670
## Multiple vs. Once    1.12222 -0.75690  3.00134 0.37511
## 
## 
## [[18]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                        psihat ci.lower ci.upper p.value
## Control vs. Multiple  0.93333 -0.08850  1.95517 0.08327
## Control vs. Once      0.90000 -0.31385  2.11385 0.13566
## Multiple vs. Once    -0.03333 -1.11858  1.05191 0.93585
## 
## 
## [[19]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                        psihat ci.lower ci.upper p.value
## Control vs. Multiple  1.06667  0.28199  1.85134 0.00706
## Control vs. Once      0.90000  0.14687  1.65313 0.01157
## Multiple vs. Once    -0.16667 -0.97726  0.64393 0.59473
## 
## 
## [[20]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                        psihat ci.lower ci.upper p.value
## Control vs. Multiple  1.44444  0.29462  2.59427 0.01315
## Control vs. Once      0.70000 -0.91668  2.31668 0.26920
## Multiple vs. Once    -0.74444 -2.22310  0.73421 0.26920
## 
## 
## [[21]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                        psihat ci.lower ci.upper p.value
## Control vs. Multiple  1.81111 -0.00692  3.62915 0.05373
## Control vs. Once      1.80000 -0.23423  3.83423 0.06477
## Multiple vs. Once    -0.01111 -1.66643  1.64421 0.98599
## 
## 
## [[22]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                        psihat  ci.lower ci.upper p.value
## Control vs. Multiple 37.08889 -64.14305 138.3208 0.38427
## Control vs. Once     73.20000   0.36987 146.0301 0.05103
## Multiple vs. Once    36.11111 -71.74053 143.9627 0.38427
## 
## 
## [[23]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                      psihat  ci.lower ci.upper p.value
## Control vs. Multiple   53.3 -32.93203 139.5320 0.23552
## Control vs. Once       84.6   3.62130 165.5787 0.04121
## Multiple vs. Once      31.3 -66.86782 129.4678 0.41214
## 
## 
## [[24]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                        psihat ci.lower ci.upper p.value
## Control vs. Multiple -1.15556 -5.71453  3.40342 0.85978
## Control vs. Once     -1.50000 -6.26549  3.26549 0.85978
## Multiple vs. Once    -0.34444 -5.40331  4.71442 0.85978
## 
## 
## [[25]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                        psihat ci.lower ci.upper p.value
## Control vs. Multiple -3.72222 -8.09841  0.65396 0.11574
## Control vs. Once     -3.20000 -7.53180  1.13180 0.13619
## Multiple vs. Once     0.52222 -3.08024  4.12469 0.70715
## 
## 
## [[26]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                         psihat  ci.lower ci.upper p.value
## Control vs. Multiple -11.77778 -20.15869 -3.39687 0.00543
## Control vs. Once      -7.30000 -16.40366  1.80366 0.09999
## Multiple vs. Once      4.47778  -3.74438 12.69994 0.16910
## 
## 
## [[27]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                         psihat  ci.lower ci.upper p.value
## Control vs. Multiple -11.56667 -22.68064 -0.45269 0.04163
## Control vs. Once     -11.60000 -23.59688  0.39688 0.04163
## Multiple vs. Once     -0.03333 -10.59847 10.53180 0.99345
## 
## 
## [[28]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                         psihat  ci.lower ci.upper p.value
## Control vs. Multiple -11.62222 -19.77296 -3.47148 0.00514
## Control vs. Once      -6.90000 -13.54507 -0.25493 0.02805
## Multiple vs. Once      4.72222  -3.36527 12.80971 0.13986
## 
## 
## [[29]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                         psihat  ci.lower ci.upper p.value
## Control vs. Multiple  -9.86667 -18.09148 -1.64185 0.01612
## Control vs. Once     -10.70000 -20.07386 -1.32614 0.01612
## Multiple vs. Once     -0.83333 -10.76917  9.10250 0.82750
## 
## 
## [[30]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                        psihat ci.lower ci.upper p.value
## Control vs. Multiple  0.74444 -0.26248  1.75137 0.20350
## Control vs. Once      0.50000 -1.03443  2.03443 0.65759
## Multiple vs. Once    -0.24444 -1.71353  1.22464 0.65759
## 
## 
## [[31]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                        psihat ci.lower ci.upper p.value
## Control vs. Multiple -1.74444 -7.14248  3.65359 0.68820
## Control vs. Once     -2.70000 -7.51585  2.11585 0.46315
## Multiple vs. Once    -0.95556 -7.13620  5.22509 0.68820
## 
## 
## [[32]]
## Call:
## WRS2::lincon(formula = substitute(i ~ Type, list(i = as.name(x))), 
##     data = testDF)
## 
##                       psihat ci.lower ci.upper p.value
## Control vs. Multiple 0.07778 -0.67914  0.83470 0.78932
## Control vs. Once     0.30000 -0.24616  0.84616 0.44062
## Multiple vs. Once    0.22222 -0.41467  0.85911 0.66382

Correlacoes

# Robust correlations
cor.rob <- pball(testDF[c(1,2,4,7,14,17,18,21,22,23,29,30:33)])
psych::cor.plot(cor.rob$pbcorm)