[R] Ordinal logistic regression p-values

Rune Haubo rhbc at imm.dtu.dk
Tue Aug 30 08:42:10 CEST 2011


There is also clm() (for cumulative link models) from package ordinal
that has much the same interface that polr() has, but it does give you
p-values for the regression parameters. A simple example from
examples(clm):

library(ordinal)
data(wine)
fm1 <- clm(rating ~ contact + temp, data=wine)
(summ <- summary(fm1))

giving the output:

formula: rating ~ contact + temp
data:    wine

 link  threshold nobs logLik AIC    niter max.grad cond.H
 logit flexible  72   -86.49 184.98 6(0)  4.01e-12 2.7e+01

Coefficients:
           Estimate Std. Error z value Pr(>|z|)
contactyes   1.5278     0.4766   3.205  0.00135 **
tempwarm     2.5031     0.5287   4.735 2.19e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Threshold coefficients:
    Estimate Std. Error z value
1|2  -1.3444     0.5171  -2.600
2|3   1.2508     0.4379   2.857
3|4   3.4669     0.5978   5.800
4|5   5.0064     0.7309   6.850

The p-values are extracted with:
> coef(summ)[5:6, 4]
  contactyes     tempwarm
1.348440e-03 2.194605e-06

Cheers,
Rune

On 30 August 2011 03:30, Frank Harrell <f.harrell at vanderbilt.edu> wrote:
> Use the rms package to replace Design.  Run anova(fit object from lrm) which
> produces a matrix from which you can extract P-values.  This also handles
> the case of multiple degrees of freedom per predictor.
> Frank
>
> Debs Majumdar wrote:
>>
>> Hi,
>>
>>    Are there any packages which prints out p-values for OLR's (like
>> `ologit' from Stata)? I want to run a bunch of OLRs and print the p-value
>> for the first coefficient from each of them.
>>
>>
>>   I checked polr() under MASS and it doesn't.
>>
>>  There's a lrm() function under Design which does print out p-values but I
>> couldn't extract p-values from the output.
>>
>>
>>   Thanks,
>>
>>   Debs
>>
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
> -----
> Frank Harrell
> Department of Biostatistics, Vanderbilt University
> --
> View this message in context: http://r.789695.n4.nabble.com/Ordinal-logistic-regression-p-values-tp3777674p3777768.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Rune Haubo Bojesen Christensen

Ph.D. 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-help mailing list