Skip to content

Forecasting semi-annual data #430

@anastasiospanagiotelis

Description

@anastasiospanagiotelis

When forecasting with ARIMA for semiannual data, model function works, even fitting seasonal ARIMA model with correct seasonal period. However piping the output through to forecast throws a bug due to periods having noninteger values. There may be a workaround, however it would be nice if it worked by default. Minimum working example below:

# Load packages
library(tsibble)
library(fable)

#Set date variable as yearquarter (but only observed every 2 quarters)
dates<-yearquarter(seq.Date('1970-02-15','2019-08-15',length.out = 100))

#Randomly generate data in a way that has seasonality
y=(-1)^(1:100)+0.01*rnorm(100)

#Put into a tsibble
data<-tsibble(dates,y)

#Model (this part works as expected)
data%>%
  model(arima=ARIMA(y))->mod
mod

#Forecast(this next line throws an error)
forecast(mod)

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions