jpp online supplemental materials for multivariate multilevel survival models (mmsa) mike...
TRANSCRIPT
JPP Online Supplemental Materials for Multivariate Multilevel Survival
Models (MMSA)
Mike Stoolmiller: [email protected] of Oregon
8/14/13
Instructions To Readers
• Important information is presented in both the slides and in the notes window.
• Important information is also in the manuscript and this powerpoint will be best understood when used in conjunction with the manuscript.
Outline
• Example Research Question & Application• MMSA Path Diagram for Example Application• Coding Dyadic (parent-child) Microsocial
Interaction• Restructuring Microsocial Data for Analysis• Mplus Syntax for Example Application
Example Application• Research Question: When confronted by a negative parent
as in a discipline encounter are antisocial children quicker to use anger and slower to use sad/fear emotions relative to normal children?
• Analytic Strategy: Use MMSA to look at child transitions from dyadic state of parent negative-child neutral.
• Child can transition from neutral to either positive, anger or sad/fear. By hypothesis, anger transitions will be elevated, sad/fear transitions depressed and positive transitions unaffected for antisocial relative to normal children.
• Parent can transition from negative to either positive or neutral but parent transitions ignored for simplicity.
Path Diagram For A Multivariate Multilevel Dyadic States Model
Within Dyad Level
Between Dyad Level
X2, 3rd Grade Child Antisocial
X1, Kinder Child
Antisocial
DurationNcRpPcRp
Censored? (yes=1,no=0)
fAcRp NcRpAcRp
DurationNcRpAcRp
Censored?(yes=1,no=0)
DurationNcRpScRp Censored?
(yes=1,no=0)
fPcRp NcRpPcRp
fScRp NcRpScRp
Residual NcRpAcRp
Log h0,AcRp(t) NcRpAcRp
Base Hazard
Coding Dyadic Interaction• Two separate streams of event durations in proper
temporal order, one for each dyad member but synchronized to a common time line as shown in the schematic event history diagram.
• Coding system has exhaustive and mutually exclusive categories so the behavior of each dyad member is known at all times.
• Two streams can be merged to form a single stream for the dyad that categorizes the behavior of the dyad at all times.
• Coding system does not introduce artificial dependencies between the streams (e.g., single stream coding with precedence rules).
Schematic Event History Diagram
Parent
1st
NcNp
0 5 10 15 20 25 30 35 40 45 50 55
ChildEpisode Time
P
N
R
P
N
A
S
2nd
NcRp
Session Time
0 8 0 6 0 3 0 3 0 6 0 8 0 5 0 5 0 13
3rd
AcRp
4th
AcNp
5th
NcNp
6th
NcRp
7th
ScRp
8th
ScNp
9th
NcNp
Dyad
Restructuring Dyadic Data• Starting from two separate streams in two separate files for
one individual dyad: • First, merge the two streams using time as the merge key using
standard database merging routines to get a dyadic stream.• Second, fill in missing values arising from merge and compute
dyadic state indicator.• Third, use lead or lag functions to compute start and end state
and start and end time for each dyadic state. Compute duration for each dyadic state, end time minus start time.
• Fourth, add a dyad ID variable, repeat for all individual dyadic files and concatenate (stack) in to one large file for entire sample.
• More operations are necessary on the stacked file but are explained later. Example data comes from event history schematic diagram.
Time Child0 N
14 A20 N34 S44 N57 E
Time Parent0 N6 R
17 N26 R39 N57 E
Merge on Time
Time Child Parent0 N N6 R
14 A17 N20 N26 R34 S39 N44 N57 E E
Step 1: Merge On Time
Time Child Parent Dyad0 N N NcNp6 N R NcRp
14 A R AcNp17 A N AcNp20 N N NcNp26 N R NcRp34 S R ScRp39 S N ScNp44 N N NcNp57 E E EcEp
Time Child Parent0 N N6 R
14 A17 N20 N26 R34 S39 N44 N57 E E
Back Fill
Step 2: Back Fill Missing Values And Create Dyadic State Indicator
Time Child Parent Dyad0 N N NcNp6 N R NcRp
14 A R AcNp17 A N AcNp20 N N NcNp26 N R NcRp34 S R ScRp39 S N ScNp44 N N NcNp57 E E EcEp
Start State
End State
Start Time
End Time
Duration
NcNp NcRp 0 6 6NcRp AcNp 6 14 8AcNp AcNp 14 17 3AcNp NcNp 17 20 3NcNp NcRp 20 26 6NcRp ScRp 26 34 8ScRp ScNp 34 39 5ScNp NcNp 39 44 5NcNp EcEp 44 57 13
Step 3: Use Lead & Lag And Compute Duration
Lead & Lag
Start State
End State
Start Time
End Time Duration
Dyad ID
NcNp NcRp 0 6 6 123NcRp AcNp 6 14 8 123AcNp AcNp 14 17 3 123AcNp NcNp 17 20 3 123NcNp NcRp 20 26 6 123NcRp ScRp 26 34 8 123ScRp ScNp 34 39 5 123ScNp NcNp 39 44 5 123NcNp EcEp 44 57 13 123
Repeat & Stack
Step 4: Add Dyad ID, Repeat For All Dyads And Stack
Time Child0 N
14 A20 N34 S44 N57 E
Time Parent0 N6 R
17 N26 R39 N57 E
Time Child Parent Dyad0 N N NcNp6 N R NcRp
14 A R AcNp17 A N AcNp20 N N NcNp26 N R NcRp34 S R ScRp39 S N ScNp44 N N NcNp57 E E EcEp
Merge on Time
Start State
End State
Start Time
End Time Duration
NcNp NcRp 0 6 6NcRp AcNp 6 14 8AcNp AcNp 14 17 3AcNp NcNp 17 20 3NcNp NcRp 20 26 6NcRp ScRp 26 34 8ScRp ScNp 34 39 5ScNp NcNp 39 44 5NcNp EcEp 44 57 13
Lead & Lag
Time Child Parent0 N N6 R
14 A17 N20 N26 R34 S39 N44 N57 E E
Fill
Repeat & Stack
Censoring
• A waiting time is censored if we stop observing and do not know how much longer it took for the event to finally happen.
• In microsocial interaction, waiting times will be censored by the end of the observation period, equipment malfunction, if the subject moves out of sight of observer, etc.
• In addition, waiting times for competing transitions are also censored by the transition that actually happened, so called “competing risks”.
Competing Risks and Censoring
• In the example model, the start state is always the same but there are 3 possible child transitions to 3 different end states.
• An actual child transition that happens will censor the waiting times for the other 2 child transitions.
• It is not known how long it would take for either of the other 2 transitions to happen, just longer than the transition that did happen.
• This is known as “competing risks” and is illustrated in the schematic diagram.
Schematic of Censoring In Competing Risks
Time0 1 32
Parent Negative-Child Neutral
Parent Negative-Child
Anger
Parent Negative-
Child Positive
ObservedNot Observed:
Censored
Parent Negative- Child Sad
Censoring Indicators• Mplus requires a dichotomous censoring indicator that is scored
0 if a particular transition actually happened and 1 if censored for any reason.
• Each of the 3 types of child transitions in the model needs a corresponding censoring indicator.
• These censoring indicators can be easily computed in the stacked file by using a series of conditional compute statements.
• For example if AcRp is the name of the censoring indicator:– If (endstate equal to “AcRp”) then AcRp = 0;– If (endstate not equal to “AcRp”) then AcRp = 1;
• This needs to be done outside of Mplus because Mplus does not read or use character data.
Censor IndicatorsStart State
End State Duration AcRp PcRp ScRp
Dyad ID
NcNp NcRp 6 1 1 1 123NcRp AcRp 8 0 1 1 123AcRp AcNp 3 1 1 1 123AcNp NcNp 3 1 1 1 123NcNp NcRp 6 1 1 1 123NcRp ScRp 8 1 1 0 123ScRp ScNp 5 1 1 1 123ScNp NcNp 5 1 1 1 123NcNp EcEp 13 1 1 1 123
Data Structure Including Censoring Indicators
Duration Variables
• In parallel to the censoring indicators, Mplus requires a separate duration variable for each type of transition in the model.
• The example model has 3 types of child transitions so 3 duration variables, one for each type of transition are required.
• In the data as currently structured, there is only 1 duration so 2 more copies of the existing duration variable need to be computed and named appropriately.
• This can be easily done in Mplus and it works well to name each duration to match its corresponding censoring indicator.
Duration Variables Censor IndicatorsStart State
End State AcRp_ Dur PcRp_Dur ScRp_Dur AcRp PcRp ScRp
Dyad ID
NcNp NcRp 6 6 6 1 1 1 123
NcRp AcRp 8 8 8 0 1 1 123
AcRp AcNp 3 3 3 1 1 1 123
AcNp NcNp 3 3 3 1 1 1 123
NcNp NcRp 6 6 6 1 1 1 123
NcRp ScRp 8 8 8 1 1 0 123
ScRp ScNp 5 5 5 1 1 1 123
ScNp NcNp 5 5 5 1 1 1 123
NcNp EcEp 13 13 13 1 1 1 123
Data Structure Including Duration Variables
Mplus Syntax For Cox MMSA Model
• In addition to the standard syntax required for a 2-level model in Mplus:
• VARIABLES: – SURVIVAL = AcRp_dur (ALL) PcRp_dur (ALL)
ScAp_dur (ALL);– TIMECENSOR = AcRp PcRp ScRp;
• ANALYSIS: basehazard = off;• Full syntax in notes window.