data survData; lambdat = 0.02; *baseline hazard; lambdac = 0.04; *censoring hazard; do i = 1 to 100; t = RANEXP(12345)/lambdat; * time of event; c = RANEXP(67890)/lambdac; * time of censoring; time = min(t, c); * which happens first?; censored = (c < t); * censored when the censoring hapapened before event; output; end; drop i lambda:; run; proc freq data=SurvData; tables censored ; run; proc univariate data=survData; histogram T C; run; Above is the sample code that I have and below are a few questions. This is the same code & questions from earlier, but now they are copy and pasted instead of images. simulate a survival data with the following specifications: Event time T follows an exponential distribution with a mean of 40 Censoring time Tc follows an exponential distribution with a mean of 25 Generate 500 observations, with censoring flag indicating whether censoring happened before events.
... View more