Skip to content
Prev 8794 / 20628 Next

MCMCglmm multinomial logit

Hi Jackson,

If x1 is the fixed effect prediction for the log contrast B-A then

plogis(x1/sqrt(1+v1*c2))

gives the expected probability of being B rather than A after  
integrating over the random effects (in your case the residuals under  
the assumption that they have unit variance v1=1). You can write it  
another way:

Have nu1 = x1+e1

plogis(x1/sqrt(1+v1*c2)) \approx  int plogis(nu1)pnorm(e1,0,sqrt(v1))de

and we can see the approximation is pretty good:

x1<-2
c2<-0.345843
v1<-1

plogis(x1/sqrt(1+v1*c2))
integrate(function(e1){plogis(x1+e1)*dnorm(e1,0,sqrt(v1))}, -Inf,Inf)

Obtaining the expected probability of being B rather than A, or C  
rather than A, is therefore relatively straightforward.

Obtaining the expected probability of B rather than C is a bit more tricky.

take nu2 = log contrast C-A

nu1-nu2 = log contrast B-C

which is

x1+e1-x2+e2

and is distributed as N(x1-x2, V[1,1]+V[2,2]-2*V[1,2]) where in you case V=R.

We can therefore use the same approximation as before replacing x1  
with x1-x2 and v1 with V[1,1]+V[2,2]-2*V[1,2].

If we chose V = IJ  then V[1,1] = V[2,2] = V[1,1]+V[2,2]-2*V[1,2] and  
so we multiply c2 by the same constant for all contrasts. This was the  
main motivation. In fact, it might make more sense to scale IJ by  
1/(j-1) rather than 1/j so all contrasts have unit variance, but  
anything could be used really as long as you are careful.

Looking at it now, the justification that these results/approximations  
extend to the case A versus (B and C) as I suggest in the CourseNotes  
seems more tenuous and I will check it out.

Cheers,

Jarrod





Quoting Jackson King <jackson.king722 at gmail.com> on Sun, 26 Aug 2012  
09:28:45 -0500: