Skip to content
Prev 369 / 585 Next

Simulating a Weibull regression model

If you use

time<-exp(b0+b1*x1+b2*x2-c*error) # or
time<-rexp(n, rate=1/exp(b0+b1*x1+b2*x2)) # or
time<-rweibull(n, shape=c, scale=exp(b0+b1*x1+b2*x2))

then you could model using

survreg(Surv(time, status==1) ~ x1+x2,dist="exponential") # or
survreg(Surv(time, status==1) ~ x1+x2,dist="weibull")

-- Mark