I have a continuous variable to which I want to fit a Weibull distribution. The variable is right censored. My objective is to estimate the shape and scale parameters. Because I’m failing with my data, I created a hypothetical example:
set obs 5000
generate x = rweibull(6.183, 12.23)
generate xCensor = 0
replace xCensor = 1 if runiform() < 0.01
stset x, failure(xCensor)
streg x, distribution(weibull)
_t | Haz. Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x | .0069157 .0043201 -7.96 0.000 .0020329 .0235266
_cons | 9.62e-39 1.00e-37 -8.41 0.000 1.34e-47 6.93e-30
-------------+----------------------------------------------------------------
/ln_p | 4.054029 .1238296 32.74 0.000 3.811327 4.29673
-------------+----------------------------------------------------------------
p | 57.62916 7.136195 45.2104 73.4592
1/p | .0173523 .0021487 .013613 .0221188
------------------------------------------------------------------------------
The estimated shape parameter 4.054 differs considerably from 6.183. In addition, the estimated scale parameter, exp(0.0069157) = 1.
I’d appreciate assistance in understanding what I’m clearly doing incorrectly to estimate the 6.183 and 12.23.
Related Posts with Estimating shape and scale parameters of Weibull distribution, with right censoring
Creating new variable from old variable for each unit in panel data settingHi: I have a dataset that looks like this: Code: * Example generated by -dataex-. For more info, …
Error opening Excel after using merge option on -putexcel- commandI'm trying to use the -putexcel- command to create tables with a header at the top. I found the -tab…
option 3aster not allowedHi I was trying to run this regression but i am getting this error "option 3aster not allowed", i in…
Convert a dataset from wide to longHello, I have a dataset (survey longitudinal data) with several variables that I want to convert fr…
Creating new variable for each id from old variable in panel data settingHi: I have a dataset that looks like this: Code: * Example generated by -dataex-. For more info, …
Subscribe to:
Post Comments (Atom)
0 Response to Estimating shape and scale parameters of Weibull distribution, with right censoring
Post a Comment