4
$\begingroup$

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?

$\endgroup$
4
  • $\begingroup$ My first guess is that the parametrization of the Weibull r.v. (or, equivalently, of the Exponential r.v., since you've fixed the shape parameter to be equal to one) in SAS is different from what you think it is: support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/… $\endgroup$
    – boscovich
    Apr 29, 2012 at 8:14
  • $\begingroup$ In particular, in SAS the Hazard Function of an Exponential r.v. is $h_0(t)=1/\lambda$. In epidemiology/biostatistics it is more common to utilize a different parametrization, which results in $h_0(t)=\lambda$ instead. $\endgroup$
    – boscovich
    Apr 29, 2012 at 8:27
  • $\begingroup$ @andrea That makes perfect sense, and would also explain why that number isn't bounded at 1 like I was expecting it to be. If you'd like to repackage your comment as an answer, I'll accept it. $\endgroup$
    – Fomite
    Apr 29, 2012 at 18:54
  • $\begingroup$ Done. I know certain details I pointed out are obvious to you, but I added them just for completeness. $\endgroup$
    – boscovich
    Apr 29, 2012 at 20:54

1 Answer 1

5
$\begingroup$

In SAS, the Exponential r.v. (a Weibull r.v. with shape parameter fixed to $1$) is parametrized such that the pdf is: $$f(t)=\frac{1}{\lambda}\exp(-\frac{1}{\lambda}t),$$ which results in a hazard function $h_0(t)=1/\lambda$. This parametrization is the opposite of the more "classical" parametrization of the Exponential r.v. in epidemiology and biostatistics (at least according to my experience), which has the following pdf: $$f(t)={\lambda}\exp(-{\lambda}t)$$ and the hazard function $h_0(t)=\lambda$.

With the "SAS parametrization", increasing the value of $\lambda$ means decreasing the hazard ($h_0(t)$) and, consequently, obtaining longer survival times.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.