Dear all,
I want to simulate data (time to failure) from a
Weibull distribution:
p.d.f. :
f(t)=lamda*gamma*t^(gamma-1)*exp(-lamda*t^gamma)
(scale = lamda, shape=gamma)
I have downloaded the "rnd" package (through "findit")
and using the "rndwei" command I get the following
puzzling (at least for me) results:
. drop _all
. rndwei 10000 1.5 0.0078
( Generating . )
Variable xw created.
. gen ev=1
. stset xw ev
failure event: ev ~= 0 & ev ~= .
obs. time interval: (0, xw]
exit on or before: failure
. streg ,dist(wei) nohr nolog
failure _d: ev
analysis time _t: xw
--------------------------
_cons | -7.35076
p | 1.513405
--------------------------
1.513405 very close to 1.5
but
. di exp(-7.35076)
.0006421
and
. di exp(-7.35076/1.513405)
.00777299
If I use the AFT form in streg, the exponentiated
coefficient of the constant gives the correct result.
I think this has to do with the parametrization used
in "rndwei" but the help for this command is very
limited. Do you think that rndwei is using some
parametrization like lamda=(lamda')^gamma or am I
missing something? I think that I have seen this
parametrization among sociologists texts but my
background is biostatistical (I was trying to
replicate some examples from D. Collet's survival
book)
I would appreciate any other ideas for a Weibull
simulation or even better a Weibull with frailties
simulation.
Thanks in advance for any comments.
Nikos Pantazis
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.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/