On Mon, 20 Oct 2003 10:09:43 +0200 Antonio Rodrigues Andres
<[email protected]> wrote:
>
> 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?
See -help blogit- and -help glogit- for built-in commands that most
likely accomplish what you want
Stephen
----------------------
Professor Stephen P. Jenkins <[email protected]>
Institute for Social and Economic Research (ISER)
University of Essex, Colchester, CO4 3SQ, UK
Tel: +44 (0)1206 873374. Fax: +44 (0)1206 873151.
http://www.iser.essex.ac.uk
*
* 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/