Data

Read Data

## 'data.frame':    221 obs. of  31 variables:
##  $ FRG_A_01_t1: int  4 3 4 3 1 5 2 5 3 1 ...
##  $ FRG_A_02_t1: int  3 4 4 3 2 3 2 2 2 1 ...
##  $ FRG_A_03_t1: int  3 4 2 3 2 3 2 2 3 4 ...
##  $ FRG_A_04_t1: int  4 4 3 3 2 2 2 3 2 1 ...
##  $ FRG_A_05_t1: int  3 1 3 3 1 1 2 1 1 1 ...
##  $ FRG_M_01_t1: int  4 3 4 5 5 4 3 5 4 2 ...
##  $ FRG_M_02_t1: int  4 3 3 3 3 3 4 2 3 1 ...
##  $ FRG_M_03_t1: int  3 3 3 4 3 5 5 3 6 2 ...
##  $ FRG_M_04_t1: int  4 3 4 4 4 3 4 4 2 3 ...
##  $ FRG_M_05_t1: int  3 2 4 3 1 3 3 2 2 2 ...
##  $ FRG_E_01_t1: int  4 4 5 3 6 4 5 6 6 5 ...
##  $ FRG_E_02_t1: int  4 4 5 4 5 4 5 5 4 1 ...
##  $ FRG_E_03_t1: int  4 3 5 4 5 5 5 6 6 4 ...
##  $ FRG_E_04_t1: int  4 4 4 5 6 5 5 6 6 6 ...
##  $ FRG_E_05_t1: int  4 4 5 4 4 5 5 6 6 6 ...
##  $ FRG_A_01_t2: int  3 2 3 4 4 2 2 4 1 1 ...
##  $ FRG_A_02_t2: int  3 3 2 2 3 1 2 1 1 1 ...
##  $ FRG_A_03_t2: int  3 3 2 2 3 1 2 1 1 3 ...
##  $ FRG_A_04_t2: int  3 4 3 2 2 1 2 1 1 3 ...
##  $ FRG_A_05_t2: int  2 1 2 2 1 1 1 1 1 1 ...
##  $ FRG_M_01_t2: int  4 3 4 4 5 5 5 2 2 2 ...
##  $ FRG_M_02_t2: int  3 2 4 2 4 2 5 2 2 1 ...
##  $ FRG_M_03_t2: int  3 4 4 2 4 2 5 4 5 1 ...
##  $ FRG_M_04_t2: int  3 4 4 3 2 4 4 2 2 1 ...
##  $ FRG_M_05_t2: int  3 3 3 3 3 2 3 2 3 2 ...
##  $ FRG_E_01_t2: int  4 4 5 4 5 5 5 6 5 4 ...
##  $ FRG_E_02_t2: int  4 4 4 6 5 4 5 4 4 1 ...
##  $ FRG_E_03_t2: int  5 5 5 4 5 2 5 3 6 2 ...
##  $ FRG_E_04_t2: int  6 5 6 6 5 5 5 6 1 6 ...
##  $ FRG_E_05_t2: int  6 5 6 4 4 4 4 5 4 6 ...
##  $ study      : Factor w/ 3 levels "s1","s2","s3": 3 3 3 3 3 3 3 3 3 3 ...

Descriptives Item Level

library(psych)




