dexter-psychometrics / dexterMML

An add on to dexter for situations where CML estimation is impossible.
GNU General Public License v3.0
3 stars 0 forks source link

could you also include the number of parameters beeing estimated and number of observations, so that it would be possible to compute AIC en BIC ? #4

Closed mometRie closed 2 years ago

mometRie commented 2 years ago

https://github.com/dexter-psychometrics/dexterMML/blob/23ffa1c6433825ebeae55406ab5d72dfcfaefe3e/R/model_est.R#L550

jessekps commented 2 years ago

Maybe I could put a degrees of freedom in the loglikelihood. I'll have to think where to put it and let you know. Computing it yourself is not that hard though. For 1pl it's the total number of score categories (i.e. nrow(coef(fit)) + the number of groups minus 1. For 2pl it's twice the (number of groups - 1) plus the number of scoring cateogeries plus the number of items. If you're baking your own AIC and BIC I would just include that. We're not likely to facilitate model selection tests much because we don't find them very useful.

mometRie commented 2 years ago

Thank you for your answer. I know that the computation of the number of parameters and observations are simply the amount of parameters and observations, but it would be a nice addition to directly access these objects in the returned results. These objects are also nice to use for reporting and not only for the model selection.

jessekps commented 2 years ago

Fair enough, I will think about this a little and see if I can find a logical place to put them

jessekps commented 2 years ago

the logLik method now returns an object with attributes df and nobs, 8ccbfac