sma.dt | R Documentation |
Function wrapper for single moving averages.
sma.dt(trainset, m, nahead = 0)
trainset |
A set of univariate time series data. Can be a vector (type double) or a data.table. |
m |
Number of most recent observations where the moving average will be taken at each point in time. Should be less than or equal to the length of training set. |
nahead |
Number of observations to predict. |
A list containing smoothed
(training set, moving averages, and predicted training values)
and forc
(forecasted values to use against a test set).
sma.dt(crudenow$close,5,nahead=10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.