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
Help with nested loops in regression and interaction termsHi, I am trying to create a nested loop to run a series of interactions in a regression command, an …
Multicollinearity in simple diference-in-differences modelHi All, I have a simple 2-period panel data and I am trying to run a difference-in-differences model…
Creation of New Variable from Long VariableHello Everyone, I am currently working on a "long" variable of 9 digits and want to make a new vari…
Using detring to remove special charactersHi all, I'm trying to remove special characters from a string variable. I have two variables. One c…
Linear Regression or Panel RegressionHello I just read a paper and would like to try to replicate it. However, I don't exactly understan…
Subscribe to:
Post Comments (Atom)
0 Response to Estimating shape and scale parameters of Weibull distribution, with right censoring
Post a Comment