Statalist The Stata Listserver

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

RE: st: wish for logit output

From   "Newson, Roger B" <>
To   <>
Subject   RE: st: wish for logit output
Date   Sun, 4 Feb 2007 19:29:37 -0000

You can get the likelihood-ratio test using -lrtest-. As in:

sysuse auto, clear 
gene byte baseline=1
logit foreign baseline, noconst or
est store H0
logit foreign baseline trunk, noconst or
est store H1
lrtest H0 H1

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

Hope this helps.


Roger Newson
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322

Opinions expressed are those of the author, not of the institution.

-----Original Message-----
[] On Behalf Of Richard
Sent: 04 February 2007 18:26
Subject: RE: st: wish for logit output

At 01:04 PM 2/4/2007, Newson, Roger B wrote:
>The way to get the exponentiated constant coefficient with -logit- is
>define explicitly the X-variable of ones corresponding to the
>and then to include this variable explicitly in the model, using the
>-noconst- option. As in:
>sysuse auto, clear
>gene byte baseline=1
>logit foreign baseline trunk, or noconst
>This will display the baseline odds of non-US origin for cars with zero
>trunk space, as well as the odds ratio of non-US origin per cubic foot
>of trunk space. This trick is equally useful for defining confidence
>intervals for geometric means and their ratios. See Newson (2003),
>can also be purchased together with 32 other useful Stata tips in
>Newton and Cox (2006).

Nice tip.  That does zap the LR Chi Square and Pseudo R^2 stats.  To 
get everything, you could run the command twice, once with the 
nonconst option and once without it.

Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX:    (574)288-4373
HOME:   (574)289-5227
EMAIL:  Richard.A.Williams.5@ND.Edu
WWW (personal):
WWW (department): 

*   For searches and help try:

*   For searches and help try:

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