Description Usage Arguments Examples
View source: R/forecast_functions.R
Forecast trainML models
1 | forecastLM(model, newdata = NULL, h, pi = c(0.95, 0.8))
|
model |
A trainLM object |
newdata |
A tsibble object, must be used when the input model was trained with external inputs (i.e., the 'x' argument of the trainML function was used). This input must follow the following structure: - Use the same time intervals (monthly, daily, hourly, etc.) structure and timestamp class (e.g., yearquarter, yearmonth, POSIXct, etc.) as the original input - The number of observations must align with the forecasting horizon (the 'h' argument) - The timestamp of the first observation must be the consecutive observation of the last observation of the original series |
h |
An integer, define the forecast horizon |
pi |
A vector with numeric values between 0 and 1, define the level of the confidence of the prediction intervals of the forecast. By default calculate the 80% and 95% prediction intervals |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.