I have used MlwiN software to do multilevel analysis to diary data. In my analyses day-level variables (time points) are nested within persons. All day-level variables (measured over 5 days) predict day-level variables, after controling for the trait-level versions of outcomes. I did 4 analyses which imply mediation but now I want to combine them all in one model, so as to test a multilevel SEM for mediation: day-level x1, x2 and x1*x2 (interaction) predicting day-level x3, x4, x5 (controlling for trait-level x3, x4, x5) and day-level x3-x5 predicting day-level x6 (controlling for trait-level x6).
I am new in Mplus but I read that for this type of analysis, I should look at Growth Modeling and/or Survival Analysis. Here are my questions:
1. Is it chapter 6 of the Guide that is appropriate for my analysis? And if so, is it called survival analysis what I need to do? Which example should I study?
2. Does my data set need to have the multilevel structure (time points nested within persons)? Can I use the data file I have been using for MlwiN or are there any other preparations I need to do in the file before I start analyzing?
Can you give a little more information about the model, such as what is meant by "day-level" variables and "trait-level" sources of the outcome? Is there a particularly pertinent reference that you can give or can you write out the statistical model?
Bengt, thank you very much for your prompt reaction.
Trait is a stable construct that is measured only once, before the start of the diary study and is representing the higher level, "person". Day-level variables are all the variables which comprise the diary study/survey. They are measured 5 times. They form the first (lower) level and are nested within persons.
Actually, I just found a published paper that performed a similar type of multilevel analysis which specified 2 levels and I am wondering if I can do the same. It is: Biennewies, Sonnentag & Mojza (2010). Journal of Occupational and Organizational Psychology, 83(2), 419-441.
I am still puzzled regarding my two questions above, though!
It sounds like your day-level variables for 5 time points should be arranged in a wide format as in Chapter 6 of the Mplus User's Guide. A two-level model is not needed in Mplus when taking this wide approach. The trait-level variables are simply added to the day-level variables, measured only once.
And it sounds like you have several (4) versions of these variables and that you want to combine them into one model which is fine - you still have a single-level, wide setup, but just having more variables. You are not interested in growth it seems, but you just want to do regressions with day-level variables as DVs, which is straightforward in this setting.
To add my 2 cents, as an experience-sampling researcher who uses Mplus, I'd encourage you to read Heck and Thomas's recent book on multilevel modeling. Their book has good coverage of how to specify ESM-type models using a general latent variable approach, including sample Mplus syntax.
Bengt, what do you mean by wide format? Should repeated measures be nested within individuals?
Indeed I am not interested in growth. Only in regressions between day-level variables, but after controling for trait level. For every day-level outcome I control for trait version of this variable. So, trait-level variables will also be predictors in this SEM.
When data are in wide format, each variable represents one column of the data set. When data are in long format, there is one variable representing the outcome with a second variable specifying the time of measurement or the cluster.
Hi Linda et al., With ESM/diary data for 3 occasions in ML-SEM there's a problem: This imposes compound symmetry across occasions of measurement. E.g., covariance at Times 1-3 along an Item 1 are only allowed to covary through between-person variance in Item 1. But, often both between-person and autoregressive (co)variance are expected. I'm trying to extract the observation-specific residuals to impose AR(1). However, individually-varying factor loadings or dummy-coded predictor variables with random slopes seem needed.
e.g., with Y1 measured at 3 occasions, 3 dummy-coded variables T1-T3 could code for occasion to separate residuals R1-R3:
Mplus puts the random slopes at the between level (sensibly), but they should be at the within level. The dummy codings can be thought of as individually-varying factor loadings at the within level, but how to make that work? Of course R1-R3 could be specified at the between level, but that adds parameters to the between model that don't belong there.
Perhaps the following does what you want. Take a wide, single-level approach spreading out y by time. Let the person variance be handled by a factor influencing the item at the different time points with loadings fixed at 1. Add AR(1) correlated residuals using UG ex6.17.
Mike Zyphur posted on Thursday, July 22, 2010 - 7:52 pm
Hi Bengt, thanks for responding.
But you've ruined the fun! :-)
Your parameterization is surely the way to go. Unfortunately, I have roughly 30 measurement occasions for some study participants and there are around 10 observed variables. I'd like to avoid an observed COV matrix with 300 rows/columns, ergo ML-SEM looked an easier route. If anything comes to mind in the future regarding this problem--which seems substantial for ML-SEM with longitudinal data--I'm all ears!
Initially I had planned on analyzing my diary data with multilevel SEM, but I'm trying to see how it will work out in wide format.
However, I'm considered with the implications of this would be? With some variables measured on the between level (baseline measures) and others on the within level (daily measures), doesn't this approach lose something in terms of the within person variability by just using a single-level model?
No, you can obtain the same results using the long and wide formats if the models are specified the same, for example, if in the wide format residual variances are held equal across time. The wide format simply reduces the number of levels by one. It takes a multivariate rather than a multilevel approach.
I am doing a diary analysis that seems far too complex for wide format - we assess individuals (level 2) across a time period of 30 days (level 1). We measure affect and sexual behavior each day and have one-time individual-level measurements as well. One of the goals of the analysis is to predict sexual behavior based on both daily affect (which I will eventually decompose into both within and between-person effects) as well as other individual-level (level 2) variables. I am on board with how to specify all of this.
My concern is that I would like to account for the autoregressive effect that repeated measurements create on the day-level measurement of the outcome. So far, I've had some trouble figuring out how to do this, as it's typically handled using wide format. It's also worth noting that we are explicitly not interested in growth - we actually hope that behavior remains constant over time (though it probably changes slightly) - many times, the outcome will also be either dichotomous or nominal (using either binary or multinomial logistic models). I know exactly how to specify these autoregressive structures in other software (SPSS, HLM), but have still been unable to figure out how to do these models in Mplus using twolevel analysis, which is most desirable as we hope to conduct MLSEM as the end product.
I am working on the mediation analysis of daily diary data.
All of my variables are on the daily level: 2 predictors, 1 mediator and 2 outcomes measured for 5 consecutive days. I already did multilevel mediation, but for the two outcomes separately, and I want to combine them all in one model:
Predictor1 -> Mediator -> Outcome1
Predictor1 -> Mediator -> Outcome2
Predictor2 -> Mediator -> Outcome1
Predictor2 -> Mediator -> Outcome2
I would really appreciate if you could guide me in:
1. Which type of analysis is most appropriate (multilevel SEM? LGCM?)?
2. How to deal with two outcomes in the same mediation model for daily diary data?