eStat Error running 1levelundordered multinomial logit

Welcome to the forum for Stat-JR users. Feel free to post your question about Stat-JR here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

We will add further support to the Stat-JR website, such as FAQs and tutorials, as soon as it is available; the Stat-JR website can be found here: http://www.bristol.ac.uk/cmm/software/statjr/
Post Reply
kofidlehman
Posts: 12
Joined: Tue Jan 07, 2014 5:28 pm

eStat Error running 1levelundordered multinomial logit

Post by kofidlehman »

Hello,
I get an error running the template for the 1levelunorderd multinomial logit with eStat. I have attached the errors reported in Stat-JR and the commands reported in the command window. I would appreciate any help available figuring out what is going on. Thanks.
Kofi
Attachments
Stat-JR error.txt
(18.34 KiB) Downloaded 266 times
ChrisCharlton
Posts: 1285
Joined: Mon Oct 19, 2009 10:34 am

Re: eStat Error running 1levelundordered multinomial logit

Post by ChrisCharlton »

Looking at the model and subsequent error messages it looks like it is missing the prior for alpha_2:

Code: Select all

model
{
    for(i in 1:length(couple_ideal)) {
       dummy[i] ~ dcatun3(p1[i], p2[i], p3[i],r1[i],r2[i],r3[i])

       ln(p1[i]) <- constant[i] * alpha_0
       ln(p2[i]) <- constant[i] * alpha_1
       ln(p3[i]) <- constant[i] * alpha_2
    }
    # Priors
    alpha_0 ~ dflat()
    alpha_1 ~ dflat()
}
I will need to go through the template to try to work out why this is.
ChrisCharlton
Posts: 1285
Joined: Mon Oct 19, 2009 10:34 am

Re: eStat Error running 1levelundordered multinomial logit

Post by ChrisCharlton »

Can you please let me know how many categories you have in your unordered response, and what you have chosen as the base category? I have a feeling that it isn't correctly excluding the base from the dcatun3 line, but is for the priors.
kofidlehman
Posts: 12
Joined: Tue Jan 07, 2014 5:28 pm

Re: eStat Error running 1levelundordered multinomial logit

Post by kofidlehman »

Hi Chris,
Thank you for the prompt response. I have three categories - 1, 2 and 4. 4 is the excluded category.
kofidlehman
Posts: 12
Joined: Tue Jan 07, 2014 5:28 pm

Re: eStat Error running 1levelundordered multinomial logit

Post by kofidlehman »

Hi Chris,
Following your comment, I recoded the categories of the dependent variable to be 1,2 and 3 with 3 as the excluded category and that appears to fix the problem.
Kofi
Post Reply