Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Standard Errors of predicted logit transformation


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Standard Errors of predicted logit transformation
Date   Thu, 29 Oct 2009 23:54:57 -0700 (PDT)

--- On Fri, 30/10/09, Robert White wrote:
> I estimated an OLS regression where the dependent variable
> is a logit transformation of a proportion.
> How do I calculate the standard errors of the predicted
> proportion? That is, not the standard error of the
> predicted logit, but the standard error of the predicted
> proportion (the transformation of the predicted logit).

The problem with using OLS in this case is that the 
transformation of the predicted logit is not the predicted 
proportion. That is because the logit transformation is a 
non-linear transformation. Remember that predicted values
are in essence conditional means, and that transforming a
variable computing the mean and backtransforming that 
variable in the original metric will not result in the same
value as computing the mean on the original variable.
You can see that in the example below:

*-------------------- begin example --------------------
use http://fmwww.bc.edu/repec/bocode/c/citybudget.dta, clear
gen transformed = logit(governing)
sum transformed
di invlogit(r(mean))
sum governing
*-------------------- end example ----------------------
( For more on how to use examples I sent to statalist see:
http://www.maartenbuis.nl/stata/exampleFAQ.html )

Fortunately, there are other options open to you. You can
use -betafit- (downloadable from SSC by typing in Stata:
-ssc install betafit-.) or you can use -glm- with the
-link(logit) robust- options to fit a fractional logit.
After either of these, you can use -predictnl- in the
way shown below to get the predicted probabilities 
together with their confidence intervals and standard
errors.

*----------------------- begin example ----------------------
use http://fmwww.bc.edu/repec/bocode/c/citybudget.dta, clear
betafit governing , mu(minorityleft noleft )
predictnl prhat = invlogit(xb()), ci(lb ub)
*------------------------ end example -----------------------
( For more on how to use examples I sent to statalist see:
http://www.maartenbuis.nl/stata/exampleFAQ.html )

Hope this helps,
Maarten Buis

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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