In this practical you will get a taste of fitting (Bayesian) multilevel models for intensive longitudinal data in Mplus. You are provided with code for an multilevel VAR(1) model, and a multilevel AR(1) model with measurement error. It can take a while to run such models, so it is wise to choose which model you prefer, and start with running that model.

Mplus v8

For the DSEM analyses in Mplus you will need Mplus version 8 or higher. You will need a licensed version of Mplus to be able to run these models. www.statmodel.com

The data

We will work with simulated data sets for both models. Take a look at each of the data sets.

VAR1.dat contains time series data for 2 variables in the first two columns, for 100 individuals (50 repeated measures per individual). The third column contains the participant numbers. The fourth and fifth rows contain lagged (lag1) versions of the two variables, but we will not use this part of the data for the analyses.

MEAR1.dat contains time series data for 1 variable in the first column, with 100 repeated measures for 200 individuals.

Multilevel VAR(1) model

1. Take a look at the model code.

Take a look at how the model is specified in Mplus. Much of the model specification is handled automatically. We will specify TECH1 in the output to get the full details on how the model is specified. Which coefficients are allowed to vary randomly (are specified with name | equation)? Which are then most likely assumed to be fixed? Is that realistic?

In the output we request the results for the Bayesian MCMC convergence (Tech8), standardized coefficients, also for each individual (STANDARDIZED (cluster)) and the estimated regular coefficients for each individual (Tech4 (cluster)). We also request a number of plots, including the time series of the participants, plots of the points estimates of the random coefficients, and Bayesian convergence plots.

2. Run the model

Fit the model in Mplus v8. Inspect the more detailed model specification in the output.

3. Look at plots for the data, and evaluate Bayesian convergence.

Take a look at the plots for the observed time series of the participants. Do you see many differences?

4. Check convergence.

After the model has been fitted, do some convergence checks. Specifically, we check the density plots, trace plots, and the gelman-rubin statistics (potential scale reduction factors). You can take a look at the density and trace plots in Mplus via view plots (because we requestions type=PLOT3 in the output). The Gelman-Rubin statistics (PSRs) are reported at the end of the Mplus output file (because we requested tech8 in the output). The density plots should look nice and smooth, the trace plots should look like fat catterpillars, and gelman-rubin statistics should be very very near 1.

6. Interpret the results.

Now, look at the estimated within and between person coefficients and interpret the results. What would the model look like for the average person? What do the average standardized effects look like?

Is there a lot of variation in the parameters across persons (You can also take a look at the distributions of the random effects in the Mplus plots)?

7 Individual results.

Pick two participants and look at their standardized and unstandardized coefficients. Are their estimated VAR(1) models similar? In what ways do they differ?

Multilevel AR1 model with measurement error.

1. Take a look at the model code.

Take a look at how the model is specified in Mplus. Much of the model specification is handled automatically. We will specify TECH1 in the output to get the full details on how the model is specified. Which coefficients are allowed to vary randomly (are specified with name | equation)? Which are then most likely assumed to be fixed? Is that realistic?

In the output we further request the results for the Bayesian MCMC convergence (Tech8) and the estimated regular coefficients for each individual (Tech4 (cluster)). We also request a number of plots, including the time series of the participants, plots of the points estimates of the random coefficients, and Bayesian convergence plots.

2. Run the model

Fit the model in Mplus v8. Inspect themore detailed model specification in the output.

3. Look at plots for the data, and evaluate Bayesian convergence.

Take a look at the plots for the observed time series of the participants. Do you see many differences?

4. Check convergence.

After the model has been fitted, do some convergence checks. Specifically, check the density plots, trace plots, and the gelman-rubin statistics (potential scale reduction factors). You can take a look at the density and trace plots in Mplus via view plots (because we requestions type=PLOT3 in the output). The Gelman-Rubin statistics (PSRs) are reported at the end of the Mplus output file (because we requested tech8 in the output). The density plots should look nice and smooth, the trace plots should look like fat catterpillars, and gelman-rubin statistics should be very very near 1.

6. Interpret the results.

Now, look at the estimated within and between person coefficients and interpret the results. What would the model look like for the average person? Is there a lot of measurement error variance compared to the dynamic error variance?

Is there a lot of variation in the parameters across persons (You can also take a look at the distributions of the random effects in the Mplus plots)?

7 Individual results.

Pick two participants and look at their estimated coefficients. Are their estimated AR(1) models similar? In what ways do they differ?

End of n=1 practical.

This is the end of the multilevel exercises. I hope you’ve been able to get an impression of n=1 modeling of intensive longitudinal data, and the individual differences in dynamic processes. There are many more possibilities that do not fit in one short practical. Take a look at the papers and examples published on the Mplus website for more inspiration.