Augment a mable: residuals and innovations from regression with ARMA errors model are the same

319 views Asked by At

I think there is something odd here. For example the following code gives the same values for residuals and innovations:

fit <- us_change %>%
  model(ARIMA(Consumption ~ Income)) %>%
    augment()

It seems that the augment() function extracts only the innovation values and uses it for the residuals from the regression too. This is seen when we extract the residuals and innovations using residuals():

bind_rows(
    `Regression Errors` = as_tibble(residuals(fit, type = "regression")),
    `ARIMA Errors` = as_tibble(residuals(fit, type = "innovation")),
    .id = "type"
  )

Then the residuals and innovations are different as they should be.

1

There are 1 answers

0
Mitchell O'Hara-Wild On BEST ANSWER

The .resid column provided by augment() contains response residuals, not regression residuals. I have updated the documentation to clarify this: https://github.com/tidyverts/fabletools/commit/c0efd7166bca06450d7b18d3d0530fdeac67cce7

A response residual (.resid) is the error from backtransformed predictions on the original response variable. An innovation residual (.innov) is the error from the model (on potentially a different, transformed response variable). As your model does not transform the data, the response residuals (.resid) and the innovation residuals (.innov) are the same.

There is currently no way to obtain the regression residuals (residuals after performing regression, before applying ARIMA process) using the augment() function. This is something that would be nice to have in the future.