fable icon indicating copy to clipboard operation
fable copied to clipboard

Excessive division by df in `generate.TSLM()` to obtain the variance of innovations?

Open zouharj opened this issue 2 years ago • 1 comments

In generate.TSLM(), the variance of generated (non-bootstrapped) innovations is obtained as x$sigma2 / x$df.residual:

https://github.com/tidyverts/fable/blob/a9404d8bdbd2990a49fffcc43257f8a6e9f9a5d3/R/lm.R#L331

Correct me if I'm wrong, but I believe that plain x$sigma2 is in fact the variance we would like to use (sigma2 is obtained as rss/df, I don't see the point of further division by df).

zouharj avatar Dec 07 '22 17:12 zouharj

Thanks. Now fixed in https://github.com/tidyverts/fable/commit/79d5a5049a24ea55dd5d8009259b8ebcea8a4e98

robjhyndman avatar Dec 07 '22 20:12 robjhyndman