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
Difference-in- model and data structureDear all, I have a question about the difference-in-difference (DID) model and its data structure. M…
Replace with value from another observation?Hi Statalist! I am so please to be on board this great list that I have often used with great pleas…
Generating age variable in pannel datasetHello Everyone! I was wondering if you could assist me in generating an age variable in a panel dat…
Generating advanced variable in Stata (panel data)Hi all, I am working with a panel data set (Orbis by Bureau van Dijk) containing information on mill…
Variable selection in survival analysesHi All, I have clinical trial data, and my goal is to build a predictive model. In logistic analyse…
Subscribe to:
Post Comments (Atom)
0 Response to Estimating shape and scale parameters of Weibull distribution, with right censoring
Post a Comment