tldr; If you have a 2-4GB dataset and you need to estimate a (generalized) linear model with a large number of fixed effects, this package is for you.
13
stars
0
forks
source link
note for myself: deviance values #3
Closed
pachadotdev closed 2 months ago
https://github.com/pachadotdev/capybara/blob/reducebackandforth/ uses the same underlying functions as https://github.com/pachadotdev/capybara/blob/main
the differences are
the tests in https://github.com/pachadotdev/capybara/blob/reducebackandforth/tests/testthat/test-fepoisson.R#L2 https://github.com/pachadotdev/capybara/blob/reducebackandforth/tests/testthat/test-fepoisson.R#L7 https://github.com/pachadotdev/capybara/blob/reducebackandforth/tests/testthat/test-fepoisson.R#L12 give the same results as main
the problem is here
https://github.com/pachadotdev/capybara/blob/reducebackandforth/src/05_glm_fit.cpp#L248
output:
iter: 0 dev: 1.15908e+08 iter: 1 dev: 1.12655e+20
adding a print statement in https://github.com/pachadotdev/capybara/blob/main/R/internals.R#L66 returns this for the same model
[1] "iter: 1" [1] "dev: 119812197.425158" [1] "iter: 2" [1] "dev: 61981346.125582" [1] "iter: 12" [1] "dev: 4265228.57183159"
I need to check the deviance https://github.com/pachadotdev/capybara/blob/reducebackandforth/src/05_glm_fit.cpp#L77
curious thing:
felm()
, which is just a wrapper forfeglm()
with a Gaussian link, works ok so the problem must be the transformed values