[R-sig-ME] ordinal regression with MCMCglmm
Rune Haubo
rune.haubo at gmail.com
Thu Apr 15 08:49:23 CEST 2010
Hi Kari
I know you asked specifically about MCMCglmm, but as an alternative
you could consider to fit the mixed-effects model with clmm from
package ordinal by maximum likelihood:
> library(ordinal)
> fmm1 <- clmm(resp ~ treat, random = group, Hess = 1, nAGQ = 7)
> summary(fmm1)
Cumulative Link Mixed Model fitted with the adaptive Gauss-Hermite
quadrature approximation with 7 quadrature points
Call:
clmm(location = resp ~ treat, random = group, Hess = 1, nAGQ = 7)
Random effects:
Var Std.Dev
group 1.673846 1.293772
Location coefficients:
Estimate Std. Error z value Pr(>|z|)
treatB -3.9275 1.8372 -2.1377 0.032539
No scale coefficients
Threshold coefficients:
Estimate Std. Error z value
1|2 -4.5676 1.8970 -2.4078
2|3 -0.7297 0.9509 -0.7674
3|4 0.6002 0.9466 0.6340
log-likelihood: -20.43121
AIC: 50.86241
Condition number of Hessian: 32.46322
This function uses the same parameterization as polr in MASS:
> summary(polr(resp ~ treat, Hess = TRUE))
Call:
polr(formula = resp ~ treat, Hess = TRUE)
Coefficients:
Value Std. Error t value
treatB -3.130462 1.219036 -2.567981
Intercepts:
Value Std. Error t value
1|2 -3.6062 1.1872 -3.0376
2|3 -0.5510 0.6451 -0.8542
3|4 0.4758 0.6498 0.7321
Residual Deviance: 41.81359
AIC: 49.81359
Observe how the estimates of the thresholds and regression
coefficients from the marginal model (polr) are smaller ("attenuated"
is the official term) in absolute value than the estimate from the
conditional model (the mixed-effects model fitted by clmm) to comment
on David's 2c. I am not sure what the effect would be in an MCMCglmm
model.
Regards,
Rune
On 13 April 2010 13:11, Kari Ruohonen <kari.ruohonen at utu.fi> wrote:
> 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
>
--
Rune Haubo Bojesen Christensen
PhD Student, M.Sc. Eng.
Phone: (+45) 45 25 33 63
Mobile: (+45) 30 26 45 54
Mail: rhbc at imm.dtu.dk, rune.haubo at gmail.com
DTU Informatics, Section for Statistics
Technical University of Denmark, Build. 305, Room 122,
DK-2800 Kgs. Lyngby, Denmark
More information about the R-sig-mixed-models
mailing list