| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Re: Fixing an -ml model- syntax problem
At 12:55 PM 2/20/2007, Sergiy Radyakin wrote:
. ml model lf gplogit (union = age black grade south) (delta: black,nocons)
. ml maximize
Number of obs = 26200
Wald chi2(4) = 1073.40
Log likelihood = -13267.224 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
union | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
eq1 |
age | .0119869 .0023941 5.01 0.000 .0072945 .0166793
black | .8475739 .0615269 13.78 0.000 .7269834 .9681643
grade | .07586 .0069451 10.92 0.000 .0622479 .0894721
south | -.9233356 .0435432 -21.21 0.000 -1.008679 -.8379924
_cons | -2.52238 .1121859 -22.48 000 -2.742261 -2.3025
-------------+----------------------------------------------------------------
delta |
black | -.0198168 .0680003 -0.29 0.771 -.1530949 .1134614
------------------------------------------------------------------------------
Here is how to get the same results in -oglm-. (oglm stands for
Ordinal Generalized Linear Models, but such models may be better know
by such names as location/scale models or heterogeneous choice
models. oglm was inspired by SPSS's PLUM routine but has some
Stata-ish features that PLUM does not.)
. webuse union
(NLS Women 14-24 in 1968)
. oglm union age black grade south, het(black)
Heteroskedastic Ordered Logistic Regression Number of obs = 26200
LR chi2(5) = 1194.01
Prob > chi2 = 0.0000
Log likelihood = -13267.224 Pseudo R2 = 0.0431
------------------------------------------------------------------------------
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
union |
age | .0119869 .0023941 5.01 0.000 .0072945 .0166793
black | .8475699 .0615274 13.78 0.000 .7269783 .9681614
grade | .0758602 .0069451 10.92 0.000 .0622481 .0894723
south | -.9233374 .0435432 -21.21 0.000 -1.008681 -.8379942
-------------+----------------------------------------------------------------
lnsigma |
black | .0200207 .0693753 0.29 0.773 -.1159524 .1559938
-------------+----------------------------------------------------------------
/cut1 | 2.522383 .112186 22.48 0.000 2.302502 2.742263
------------------------------------------------------------------------------
. * Simple algebra converts log of sigma into Allison's delta
. scalar lnsigma = [lnsigma]_b[black]
. display "Allison's delta = " (1 - exp(lnsigma))/ exp(lnsigma)
Allison's delta = -.01982162
. * This reproduces the Wald test from Allison's procedure
. test [union]
( 1) [union]age = 0
( 2) [union]black = 0
( 3) [union]grade = 0
( 4) [union]south = 0
chi2( 4) = 1073.40
Prob > chi2 = 0.0000
oglm has assorted advantages over Allison's code. Among other
things, it is not limited to a single dichotomous variable in the
heteroskedasticity equation, it works with ordinal as well as
dichotomous dependent variables, it allows link functions besides
logit, and it lets you take advantage of various advanced Stata
features, e.g. prefix commands like svy and nestreg.
-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
*
* 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/