Simulates an mlVAR model and data
Simulates an mlVAR model and data with a random variance-covariance matrix for the random effects.
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)
nPerson
: Number of subjectsnNode
: Number of variablesnTime
: Number of observations per personlag
: The maximum lag to be usedthetaVar
: Contemporaneous fixed effect variancesDF_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 meansinit_beta_SD
: Initial range of standard deviations for the temporal effectsfixedMuSD
: Standard deviation used in sampling the fixed effectsshrink_fixed
: Shrinkage factor for shrinking the fixed effects if the VAR model is not stationaryshrink_deviation
: Shrinkage factor for shrinking the random effects variance if the VAR model is not stationarySacha Epskamp (mail@sachaepskamp.com)
Useful links