(Using Orange dataset from library(Ecdat)
for reproducibility.)
I am trying to fit a mean forecasting model in R using tsibble, fable package in R. The code below is pretty simple, however I get the error Error in NCOL(x) : object 'value' not found
when I try to run the last model part (even though value
is a column name in o_ts
), not sure why would that be. I am following RJH tutorials from here (https://robjhyndman.com/hyndsight/fable/).
I would also appreciate any help whether arima & mean forecasting model are same, if not what is the function that I should be using instead of Arima.
library(Ecdat)
library(tsibble)
library(feasts)
library(tidyverse)
library(fable)
o<- Orange
o_ts <- o %>% as_tsibble()
o_ts %>%
filter(key=="priceoj") %>%
model(
arima=arima(value))
arima
is from thestats
package. I believe you wantARIMA
fromfable
.