Hi! I’ve been exploring
StateSpaceModels.jl for fitting some time series using
auto_arima. However I’ve run into an issue which might be pretty basic: Is there a way in which one can get the residuals from the fitted model?.
I’ve explored the
forecast function (but only predicts ahead hence no apparent way to get the residuals) and the
model.results don’t seem to have the residuals anywhere.
Here is the model (which is copy-paste from the documentation)
using CSV using DataFrames using Plots using StateSpaceModels airp = CSV.File(StateSpaceModels.AIR_PASSENGERS) |> DataFrame log_air_passengers = log.(airp.passengers) model = auto_arima(log_air_passengers; seasonal = 12) #And the residuals?
It seems to me the only way might be by reconstructing from
model.system’s matrices. I was wondering if there is an easier way (reconstructing from the matrices seems highly inefficient)