Statalist The Stata Listserver

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

Re: st: Fixing an -ml model- syntax problem

From   Richard Williams <>
Subject   Re: st: Fixing an -ml model- syntax problem
Date   Tue, 20 Feb 2007 13:04:55 -0500

At 12:10 PM 2/20/2007, Clive Nicholas wrote:
For fun, I thought I'd test out an old piece of Stata code I found in Allison (1999: 203-4) that fires up a logit model which takes into account unequal residual variation across groups. I'm sure it's just a minor thing, but I'm having problems running his Stata 6 routine, which utilizes -ml- code:

webuse union, clear
program define gplogit
version 6
args lnf theta delta
qui replace `lnf' =
ml model lf gplogit (union = age black grade south) ///
(delta: black,nocons)
ml maximize
You've split your code across lines; just because the journal typesetters can do that doesn't mean you can. It ought to be

qui replace `lnf' = $ML_y1*`theta'*(1+`delta') - ln(1+exp(`theta'*(1+`delta')))

As a sidelight, Allison's models can easily be estimated with -oglm-, available from SSC. For detailed discussion with code, see

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:

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