Closed robjhyndman closed 7 years ago
Arima() currently doesn't accept a biasadj term as it does not output fitted values. Should the object returned from Arima() be made consistent with the object returned from auto.arima()?
Actually I think auto.arima does not return fitted values (and ignores the biasadj term) if stepwise=TRUE. It would be better if both Arima and auto.arima returned fitted values, and both returned the biasadj term for use by forecast.Arima. Similarly, any other modelling function where biasadj is passed should return it for use in forecast.xxx().
I figured that the stepwise condition causing different output (existence of fitted values) was weird.
Do you foresee any issues adding an biasadj attribute to the lambda variable?
lambda <- 0.5
attributes(lambda) <- list(biasadj = TRUE)
That should work ok. You might need to strip the attribute inside BoxCox and InvBoxCox so it doesn't get attached to anything else.
Didn't seem to cause problems in those functions, but I'll double check.
Whilst updating the code for this, I was thinking, maybe InvBoxCox() should be given the biasadj parameter, and InvBoxCoxf() should be merged into InvBoxCox?
There's a lot of duplicated code around use of biasadj in every forecasting function, which this should drastically cut down on.
Yes, that makes sense.
Added in #411
e.g.,
It would be better if the latter automatically set biasadj=TRUE if it has been specified earlier. This probably requires adding a biasadj component to an Arima object.