5 Single-Level CFA Models for Interchangeable Raters
Models of Section 5.1
I-SAT model
R Code
isat <- '
Flon11 ~ .con1*1
Flon12 ~ .con1*1
Flon21 ~ .con2*1
Flon22 ~ .con2*1
Flon31 ~ .con3*1
Flon32 ~ .con3*1
Fflou11 ~ .con4*1
Fflou12 ~ .con4*1
Fflou21 ~ .con5*1
Fflou22 ~ .con5*1
# Set observed variable variances equal across Friend 1 and Friend 2
Flon11 ~~ .con6*Flon11
Flon12 ~~ .con6*Flon12
Flon21 ~~ .con7*Flon21
Flon22 ~~ .con7*Flon22
Flon31 ~~ .con8*Flon31
Flon32 ~~ .con8*Flon32
Fflou11 ~~ .con9*Fflou11
Fflou12 ~~ .con9*Fflou12
Fflou21 ~~ .con10*Fflou21
Fflou22 ~~ .con10*Fflou22
# Set observed variable covariances equal across Friend 1 and Friend 2
# Covariances within each rater
Flon11 ~~ .con11*Flon21
Flon12 ~~ .con11*Flon22
Flon11 ~~ .con12*Flon31
Flon12 ~~ .con12*Flon32
Flon11 ~~ .con13*Fflou11
Flon12 ~~ .con13*Fflou12
Flon11 ~~ .con14*Fflou21
Flon12 ~~ .con14*Fflou22
Flon21 ~~ .con15*Flon31
Flon22 ~~ .con15*Flon32
Flon21 ~~ .con16*Fflou11
Flon22 ~~ .con16*Fflou12
Flon21 ~~ .con17*Fflou21
Flon22 ~~ .con17*Fflou22
Flon31 ~~ .con18*Fflou11
Flon32 ~~ .con18*Fflou12
Flon31 ~~ .con19*Fflou21
Flon32 ~~ .con19*Fflou22
Fflou11 ~~ .con20*Fflou21
Fflou12 ~~ .con20*Fflou22
# Covariances across raters
Flon11 ~~ .con21*Flon22
Flon21 ~~ .con21*Flon12
Flon11 ~~ .con22*Flon32
Flon31 ~~ .con22*Flon12
Flon11 ~~ .con23*Fflou12
Fflou11 ~~ .con23*Flon12
Flon11 ~~ .con24*Fflou22
Fflou21 ~~ .con24*Flon12
Flon21 ~~ .con25*Flon32
Flon31 ~~ .con25*Flon22
Flon21 ~~ .con26*Fflou12
Fflou11 ~~ .con26*Flon22
Flon21 ~~ .con27*Fflou22
Fflou21 ~~ .con27*Flon22
Flon31 ~~ .con28*Fflou12
Fflou11 ~~ .con28*Flon32
Flon31 ~~ .con29*Fflou22
Fflou21 ~~ .con29*Flon32
Fflou11 ~~ .con30*Fflou22
Fflou21 ~~ .con30*Fflou12
# Freely estimated monotrait-heteromethod covariances (convergent validities)
Flon11 ~~ Flon12
Flon21 ~~ Flon22
Flon31 ~~ Flon32
Fflou11 ~~ Fflou12
Fflou21 ~~ Fflou22
'
fit <- sem(model=isat, data=chapter_5, estimator="mlr", missing="fiml")
summary(fit, fit.measures=T, standardized=T)
MPlus Code
I-NULL model
inull <- '
# Set observed variable means equal across Friend 1 and Friend 2
Flon11 ~ .con1*1
Flon12 ~ .con1*1
Flon21 ~ .con2*1
Flon22 ~ .con2*1
Flon31 ~ .con3*1
Flon32 ~ .con3*1
Fflou11 ~ .con4*1
Fflou12 ~ .con4*1
Fflou21 ~ .con5*1
Fflou22 ~ .con5*1
# Set observed variable variances equal across Friend 1 and Friend 2
Flon11 ~~ .con6*Flon11
Flon12 ~~ .con6*Flon12
Flon21 ~~ .con7*Flon21
Flon22 ~~ .con7*Flon22
Flon31 ~~ .con8*Flon31
Flon32 ~~ .con8*Flon32
Fflou11 ~~ .con9*Fflou11
Fflou12 ~~ .con9*Fflou12
Fflou21 ~~ .con10*Fflou21
Fflou22 ~~ .con10*Fflou22
# Set all observed variable covariances to zero
# Covariances within each rater
Flon11 ~~ 0*Flon21
Flon12 ~~ 0*Flon22
Flon11 ~~ 0*Flon31
Flon12 ~~ 0*Flon32
Flon11 ~~ 0*Fflou11
Flon12 ~~ 0*Fflou12
Flon11 ~~ 0*Fflou21
Flon12 ~~ 0*Fflou22
Flon21 ~~ 0*Flon31
Flon22 ~~ 0*Flon32
Flon21 ~~ 0*Fflou11
Flon22 ~~ 0*Fflou12
Flon21 ~~ 0*Fflou21
Flon22 ~~ 0*Fflou22
Flon31 ~~ 0*Fflou11
Flon32 ~~ 0*Fflou12
Flon31 ~~ 0*Fflou21
Flon32 ~~ 0*Fflou22
Fflou11 ~~ 0*Fflou21
Fflou12 ~~ 0*Fflou22
# Covariances across raters
Flon11 ~~ 0*Flon22
Flon21 ~~ 0*Flon12
Flon11 ~~ 0*Flon32
Flon31 ~~ 0*Flon12
Flon11 ~~ 0*Fflou12
Fflou11 ~~ 0*Flon12
Flon11 ~~ 0*Fflou22
Fflou21 ~~ 0*Flon12
Flon21 ~~ 0*Flon32
Flon31 ~~ 0*Flon22
Flon21 ~~ 0*Fflou12
Fflou11 ~~ 0*Flon22
Flon21 ~~ 0*Fflou22
Fflou21 ~~ 0*Flon22
Flon31 ~~ 0*Fflou12
Fflou11 ~~ 0*Flon32
Flon31 ~~ 0*Fflou22
Fflou21 ~~ 0*Flon32
Fflou11 ~~ 0*Fflou22
Fflou21 ~~ 0*Fflou12
# Monotrait-heteromethod covariances (convergent validities)
Flon11 ~~ 0*Flon12
Flon21 ~~ 0*Flon22
Flon31 ~~ 0*Flon32
Fflou11 ~~ 0*Fflou12
Fflou21 ~~ 0*Fflou22
'
fit <- sem(model=inull, data=chapter_5, estimator="mlr", missing="fiml")
summary(fit, fit.measures=T, standardized=T)
MPlus Code
Models of Section 5.4.1
Basic CTIM model with general trait factors
R Code
bCTIMg <- '
# General trait factors T_j
# Loneliness (T_1)
# Trait factor loadings set equal across raters
T1_flone =~ 1*Flon11 + l_T21*Flon21 + l_T31*Flon31 + 1*Flon12 + l_T21*Flon22 +
l_T31*Flon32
# Flourishing (T_2)
T2_flou =~ 1*Fflou11 + l_T22*Fflou21 + 1*Fflou12 + l_T22*Fflou22
# Trait-specific rater (method) factors R_jk
# Rater factor loadings set equal across raters
# Loneliness, Friend 1 (R_11)
R1_flone =~ 1*Flon11 + l_R21*Flon21 + l_R31*Flon31
# Loneliness, Friend 2 (R_12)
R2_flone =~ 1*Flon12 + l_R21*Flon22 + l_R31*Flon32
# Flourishing, Friend 1 (R_21)
R1_flou =~ 1*Fflou11 + l_R22*Fflou21
# Flourishing, Friend 2 (R_22)
R2_flou =~ 1*Fflou12 + l_R22*Fflou22
# Intercepts set equal for the same variable across raters
Flon11 ~ a_11*1
Flon12 ~ a_11*1
Flon21 ~ a_21*1
Flon22 ~ a_21*1
Flon31 ~ a_31*1
Flon32 ~ a_31*1
Fflou11 ~ a_12*1
Fflou12 ~ a_12*1
Fflou21 ~ a_22*1
Fflou22 ~ a_22*1
# Measurement error variables set equal for the same variable across raters
Flon11 ~~ E_11*Flon11
Flon12 ~~ E_11*Flon12
Flon21 ~~ E_21*Flon21
Flon22 ~~ E_21*Flon22
Flon31 ~~ E_31*Flon31
Flon32 ~~ E_31*Flon32
Fflou11 ~~ E_12*Fflou11
Fflou12 ~~ E_12*Fflou12
Fflou21 ~~ E_22*Fflou21
Fflou22 ~~ E_22*Fflou22
# Set rater factor variances equal across raters within the same trait
R1_flone ~~ VarR_1*R1_flone
R2_flone ~~ VarR_1*R2_flone
R1_flou ~~ VarR_2*R1_flou
R2_flou ~~ VarR_2*R2_flou
# Constrain rater covariances between different traits to be equal
R1_flone ~~ CovR12*R1_flou
R2_flone ~~ CovR12*R2_flou
# Fix correlations between trait and rater factors to zero
T1_flone ~~ 0*R1_flone + 0*R2_flone + 0*R1_flou + 0*R2_flou
T2_flou ~~ 0*R1_flone + 0*R2_flone + 0*R1_flou + 0*R2_flou
# Fix non-admissible correlations between rater factors to zero
R1_flone ~~ 0*R2_flone + 0*R2_flou
R2_flone ~~ 0*R1_flou
R1_flou ~~ 0*R2_flou
'
fit <- sem(model=bCTIMg, data=chapter_5, estimator="mlr", missing="fiml")
summary(fit, fit.measures=T, standardized=T)
MPlus Code
Models of Section 5.4.3
Application of the model see 5.4.4
Restricted CTIM model
R Code
rCTIM <- '
# General trait factors T_j
# Loneliness (T_1)
# Trait factor loadings set equal across raters
T1_flone =~ 1*Flon11 + .con1*Flon21 + .con2*Flon31 + 1*Flon12 + .con1*Flon22 +
.con2*Flon32
# Flourishing (T_2)
T2_flou =~ 1*Fflou11 + .con3*Fflou21 + 1*Fflou12 + .con3*Fflou22
# Trait-specific rater (method) factors R_jk
# Rater factor loadings set equal across raters
# and to corresponding trait factor loadings
# Loneliness, Friend 1 (R_11)
R1_flone =~ 1*Flon11 + .con1*Flon21 + .con2*Flon31
# Loneliness, Friend 2 (R_12)
R2_flone =~ 1*Flon12 + .con1*Flon22 + .con2*Flon32
# Flourishing, Friend 1 (R_21)
R1_flou =~ 1*Fflou11 + .con3*Fflou21
# Flourishing, Friend 2 (R_22)
R2_flou =~ 1*Fflou12 + .con3*Fflou22
# Intercepts set equal for the same variable across raters
# Implies equal latent means across raters
# because latent means are all fixed to zero by default in Mplus
Flon11 ~ .con4*1
Flon12 ~ .con4*1
Flon21 ~ .con5*1
Flon22 ~ .con5*1
Flon31 ~ .con6*1
Flon32 ~ .con6*1
Fflou11 ~ .con7*1
Fflou12 ~ .con7*1
Fflou21 ~ .con8*1
Fflou22 ~ .con8*1
# Measurement error variances set equal for the same variable across raters
Flon11 ~~ .con9*Flon11
Flon12 ~~ .con9*Flon12
Flon21 ~~ .con10*Flon21
Flon22 ~~ .con10*Flon22
Flon31 ~~ .con11*Flon31
Flon32 ~~ .con11*Flon32
Fflou11 ~~ .con12*Fflou11
Fflou12 ~~ .con12*Fflou12
Fflou21 ~~ .con13*Fflou21
Fflou22 ~~ .con13*Fflou22
# Set rater factor variances equal across raters within the same trait
R1_flone ~~ .con14*R1_flone
R2_flone ~~ .con14*R2_flone
R1_flou ~~ .con15*R1_flou
R2_flou ~~ .con15*R2_flou
# Constrain rater covariances between diFferent traits to be equal
R1_flone ~~ .con16*R1_flou
R2_flone ~~ .con16*R2_flou
# Fix correlations between traits and rater factors to zero
T1_flone ~~ 0*R1_flone + 0*R2_flone + 0*R1_flou + 0*R2_flou
T2_flou ~~ 0*R1_flone + 0*R2_flone + 0*R1_flou + 0*R2_flou
# Fix non-admissible correlations between rater factors to zero
R1_flone ~~ 0*R2_flone + 0*R2_flou
R2_flone ~~ 0*R1_flou
R1_flou ~~ 0*R2_flou
'
fit <- sem(model=rCTIM, data=chapter_5, estimator="mlr", missing="fiml")
summary(fit, fit.measures=T, standardized=T)
MPlus Code
Models of Section 5.4.5
Basic CTIM model with general trait factors and indicator-specific residual factors
R Code
bCTIMIS <- '
# General trait factors T_j
# Loneliness (T_1)
# Trait factor loadings set equal across raters
T1_flone =~ 1*Flon11 + .con1*Flon21 + .con2*Flon31 + 1*Flon12 + .con1*Flon22 +
.con2*Flon32
# Flourishing (T_2)
T2_flou =~ 1*Fflou11 + .con3*Fflou21 + 1*Fflou12 + .con3*Fflou22
# Indicator-specific residual factors I_ij
# The first indicator (i = 1) is chosen as reference
# All loadings are fixed to 1 to set them equal across raters
# Loneliness, Indicator 2 (I_21)
I2_flone =~ 1*Flon21 + 1*Flon22
# Loneliness, Indicator 3 (I_31)
I3_flone =~ 1*Flon31 + 1*Flon32
# Flourishing, Indicator 2 (I_22)
I2_flou =~ 1*Fflou21 + 1*Fflou22
# Trait-specific rater (method) factors R_jk
# Rater factor loadings set equal across raters
# Loneliness, Friend 1 (R_11)
R1_flone =~ 1*Flon11 + .con4*Flon21 + .con5*Flon31
# Loneliness, Friend 2 (R_12)
R2_flone =~ 1*Flon12 + .con4*Flon22 + .con5*Flon32
# Flourishing, Friend 1 (R_21)
R1_flou =~ 1*Fflou11 + .con6*Fflou21
# Flourishing, Friend 2 (R_22)
R2_flou =~ 1*Fflou12 + .con6*Fflou22
# Intercepts set equal for the same variable across raters
Flon11 ~ .con7*1
Flon12 ~ .con7*1
Flon21 ~ .con8*1
Flon22 ~ .con8*1
Flon31 ~ .con9*1
Flon32 ~ .con9*1
Fflou11 ~ .con10*1
Fflou12 ~ .con10*1
Fflou21 ~ .con11*1
Fflou22 ~ .con11*1
# Measurement error variables set equal for the same variable across raters
Flon11 ~~ .con12*Flon11
Flon12 ~~ .con12*Flon12
Flon21 ~~ .con13*Flon21
Flon22 ~~ .con13*Flon22
Flon31 ~~ .con14*Flon31
Flon32 ~~ .con14*Flon32
Fflou11 ~~ .con15*Fflou11
Fflou12 ~~ .con15*Fflou12
Fflou21 ~~ .con16*Fflou21
Fflou22 ~~ .con16*Fflou22
# Set rater factor variances equal across raters within the same trait
R1_flone ~~ .con17*R1_flone
R2_flone ~~ .con17*R2_flone
R1_flou ~~ .con18*R1_flou
R2_flou ~~ .con18*R2_flou
# Constrain rater covariances between diFferent traits to be equal
R1_flone ~~ .con19*R1_flou
R2_flone ~~ .con19*R2_flou
# Trait and indicator-specific factors are uncorrelated
T1_flone ~~ 0*I2_flone + 0*I3_flone + 0*I2_flou
T2_flou ~~ 0*I2_flone + 0*I3_flone + 0*I2_flou
# Fix correlations between traits and rater factors to zero
T1_flone ~~ 0*R1_flone + 0*R2_flone + 0*R1_flou + 0*R2_flou
T2_flou ~~ 0*R1_flone + 0*R2_flone + 0*R1_flou + 0*R2_flou
# Indicator-specific factors are uncorrelated with rater factors
I2_flone ~~ 0*R1_flone + 0*R2_flone + 0*R1_flou + 0*R2_flou
I3_flone ~~ 0*R1_flone + 0*R2_flone + 0*R1_flou + 0*R2_flou
I2_flou ~~ 0*R1_flone + 0*R2_flone + 0*R1_flou + 0*R2_flou
# Fix non-admissible correlations between rater factors to zero
R1_flone ~~ 0*R2_flone + 0*R2_flou
R2_flone ~~ 0*R1_flou
R1_flou ~~ 0*R2_flou
'
fit <- sem(model=bCTIMIS, data=chapter_5, estimator="mlr", missing="fiml")
summary(fit, fit.measures=T, standardized=T)
MPlus Code
Restricted CTIM model with indicator-specific residual factors
R Code
rCTIMIS <- '
# General trait factors T_j
# Loneliness (T_1)
# Trait factor loadings set equal across raters
T1_flone =~ 1*Flon11 + .con1*Flon21 + .con2*Flon31 + 1*Flon12 + .con1*Flon22 +
.con2*Flon32
# Flourishing (T_2)
T2_flou =~ 1*Fflou11 + .con3*Fflou21 + 1*Fflou12 + .con3*Fflou22
# Indicator-specific residual factors I_ij
# The first indicator (i = 1) is chosen as reference
# All loadings are fixed to 1 to set them equal across raters
# Loneliness, Indicator 2 (I_21)
I2_flone =~ 1*Flon21 + 1*Flon22
# Loneliness, Indicator 3 (I_31)
I3_flone =~ 1*Flon31 + 1*Flon32
# Flourishing, Indicator 2 (I_22)
I2_flou =~ 1*Fflou21 + 1*Fflou22
# Trait-specific rater (method) factors R_jk
# Rater factor loadings set equal across raters
# and to corresponding trait factor loadings
# Loneliness, Friend 1 (R_11)
R1_flone =~ 1*Flon11 + .con1*Flon21 + .con2*Flon31
# Loneliness, Friend 2 (R_12)
R2_flone =~ 1*Flon12 + .con1*Flon22 + .con2*Flon32
# Flourishing, Friend 1 (R_21)
R1_flou =~ 1*Fflou11 + .con3*Fflou21
# Flourishing, Friend 2 (R_22)
R2_flou =~ 1*Fflou12 + .con3*Fflou22
# Intercepts set equal for the same variable across raters
# Implies equal latent means across raters
# because latent means are all fixed to zero by default in Mplus
Flon11 ~ .con4*1
Flon12 ~ .con4*1
Flon21 ~ .con5*1
Flon22 ~ .con5*1
Flon31 ~ .con6*1
Flon32 ~ .con6*1
Fflou11 ~ .con7*1
Fflou12 ~ .con7*1
Fflou21 ~ .con8*1
Fflou22 ~ .con8*1
# Measurement error variances set equal for the same variable across raters
Flon11 ~~ .con9*Flon11
Flon12 ~~ .con9*Flon12
Flon21 ~~ .con10*Flon21
Flon22 ~~ .con10*Flon22
Flon31 ~~ .con11*Flon31
Flon32 ~~ .con11*Flon32
Fflou11 ~~ .con12*Fflou11
Fflou12 ~~ .con12*Fflou12
Fflou21 ~~ .con13*Fflou21
Fflou22 ~~ .con13*Fflou22
# Set rater factor variances equal across raters within the same trait
R1_flone ~~ .con14*R1_flone
R2_flone ~~ .con14*R2_flone
R1_flou ~~ .con15*R1_flou
R2_flou ~~ .con15*R2_flou
# Constrain rater covariances between diFferent traits to be equal
R1_flone ~~ .con16*R1_flou
R2_flone ~~ .con16*R2_flou
# Trait and indicator-specific factors are uncorrelated
T1_flone ~~ 0*I2_flone + 0*I3_flone + 0*I2_flou
T2_flou ~~ 0*I2_flone + 0*I3_flone + 0*I2_flou
# Fix correlations between traits and rater factors
# as well as indicator-specific factors to zero
T1_flone ~~ 0*R1_flone + 0*R2_flone + 0*R1_flou + 0*R2_flou
T2_flou ~~ 0*R1_flone + 0*R2_flone + 0*R1_flou + 0*R2_flou
# Indicator-specific factors are uncorrelated with rater factors
I2_flone ~~ 0*R1_flone + 0*R2_flone + 0*R1_flou + 0*R2_flou
I3_flone ~~ 0*R1_flone + 0*R2_flone + 0*R1_flou + 0*R2_flou
I2_flou ~~ 0*R1_flone + 0*R2_flone + 0*R1_flou + 0*R2_flou
# Fix non-admissible correlations between rater factors to zero
R1_flone ~~ 0*R2_flone + 0*R2_flou
R2_flone ~~ 0*R1_flou
R1_flou ~~ 0*R2_flou
'
fit <- sem(model=rCTIMIS, data=chapter_5, estimator="mlr", missing="fiml")
summary(fit, fit.measures=T, standardized=T)
MPlus Code
CTIM model with indicator-specific trait factors
R Code
CTIMIT <- '
# Indicator-specific trait factors T_ij
# Trait factor loadings set equal across raters
# (by fixing them to 1)
# Loneliness, Parcel 1 (T_11)
T11_flone =~ 1*Flon11 + 1*Flon12
# Loneliness, Parcel 2 (T_21)
T21_flone =~ 1*Flon21 + 1*Flon22
# Loneliness, Parcel 3 (T_31)
T31_flone =~ 1*Flon31 + 1*Flon32
# Flourishing, Parcel 1 (T_12)
T12_flou =~ 1*Fflou11 + 1*Fflou12
# Flourishing, Parcel 2 (T_22)
T22_flou =~ 1*Fflou21 + 1*Fflou22
# Trait-specific rater (method) factors R_jk
# Rater factor loadings set equal across raters
# Loneliness, Friend 1 (R_11)
R1_flone =~ 1*Flon11 + .con1*Flon21 + .con2*Flon31
# Loneliness, Friend 2 (R_12)
R2_flone =~ 1*Flon12 + .con1*Flon22 + .con2*Flon32
# Flourishing, Friend 1 (R_21)
R1_flou =~ 1*Fflou11 + .con3*Fflou21
# Flourishing, Friend 2 (R_22)
R2_flou =~ 1*Fflou12 + .con3*Fflou22
# Intercepts set equal for the same variable across raters
Flon11 ~ .con4*1
Flon12 ~ .con4*1
Flon21 ~ .con5*1
Flon22 ~ .con5*1
Flon31 ~ .con6*1
Flon32 ~ .con6*1
Fflou11 ~ .con7*1
Fflou12 ~ .con7*1
Fflou21 ~ .con8*1
Fflou22 ~ .con8*1
# Measurement error variables set equal for the same variable across raters
Flon11 ~~ .con9*Flon11
Flon12 ~~ .con9*Flon12
Flon21 ~~ .con10*Flon21
Flon22 ~~ .con10*Flon22
Flon31 ~~ .con11*Flon31
Flon32 ~~ .con11*Flon32
Fflou11 ~~ .con12*Fflou11
Fflou12 ~~ .con12*Fflou12
Fflou21 ~~ .con13*Fflou21
Fflou22 ~~ .con13*Fflou22
# Set rater factor variances equal across raters within the same trait
R1_flone ~~ .con14*R1_flone
R2_flone ~~ .con14*R2_flone
R1_flou ~~ .con15*R1_flou
R2_flou ~~ .con15*R2_flou
# Constrain rater covariances between diFferent traits to be equal
R1_flone ~~ .con16*R1_flou
R2_flone ~~ .con16*R2_flou
# Trait and rater factors are uncorrelated for the same trait
T11_flone ~~ 0*R1_flone + 0*R2_flone
T21_flone ~~ 0*R1_flone + 0*R2_flone
T31_flone ~~ 0*R1_flone + 0*R2_flone
T12_flou ~~ 0*R1_flou + 0*R2_flou
T22_flou ~~ 0*R1_flou + 0*R2_flou
# Rater factors are uncorrelated with other rater factors
# pertaining to the same trait
R1_flone ~~ 0*R2_flone
R1_flou ~~ 0*R2_flou
# Constrain non-substantial factor correlations to zero
T11_flone ~~ 0*R1_flou + 0*R2_flou
T21_flone ~~ 0*R1_flou + 0*R2_flou
T31_flone ~~ 0*R1_flou + 0*R2_flou
T12_flou ~~ 0*R1_flone + 0*R2_flone
T22_flou ~~ 0*R1_flone + 0*R2_flone
R1_flone ~~ 0*R2_flou
R2_flone ~~ 0*R1_flou
'
fit <- sem(model=CTIMIT, data=chapter_5, estimator="mlr", missing="fiml")
summary(fit, fit.measures=T, standardized=T)
MPlus Code