6 Multilevel CFA Models for Interchangeable Raters

#### Loading of data set

load("chapter_6.RData")
load("chapter_6_round_robin.RData")

MPlus data file

R data file

Round Robin R data file

Models of Section 6.2.2

Basic CTIM model with general trait factors

R Code

bCTIM <- '
    level: 1
        r_flone =~ Flon1 + Flon2 + Flon3
        r_fflou =~ FFlou1 + FFlou2
    level: 2
        flone =~ Flon1 + Flon2 + Flon3
        flou =~ FFlou1 + FFlou2
        
        Flon1~~0*Flon1
        Flon2~~0*Flon2
        Flon3~~0*Flon3

        FFlou1~~0*FFlou1
        FFlou2~~0*FFlou2'

fit <- sem(model = bCTIM, data = chapter_6, estimator="mlr",
           cluster = "Target")

summary(fit, fit.measures=T, standardized=T)

MPlus Code

Download

Basic CTIM model with general trait factors and indicator-specific residual factors

R Code

bCTIMIS <- '
# Level 1
# Trait-specific rater (method) factors R_j
# Loneliness (R_1)

Level: 1
r_flone =~ 1*Flon1 + Flon2 + Flon3

# Flourishing (R_2)
r_fflou =~ 1*FFlou1 + FFlou2

# Level 2
# General trait factors T_j
# Loneliness (T_1)

Level: 2
flone =~ 1*Flon1 + Flon2 + Flon3

# Flourishing (T_2)
flou =~ 1*FFlou1 + FFlou2

# T_2
# Indicator-specific factors

I2_flon =~ Flon2
I3_flon =~ Flon3
I2_flou =~ FFlou2
flone ~~ 0*I2_flon + 0*I3_flon + 0*I2_flou
flou ~~ 0*I2_flon + 0*I3_flon + 0*I2_flou

# Level-2 residual variances fixed to zero
Flon1~~0*Flon1
Flon2~~0*Flon2
Flon3~~0*Flon3

FFlou1~~0*FFlou1
FFlou2~~0*FFlou2
'
fit <- sem(model = bCTIMIS, data = chapter_6, estimator="mlr",
           cluster = "Target")

summary(fit, fit.measures=T, standardized=T)

MPlus Code

Download

Restricted CTIM model that is equivalent to single-level CFA model with correlated first-order factors

R Code

rCTIM <- '
# Level 1
# Trait-specific rater (method) factors R_j
# Loneliness (R_1)

Level: 1
r_flone =~ 1*Flon1 + .con1*Flon2 + .con2*Flon3

# Flourishing (R_2)
r_fflou =~ 1*FFlou1 + .con3*FFlou2

# Level 2
# General trait factors T_j
# Loneliness (T_1)

Level: 2
flone =~ 1*Flon1 + .con1*Flon2 + .con2*Flon3

# Flourishing (T_2)
flou =~ 1*FFlou1 + .con3*FFlou2

# Level-2 residual variances fixed to zero
Flon1~~0*Flon1
Flon2~~0*Flon2
Flon3~~0*Flon3

FFlou1~~0*FFlou1
FFlou2~~0*FFlou2
'
fit <- sem(model = rCTIM, data = chapter_6, estimator="mlr",
           cluster = "Target")

summary(fit, fit.measures=T, standardized=T)

MPlus Code

Download

Restricted CTIM model that is equivalent to single-level CFA model with correlated first-order factors with indicator-specific residual factors

R Code

rCTIMIS <- '
# Level 1
# Trait-specific rater (method) factors R_j
# Loneliness (R_1)

Level: 1
r_flone =~ 1*Flon1 + .con1*Flon2 + .con2*Flon3

# Flourishing (R_2)
r_fflou =~ 1*FFlou1 + .con3*FFlou2

# Level 2
# General trait factors T_j
# Loneliness (T_1)

Level: 2
flone =~ 1*Flon1 + .con1*Flon2 + .con2*Flon3

