Assume that my dependent variable is Pj (proportion of crimes in
region i and time t). I want to estimate a grouped data logistic model
as follows
log (Pj/1-Pj) =X1* alpha_i +X2**Bj + epsilon
In STATA you type
gen ratio= Pj/1-pj
gen lratio=log(ratio)
regress lratio stats race
Next step
you need fitted probabilities
gen lp =constant + coefficient estimated* X1 + coefficient *x2 % this
may be generated using the command predict in the above regression
gen elp =exp(lp)
gen fp= elp/1+elp
and then you can correct by heteroskedasticity using weigthed least
squares
taking as weights the inverse of the variances
regress lratio stats race [aw=weights]
Is that correct?
I would appreciate your help
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/