Ordered logistic regression in R vs in SAS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Ordered logistic regression in R vs in SAS

Emilie Berthiaume

I tried the following ordered logistic regression in R:

mod1 <- polr(altitude~sp + wind_dir + wind_speed + hr, data=altioot)

But when I asked The summary of my regression I got the folloing error message:

> summary (mod1)

Re-fitting to get Hessian

Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) :
        the initial value of 'vmin' is not finished.

I decided to try it in SAS with the following program:

PROC LOGISTIC
DATA=altioot;
CLASS sp wind_dir ;
title "mod1";
output out=mod1;
MODEL altitude = sp wind_dir wind_speed hr;
RUN;

And it ran well with an good output.  So my question is: Can someone tell me what is the difference between the ordered logistic regression of R and that of SAS?  Does anyone have a suggestion to help me run my program in R?

Thank you very much,

Emilie Berthiaume
graduate student
Biology Department
Sherbrooke University
Sherbrooke, Quebec
CANADA

[hidden email]
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Ordered logistic regression in R vs in SAS

Frank Harrell
Emilie Berthiaume wrote:
> I tried the following ordered logistic regression in R:
>
> mod1 <- polr(altitude~sp + wind_dir + wind_speed + hr, data=altioot)

You might also try
library(Design) # also requires Hmisc package
mod1 <- lrm(....)
mod1
summary(mod1)
anova(mod1)

Frank Harrell

>
> But when I asked The summary of my regression I got the folloing error message:
>
>
>>summary (mod1)
>
>
> Re-fitting to get Hessian
>
> Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) :
>         the initial value of 'vmin' is not finished.
>
> I decided to try it in SAS with the following program:
>
> PROC LOGISTIC
> DATA=altioot;
> CLASS sp wind_dir ;
> title "mod1";
> output out=mod1;
> MODEL altitude = sp wind_dir wind_speed hr;
> RUN;
>
> And it ran well with an good output.  So my question is: Can someone tell me what is the difference between the ordered logistic regression of R and that of SAS?  Does anyone have a suggestion to help me run my program in R?
>
> Thank you very much,
>
> Emilie Berthiaume
> graduate student
> Biology Department
> Sherbrooke University
> Sherbrooke, Quebec
> CANADA
>
> [hidden email]
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>


--
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Frank Harrell
Department of Biostatistics, Vanderbilt University