PROC PHREG data=XXX covs(aggregate);
CLASS [all categorical variables]
MODEL (exact age, exact age at hysterectomy)*cancer_event(0)=exposure v1 v2 v3 v4 v5;
ID [observation identifier];
HAZARDRATIO exposure / UNITS=10;
RUN;
Based on this model, I am trying to calculate person-time. When I run this model, I am able to see the the number of events in the 'Summary of the Number of Event and Censored Values' table, but I am not quite sure about how to identify which observations were considered to be events.
I think that if I was able to identify which observations are events that I would be able to calculate person time with a DATA step to subset the data and create a person-time variable before running PROC MEANS to sum all the observations for person-time. Any ideas about how to best calculate person time based on this model would be greatly appreciate.
I think that if you add an OUTPUT statement you will see that the number of Cancer_event (censoring variable) values = 1 may match the number of events and 0 the number censored in the output set.
At least it is easy to test. Add
output out=work.somedatasetname;
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.