Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
360 views
in Technique[技术] by (71.8m points)

time series - Simulate cross-lag panel model data in R

I'm looking for a way to concisely and flexibly simulate cross-lag panel data in R.

Considering a 2-variable use case for X and Y over some arbitrary number of time units n, I'd like to be able to specify:

  1. Autoregressive relationships for each variable independently (so, AR(1) for each of X & Y)
  2. Overall mean for each variable
  3. Variance for each variable
  4. Cross-lagged relationships between X and Y (so, the b in X_n = b * Y_(n-1), and vice versa)
  5. [less important, but useful] Change over time (slope from 1 to n for each variable)

The single-variable version of this seems possible with something like arima.sim(), but I'm not sure how to best to approach this in the multivariate case.

Custom approaches are fine, but any packages implementing a solution would be even better.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...