describe(data)
##             vars   n mean   sd median trimmed  mad min max range  skew
## FRG_A_01_t1    1 221 3.18 1.26      3    3.17 1.48   1   6     5  0.16
## FRG_A_02_t1    2 221 2.51 1.15      2    2.44 1.48   1   6     5  0.47
## FRG_A_03_t1    3 221 2.95 1.19      3    2.92 1.48   1   6     5  0.22
## FRG_A_04_t1    4 221 2.93 0.95      3    2.97 1.48   1   5     4 -0.15
## FRG_A_05_t1    5 221 2.15 1.05      2    2.04 1.48   1   6     5  0.66
## FRG_M_01_t1    6 221 3.84 1.15      4    3.89 1.48   1   6     5 -0.34
## FRG_M_02_t1    7 221 2.57 1.05      3    2.54 1.48   1   5     4  0.24
## FRG_M_03_t1    8 221 3.72 1.20      4    3.73 1.48   1   6     5 -0.06
## FRG_M_04_t1    9 221 3.22 1.08      3    3.25 1.48   1   6     5 -0.27
## FRG_M_05_t1   10 221 2.68 0.99      3    2.69 1.48   1   5     4  0.16
## FRG_E_01_t1   11 221 4.81 0.91      5    4.85 1.48   2   6     4 -0.58
## FRG_E_02_t1   12 221 4.75 1.04      5    4.87 1.48   1   6     5 -0.98
## FRG_E_03_t1   13 221 4.79 0.99      5    4.88 1.48   1   6     5 -0.83
## FRG_E_04_t1   14 221 4.67 1.03      5    4.76 1.48   1   6     5 -0.70
## FRG_E_05_t1   15 221 4.90 0.84      5    4.93 1.48   3   6     3 -0.23
## FRG_A_01_t2   16 221 2.41 1.29      2    2.28 1.48   1   6     5  0.65
## FRG_A_02_t2   17 221 1.95 1.00      2    1.83 1.48   1   6     5  0.93
## FRG_A_03_t2   18 221 2.33 1.11      2    2.23 1.48   1   6     5  0.52
## FRG_A_04_t2   19 221 2.57 1.11      3    2.55 1.48   1   5     4  0.11
## FRG_A_05_t2   20 221 1.77 0.93      2    1.63 1.48   1   5     4  1.11
## FRG_M_01_t2   21 221 3.29 1.25      3    3.32 1.48   1   6     5 -0.13
## FRG_M_02_t2   22 221 2.45 1.11      2    2.37 1.48   1   6     5  0.61
## FRG_M_03_t2   23 221 3.67 1.27      4    3.71 1.48   1   6     5 -0.28
## FRG_M_04_t2   24 221 2.67 1.10      3    2.66 1.48   1   6     5  0.15
## FRG_M_05_t2   25 221 2.48 1.03      2    2.43 1.48   1   5     4  0.39
## FRG_E_01_t2   26 221 5.10 0.83      5    5.16 1.48   3   6     3 -0.43
## FRG_E_02_t2   27 221 4.70 0.99      5    4.79 1.48   1   6     5 -0.85
## FRG_E_03_t2   28 221 4.87 0.95      5    4.94 1.48   2   6     4 -0.73
## FRG_E_04_t2   29 221 5.34 0.95      6    5.49 0.00   1   6     5 -1.60
## FRG_E_05_t2   30 221 5.40 0.79      6    5.52 0.00   2   6     4 -1.11
## study*        31 221 2.08 0.58      2    2.10 0.00   1   3     2 -0.01
##             kurtosis   se
## FRG_A_01_t1    -0.68 0.08
## FRG_A_02_t1    -0.26 0.08
## FRG_A_03_t1    -0.48 0.08
## FRG_A_04_t1    -0.72 0.06
## FRG_A_05_t1     0.03 0.07
## FRG_M_01_t1    -0.27 0.08
## FRG_M_02_t1    -0.63 0.07
## FRG_M_03_t1    -0.49 0.08
## FRG_M_04_t1    -0.38 0.07
## FRG_M_05_t1    -0.49 0.07
## FRG_E_01_t1     0.40 0.06
## FRG_E_02_t1     1.16 0.07
## FRG_E_03_t1     0.88 0.07
## FRG_E_04_t1     0.58 0.07
## FRG_E_05_t1    -0.75 0.06
## FRG_A_01_t2    -0.56 0.09
## FRG_A_02_t2     0.61 0.07
## FRG_A_03_t2    -0.21 0.07
## FRG_A_04_t2    -0.89 0.07
## FRG_A_05_t2     0.59 0.06
## FRG_M_01_t2    -0.76 0.08
## FRG_M_02_t2    -0.15 0.07
## FRG_M_03_t2    -0.52 0.09
## FRG_M_04_t2    -0.56 0.07
## FRG_M_05_t2    -0.46 0.07
## FRG_E_01_t2    -0.82 0.06
## FRG_E_02_t2     1.23 0.07
## FRG_E_03_t2     0.52 0.06
## FRG_E_04_t2     3.04 0.06
## FRG_E_05_t2     0.64 0.05
## study*         -0.12 0.04

Compute Scales and Unstandardized Descriptives/Reliabilities

##FREE-GST

data$FRG_A_t1 <- rowMeans(data[,c("FRG_A_01_t1","FRG_A_02_t1","FRG_A_03_t1","FRG_A_04_t1","FRG_A_05_t1")])

data$FRG_M_t1 <- rowMeans(data[,c("FRG_M_01_t1","FRG_M_02_t1","FRG_M_03_t1","FRG_M_04_t1","FRG_M_05_t1")])

data$FRG_E_t1 <- rowMeans(data[,c("FRG_E_01_t1","FRG_E_02_t1","FRG_E_03_t1","FRG_E_04_t1","FRG_E_05_t1")])

