This repository contains files for a fully reproducible tutorial on estimating Latent Class Vector Autoregressive (LCVAR) Models with the R-package ClusterVAR. We reanalyze open data by Grommisch et al. (2020), who helpfully shared their materials and data here on OSF.
The tutorial is in the following paper:
XXX
This repository contains the following files/folders:
Preprocess_Grommisch2020.R
takes the data of Grommisch et al. in the state in which the author shared it on OSF and transforms it into a clean data frame containing only the relevant variables, which is saved asData_Grommisch2020_clean.RDS
into the folderFiles
LCVAR_Tutorial.R
contains the code for the entire tutorialHelpers.R
contains helper functions for the tutorial, mostly for plotting figures/Data
is the folder containing the empirical data/Files
is the folder where we save files such as the preprocessed data or LCVAR model objects/Figures
is the folder in which we plot PDF figures