简体   繁体   English

增加一个 mable:带有 ARMA 错误 model 的回归的残差和创新是相同的

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

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.似乎augment() function 仅提取创新值并将其用于回归的残差。 This is seen when we extract the residuals and innovations using residuals() :当我们使用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.那么残差和创新应该是不同的。

The .resid column provided by augment() contains response residuals, not regression residuals. augment()提供的.resid列包含响应残差,而不是回归残差。 I have updated the documentation to clarify this: https://github.com/tidyverts/fabletools/commit/c0efd7166bca06450d7b18d3d0530fdeac67cce7我更新了文档以澄清这一点: https://github.com/tidyverts/fabletools/commit/c0efd7166bca06450d7b18d3d0530fdeac67cce7

A response residual ( .resid ) is the error from backtransformed predictions on the original response variable.响应残差 ( .resid ) 是来自原始响应变量的反向转换预测的误差。 An innovation residual ( .innov ) is the error from the model (on potentially a different, transformed response variable).创新残差 ( .innov ) 是来自 model 的误差(可能是不同的转换响应变量)。 As your model does not transform the data, the response residuals ( .resid ) and the innovation residuals ( .innov ) are the same.由于您的 model 不转换数据,因此响应残差 ( .resid ) 和创新残差 ( .innov ) 是相同的。

There is currently no way to obtain the regression residuals (residuals after performing regression, before applying ARIMA process) using the augment() function.目前无法使用augment() function 获得回归残差(执行回归后,应用 ARIMA 过程之前的残差)。 This is something that would be nice to have in the future.这是将来很高兴拥有的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM