fits | R Documentation |
Fits the best model from classes ARIMA, ETS, TBATS and NNETAR.
fits(
x,
train = 0.8,
steps = NULL,
max.points = 500,
show.main.graph = TRUE,
show.sec.graph = TRUE,
show.value = TRUE,
PI = FALSE,
theme.doj = FALSE
)
x |
A vector or ts object. |
train |
The (initial) percentage of the time series to be used to train the models. Must be |
steps |
Number of steps to forecast. If |
max.points |
Limits the maximum number of points to be used in modeling. Uses the first |
show.main.graph |
Logical. Should the main graphic (with the final model) be displayed? Default: 'TRUE'. |
show.sec.graph |
Logical. Should the secondary graphics (with the training models) be displayed? Default: 'TRUE'. |
show.value |
Logical. Should the values be displayed? Default: 'TRUE'. |
PI |
Prediction Interval used in nnar models. May take long time processing. Default: 'FALSE'. |
theme_doj |
Logical. Should the theme of Decades Of Jurimetrics be used? Default: 'FALSE'. |
$fcast
Predicted time series using the model that minimizes the forecasting mean square error.
$mse.pred
Mean squared error of prediction. Used to decide the best model.
$best.model
Model that minimizes the mean squared error of prediction.
$runtime
Running time.
Hyndman, R.J., & Athanasopoulos, G. (2018) Forecasting: principles and practice, 2nd edition, OTexts: Melbourne, Australia. otexts.com/fpp2.
https://robjhyndman.com/hyndsight/nnetar-prediction-intervals/
https://robjhyndman.com/talks/Google-Oct2015-part1.pdf
Zabala, F. J. and Silveira, F. F. (2019). Decades of Jurimetrics. https://arxiv.org/abs/2001.00476#'
library(jurimetrics)
fits(livestock)
fits(livestock, theme.doj = T)
fits(livestock, show.main.graph = F, show.sec.graph = T, show.value = F)
fits(h02, .9)
fits(gas)
data('tjmg_year')
y1 <- ts(tjmg_year$count, start = c(2000,1), frequency = 1)
fits(y1)
data(tjrs_year_month)
y2 <- ts(tjrs_year_month$count, start = c(2000,1), frequency = 12)
fits(y2, train = 0.8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.