I am dealing with huge datasets for which I have to estimate
percentile exposure time within two to three subsets. I noticed
something that happened there and tried duplicating it with a stata
example dataset [webuse beetle] and I noticed it again. Attached
below is the do file modified for beetle dataset.
/* Stata/IC 10.0 for Macintosh */
/* Do file to assess LD10-90 for beetle.dta */
/* Obtain beetle from webuse beetle */
use ~/desktop/beetle.dta
gen p=r/n
forvalues i=1/3 {
glm p ldose if beetle==`i', f(b)
forvalues j=0.1(0.1)0.9 {
local k=`j'*100
display as text "LD `k' = " as result (log(`j'/(1-`j'))-_b[_cons])/_b
[ldose]
}
}
A part of the result for beetle.dta looks like this...