BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi folks,
Does anyone know whether I can use phreg or lifereg or lifetest to model following survival analysis data structure?

ID DUR DEAD AGE ...
1 1 0 15
1 2 0 16
1 3 1 17
2 1 0 22
2 2 0 23
2 3 0 24
2 4 0 25
3 1 0 33
3 2 0 34
3 3 0 35
3 4 1 36

Dead:1 is dead, 0 is alive, used as status variable.
DUR is survival time.

Normally I just use the last row of each ID(see below), and use data step inside PHREG to add time-dependent variable (Age in this case). Now I hope to model this data structure directly, but couldn't figure out how. Thank you so much if anyone could help !!!

ID DUR DEAD AGE ...
1 3 1 17
2 4 0 25
3 4 1 36

Thanks,
Shelia
4 REPLIES 4
Doc_Duke
Rhodochrosite | Level 12
This looks like a straightforward PHREG analysis. You may need to restructure your data to use age at onset as a covariate, but it is not time dependent.

I don't generally use the other two procedures (It's an age thing, I learned the Cox model before the other two SAS Procedures were available, way back in V 5.....).

BTW, DR Cox gave a great talk about the Student's t (William Gosset) and the relationships between Gosset, Fisher, and Pearson at the International Biometrics Society Conference in Dublin (home of Gosset's employer, Guiness). I'm afraid that we won't have too many more opportunities to hear some of these stories from first-hand observers. We added a plaque to him the Guiness Storehouse; look for it at your next visit.

Doc Muhlbaier
Duke
deleted_user
Not applicable
Hi Doc,
Thanks a lot for your help !!

I understand what you said of using last record of each person, and treat AGE as time independent. However, AGE is just one of the time-dependent variables in my dataset. I have over hundred of variables in my dataset, lots of them are time-dependent.

My data structure is one row for one person at each time point(see below). That's why I'm asking whether PHREG have a way to model this data structure directly, so that I don't need to restructure and aggregate my dataset into only one row for one person regardless of time points.

Thank you so much for your reply ! Hope you can help me with this question !!

Thanks a lot !
Shelia

ID DUR DEAD AGE ...
1 1 0 15
1 2 0 16
1 3 1 17

2 1 0 22
2 2 0 23
2 3 0 24
2 4 0 25

3 1 0 33
3 2 0 34
3 3 0 35
3 4 1 36
Doc_Duke
Rhodochrosite | Level 12
Shelia,

I can't help you much further, I haven't done time-dependent covariates in a long time. One possibility is to look at Paul Allison's book on survival analysis (mine is out right now, or I'd look); he has good advice for solving problems; if you don't have one available locally, you can get it from the SAS bookstore.

Also, I will repeat, Age is NOT a time-dependent covariate. Age is a linear function of the age at time 0 and the difference from time 0 to time k. If you model it as time-dependent, you will have an over specified model and the results might be unreliable.

Doc
deleted_user
Not applicable
Hi Doc,
Thank you very much !

I have Paul's book, he used only one summary row for one person. He also embedded data steps inside Phreg to utilize the time-dependent predictors.

According to him, the computation efficiency is very low with this structure, since I have millions of rows and hundreds of variables... That's why I hope to change data structure if I could.

Thanks anyway ! I appreciate your kind help !
Shelia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

Discussion stats
  • 4 replies
  • 1514 views
  • 0 likes
  • 2 in conversation