mlVARsim: Simulates an mlVAR model and data

View source: R/mlVARmodel.R

mlVARsimR Documentation

Simulates an mlVAR model and data

Description

Simulates an mlVAR model and data with a random variance-covariance matrix for the random effects.

Usage

mlVARsim(nPerson = 10, nNode = 5, nTime = 100, lag = 1, thetaVar = rep(1,nNode),
DF_theta = nNode * 2, mu_SD = c(1, 1), init_beta_SD = c(0.1, 1), fixedMuSD = 1, 
shrink_fixed = 0.9, shrink_deviation = 0.9)

Arguments

nPerson

Number of subjects

nNode

Number of variables

nTime

Number of observations per person

lag

The maximum lag to be used

thetaVar

Contemporaneous fixed effect variances

DF_theta

Degrees of freedom in simulating person-specific contemporaneous covariances (e.g., the individual differences in contemporaneous effects)

mu_SD

Range of standard deviation for the means

init_beta_SD

Initial range of standard deviations for the temporal effects

fixedMuSD

Standard deviation used in sampling the fixed effects

shrink_fixed

Shrinkage factor for shrinking the fixed effects if the VAR model is not stationary

shrink_deviation

Shrinkage factor for shrinking the random effects variance if the VAR model is not stationary

Author(s)

Sacha Epskamp (mail@sachaepskamp.com)


SachaEpskamp/mlVAR documentation built on Feb. 1, 2024, 10:38 a.m.