Simulates data based on an mlVAR object, estimates the mlVAR network model based on the simulated data and compares the estimated network to the mlVAR object network.
mlVARsample(object, nTime = c(25,50,100,200), nSample =100, pMissing =0, nReps =100, nCores =1,...)## S3 method for class 'mlVARsample'summary(object,...)
Arguments
object: mlVAR object, or mlVARsample object in the summary method
nTime: Vector with number of time points to test.
nSample: Number of individuals in the dataset. It is possible to decrease the number of individuals compared to the individuals in the mlVAR object. However, it is not possible to have more individuals than there are in the mlVAR object.
pMissing: Percentage of missing data to be simulated.
nReps: Number of repetitions for each condition.
nCores: Number of cores to use.
...: Arguments sent to mlVAR.
Details
This function simulates data based on the mlVAR object. The individual networks (random effects) are used to simulate data using the graphicalVARsim function from the graphicalVAR package (Epskamp, 2020). The individual data is combined into one dataset. This dataset is used to estimate the mlVAR network.
For every condition, the function returns four values per network comparison measure (correlation, sensitivity, specificity, bias, and precision): one for the fixed temporal effects, one for the fixed contemporaneous effects, the mean comparison value of the random temporal effects, and the mean comparison value of the random contemporaneous effects.