I have estimate the grouped data logistic model using the command
glogit
glogit ntcrimes pop lincome pyoung pforeign unempl
Now I want to replicate the analysis doing it step by step
1. Step OLS regression
log(p/1-p) = constant + xit + error
regress lp lincome pyoung pforeign unempl
2. Get predicted values
predict flp
3. Generate logits exp(predicted value)/1+ exp(predicted values)
gen eflp= exp(flp)
gen fpflp=eflp/(1+eflp)
4. Get estimated variances
gen v=1/ ((ntcrimes*flpe)*(1-flpe))
5. weights
gen wt= 1/v
regress lpe lincome pyoung pforeign unempl [aw=wt]
It appears the message no observations
Someone could help me
*
* 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/