| sim.egcm | R Documentation | 
Given an Engle-Granger cointegration model and the number of steps to simulate, generates a simulated realization of that model for the specified number of steps.
sim.egcm(E, nsteps, X0, Y0)
| E | the Engle-Granger model to be simulated.  See  | 
| nsteps | the number of steps to simulate | 
| X0 | the starting value of  | 
| Y0 | the starting value of  | 
Returns a two-column data.frame, where the first column contains the simulated values of X, and the second column contains the simulated
values of Y.
Matthew Clegg matthewcleggphd@gmail.com
egcm
rcoint
# Generate a random pair of cointegrated vectors cv1 <- rcoint(1000) # Construct a cointegration model from them e1 <- egcm(cv1) # Simulate the model for an additional 1000 steps cv2 <- sim.egcm(e1, 1000) # Construct a cointegration model from the simulated data e2 <- egcm(cv2) # Compare the original model to the model obtained from simulation e1 e2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.