The following code gives me the estimated survival function for just the events, How can I get the baseline survival for both events and censored observation.
I need the estimated baseline survival'
proc phreg data=ph;
model zz*status(0)=x1/RL TIES=EFRON;
baseline out=survs survival=s;
run;
I think both censored and event have the same baseline estimates based on the cox model.
The baseline function just happens to give estimates at event times, rather than censored times.
You can specify the timelist option if you want the estimate for specific time intervals instead of event times.
Check the documentation on how to specify the time list for baseline.
I wish to have the survival probability of both censored and events as Stata does
I'm fairly certain that the baseline should be the same for censored and uncensored.
Can you provide sample stata code that you want converted or preferably a link to their documentation that show how it is calculated.
I just read the stata document, ignore my previous statement
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.