[R-sig-ME] ordinal regression with MCMCglmm
Jarrod Hadfield
j.hadfield at ed.ac.uk
Tue Apr 13 18:41:12 CEST 2010
Hi Kari,
The simplest model is
m1<-MCMCglmm(resp~treat, random=~group, family="ordinal",
data=your.data, prior=prior)
as with multinomial data with a single realisation, the residual
variance cannot be estimated from the data. The best option is to fix
it at some value. most programs fix it at zero but MCMCglmm will fail
to mix if this is done, so I usually fix it at 1:
prior=list(R=list(V=1, fix=1), G=list(G1=list(V=1, nu=0)))
I have left the default prior for the fixed effects (not explicitly
specified above), and the default prior random effect variance
structure (G) which has a zero degree of belief parameter. Often this
requires some/more thought, especially if there are few groups or
replication within groups is low. Sections 1.2, 1.5 & 8.2 in the
CourseNotes cover priors for variances.
Currently there is no option for specifying priors on the cut-points -
the prior is flat and improper. The posterior in virtually all cases
will be proper though.
Cheers,
Jarrod
Quoting Kari Ruohonen <kari.ruohonen at utu.fi>:
> Hi,
> I am trying to figure out how to fit an ordinal regression model with
> MCMCglmm. The "MCMCglmm Course notes" has a section on multinomial
> models but no example of ordinal models. Suppose I have the following
> data
>
> > data
> resp treat group
> 1 4 A 1
> 2 4 A 1
> 3 3 A 2
> 4 4 A 2
> 5 2 A 3
> 6 4 A 3
> 7 2 A 4
> 8 2 A 4
> 9 3 A 5
> 10 2 A 5
> 11 1 B 6
> 12 1 B 6
> 13 1 B 7
> 14 2 B 7
> 15 2 B 8
> 16 3 B 8
> 17 2 B 9
> 18 1 B 9
> 19 2 B 10
> 20 2 B 10
>
> and the "resp" is an ordinal response, "treat" is a treatment and
> "group" is membership to a group. Assume I would like to fit an ordinal
> model between "resp" and "treat" by having "group" effects as random
> effects. How would I specify such a model in MCMCglmm? And how would I
> specify the prior distributions?
>
> All help is greatly appreciated.
>
> regards, Kari
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the R-sig-mixed-models
mailing list