-
Notifications
You must be signed in to change notification settings - Fork 0
/
TwoFactorMLMplus.inp
33 lines (33 loc) · 1.16 KB
/
TwoFactorMLMplus.inp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
TITLE: One factor Random intercepts ML
DATA: FILE IS "exampledata.dat";
VARIABLE:NAMES ARE ID study intercept sex age edu y1-y12;
USEVARIABLES ARE study sex age edu y1-y12;
! intercepts and ID scores have to be ignored, are not in the analysis
CLUSTER = study;
! study defines the second "between" level
WITHIN = sex age edu;
! sex age and education are IVs on level 1
MISSING = .;
! missing values are coded as ., the Mplus default
ANALYSIS:TYPE = TWOLEVEL;
MODEL:
%WITHIN%
y1-y12 ON sex age edu;
! regression coefficients for all variables
f1 BY y1* y3 y5 y7 y9 y11;
! define latent factor 1 on which odd variables load
! asterisk frees the factor loading, is not restricted to 1
f1@1;
! factor variance is restricted to 1
f2 BY y2* y4 y6 y8 y10 y12;
! define latent factor 2 on which even variables load
! asterisk frees the factor loading, is not restricted to 1
f2@1;
! factor variance is restricted to 1
f1 WITH f2;
! factor covariance (correlation) is freely estimated
y1-y12;
! random within study (error) variance is estimated for all vars
%BETWEEN%
y1-y12;
! random between study (intercept) variance is estimated for all vars