Samiul Hasan
2009-Oct-24 00:05 UTC
[R] Generate random variate from a non-parametric hazard function
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 -- View this message in context: http://www.nabble.com/Generate-random-variate-from-a-non-parametric-hazard-function-tp26034880p26034880.html Sent from the R help mailing list archive at Nabble.com.
Peter Dalgaard
2009-Oct-24 11:38 UTC
[R] Generate random variate from a non-parametric hazard function
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 > SamiulAs 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.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
Seemingly Similar Threads
- Non-linear regression with latent variable
- non parametric estimates of the hazard with right censored data
- parametric proportional hazard regression
- proportional hazard with parametric baseline function: can it be estimated in R
- Simulating from "matrix variate normal distribution"