ranfor_ts: Make forecasts using a random forest model

Description Usage Arguments Value

View source: R/forecasting-ranfor.R

Description

Fit a random forest model with the output as the 1-step ahead value and the predictors as the 5 previous lags. This is functionally similar to the time-delay embedding approach with an embedding of 5, but using randomForest to estimate the forecast function.

Usage

1
ranfor_ts(timeseries, num_ahead = 5, level = 95)

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.

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)


weecology/MATSS-forecasting documentation built on Nov. 28, 2020, 10:19 a.m.