Multilevel VAR Estimation for Multiple Time Series
Multilevel VAR Estimation for Multiple Time Series
The function mlVAR0 computes estimates of the multivariate vector autoregression model as introduced by Bringmann et al. (2013) which can be extended through treatment effects, covariates and pre- and post assessment effects.
vars: Vectors of variables to include in the analysis
idvar: String indicating the subject ID
lags: Vector indicating the lags to include
dayvar: String indicating assessment day (if missing, every assessment is set to one day)
beepvar: String indicating assessment beep per day (if missing, is added)
periodvar: String indicating the period (baseline, treatment period, etc.) of assessment (if missing, every assessment is set to one period)
treatmentvar: Character vector indicating treatment
covariates: Character indicating covariates independent of assessment.
timevar: Character indicating the time variable
maxTimeDiff: Maximum time differece to include observation pairs
control: A list of arguments sent to lmerControl
verbose: Logical to print progress to the console
orthogonal: Logical to indicate if orthogonal estimation (no correlated random effects) should be used. Defaults to FALSE if the number of nodes is less than 6 and TRUE otherwise
estimator: Estimator to use. Note: lmmlasso implementation is very experimental
method: Method to use. Experimental
laginteractions: Experimental, do not use.
critFun: Experimental, do not use.
lambda: lmmlasso lambda parameter
center: Centering to be used. "inSubject" uses within-person centering, "general" uses grand-mean centering and "none" does not use centering. IMPORTANT NOTE: "inSubject" leads to coefficients to resemble within-person slopes, the other centering option leads to coefficients to be a blend of within and between person slopes.
Details
mlVAR0 has been built to extract individual network dynamics by estimating a multilevel vector autoregression model that models the time dynamics of selected variables both within an individual and on group level. For example, in a lag-1-model each variable at time point t is regressed to a lagged version of itself at time point t-1 and all other variables at time point t-1. In psychological research, for example, this analysis can be used to relate the dynamics of symptoms on one day (as assessed by experience sampling methods) to the dynamics of these symptoms on the consecutive day.
Returns
mlVAR0 returns a 'mlVAR0' object containing - fixedEffects: A matrix that contains all fixed effects coefficients with dependent variables as rows and the lagged independent variables as columns.
se.fixedEffects: A matrix that contains all standard errors of the fixed effects.
randomEffects: A list of matrices that contain the random effects coefficients.
randomEffectsVariance: A matrix containing the estimated variances between the random-effects terms
pvals: A matrix that contains p-values for all fixed effects.
pseudologlik: The pseudo log-likelihood.
BIC: Bayesian Information Criterion, i.e. the sum of all univariate models' BICs
input: List containing the names of variables used in the analysis
References
Bringmann, L. F., Vissers, N., Wichers, M., Geschwind, N., Kuppens, P., Peeters, F., ... & Tuerlinckx, F. (2013). A network approach to psychopathology: New insights into clinical longitudinal data. PloS one, 8(4), e60188.