JenniNiku / gllvm

Generalized Linear Latent Variable Models
https://jenniniku.github.io/gllvm/
48 stars 20 forks source link

Number of observations reported by logLik and used in IC calculations #50

Closed stouffer closed 2 years ago

stouffer commented 3 years ago

Shouldn't the number of observations that gets reported by logLik(model) or gets used in AICc(model) or BIC(model) be the product of the number of rows and the number of columns of model$y?

Currently, the nobs function in aicc.gllvm.R returns this product but other functions including inf.criteria in gllvm.auxiliary.R and logLik in logLik.gllvm.R only use the number of rows.

BertvanderVeen commented 3 years ago

Indeed. I have corrected this some time back when I implemented AICc, yet forgot to address the same issue in BIC and logLik, apparently. Thanks for noting this, it has now been addressed in my PR #51.