Based on this guide to simulating survival times in SAS and R, I used the following code to generate two survival functions:
data simulation; call streaminit(321); beta_death = 0.9163; *Simulated ln(HR) of ~ln(2.5); lambda_death = 0.002; *Baseline hazard of death; beta_discharge = 0.4055; *Simulated ln(HR) of ~ln(1.5); lambda_discharge = 0.001; *Baseline hazard of discharge; do i = 1 to 100; x = rand('BERN', 0.10); *10% exposure rate; linpred_death = exp(-beta_death*x); linpred_dis = exp(-beta_discharge*x); t_death = rand('Weibull', 1, lambda_death* linpred_death); *Time to death; t_dis = rand('Weibull', 1, lambda_discharge* linpred_dis); *Time to discharge; output; end; run;
The weird part is when I look at the generated survival times - they're quite small. And when I increase what's being called the baseline hazard, the survival times get longer. That doesn't make sense to be - decreasing the baseline hazard should, I feel, increase the survival times, should it not? What am I missing?