[R-sig-ME] three level ordered logit

Rune Haubo rhbc at imm.dtu.dk
Thu Feb 24 08:19:47 CET 2011


Hi Ben,

The ordered logit model with a random intercept (also known as a
proportional odds model with random intercept and a cumulative link
mixed model, CLMM with a random intercept) can be fitted with the clmm
function from package ordinal. If you want more than one random
intercept, you can use the clmm function from package ordinal2 - this
a development package currently on R-Forge, but not on CRAN. Most of
the documentation in ordinal2 is only drafted, but the model
estimation seems to be correct - at least it gives equivalent answers
to glmer for binomial models, so that is reassuring. You may notice
that clmm::ordinal has more arguments and additional features to
clmm::ordinal2, and most importantly that the random effects are
specified differently in the two functions/packages.

A few examples:

First, a single random intercept using clmm::ordinal:
install.packages("ordinal")
library(ordinal)
data(soup)
fm1 <- clmm(SURENESS ~ PROD, random = RESP, data = soup, Hess = TRUE)
summary(fm1)
Cumulative Link Mixed Model fitted with the Laplace approximation

Call:
clmm(location = SURENESS ~ PROD, random = RESP, data = soup,
    Hess = TRUE)

Random effects:
           Var   Std.Dev
RESP 0.3115319 0.5581504

Location coefficients:
         Estimate Std. Error z value  Pr(>|z|)
PRODTest   1.2055   0.0918    13.1264 < 2.22e-16

No scale coefficients

Threshold coefficients:
    Estimate Std. Error z value
1|2  -1.4768   0.0939   -15.7314
2|3  -0.4547   0.0827    -5.4998
3|4  -0.1174   0.0819    -1.4338
4|5   0.1474   0.0819     1.7990
5|6   0.8519   0.0846    10.0644

log-likelihood: -2673.708
AIC: 5361.417
Condition number of Hessian: 132.2262

Then an example with multiple random intercepts (in this case
including a random interaction, so the random effects are crossed
rather than nested) using clmm::ordinal2:
detach(package:ordinal)
install.packages("ordinal2", repos="http://R-Forge.R-project.org")
library(ordinal2)
fm2 <- clmm(SURENESS ~ PROD + (1|RESP) + (1|RESP:PROD), data = soup)
summary(fm2)

Cumulative Link Mixed Model fitted with the Laplace approximation

Call:
clmm(formula = SURENESS ~ PROD + (1 | RESP) + (1 | RESP:PROD),
    data = soup)

Random effects:
                Var   Std.Dev
RESP:PROD 0.4024321 0.6343753
RESP      0.1445515 0.3801993

Coefficients:
         Estimate Std. Error z value  Pr(>|z|)
PRODTest   1.2671   0.1155    10.9732 < 2.22e-16

Threshold coefficients:
    Estimate Std. Error z value
1|2  -1.5300   0.1023   -14.9547
2|3  -0.4719   0.0911    -5.1817
3|4  -0.1210   0.0902    -1.3412
4|5   0.1545   0.0903     1.7110
5|6   0.8911   0.0933     9.5521

log-likelihood: -2664.984
AIC: 5345.969
Condition number of Hessian: 471.063

Cheers,
Rune
(author or ordinal and ordinal2 packages)

On 23 February 2011 17:05, Ben Pelzer <b.pelzer at maw.ru.nl> wrote:
> Hi all,
>
> Is there a package in R that estimates an random intercept (three levels
> would be nice) ordered logit model? Thanks for any advice!
>
> Ben.
>
> _______________________________________________
> 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

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