Skip to content

Predicted values in MCMCglmm family="threshold"

3 messages · Shamil Sadigov, Jarrod Hadfield

#
Hi,

have

cp<-c(-Inf, 0, cp.est, Inf)

where cp.est are the estimated cutpoints (if there are any - with 2  
categories there are none).

Have linear predictor nu = xb or nu=xb+zu. If the former (and there  
are random effects) then have v the sum of the variance components  
associated with that term, and if the latter have v as the units  
variance associated with that term.

Have obs<-1:k where k is the number of categories (2+the number of  
estimated cutpoints) and the probability of falling into a category  
conditional on nu and v is:

pnorm(cp[obs+1], nu , sqrt(v)) ? pnorm(cp[obs], nu, sqrt(v))

for family=threshold, and

pnorm(cp[obs+1], nu , sqrt(v+1)) ? pnorm(cp[obs], nu, sqrt(v+1))

for ordinal.

For example,

cp.est<-1
cp<-c(-Inf, 0, cp.est, Inf)
k<-2+length(cp.est)
obs<-1:k
nu<--1
v<-2
pnorm(cp[obs+1], nu , sqrt(v))-pnorm(cp[obs], nu, sqrt(v))

Jarrod


Quoting Shamil Sadigov <shamil at gmail.com> on Fri, 21 Mar 2014 14:56:25 +0200:

  
    
#
Hi,

? should be - (and microsoft should be *)

Jarrod


Quoting Jarrod Hadfield <j.hadfield at ed.ac.uk> on Fri, 21 Mar 2014  
14:14:50 +0000: