Description Usage Arguments Details Value Author(s) Examples

Given a time series vector, produces the input matrix and output vector for a time series prediction task. The other parameters are the lags to include and the number of steps ahead to predict.

1 | ```
laggedData(x, lags = 0:9, stepsAhead = 1)
``` |

`x` |
an |

`lags` |
which lags to use for prediction. A |

`stepsAhead` |
how many steps ahead to predict. A non-negative
integral value ( |

The default parameters correspond to predicting one step ahead
(position

) using the ten most recent values
(positions `t`+1

... `t`

).
`t`-9

A `list`

with two components:

`X` |
The |

`y` |
The output |

Mikko Korpela

1 | ```
laggedData(1:20)
``` |

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.