Description Usage Arguments Details Value Author(s) See Also Examples

Generates a random pair of cointegrated sequences

1 2 3 4 5 6 7 8 |

`n` |
number of observations in each sequence |

`alpha` |
constant term of linear relation |

`beta` |
slope term of linear relation |

`rho` |
coefficient of mean reversion |

`sd_eps` |
standard deviation of innovations in first sequence |

`sd_delta` |
standard deviation of innovations in residual sequence |

`X0` |
initial value of first sequence |

`Y0` |
initial value of second sequence |

Generates a random pair of cointegrated sequences. The sequences are constructed
by first generating two random sequences that are independent and normally distributed.
The elements of the first sequence, *epsilon[i]*,
have standard deviation `sd_eps`

,
while those of the second sequence, *delta[i]*,
have standard deviation `sd_delta`

.
Having generated these two sequences, the cointegrated sequences `X[i]`

and
`Y[i]`

are generated according to the following relations:

*X[i] = X[i-1] + epsilon[i]*

*R[i] = rho * R[i-1] + delta[i]*

*Y[i] = alpha + beta * X[i] + R[i]*

Returns a two-column data.frame containing the randomly generated cointegrated sequences.

Matthew Clegg [email protected]

1 2 |

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.