Nagelkerke Pseudo R-squared

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

Nagelkerke Pseudo R-squared

varin sacha
Dear R-Experts,

I have fitted an ordinal logistic regression with just 1 explanatory variable for the reproducible example here below.

Everything is working, now I try to calculate the Nagelkerke Pseudo R-squared.
I have found a package BaylorEdPsych providing many Pseudo R-squared, but the example shown in the package is for GLM (binary logistic regression) not for ordinal logistic regression.
How can I calculate the Nagelkerke Pseudo R-squared for ordinal logistic regression ?

Many thanks as usual for your precious help.

Reproducible example :

install.packages("MASS")
library(MASS)
a=factor(c("tres grand", "grand", "petit","petit","tres grand","grand","petit","petit","tres grand","grand"))
b=c("homme", "homme", "femme", "femme", "femme", "homme", "homme", "homme", "femme", "femme")
m <- polr(a ~ b, Hess=TRUE)
summary(m)

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Nagelkerke Pseudo R-squared

David Winsemius

On Jul 17, 2015, at 4:33 PM, varin sacha wrote:

> Dear R-Experts,
>
> I have fitted an ordinal logistic regression with just 1 explanatory variable for the reproducible example here below.
>
> Everything is working, now I try to calculate the Nagelkerke Pseudo R-squared.
> I have found a package BaylorEdPsych providing many Pseudo R-squared, but the example shown in the package is for GLM (binary logistic regression) not for ordinal logistic regression.
> How can I calculate the Nagelkerke Pseudo R-squared for ordinal logistic regression ?

polr-objects have a deviance node. If this has statistical value (which I have some doubts regarding) then just apply the usual formula to compare nested models.

--
David.

>
> Many thanks as usual for your precious help.
>
> Reproducible example :
>
> install.packages("MASS")
> library(MASS)
> a=factor(c("tres grand", "grand", "petit","petit","tres grand","grand","petit","petit","tres grand","grand"))
> b=c("homme", "homme", "femme", "femme", "femme", "homme", "homme", "homme", "femme", "femme")
> m <- polr(a ~ b, Hess=TRUE)
> summary(m)
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Nagelkerke Pseudo R-squared

Frank Harrell
It's implemented in the R rms package's lrm and orm functions.
Frank Harrell
Department of Biostatistics, Vanderbilt University
Reply | Threaded
Open this post in threaded view
|

Re: Nagelkerke Pseudo R-squared

varin sacha
In reply to this post by David Winsemius
Thanks David for your response.

Best regards,

SV


----- Mail original -----
De : David Winsemius <[hidden email]>
À : varin sacha <[hidden email]>
Cc : R-help Mailing List <[hidden email]>
Envoyé le : Samedi 18 juillet 2015 3h33
Objet : Re: [R] Nagelkerke Pseudo R-squared


On Jul 17, 2015, at 4:33 PM, varin sacha wrote:

> Dear R-Experts,
>
> I have fitted an ordinal logistic regression with just 1 explanatory variable for the reproducible example here below.
>
> Everything is working, now I try to calculate the Nagelkerke Pseudo R-squared.
> I have found a package BaylorEdPsych providing many Pseudo R-squared, but the example shown in the package is for GLM (binary logistic regression) not for ordinal logistic regression.
> How can I calculate the Nagelkerke Pseudo R-squared for ordinal logistic regression ?

polr-objects have a deviance node. If this has statistical value (which I have some doubts regarding) then just apply the usual formula to compare nested models.

--
David.


>
> Many thanks as usual for your precious help.
>
> Reproducible example :
>
> install.packages("MASS")
> library(MASS)
> a=factor(c("tres grand", "grand", "petit","petit","tres grand","grand","petit","petit","tres grand","grand"))
> b=c("homme", "homme", "femme", "femme", "femme", "homme", "homme", "homme", "femme", "femme")
> m <- polr(a ~ b, Hess=TRUE)
> summary(m)
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Nagelkerke Pseudo R-squared

varin sacha
In reply to this post by Frank Harrell
Thanks Frank for your response.

I have used the rms package.
Reproducible example here below :

install.packages("rms")
library(rms)
a=c("tres grand", "grand", "petit","petit","tres grand","grand","petit","petit","tres grand","grand")
b=c("homme", "homme", "femme", "femme", "femme", "homme", "homme", "homme", "femme", "femme")
h <- orm(a ~ b)
h

The Nagelkerke R2 = 0.074. Is it right ?

Best Regards,

SV



----- Mail original -----
De : Frank Harrell <[hidden email]>
À : [hidden email]
Cc :
Envoyé le : Samedi 18 juillet 2015 19h51
Objet : Re: [R] Nagelkerke Pseudo R-squared

It's implemented in the R rms package's lrm and orm functions.




-----
Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context: http://r.789695.n4.nabble.com/Nagelkerke-Pseudo-R-squared-tp4710014p4710031.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Nagelkerke Pseudo R-squared

varin sacha
Already answered many thanks Frank.
Best Regards
SV

Envoyé de mon iPhone

Le 18 juil. 2015 à 20:39, varin sacha <[hidden email]> a écrit :

> Thanks Frank for your response.
>
> I have used the rms package.
> Reproducible example here below :
>
> install.packages("rms")
> library(rms)
> a=c("tres grand", "grand", "petit","petit","tres grand","grand","petit","petit","tres grand","grand")
> b=c("homme", "homme", "femme", "femme", "femme", "homme", "homme", "homme", "femme", "femme")
> h <- orm(a ~ b)
> h
>
> The Nagelkerke R2 = 0.074. Is it right ?
>
> Best Regards,
>
> SV
>
>
>
> ----- Mail original -----
> De : Frank Harrell <[hidden email]>
> À : [hidden email]
> Cc :
> Envoyé le : Samedi 18 juillet 2015 19h51
> Objet : Re: [R] Nagelkerke Pseudo R-squared
>
> It's implemented in the R rms package's lrm and orm functions.
>
>
>
>
> -----
> Frank Harrell
> Department of Biostatistics, Vanderbilt University
> --
> View this message in context: http://r.789695.n4.nabble.com/Nagelkerke-Pseudo-R-squared-tp4710014p4710031.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.