Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Programming question?


From   "Antonio Rodrigues Andres" <[email protected]>
To   <[email protected]>
Subject   st: Programming question?
Date   Wed, 22 Oct 2003 14:00:13 +0200

I run this regression for grouped data logistic regression models where
zvars is a set of individual dummies

glogit ntcrimes pop cl income1 pyoung pforeign unempl den $zvars

I try to replicate the analysis step by step

lpe =log (ntcrimes/pop/(1-ntcrimes/pop))

regress lpe income1 cl pyoung pforeign unempl den $zvars
predict flpe %get predicted values
gen eflpe= exp(flpe)
gen fpflpe=eflpe/(1+eflpe) /logits


gen v=1/((ntcrimes*fpflpe)*(1-fpflpe)) /variance
gen wt=1/v /weights are inversely proportional to variances
regress lpe cl income1 pyoung pforeign unempl den $zvars [aweight =
wt]


I got different results, somebody knows why?

Regards 

Antonio
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index