Online
appendices for
“Growth
Curve Modeling to Studying Change: A Comparison of Approaches Using
Longitudinal Dyadic Data with Distinguishable Dyads”
by
Planalp, Du, Braungart-Rierker,
& Wang (2016)
Correspondence should be addressed to Lijuan Wang. Email:
lwang4@nd.edu
1.
Long Data Format, used in Separate MLM Analyses; the file name is separatelong.
id = family or dyad indicator
mage = infant age in months at each
mother-child lab visit
fage = infant age in months at
each father-child lab visit
mms= mother outcome (marital satisfaction
score)
fms = father outcome (marital
satisfaction score)
id |
mage |
|
fage |
mms |
fms |
2 |
3 |
|
3 |
86.745 |
90.000 |
2 |
5 |
|
5 |
96.000 |
104.000 |
2 |
7 |
|
7 |
104.000 |
123.317 |
2 |
12 |
|
14 |
107.000 |
117.000 |
2 |
20 |
|
20 |
119.000 |
125.000 |
3 |
3 |
|
3 |
130.000 |
140.000 |
3 |
5 |
|
5 |
139.000 |
119.463 |
3 |
7 |
|
7 |
117.000 |
145.000 |
3 |
12 |
|
14 |
135.000 |
134.000 |
3 |
20 |
|
20 |
130.000 |
127.000 |
2. Long Data Format, used in Simultaneous MLM Analyses;
the file name is bothlong.
id = family or dyad indicator
age = infant age in months at each
mother-child or father-child lab visit
wave = measurement occasion (1 to 5)
role = parent role (1 = mother, 0 = father)
mom = dummy coded for
mother v. father report (1=mother, 0=father)
ms = outcome (marital
satisfaction score)
id |
age |
wave |
role |
mom |
ms |
2 |
3 |
1 |
1 |
1 |
86.745 |
2 |
5 |
2 |
1 |
1 |
96.000 |
2 |
7 |
3 |
1 |
1 |
104.000 |
2 |
12 |
4 |
1 |
1 |
107.000 |
2 |
20 |
5 |
1 |
1 |
119.000 |
2 |
3 |
1 |
0 |
0 |
90.000 |
2 |
5 |
2 |
0 |
0 |
104.000 |
2 |
7 |
3 |
0 |
0 |
123.317 |
2 |
14 |
4 |
0 |
0 |
117.000 |
2 |
20 |
5 |
0 |
0 |
125.000 |
3 |
3 |
1 |
1 |
1 |
130.000 |
3 |
5 |
2 |
1 |
1 |
139.000 |
3 |
7 |
3 |
1 |
1 |
117.000 |
3 |
12 |
4 |
1 |
1 |
135.000 |
3 |
20 |
5 |
1 |
1 |
130.000 |
3 |
3 |
1 |
0 |
0 |
140.000 |
3 |
5 |
2 |
0 |
0 |
119.463 |
3 |
7 |
3 |
0 |
0 |
145.000 |
3 |
14 |
4 |
0 |
0 |
134.000 |
3 |
20 |
5 |
0 |
0 |
127.000 |
3. Wide Data Format, used in all SEM analyses
id = family/dyad identifier
MMS = mother report of marital satisfaction
FMS = father report of marital satisfaction
id |
MMS1 |
MMS2 |
MMS3 |
MMS4 |
MMS5 |
FMS1 |
FMS2 |
FMS3 |
FMS4 |
FMS5 |
2 |
86.75 |
96.00 |
104.00 |
107.00 |
119.00 |
90.00 |
104.00 |
123.32 |
117.00 |
125.00 |
3 |
130.00 |
139.00 |
117.00 |
135.00 |
130.00 |
140.00 |
119.46 |
145.00 |
134.00 |
127.00 |
A.
SAS Code
Center AND SCALE THE AGE VARIABLE *for ‘separatelong’ cmage = mage/12; cfage = fage/12; *for ‘bothlong’ cage=age/12; ICC CALCULATIONS (=intercept variance/[intercept variance + level-1
residual variance]) (1) ICC for mothers’ data over time ; proc mixed covtest data=separatelong method=reml; class id; model mms = /s covb; random int
/type=un subject=id; run; (2) ICC for fathers’ data over time ; proc mixed covtest data=separatelong method=reml; class id; model fms = /s covb; random int
/type=un subject=id; run; (3) ICC for measuring the nonindependence
between mothers and fathers at wave t=1,
2,… or T; proc mixed covtest data=bothlong method=reml; where wave =1; * need to change 1 to t for wave t; class id; model ms = /s covb; random int
/type=un subject=id; run; SEPARATE ANALYSES (MOTHER) proc mixed covtest data=separatelong
method=ml; class id; model mms = cmage
/s covb; random int cmage /type=un subject=id; run; SEPARATE ANALYSES (FATHER) proc mixed covtest data=separatelong
method=ml; class id; model fms = cfage /s covb; random int cfage /type=un subject=id; run; Center AND SCALE THE AGE VARIABLE cage = age/12; |
SIMULTANEOUS “DEFAULT” METHOD proc mixed covtest data=bothlong method=ml; class id; model ms
= cage mom mom *cage /s covb; random int
cage mom mom *cage /type=un subject=id; run; |
SIMULTANEOUS “DEPENDENT” METHOD proc mixed covtest data=bothlong method=ml; class id role wave; model ms
= cage mom mom*cage /s covb; random int
cage mom mom*cage /type=un subject=id; repeated role/type=CSH
subject=id*wave; * the role and wave variables are used for specifying the
“dependent” error covariance structure; run; |
B.
SEM MPlus Code
For our example, we have MT1= 3/12, MT2 =
5/12, MT3 = 7/12, MT4 = 12/12, and MT5 = 20/12 for mothers. For fathers, we
have FT1= 3/12, FT2 = 5/12, FT3 = 7/12, FT4 = 14/12, and FT5 = 20/12
SEPARATE ANALYSES (MOTHER) level slope | MMS1@MT1
MMS2@MT2 MMS3@MT3 MMS4@MT4 MMS5@MT5; !means set to zero [MMS1@0]; [MMS2@0];
[MMS3@0]; [MMS4@0]; [MMS5@0]; !residual variances constrained to be equal MMS1 MMS2 MMS3 MMS4 MMS5
(1); !estimate means and variances of intercept and slope [level slope
]; level slope; SEPARATE ANALYSES (FATHER) level slope | FMS1@FT1
FMS2@FT2 FMS3@FT3 FMS4@FT4 FMS5@FT5; !means set to zero [FMS1@0]; [FMS2@0];
[FMS3@0]; [FMS4@0]; [FMS5@0]; !residual variances constrained to be equal FMS1 FMS2 FMS3 FMS4 FMS5
(1); !estimate means and variances of intercept and slope [level slope ]; level slope; |
SIMULTANSOUS “DEFAULT” METHOD M_level M_slope | MMS1@MT1 MMS
2@MT2 MMS 3@MT3 MMS4@MT4 MMS5@MT5; F_level F_slope | FMS1@FT1 FMS2@FT2 FMS3@FT3 FMS4@FT4
FMS5@FT5; !means set to zero [MMS1@0]; [MMS2@0];
[MMS3@0]; [MMS4@0]; [MMS4@0]; [FMS1@0]; [FMS2@0];
[FMS3@0]; [FMS4@0]; [FMS5@0]; !residual variances constrained to be equal MMS1 MMS2 MMS3 MMS4 MMS5
(1); FMS1 FMS2 FMS3 FMS4 FMS5
(1); !create difference score between M_level
and F_level, M_slope and F_slope !to mimic the MLM specification Diff_level by M_level@1; M_level on F_level@1; Diff_slope by M_slope@1; M_slope on F_slope@1; !set means and variances of m_level
and m_slope to zero [M_level@0 M_slope@0];
M_level@0 M_slope@0; !estimate means of Father intercept and slope [F_level
F_slope]; !estimate means of the difference variables [Diff_level
Diff_slope]; !estimate variances F_level; F_slope; Diff_level; Diff_slope; |
SIMULTANEOUS “DEPENDENT” METHOD M_level M_slope | MMS1@MT1 MMS
2@MT2 MMS 3@MT3 MMS4@MT4 MMS5@MT5; F_level F_slope | FMS1@FT1 FMS2@FT2 FMS3@FT3 FMS4@FT4
FMS5@FT5; !means set to zero [MMS1@0]; [MMS2@0];
[MMS3@0]; [MMS4@0]; [MMS4@0]; [FMS1@0]; [FMS2@0];
[FMS3@0]; [FMS4@0]; [FMS5@0]; !residual variances constrained to be equal MMS1 MMS2 MMS3 MMS4 MMS5
(1); FMS1 FMS2 FMS3 FMS4 FMS5 (2); !at a given time, residuals are allowed to correlate
between dyad members !but constrained to be equal across time points MMS1 with FMS1 (3); MMS2 with FMS2 (3); MMS3 with FMS3 (3); MMS4 with FMS4 (3); MMS5 with FMS5 (3); !create difference score between M_level
and F_level, M_slope and F_slope !to mimic the MLM specification Diff_level by M_level@1; M_level on F_level@1; Diff_slope by M_slope@1; M_slope on F_slope@1; !set means and variances of m_level
and m_slope to zero [M_level@0 M_slope@0];
M_level@0 M_slope@0; !estimate means of Father intercept and slope [F_level
F_slope]; !estimate means of the difference variables [Diff_level
Diff_slope]; !estimate variances F_level; F_slope; Diff_level; Diff_slope; |
C. R MLM Code using lme()
Center
AND SCALE THE AGE VARIABLE
#for ‘separatelong’
cmage <- mage/12
cfage <-
fage/12
#for ‘bothlong’
cage <- age/12
SEPARATE
ANALYSES (MOTHER)
## load required R packages
library(nlme)
## run R function lme( )
separate_m
<- lme(mms~cmage, random =
~1+cmage| id, data=separatelong, method =
"ML", na.action = na.omit)
## fixed-effects estimates
summary(separate_m)
## random-effects estimates
VarCorr(separate_m)
SEPARATE
ANALYSES (FATHER)
separate_f
<- lme(fms~cfage, random =
~1+cfage| id, data = separatelong, method =
"ML", na.action = na.omit)
## fixed-effects estimates
summary(separate _f)
## random-effects estimates
VarCorr(separate _f)
SIMULTANEOUS “DEFAULT” METHOD simul_df <- lme(ms~mom+cage+mom*cage, random = ~1+mom+cage+mom*cage| id, method =
"ML", data = bothlong, na.action = na.omit) ## fixed-effects estimates summary(simul_df)
## random-effects estimates VarCorr(simul_df) |
SIMULTANEOUS “DEPENDENT” METHOD simul_dp <- lme(ms~mom+cage+mom*cage, random = ~1+mom+cage+mom*cage| id, method =
"ML", data=bothlong, na.action=na.omit, correlation = corCompSymm(form
= ~ 1 | id), weights = varIdent(form
= ~ 1 |mom)) ## fixed-effects estimates summary(simul_dp) ## random-effects estimates VarCorr(simul_dp) ## level-one residual variance
of mother mother_re <- as.numeric(VarCorr(simul_dp)[5]) ## level-one residual variance
of father #The proportion of father's
variance to that of mother's variance |
D.
R SEM code using lavaan()
SEPARATE ANALYSES (MOTHER) ##
load required R packages library(lavaan) ##
Define model separate_m <- ' level =~ 1*MMS1 + 1*MMS2 + 1* MMS3 + 1* MMS4 + 1* MMS5 slope
=~ MT1* MMS1 + MT2*MMS2 + MT3*MMS3 + MT4*MMS4 + MT5*MMS5 MMS1
~~ sigmae2m*MMS1 MMS2
~~ sigmae2m*MMS2 MMS3
~~ sigmae2m*MMS3 MMS4
~~ sigmae2m*MMS4 MMS5
~~ sigmae2m*MMS5 level~~slope' ##
run R function growth( ) fit_m
<- growth(separate_m,
data=data,missing="ml") summary(fit_m) SEPARATE ANALYSES (FATHER) ##
Define model separate_f <- ' level =~ 1*FMS1 + 1*FMS2 + 1*FMS3 + 1*FMS4 + 1*FMS5 slope
=~ FT1*FMS1 + FT2*FMS2 + FT3*FMS3 + FT4*FMS4 + FT5*FMS5 FMS1
~~ sigmae2f *FMS1 FMS2
~~ sigmae2f *FMS2 FMS3
~~ sigmae2f *FMS3 FMS4
~~ sigmae2f *FMS4 FMS5
~~ sigmae2f *FMS5 level~~slope' fit_f
<- growth(separate_f,
data=data,missing="ml") summary(fit_f) |
SIMULTANSOUS “DEFAULT” METHOD ##
Define model simul_df <- ' m_level =~ 1*MMS1 + 1*MMS2 + 1*MMS3 + 1*MMS4 + 1*MMS5 m_slope =~ MT1*MMS1 + MT2*MMS2 + MT3*MMS3 + MT4*MMS4 + MT5*MMS5 f_level =~ 1*FMS1 + 1*FMS2 + 1*FMS3 + 1*FMS4 + 1*FMS5 f_slope =~ FT1*FMS1 + FT2*FMS2 + FT3*FMS3 + FT4*FMS4 + FT5*FMS5 MMS1
~~ sigmae2*MMS1 MMS2
~~ sigmae2*MMS2 MMS3
~~ sigmae2*MMS3 MMS4
~~ sigmae2*MMS4 MMS5
~~ sigmae2*MMS5 FMS1
~~ sigmae2*FMS1 FMS2
~~ sigmae2*FMS2 FMS3
~~ sigmae2*FMS3 FMS4
~~ sigmae2*FMS4 FMS5
~~ sigmae2*FMS5 diff_level =~ 1*m_level m_level ~ 1 * f_level diff_slope =~ 1* m_slope m_slope ~ 1 * f_slope m_level ~ 0 m_slope ~ 0 m_level ~~ 0*m_level m_slope ~~ 0*m_slope f_level ~~ f_slope f_level ~~ diff_level f_level ~~ diff_slope f_slope ~~ diff_level f_slope ~~ diff_slope diff_level ~~ diff_slope' fit_
simul_df <- growth(simul_df, data=data,missing="ml") summary(fit_ simul_df) |
SIMULTANEOUS “DEPENDENT” METHOD ##
Specify model |
simul_dp <- '
m_level =~
1*MMS1 + 1*MMS2 + 1*MMS3 + 1*MMS4 + 1*MMS5
m_slope =~ MT1*MMS1 + MT2*MMS2 + MT3*MMS3 + MT4*MMS4 + MT5*MMS5
f_level =~
1*FMS1 + 1*FMS2 + 1*FMS3 + 1*FMS4 + 1*FMS5
f_slope =~
FT1*FMS1 + FT2*FMS2 + FT3*FMS3 + FT4*FMS4 + FT5*FMS5
MMS1
~~ sigmae2m*MMS1
MMS2
~~ sigmae2m*MMS2
MMS3
~~ sigmae2m*MMS3
MMS4
~~ sigmae2m*MMS4
MMS5
~~ sigmae2m*MMS5
FMS1
~~ sigmae2f*FMS1
FMS2
~~ sigmae2f*FMS2
FMS3
~~ sigmae2f*FMS3
FMS4
~~ sigmae2f*FMS4
FMS5
~~ sigmae2f*FMS5
FMS1
~~ sigmamf*MMS1
FMS2
~~ sigmamf *MMS2
FMS3 ~~
sigmamf *MMS3
FMS4
~~ sigmamf *MMS4
FMS5
~~ sigmamf *MMS5
diff_level =~ 1*m_level
m_level ~ 1 *
f_level
diff_slope =~ 1*m_slope
m_slope ~ 1 *
f_slope
m_level ~ 0
m_slope ~ 0
m_level ~~ 0*m_level
m_slope ~~ 0*m_slope
f_level ~~ f_slope
f_level ~~ diff_level
f_level~~ diff_slope
f_slope ~~ diff_level
f_slope ~~ diff_slope
diff_level ~~ diff_slope'
fit_ simul_dp <- growth(simul_dp, data=widedata,missing="ml")
summary(fit_ simul_dp)