Missing Data Multinomial Logistic Model

2013-03-17
2013-03-22
  • mark pahuta
    mark pahuta
    2013-03-17

    Hi Everyone,

    I am running a multinomial logistic regression model. The model has 3 categories (1,2,3). For some observations, I only know that they are not category 3.

    I don't want to sample from the full posterior for the missing observations. I am trying to use dinterval to accomplish this.

    When I run the code below, I get the error "Unable to find appropriate sampler" for the missing observations. I am wondering if I am doing something incorrectly, or is it just not possible to use dinterval in this way?

    for (pat in 1:Npat){
        censtyp1[pat]  ~ dinterval(testobs[pat], brkpt1[pat,])
        testobs[pat]<-inprod(observed[pat,],testvec[])
        observed[pat,]~dmulti(prob[pat,],1) 
    }
    
    testvec[1]<-1
    testvec[2]<-2
    testvec[3]<-3
    
     
  • Martyn Plummer
    Martyn Plummer
    2013-03-22

    Try modelling testobs directly using the dcat distribution:

    for (pat in 1:Npat){
        censtyp1[pat]  ~ dinterval(testobs[pat], brkpt1[pat,])
        testobs[pat] <- dcat(prob[pat,])
    
    }
    

    If you need observed elsewhere in your code, you can reconstruct it

    for (pat in 1:Npat) {
       for (j in 1:3) {
          observed[pat,j] <- testobs[pat] == j
       }
    }