Samiul Hasan wrote:
Hi
I have estimated a hazard function using a kernel based method. Now i have
to generate a random variate that follows this hazard function. Does any one
know method I should use to generate the variate.
Thanks
Samiul
As far as I remember, the relation that you need is that if Lambda is
the _integrated_ intensity function for a random variable X, then
Lambda(X) has a unit exponential distribution. So the strategy is to
figure out how to calculate and invert Lambda, then use invLambda(rexp(N)).
--
O__ ---- Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalga...@biostat.ku.dk) FAX: (+45) 35327907
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.