npreg_ts fits a timeseries model using npreg

npreg_ts(timeseries, num_ahead = 5, level = 95, regtype = "ll",
  bwmethod = "cv.aic", gradients = TRUE)

Arguments

timeseries

the time series to forecast

num_ahead

the number of points at the end of the time series to forecast

level

Confidence level for prediction intervals.

regtype

a character string specifying which type of kernel regression estimator to use. lc specifies a local-constant estimator (Nadaraya-Watson) and ll specifies a local-linear estimator. Defaults to lc.

bwmethod

which method to use to select bandwidths. cv.aic specifies expected Kullback-Leibler cross-validation (Hurvich, Simonoff, and Tsai (1998)), and cv.ls specifies least-squares cross-validation. Defaults to cv.ls.

gradients

a logical value indicating that you want gradients computed and returned in the resulting npregression object. Defaults to FALSE.

Value

a data.frame of the mean forecasts, the observed values, and the lower and upper CI levels (if an error occurs, then just NA values)