# Flourishing (T_2)
flou =~ 1*FFlou1 + .con3*FFlou2

# T_2
# Indicator-specific factors
I2_flon =~ Flon2
I3_flon =~ Flon3
I2_flou =~ FFlou2

flone ~~ 0*I2_flon + 0*I3_flon + 0*I2_flou
flou ~~ 0*I2_flon + 0*I3_flon + 0*I2_flou

# Level-2 residual variances fixed to zero
Flon1~~0*Flon1
Flon2~~0*Flon2
Flon3~~0*Flon3
FFlou1~~0*FFlou1
FFlou2~~0*FFlou2
'
fit <- sem(model = rCTIMIS, data = chapter_6, estimator="mlr",
           cluster = "Target")

summary(fit, fit.measures=T, standardized=T)

MPlus Code

Download

CTIM model with indicator-specific trait factors

R Code

CTIMIT <- '
# Level 1
# Trait-specific rater (method) factors R_j
# Loneliness (R_1)

Level: 1
r_flone =~ 1*Flon1 + .con1*Flon2 + .con2*Flon3
# Flourishing (R_2)
r_fflou =~ 1*FFlou1 + .con3*FFlou2

# Level 2
# Indicator-specific trait factors T_ij
# Loneliness (T_i1)

Level: 2
flone1 =~ 1*Flon1
flone2 =~ 1*Flon2
flone3 =~ 1*Flon3

# Flourishing (T_i2)
flou1 =~ 1*FFlou1
flou2 =~ 1*FFlou2

# Level-2 residual variances fixed to zero
Flon1~~0*Flon1
Flon2~~0*Flon2
Flon3~~0*Flon3
FFlou1~~0*FFlou1
FFlou2~~0*FFlou2
'
fit <- sem(model = CTIMIT, data = chapter_6, estimator="mlr",
           cluster = "Target")

summary(fit, fit.measures=T, standardized=T)

MPlus Code

Download

Models of Section 6.4.2

Multiple indicator multiple trait social relation model (MIMT-SRM) model

R Code

MIMT_SRM  <- '
%Person

Flou@A=~1*y1@A+y2@A
Flou@P=~1*y1@P+y2@P

Lone@A=~1*y3@A+y4@A
Lone@P=~1*y3@P+y4@P

Flou@A ~~ Flou@P + Lone@A + Lone@P
Flou@P ~~ Lone@A + Lone@P
Lone@A ~~ Lone@P

y2@A ~~ y2@P + y4@A + y4@P
y2@P ~~ y4@A + y4@P
y4@A ~~ y4@P

y1@A ~~ 0*y1@P + 0*y3@A + 0*y3@P
y1@P ~~ 0*y3@A + 0*y3@P
y3@A ~~ 0*y3@P

y1@A ~~ 0*y1@A
y1@P ~~ 0*y1@P
y3@A ~~ 0*y3@A
y3@P ~~ 0*y3@P

%Dyad

Flou@AP=~1*y1@AP+y2@AP
Flou@PA=~1*y1@PA+y2@PA

Lone@AP=~1*y3@AP+y4@AP
Lone@PA=~1*y3@PA+y4@PA

Flou@AP ~~ Flou@PA + Lone@AP + Lone@PA
Flou@PA ~~ Lone@AP + Lone@PA
Lone@AP ~~ Lone@PA

y2@AP ~~ 0*y2@PA + 0*y4@AP + 0*y4@PA
y2@PA ~~ 0*y4@AP + 0*y4@PA
y4@AP ~~ 0*y4@PA

y1@AP ~~ 0*y1@PA + 0*y3@AP + 0*y3@PA
y1@PA ~~ 0*y3@AP + 0*y3@PA
y3@AP ~~ 0*y3@PA

'

fit_MIMT_SRM<- srm(MIMT_SRM, data = chapter_6_round_robin, rrgroup_name="Group", 
                   optimizer = "srm", maxiter = 300, 
                   conv_par=1e-4)

summary(fit_MIMT_SRM)

MPlus Code

Download