data$FRG_A_t2 <- rowMeans(data[,c("FRG_A_01_t2","FRG_A_02_t2","FRG_A_03_t2","FRG_A_04_t2","FRG_A_05_t2")])

data$FRG_M_t2 <- rowMeans(data[,c("FRG_M_01_t2","FRG_M_02_t2","FRG_M_03_t2","FRG_M_04_t2","FRG_M_05_t2")])

data$FRG_E_t2 <- rowMeans(data[,c("FRG_E_01_t2","FRG_E_02_t2","FRG_E_03_t2","FRG_E_04_t2","FRG_E_05_t2")])


alpha(data[,c("FRG_A_01_t1","FRG_A_02_t1","FRG_A_03_t1","FRG_A_04_t1","FRG_A_05_t1")])
## 
## Reliability analysis   
## Call: alpha(x = data[, c("FRG_A_01_t1", "FRG_A_02_t1", "FRG_A_03_t1", 
##     "FRG_A_04_t1", "FRG_A_05_t1")])
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
##       0.66      0.66    0.63      0.28 1.9 0.035  2.7 0.74     0.25
## 
##  lower alpha upper     95% confidence boundaries
## 0.59 0.66 0.73 
## 
##  Reliability if an item is dropped:
##             raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r
## FRG_A_01_t1      0.57      0.57    0.52      0.25 1.3    0.046 0.0145
## FRG_A_02_t1      0.54      0.53    0.47      0.22 1.1    0.050 0.0091
## FRG_A_03_t1      0.59      0.58    0.54      0.26 1.4    0.043 0.0187
## FRG_A_04_t1      0.65      0.64    0.60      0.31 1.8    0.038 0.0193
## FRG_A_05_t1      0.68      0.68    0.63      0.35 2.1    0.034 0.0107
##             med.r
## FRG_A_01_t1  0.25
## FRG_A_02_t1  0.22
## FRG_A_03_t1  0.23
## FRG_A_04_t1  0.29
## FRG_A_05_t1  0.33
## 
##  Item statistics 
##               n raw.r std.r r.cor r.drop mean   sd
## FRG_A_01_t1 221  0.73  0.70  0.61   0.49  3.2 1.26
## FRG_A_02_t1 221  0.76  0.75  0.70   0.57  2.5 1.15
## FRG_A_03_t1 221  0.69  0.68  0.57   0.46  2.9 1.19
## FRG_A_04_t1 221  0.55  0.59  0.40   0.33  2.9 0.95
## FRG_A_05_t1 221  0.50  0.52  0.29   0.24  2.2 1.05
## 
## Non missing response frequency for each item
##                1    2    3    4    5    6 miss
## FRG_A_01_t1 0.09 0.24 0.27 0.24 0.13 0.03    0
## FRG_A_02_t1 0.22 0.30 0.30 0.14 0.04 0.01    0
## FRG_A_03_t1 0.12 0.25 0.31 0.23 0.08 0.02    0
## FRG_A_04_t1 0.06 0.28 0.35 0.29 0.02 0.00    0
## FRG_A_05_t1 0.33 0.30 0.27 0.07 0.02 0.00    0
alpha(data[,c("FRG_M_01_t1","FRG_M_02_t1","FRG_M_03_t1","FRG_M_04_t1","FRG_M_05_t1")])
## 
## Reliability analysis   
## Call: alpha(x = data[, c("FRG_M_01_t1", "FRG_M_02_t1", "FRG_M_03_t1", 
##     "FRG_M_04_t1", "FRG_M_05_t1")])
## 
##   raw_alpha std.alpha G6(smc) average_r S/N  ase mean   sd median_r
##       0.62      0.63     0.6      0.25 1.7 0.04  3.2 0.69     0.27
## 
##  lower alpha upper     95% confidence boundaries
## 0.55 0.62 0.7 
## 
##  Reliability if an item is dropped:
##             raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r
## FRG_M_01_t1      0.57      0.58    0.54      0.26 1.4    0.048 0.0138
## FRG_M_02_t1      0.52      0.53    0.49      0.22 1.1    0.053 0.0132
## FRG_M_03_t1      0.59      0.59    0.53      0.26 1.4    0.046 0.0062
## FRG_M_04_t1      0.59      0.59    0.53      0.26 1.4    0.045 0.0066
## FRG_M_05_t1      0.58      0.58    0.53      0.26 1.4    0.046 0.0116
##             med.r
## FRG_M_01_t1  0.27
## FRG_M_02_t1  0.20
## FRG_M_03_t1  0.27
## FRG_M_04_t1  0.28
## FRG_M_05_t1  0.30
## 
##  Item statistics 
##               n raw.r std.r r.cor r.drop mean   sd
## FRG_M_01_t1 221  0.64  0.63  0.47   0.38  3.8 1.15
## FRG_M_02_t1 221  0.69  0.70  0.59   0.47  2.6 1.05
## FRG_M_03_t1 221  0.64  0.61  0.46   0.35  3.7 1.20
## FRG_M_04_t1 221  0.60  0.62  0.47   0.34  3.2 1.08
## FRG_M_05_t1 221  0.59  0.62  0.47   0.36  2.7 0.99
## 
## Non missing response frequency for each item
##                1    2    3    4    5    6 miss
## FRG_M_01_t1 0.03 0.11 0.20 0.37 0.24 0.05    0
## FRG_M_02_t1 0.16 0.33 0.31 0.16 0.03 0.00    0
## FRG_M_03_t1 0.03 0.11 0.29 0.29 0.20 0.07    0
## FRG_M_04_t1 0.07 0.18 0.30 0.37 0.07 0.01    0
## FRG_M_05_t1 0.11 0.33 0.36 0.17 0.03 0.00    0
alpha(data[,c("FRG_E_01_t1","FRG_E_02_t1","FRG_E_03_t1","FRG_E_04_t1","FRG_E_05_t1")])
## 
## Reliability analysis   
## Call: alpha(x = data[, c("FRG_E_01_t1", "FRG_E_02_t1", "FRG_E_03_t1", 
##     "FRG_E_04_t1", "FRG_E_05_t1")])
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean  sd median_r
##       0.61      0.62     0.6      0.24 1.6 0.042  4.8 0.6     0.21
## 
##  lower alpha upper     95% confidence boundaries
## 0.53 0.61 0.69 
## 
##  Reliability if an item is dropped:
##             raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r
## FRG_E_01_t1      0.58      0.59    0.57      0.26 1.4    0.047 0.0238
## FRG_E_02_t1      0.58      0.58    0.54      0.26 1.4    0.047 0.0169
## FRG_E_03_t1      0.56      0.57    0.54      0.25 1.3    0.049 0.0215
## FRG_E_04_t1      0.57      0.57    0.50      0.25 1.3    0.047 0.0039
## FRG_E_05_t1      0.50      0.50    0.44      0.20 1.0    0.055 0.0080
##             med.r
## FRG_E_01_t1  0.23
## FRG_E_02_t1  0.21
## FRG_E_03_t1  0.23
## FRG_E_04_t1  0.24
## FRG_E_05_t1  0.19
## 
##  Item statistics 
##               n raw.r std.r r.cor r.drop mean   sd
## FRG_E_01_t1 221  0.58  0.59  0.40   0.32  4.8 0.91
## FRG_E_02_t1 221  0.62  0.60  0.43   0.33  4.7 1.04
## FRG_E_03_t1 221  0.63  0.62  0.46   0.36  4.8 0.99
## FRG_E_04_t1 221  0.63  0.62  0.51   0.34  4.7 1.03
## FRG_E_05_t1 221  0.69  0.71  0.64   0.49  4.9 0.84
## 
## Non missing response frequency for each item
##                1    2    3    4    5    6 miss
## FRG_E_01_t1 0.00 0.02 0.03 0.30 0.41 0.24    0
## FRG_E_02_t1 0.01 0.03 0.06 0.24 0.43 0.23    0
## FRG_E_03_t1 0.00 0.03 0.05 0.26 0.42 0.24    0
## FRG_E_04_t1 0.00 0.04 0.04 0.33 0.36 0.23    0
## FRG_E_05_t1 0.00 0.00 0.04 0.28 0.42 0.26    0
data <- data[,c("FRG_A_t1","FRG_A_t2","FRG_M_t1","FRG_M_t2","FRG_E_t1","FRG_E_t2")]


