sma.dt: Function wrapper for single moving averages.

View source: R/smoothCV.R

sma.dtR Documentation

Function wrapper for single moving averages.

Description

Function wrapper for single moving averages.

Usage

sma.dt(trainset, m, nahead = 0)

Arguments

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.

Value

A list containing smoothed (training set, moving averages, and predicted training values) and forc (forecasted values to use against a test set).

Examples

sma.dt(crudenow$close,5,nahead=10)

ammarsahab/smoothCV documentation built on April 18, 2022, 4:39 p.m.