simDFM: Simulate data following a Dynamic Factor Model

Description Usage Arguments Author(s) References Examples

View source: R/simDFM.R

Description

Function to simulate data following a dynamic factor model (DFM). Two DFMs are currently available: the direct autoregressive factor score model (Engle & Watson, 1981; Nesselroade, McArdle, Aggen, and Meyers, 2002) and the dynamic factor model with random walk factor scores.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
simDFM(
  variab,
  timep,
  nfact,
  error,
  dfm = c("DAFS", "RandomWalk"),
  loadings,
  autoreg,
  crossreg,
  var.shock,
  cov.shock,
  burnin = 1000
)

Arguments

variab

Number of variables per factor.

timep

Number of time points.

nfact

Number of factors.

error

Value to be used to construct a diagonal matrix Q. This matrix is p x p covariance matrix Q that will generate random errors following a multivariate normal distribution with mean zeros. The value provided is squared before constructing Q.

dfm

A string indicating the dynamical factor model to use. Current options are:

  • DAFS Simulates data using the direct autoregressive factor score model. This is the default method

  • RandomWalk Simulates data using a dynamic factor model with random walk factor scores.

loadings

Magnitude of the loadings.

autoreg

Magnitude of the autoregression coefficients.

crossreg

Magnitude of the cross-regression coefficients.

var.shock

Magnitude of the random shock variance.

cov.shock

Magnitude of the random shock covariance

burnin

Number of n first samples to discard when computing the factor scores. Defaults to 1000.

Author(s)

Hudson F. Golino <hfg9s at virginia.edu>

References

A one-factor multivariate time series model of metropolitan wage rates. Journal of the American Statistical Association, 76(376), 774-781. ref:01621459.1981.10477720#.XmkWWy2ZMuA

Nesselroade, J. R., McArdle, J. J., Aggen, S. H., & Meyers, J. M. (2002). Dynamic factor analysis models for representing process in multivariate time-series. In D. S. Moskowitz & S. L. Hershberger (Eds.), Multivariate applications book series. Modeling intraindividual variability with repeated measures data: Methods and applications, 235–265. https://psycnet.apa.org/record/2001-05300-009

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
\donttest{
# Estimate EGA network
data1 <- simDFM(variab = 5, timep = 50, nfact = 3, error = 0.05,
dfm = "DAFS", loadings = 0.7, autoreg = 0.8,
crossreg = 0.1, var.shock = 0.18,
cov.shock = 0.36, burnin = 1000)
 }

## End(Not run)

EGAnet documentation built on Feb. 17, 2021, 1:06 a.m.