describe(data)
##          vars   n mean   sd median trimmed  mad min max range  skew
## FRG_A_t1    1 221 2.74 0.74    2.8    2.75 0.89 1.0 5.0   4.0  0.07
## FRG_A_t2    2 221 2.21 0.82    2.2    2.17 0.89 1.0 4.8   3.8  0.35
## FRG_M_t1    3 221 3.21 0.69    3.2    3.22 0.59 1.6 4.8   3.2 -0.13
## FRG_M_t2    4 221 2.91 0.82    3.0    2.91 0.89 1.0 5.2   4.2  0.03
## FRG_E_t1    5 221 4.78 0.60    4.8    4.79 0.59 3.2 6.0   2.8 -0.17
## FRG_E_t2    6 221 5.08 0.56    5.2    5.11 0.59 3.6 6.0   2.4 -0.30
##          kurtosis   se
## FRG_A_t1     0.01 0.05
## FRG_A_t2    -0.48 0.06
## FRG_M_t1    -0.48 0.05
## FRG_M_t2    -0.21 0.06
## FRG_E_t1    -0.52 0.04
## FRG_E_t2    -0.58 0.04
library(corrplot)
## corrplot 0.84 loaded
source("http://www.sthda.com/upload/rquery_cormat.r")

rquery.cormat(data)

