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

st: grouped data logistic model


From   "Antonio Rodrigues Andres" <[email protected]>
To   <[email protected]>
Subject   st: grouped data logistic model
Date   Mon, 20 Oct 2003 11:53:24 +0200

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/



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