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 <>
Subject   RE: st: wish for logit output
Date   Sun, 4 Feb 2007 19:59:31 +0000 (GMT)

--- "Newson, Roger B" <> wrote:

> You can get the likelihood-ratio test using -lrtest-. As in:
> 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

Inbox full of unwanted email? Get leading protection and 1GB storage with All New Yahoo! Mail.
*   For searches and help try:

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