## $r
##          FRG_E_t1 FRG_E_t2 FRG_A_t1 FRG_A_t2 FRG_M_t1 FRG_M_t2
## FRG_E_t1        1                                             
## FRG_E_t2     0.51        1                                    
## FRG_A_t1    -0.25    0.011        1                           
## FRG_A_t2    -0.35    -0.19     0.58        1                  
## FRG_M_t1   0.0038    -0.11   0.0058    0.016        1         
## FRG_M_t2    -0.15     -0.1     0.12     0.22     0.55        1
## 
## $p
##          FRG_E_t1 FRG_E_t2 FRG_A_t1 FRG_A_t2 FRG_M_t1 FRG_M_t2
## FRG_E_t1        0                                             
## FRG_E_t2  9.9e-16        0                                    
## FRG_A_t1  0.00018     0.87        0                           
## FRG_A_t2    9e-08   0.0052  7.1e-21        0                  
## FRG_M_t1     0.96    0.096     0.93     0.82        0         
## FRG_M_t2    0.022     0.13    0.067  0.00099  5.3e-19        0
## 
## $sym
##          FRG_E_t1 FRG_E_t2 FRG_A_t1 FRG_A_t2 FRG_M_t1 FRG_M_t2
## FRG_E_t1 1                                                    
## FRG_E_t2 .        1                                           
## FRG_A_t1                   1                                  
## FRG_A_t2 .                 .        1                         
## FRG_M_t1                                     1                
## FRG_M_t2                                     .        1       
## attr(,"legend")
## [1] 0 ' ' 0.3 '.' 0.6 ',' 0.8 '+' 0.9 '*' 0.95 'B' 1

Standardization and Standardized Descriptives

data$FRG_A_t2 <- (data$FRG_A_t2 - mean(data$FRG_A_t1,na.rm = T))/sd(data$FRG_A_t1,na.rm = T)
data$FRG_A_t1 <- (data$FRG_A_t1 - mean(data$FRG_A_t1,na.rm = T))/sd(data$FRG_A_t1,na.rm = T)

data$FRG_M_t2 <- (data$FRG_M_t2 - mean(data$FRG_M_t1,na.rm = T))/sd(data$FRG_M_t1,na.rm = T)
data$FRG_M_t1 <- (data$FRG_M_t1 - mean(data$FRG_M_t1,na.rm = T))/sd(data$FRG_M_t1,na.rm = T)

data$FRG_E_t2 <- (data$FRG_E_t2 - mean(data$FRG_E_t1,na.rm = T))/sd(data$FRG_E_t1,na.rm = T)
data$FRG_E_t1 <- (data$FRG_E_t1 - mean(data$FRG_E_t1,na.rm = T))/sd(data$FRG_E_t1,na.rm = T)


describe(data)
##          vars   n  mean   sd median trimmed  mad   min  max range  skew
## FRG_A_t1    1 221  0.00 1.00   0.08    0.01 1.21 -2.37 3.06  5.44  0.07
## FRG_A_t2    2 221 -0.73 1.11  -0.74   -0.78 1.21 -2.37 2.79  5.16  0.35
## FRG_M_t1    3 221  0.00 1.00  -0.01    0.02 0.86 -2.32 2.30  4.62 -0.13
## FRG_M_t2    4 221 -0.43 1.18  -0.30   -0.43 1.29 -3.19 2.88  6.07  0.03
## FRG_E_t1    5 221  0.00 1.00   0.03    0.02 0.99 -2.63 2.02  4.65 -0.17
## FRG_E_t2    6 221  0.50 0.94   0.69    0.54 0.99 -1.97 2.02  3.99 -0.30
##          kurtosis   se
## FRG_A_t1     0.01 0.07
## FRG_A_t2    -0.48 0.07
## FRG_M_t1    -0.48 0.07
## FRG_M_t2    -0.21 0.08
## FRG_E_t1    -0.52 0.07
## FRG_E_t2    -0.58 0.06

