Published March 25, 2022 | Version 1.0.0
Software Open

Accompanying code for "Go multivariate: a Monte Carlo study of a multilevel hidden Markov model with categorical data of varying complexity"

  • 1. Utrecht University

Description

The multilevel hidden Markov model (MHMM) is a promising vehicle to investigate latent dynamics over time in social and behavioral processes. By including continuous individual random effects, the model accommodates variability between individuals, providing individual-specific trajectories and facilitating the study of individual differences. However, the performance of the MHMM has not been sufficiently explored. Currently, there are no practical guidelines on the sample size needed to obtain reliable estimates related to categorical data characteristics We performed an extensive simulation to assess the effect of the number of dependent variables (1-4), the number of individuals (5-90), and the number of observations per individual (100-1600) on the estimation performance of group-level parameters and between-individual variability on a Bayesian MHMM with categorical data of various levels of complexity. We found that using multivariate data generally alleviates the sample size needed and improves the stability of the results. Regarding the estimation of group-level parameters, the number of individuals and observations largely compensate for each other. Meanwhile, only the former drives the estimation of between-individual variability. We conclude with guidelines on the sample size necessary based on the complexity of the data and the study objectives of the practitioners.

This repository contains the accompanying code for the manuscript: "Go multivariate: a Monte Carlo study of a multilevel hidden Markov model with categorical data of varying complexity". It comprehends R code to: (1) run an extensive Monte Carlo simulation with a multilevel hidden Markov model with a categorical emission distribution in the Dutch National Supercomputer (Snellius), (2) analyse the outcome from the simulation study, and (3) illustrate how to analyse real data in an empirical application. Please note that the empirical data used in (3) is not available as part of this repository.

Files

sim_study_mhmmbayes.zip

Files (95.9 MB)

Name Size Download all
md5:85526b35d315cb2d03bd042a66f9a147
95.9 MB Preview Download