helske / KFAS

KFAS: R Package for Exponential Family State Space Models
64 stars 17 forks source link

Standardized residuals calculated from the KFS output #57

Closed suprajamalladi closed 3 years ago

suprajamalladi commented 3 years ago

ab

In the attached page from the KFAS package description, the standardized state and observation residuals calculated using the "rstandard" function have different formulas from those in Durbin and Koopman (2012). Below are the formulas for the standardized residuals from Durbin and Koopman(2012): image

I would like to know why they are different? Also, is there a way I can get the residuals from KFS using the exact same formulas as in the Durbin and Koopman(2012) book?

helske commented 3 years ago

The formulas are same, the DK formulas are just stated in terms of univariate states/series where it makes sense to write square root of variance. The formula for the observation residuals in KFAS is just written in a different way as the formula in DK is for Gaussian models whereas the one in the KFAS docs is applicable also for non-Gaussian models.

suprajamalladi commented 3 years ago

thank you very much for your response!