Analysis

Latent Difference Score Model

library(lavaan)
## This is lavaan 0.6-4
## lavaan is BETA software! Please report any bugs.
## 
## Attaching package: 'lavaan'
## The following object is masked from 'package:psych':
## 
##     cor2cov
cov_model <- '  # Define latent difference Factor
delta_A =~ 1*FRG_A_t2

# Set autoregressive paths to 1
FRG_A_t2 ~ 1*FRG_A_t1

# Means and Intercept
delta_A    ~ 1
FRG_A_t1 ~ 1                  
FRG_A_t2 ~ 0

# Exogenous (Co)Variances
delta_A ~ FRG_A_t1
delta_A    ~~ delta_A
FRG_A_t1 ~~ FRG_A_t1

# Disturbances
FRG_A_t2 ~~ 0*FRG_A_t2

# Covariate

delta_M =~ 1*FRG_M_t2

# Set autoregressive paths to 1
FRG_M_t2 ~ 1*FRG_M_t1

# Means and Intercept
delta_M    ~ 1
FRG_M_t1 ~ 1                  
FRG_M_t2 ~ 0

# Exogenous (Co)Variances
delta_M ~ FRG_M_t1
delta_M    ~~ delta_M
FRG_M_t1 ~~ FRG_M_t1

# Disturbances
FRG_M_t2 ~~ 0*FRG_M_t2

# Covariate




delta_E =~ 1*FRG_E_t2

# Set autoregressive paths to 1
FRG_E_t2 ~ 1*FRG_E_t1

# Means and Intercept
delta_E    ~ 1
FRG_E_t1 ~ 1                  
FRG_E_t2 ~ 0

# Exogenous (Co)Variances
delta_E ~ FRG_E_t1
delta_E    ~~ delta_E
FRG_E_t1 ~~ FRG_E_t1

# Disturbances
FRG_E_t2 ~~ 0*FRG_E_t2

delta_E ~~ delta_M
delta_A ~~ delta_M
delta_A ~~ delta_E

delta_A ~ FRG_M_t1
delta_A ~ FRG_E_t1

delta_M ~ FRG_A_t1
delta_M ~ FRG_E_t1

delta_E ~ FRG_A_t1
delta_E ~ FRG_M_t1

FRG_A_t1 ~~ FRG_M_t1
FRG_A_t1 ~~ FRG_E_t1
FRG_E_t1 ~~ FRG_M_t1




'
fit_cov <- sem(cov_model, 
            data = data)






summary(fit_cov, rsquare = T, standardized=TRUE)
## lavaan 0.6-4 ended normally after 33 iterations
## 
##   Optimization method                           NLMINB
##   Number of free parameters                         27
## 
##   Number of observations                           221
## 
##   Estimator                                         ML
##   Model Fit Test Statistic                       0.000
##   Degrees of freedom                                 0
## 
## Parameter Estimates:
## 
##   Information                                 Expected
##   Information saturated (h1) model          Structured
##   Standard Errors                             Standard
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   delta_A =~                                                            
##     FRG_A_t2          1.000                               0.978    0.879
##   delta_M =~                                                            
##     FRG_M_t2          1.000                               1.045    0.884
##   delta_E =~                                                            
##     FRG_E_t2          1.000                               0.963    1.029
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   FRG_A_t2 ~                                                            
##     FRG_A_t1          1.000                               1.000    0.897
##   delta_A ~                                                             
##     FRG_A_t1         -0.420    0.061   -6.871    0.000   -0.430   -0.429
##   FRG_M_t2 ~                                                            
##     FRG_M_t1          1.000                               1.000    0.844
##   delta_M ~                                                             
##     FRG_M_t1         -0.346    0.065   -5.332    0.000   -0.332   -0.331
##   FRG_E_t2 ~                                                            
##     FRG_E_t1          1.000                               1.000    1.066
##   delta_E ~                                                             
##     FRG_E_t1         -0.491    0.055   -8.940    0.000   -0.510   -0.509
##   delta_A ~                                                             
##     FRG_M_t1          0.015    0.059    0.253    0.800    0.015    0.015
##     FRG_E_t1         -0.246    0.061   -4.019    0.000   -0.251   -0.251
##   delta_M ~                                                             
##     FRG_A_t1          0.103    0.067    1.536    0.124    0.099    0.098
##     FRG_E_t1         -0.159    0.067   -2.365    0.018   -0.152   -0.151
##   delta_E ~                                                             
##     FRG_A_t1          0.138    0.055    2.510    0.012    0.143    0.143
##     FRG_M_t1         -0.108    0.053   -2.032    0.042   -0.112   -0.112
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##  .delta_M ~~                                                            
##    .delta_E           0.029    0.051    0.563    0.574    0.038    0.038
##  .delta_A ~~                                                            
##    .delta_M           0.151    0.058    2.606    0.009    0.178    0.178
##    .delta_E          -0.083    0.047   -1.778    0.075   -0.120   -0.120
##   FRG_A_t1 ~~                                                           
##     FRG_M_t1          0.006    0.067    0.086    0.931    0.006    0.006
##     FRG_E_t1         -0.248    0.069   -3.597    0.000   -0.248   -0.249
##   FRG_M_t1 ~~                                                           
##     FRG_E_t1          0.004    0.067    0.056    0.955    0.004    0.004
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .delta_A          -0.732    0.059  -12.388    0.000   -0.749   -0.749
##     FRG_A_t1          0.000    0.067    0.000    1.000    0.000    0.000
##    .FRG_A_t2          0.000                               0.000    0.000
##    .delta_M          -0.428    0.065   -6.599    0.000   -0.409   -0.409
##     FRG_M_t1         -0.000    0.067   -0.000    1.000   -0.000   -0.000
##    .FRG_M_t2          0.000                               0.000    0.000
##    .delta_E           0.499    0.053    9.406    0.000    0.518    0.518
##     FRG_E_t1          0.000    0.067    0.000    1.000    0.000    0.000
##    .FRG_E_t2          0.000                               0.000    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .delta_A           0.771    0.073   10.512    0.000    0.807    0.807
##     FRG_A_t1          0.995    0.095   10.512    0.000    0.995    1.000
##    .FRG_A_t2          0.000                               0.000    0.000
##    .delta_M           0.928    0.088   10.512    0.000    0.851    0.851
##     FRG_M_t1          0.995    0.095   10.512    0.000    0.995    1.000
##    .FRG_M_t2          0.000                               0.000    0.000
##    .delta_E           0.623    0.059   10.512    0.000    0.672    0.672
##     FRG_E_t1          0.995    0.095   10.512    0.000    0.995    1.000
##    .FRG_E_t2          0.000                               0.000    0.000
## 
## R-Square:
##                    Estimate
##     delta_A           0.193
##     FRG_A_t2          1.000
##     delta_M           0.149
##     FRG_M_t2          1.000
##     delta_E           0.328
##     FRG_E_t2          1.000

Cluster Analysis

NbClust

test.data <- data[,c("FRG_A_t1","FRG_M_t1","FRG_E_t1")]



library(NbClust)

NbClust(test.data, method = "ward.D", max.nc = 6)

## *** : The Hubert index is a graphical method of determining the number of clusters.
##                 In the plot of Hubert index, we seek a significant knee that corresponds to a 
##                 significant increase of the value of the measure i.e the significant peak in Hubert
##                 index second differences plot. 
## 

