[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
rgutierrez@stata.com (Roberto G. Gutierrez, StataCorp.) |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Estimation of standard error in Weibull distribution |

Date |
Fri, 28 Feb 2003 17:25:44 -0600 |

Clint Thompson <cthompson@dfpm.utah.edu> asks: > I'm using STATA v8 and when I use the 'predict' command for the > median and the standard error of the Weibull distribution the > same value is returned. The code that precedes the 'predict' > command is pasted below: > stset time > streg, dist(weibull) > nlcom (theta:exp([ln_p]_b[_cons])) (beta:exp(-b[_cons])) > For predict, I used the following code: > predict med > predict stdp As Rich Goldstein <richgold@ix.netcom.com> has pointed out, you have an error in your use of the -predict- syntax. In any case, even if you typed . predict stdp, stdp you would not get the standard error of the predicted median. This will instead give you the standard error of the linear predictor which, in this case, is not equal to the predicted median. To get the standard error of this "nonlinear" prediction, you need -predictnl-. Also, since you are only interested in the predicted median time, the reparamterization using -nlcom- is not necessary -- you can work with -streg-'s original parameterization. The following will give you what you need. . stset time . streg, dist(weibull) . predictnl med = predict(time median) in 1, se(med_se) . list med med_se in 1 which will store the predicted median in the first observation of -med-, and its standard error in the first observation of -med_se-. You can safely ignore the "prediction is constant over observations..." warning from -predictnl-, since in your case you have no covariates and you would thus not expect the prediction to vary over the data. For this reason, for speed I also restrict the calculation to take place only in the first observation -- the predicted median would be same over all observations. --Bobby rgutierrez@stata.com * * 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/

- Prev by Date:
**st: formulas for svyheckman and svyheckprob** - Next by Date:
**re: st: easy histogram** - Previous by thread:
**Re: st: Estimation of standard error in Weibull distribution** - Next by thread:
**st: formulas for svyheckman and svyheckprob** - Index(es):

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