GLM Logit and coefficient testing (linear combination)

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

GLM Logit and coefficient testing (linear combination)

David STADELMANN
Hi,

I am running glm logit regressions with R and I would like to test a
linear combination of coefficients (H0: beta1=beta2 against H1:
beta1<>beta2). Is there a package for such a test or how can I perform
it otherwise (perhaps with logLik() ???)?

Additionally I was wondering if there was no routine to calculate pseudo
R2s for logit regressions. Currently I am calculating the pseudo R2 by
comparing the maximum value of the log-Likelihood-function of the fitted
model with the maximum log-likelihood-function of a model containing
only a constant. Any better ideas?

Thanks a lot for your help.
David

######################################
David Stadelmann
Seminar für Finanzwissenschaft
Université de Fribourg
Bureau F410
Bd de Pérolles 90
CH-1700 Fribourg
SCHWEIZ

Tel: +41 (026) 300 93 82
Fax: +41 (026) 300 96 78
Tel (priv): +41 (044) 586 78 99
Mob (priv): +41 (076) 542 33 48
Email: [hidden email]
Internet: http://www.unifr.ch/finwiss
Internet (priv): http://david.stadelmann-online.com

______________________________________________
[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: GLM Logit and coefficient testing (linear combination)

Roger Koenker-2
see ?anova.glm

On Dec 18, 2005, at 10:32 AM, David STADELMANN wrote:

> Hi,
>
> I am running glm logit regressions with R and I would like to test a
> linear combination of coefficients (H0: beta1=beta2 against H1:
> beta1<>beta2). Is there a package for such a test or how can I perform
> it otherwise (perhaps with logLik() ???)?
>
> Additionally I was wondering if there was no routine to calculate  
> pseudo
> R2s for logit regressions. Currently I am calculating the pseudo R2 by
> comparing the maximum value of the log-Likelihood-function of the  
> fitted
> model with the maximum log-likelihood-function of a model containing
> only a constant. Any better ideas?
>
> Thanks a lot for your help.
> David
>
> ######################################
> David Stadelmann
> Seminar für Finanzwissenschaft
> Université de Fribourg
> Bureau F410
> Bd de Pérolles 90
> CH-1700 Fribourg
> SCHWEIZ
>
> Tel: +41 (026) 300 93 82
> Fax: +41 (026) 300 96 78
> Tel (priv): +41 (044) 586 78 99
> Mob (priv): +41 (076) 542 33 48
> Email: [hidden email]
> Internet: http://www.unifr.ch/finwiss
> Internet (priv): http://david.stadelmann-online.com
>
> ______________________________________________
> [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

______________________________________________
[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: GLM Logit and coefficient testing (linear combination)

Fox, John
In reply to this post by David STADELMANN
Dear David,

The linear.hypothesis() function in the car package will compute a Wald test
for this hypothesis, but a LR test is probably a better idea for a logit
model. You can do that by fitting the restricted model and comparing that
with the unrestricted model via anova().

I hope this helps,
 John

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
--------------------------------

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of David
> STADELMANN
> Sent: Sunday, December 18, 2005 11:32 AM
> To: [hidden email]
> Subject: [R] GLM Logit and coefficient testing (linear combination)
>
> Hi,
>
> I am running glm logit regressions with R and I would like to
> test a linear combination of coefficients (H0: beta1=beta2 against H1:
> beta1<>beta2). Is there a package for such a test or how can
> I perform it otherwise (perhaps with logLik() ???)?
>
> Additionally I was wondering if there was no routine to
> calculate pseudo R2s for logit regressions. Currently I am
> calculating the pseudo R2 by comparing the maximum value of
> the log-Likelihood-function of the fitted model with the
> maximum log-likelihood-function of a model containing only a
> constant. Any better ideas?
>
> Thanks a lot for your help.
> David
>
> ######################################
> David Stadelmann
> Seminar für Finanzwissenschaft
> Université de Fribourg
> Bureau F410
> Bd de Pérolles 90
> CH-1700 Fribourg
> SCHWEIZ
>
> Tel: +41 (026) 300 93 82
> Fax: +41 (026) 300 96 78
> Tel (priv): +41 (044) 586 78 99
> Mob (priv): +41 (076) 542 33 48
> Email: [hidden email]
> Internet: http://www.unifr.ch/finwiss
> Internet (priv): http://david.stadelmann-online.com
>
> ______________________________________________
> [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

______________________________________________
[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: GLM Logit and coefficient testing (linear combination)

Henric Nilsson
In reply to this post by David STADELMANN

On Sö, 2005-12-18, 17:32, David STADELMANN skrev:

> Hi,
>
> I am running glm logit regressions with R and I would like to test a
> linear combination of coefficients (H0: beta1=beta2 against H1:
> beta1<>beta2). Is there a package for such a test or how can I perform
> it otherwise (perhaps with logLik() ???)?
>
> Additionally I was wondering if there was no routine to calculate pseudo
> R2s for logit regressions. Currently I am calculating the pseudo R2 by
> comparing the maximum value of the log-Likelihood-function of the fitted
> model with the maximum log-likelihood-function of a model containing
> only a constant. Any better ideas?

The subject of R^2 in logistic regression was brought up some time ago.
See the postings

http://finzi.psych.upenn.edu/R/Rhelp02a/archive/54939.html
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/54940.html

You could easily have found these, and couple of other ones, all by
yourself just by issuing an `RSiteSearch("R^2 logistic")'.


HTH
Henric

______________________________________________
[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