## *** : The D index is a graphical method of determining the number of clusters. 
##                 In the plot of D index, we seek a significant knee (the significant peak in Dindex
##                 second differences plot) that corresponds to a significant increase of the value of
##                 the measure. 
##  
## ******************************************************************* 
## * Among all indices:                                                
## * 6 proposed 2 as the best number of clusters 
## * 9 proposed 3 as the best number of clusters 
## * 1 proposed 5 as the best number of clusters 
## * 7 proposed 6 as the best number of clusters 
## 
##                    ***** Conclusion *****                            
##  
## * According to the majority rule, the best number of clusters is  3 
##  
##  
## *******************************************************************
## $All.index
##        KL      CH Hartigan      CCC    Scott  Marriot    TrCovW   TraceW
## 2  3.9106 73.8923  56.8618  -3.8032 214.9066 15104339 27960.866 493.4919
## 3  0.5048 74.6275  27.2794  -6.3600 356.2574 17927139 17388.887 391.7713
## 4  6.4457 64.7720  32.0543 -10.6752 430.5491 22771698 12517.596 348.1994
## 5  0.5399 63.4746  32.9556 -10.2384 525.7075 23132171  9818.928 303.3847
## 6 99.5342 64.8169  23.3196  -9.2721 615.8861 22149608  8749.424 263.2240
##   Friedman  Rubin Cindex     DB Silhouette   Duda Pseudot2  Beale
## 2   1.3977 1.3374 0.3375 1.5880     0.2379 0.7172  56.3849 0.6666
## 3   2.3300 1.6847 0.3175 1.5066     0.2373 0.6977  37.2704 0.7293
## 4   2.8966 1.8955 0.3201 1.3688     0.2034 0.6064  35.6956 1.0852
## 5   3.8623 2.1755 0.3048 1.2213     0.2123 0.6998  31.7399 0.7205
## 6   4.9035 2.5074 0.3445 1.1717     0.2240 0.6922  26.6814 0.7446
##   Ratkowsky     Ball Ptbiserial   Frey McClain   Dunn Hubert SDindex
## 2    0.3116 246.7460     0.3268 0.1981  0.6330 0.0675 0.0023  1.8812
## 3    0.3637 130.5904     0.4203 0.5358  1.3055 0.0735 0.0028  1.6746
## 4    0.3431  87.0498     0.4163 0.1465  1.6207 0.0769 0.0029  1.5669
## 5    0.3279  60.6769     0.4319 0.1191  1.8356 0.0769 0.0031  1.4939
## 6    0.3160  43.8707     0.4514 0.4116  2.0962 0.0933 0.0035  1.4502
##   Dindex   SDbw
## 2 1.3702 1.5747
## 3 1.2170 1.4479
## 4 1.1381 0.9565
## 5 1.0621 0.8226
## 6 0.9977 0.5889
## 
## $All.CriticalValues
##   CritValue_Duda CritValue_PseudoT2 Fvalue_Beale
## 2         0.6024            94.3722       0.5729
## 3         0.5499            70.4054       0.5353
## 4         0.4921            56.7551       0.3570
## 5         0.5318            65.1614       0.5407
## 6         0.5043            58.9723       0.5268
## 
## $Best.nc
##                      KL      CH Hartigan     CCC    Scott Marriot   TrCovW
## Number_clusters  6.0000  3.0000   3.0000  2.0000   3.0000       3     3.00
## Value_Index     99.5342 74.6275  29.5823 -3.8032 141.3508 2021758 10571.98
##                  TraceW Friedman   Rubin Cindex     DB Silhouette   Duda
## Number_clusters  3.0000   6.0000  3.0000 5.0000 6.0000     2.0000 2.0000
## Value_Index     58.1487   1.0412 -0.1364 0.3048 1.1717     0.2379 0.7172
##                 PseudoT2  Beale Ratkowsky     Ball PtBiserial Frey McClain
## Number_clusters   2.0000 2.0000    3.0000   3.0000     6.0000    1   2.000
## Value_Index      56.3849 0.6666    0.3637 116.1555     0.4514   NA   0.633
##                   Dunn Hubert SDindex Dindex   SDbw
## Number_clusters 6.0000      0  6.0000      0 6.0000
## Value_Index     0.0933      0  1.4502      0 0.5889
## 
## $Best.partition
##   [1] 1 2 1 1 3 1 3 3 3 2 1 1 3 2 3 3 1 1 2 3 2 2 1 1 1 2 3 3 3 1 2 1 3 3 2
##  [36] 3 1 3 1 2 2 1 3 1 3 2 2 3 2 3 3 1 1 1 2 1 3 3 2 3 1 2 1 3 1 1 2 3 3 1
##  [71] 1 3 1 3 1 1 1 1 1 1 1 1 3 1 1 2 1 1 1 1 3 3 1 1 3 3 3 1 3 2 1 3 1 1 1
## [106] 1 1 3 3 1 1 2 1 2 3 3 2 2 1 3 1 2 2 1 1 1 2 3 3 1 1 2 2 2 2 1 1 1 1 3
## [141] 3 2 3 1 3 3 2 2 3 2 2 3 3 2 1 3 3 3 2 2 2 3 1 3 2 2 1 2 1 2 1 2 1 1 2
## [176] 2 2 3 2 2 1 1 1 1 3 1 3 3 3 3 3 1 1 1 1 3 3 2 2 3 3 3 1 3 1 2 1 3 2 1
## [211] 2 3 3 2 2 3 3 1 3 1 3
solution <- NbClust(test.data, method = "ward.D", max.nc = 6)

## *** : The Hubert index is a graphical method of determining the number of clusters.
##                 In the plot of Hubert index, we seek a significant knee that corresponds to a 
##                 significant increase of the value of the measure i.e the significant peak in Hubert
##                 index second differences plot. 
##