Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: wish for logit output


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   RE: st: wish for logit output
Date   Sun, 4 Feb 2007 19:59:31 +0000 (GMT)

--- "Newson, Roger B" <r.newson@imperial.ac.uk> wrote:

> You can get the likelihood-ratio test using -lrtest-. As in:
<snip>
> This will test the hypothesis of an odds ratio (per cubic foot of
> trunk space) of 1. I don't know much, immediately, about how to get
> the pseudo R2.

Roger's example can be extented to include a pseudo R-square:

tempname h0 h1
sysuse auto, clear 
gene byte baseline=1
logit foreign baseline, noconst or
est store H0
scalar `h0' = e(ll)
logit foreign baseline trunk, noconst or
est store H1
scalar `h1' = e(ll)
lrtest H0 H1
di "McFadden's pseudo R square : " 1-`h1'/`h0'

But Richard's suggestion to just call -logit- twice -- one with the
noconst option and one without -- is probably more practical (and I
actually used that to check if I made a mistake in the above code).

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


		
___________________________________________________________ 
Inbox full of unwanted email? Get leading protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index