I have a variable with 5 levels.
Level 5 is now automatically taken as the reference category (that is: I get intercept_1 thru intercept_4), but I want level 1 to be the reference category (i.e., have intercept_2 thru intercept_5 estimated).
What code do I have to add to change that?
If this information is available in any documentation, I would be happy if you could point me to that info as well (So far, I have worked through the Zang et al. 2016 paper, the "translation" of chapter 13 about ordered logistic regression into R2mlwin and the LEMMA course material, although that doesn't include Rcode).
How to change reference category in ordered logistic regression

 Posts: 42
 Joined: Thu Jul 28, 2016 11:33 am

 Posts: 1139
 Joined: Mon Oct 19, 2009 10:34 am
Re: How to change reference category in ordered logistic regression
To do this you can either use the R relevel() function (https://stat.ethz.ch/Rmanual/Rdevel/l ... level.html) as used at the beginning of http://www.bristol.ac.uk/cmm/media/r2ml ... rGuide10.R or you can specify the reference category in the model equation as in the section 11.4 A twolevel model in http://www.bristol.ac.uk/cmm/media/r2ml ... rGuide11.R.

 Posts: 42
 Joined: Thu Jul 28, 2016 11:33 am
Re: How to change reference category in ordered logistic regression
Could you indicate where in the function of 11.4 the reference category is specified?
I have tried replacing:
With:
But that doesn't work.
I have tried replacing:
Code: Select all
Function < logit(variable, cons, 5) ~ 1 + (1[1:4] school)
Code: Select all
Function < logit(variable, cons, 5) ~ 1 + (1[2:5] school)

 Posts: 1139
 Joined: Mon Oct 19, 2009 10:34 am
Re: How to change reference category in ordered logistic regression
It's the third parameter of the logit() function. The three parameters are:
 Response
 Denominator
 Reference category

 Posts: 42
 Joined: Thu Jul 28, 2016 11:33 am
Re: How to change reference category in ordered logistic regression
Thanks!! Thought the 5 was for "N categories", so good to know!