Bayes Factor in mirt anova

98 views
Skip to first unread message

Pedro Alberto Barbetta

unread,
Jul 5, 2016, 2:36:43 PM7/5/16
to mirt-package
Dear Phil Chalmers,
My doubt is about the Bayes Factor in mirt anova. The output this function is always in the interval [0, 1], because the difference of the log-posterior is always < 0.  The same thing happen when I write anova (m1,m2) or anova(m2,m1). Is it correct? I would expect the Bayes Factor > 1 at least in one case.
Best regards,
Pedro

Phil Chalmers

unread,
Jul 7, 2016, 10:30:04 AM7/7/16
to Pedro Alberto Barbetta, mirt-package
The anova organizes the input objects such that the comparison is always nested based on the degrees of freedom. So it will always test whether the model with more df fits worse than the one with more. Hence, the bayes factor is always organized to test whether the less restrictive model is more likely than the less restrictive. 

In the case where the df are the same, you may want to use 1/anova(mod, mod2)$Bayes_factor[2] to invert the ratio. But really that's up to you to determine which is the baseline version of the model (I suppose I could add a stament where if the df are equal then the order of anova() matters). Cheers.

Phil

--
You received this message because you are subscribed to the Google Groups "mirt-package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marvin Rost

unread,
Jan 7, 2020, 2:28:21 AM1/7/20
to mirt-package
Dear Phil,

first of all: thank you very much for this great package!

Right now I'm trying to get my head around the output of the anova()-function when applied to two models with prior specification of the intercept. I'm confused about your statement above:

"The anova organizes the input objects such that the comparison is always nested based on the degrees of freedom. So it will always test whether the model with more df fits worse than the one with more. Hence, the bayes factor is always organized to test whether the less restrictive model is more likely than the less restrictive."

Does anova() test whether the model with fewer or with more df fits worse? And does the BF organized to test whether the less restrictive model is more likely or the more restrictive model?

Best
Marvin

Phil Chalmers

unread,
Jan 7, 2020, 10:27:29 AM1/7/20
to Marvin Rost, mirt-package
Hi Marvin,

On Tue, Jan 7, 2020 at 2:28 AM Marvin Rost <maila...@gmail.com> wrote:
Dear Phil,

first of all: thank you very much for this great package!

Right now I'm trying to get my head around the output of the anova()-function when applied to two models with prior specification of the intercept. I'm confused about your statement above:

"The anova organizes the input objects such that the comparison is always nested based on the degrees of freedom. So it will always test whether the model with more df fits worse than the one with more. Hence, the bayes factor is always organized to test whether the less restrictive model is more likely than the less restrictive."

Does anova() test whether the model with fewer or with more df fits worse?

It tests whether the model with fewer degrees of freedom fits worse than the less constrained model. Though an equivalent interpretation is whether the less constrained model fits 'unusually better' than the more constrained base model with fewer df. 

 
And does the BF organized to test whether the less restrictive model is more likely or the more restrictive model?

Also yes, by way of the organization according to the degrees of freedom. HTH.

Phil
 

Best
Marvin


--
You received this message because you are subscribed to the Google Groups "mirt-package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package...@googlegroups.com.

Marvin Rost

unread,
Jan 8, 2020, 2:49:13 AM1/8/20
to mirt-p...@googlegroups.com
Thank you very much for that clarification!
Reply all
Reply to author
Forward
0 new messages