Description Usage Arguments Value Author(s) See Also Examples

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.

1 | ```
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 [email protected]

1 2 3 4 5 6 7 8 9 10 11 | ```
# 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
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.