BookmarkSubscribeRSS Feed
Ammonite | Level 13

## Kaplan Meier survival curves by age groups crossed

Hi Folks:

I'm conducting survival analyses and agecat: one of categorical variables crossed on the KM survival curves. Does it invalidate the assumption of proportional hazard and stop me for a Cox proportional HM? two other categorical variables: sex and comorb (1,0) don't have this issue.

Thank you for your time and help.

``````proc sort data=pti4;
by sex agecat comorb; run;
proc phreg data=pti4;
class sex1(ref='1') agecat(ref='2') comorb(ref='0')/param=ref order=internal;
model duration*vital_status(0)= sex1 agecat comorb/ties=Efron;
run;``````
6 REPLIES 6
Super User

## Re: Kaplan Meier survival curves by age groups crossed

It does invalidate the assumption, but your 90+ group being much smaller is causing the issue. Can you treat age as continuous instead?

Ammonite | Level 13

## Re: Kaplan Meier survival curves by age groups crossed

the age variable is categorical to begin with such as: 0, 10s, 20s, 30s, 40s, 50s, 60s, 70s, 80s, 90s and 10s. I have no events until 30s and very few events in some age groups. See attached. In the snippet, how agecat is created from 10-year age group.

``````if age1=. then agecat=.;
if age1 in (0,1,2) then agecat=1; else
if age1 in (3,4) then agecat=2; else
if age1 in (5,6) then agecat=3; else
if age1 in (7,8) then agecat=4;
if age1 in (9,10) then agecat=5; ``````

Super User

## Re: Kaplan Meier survival curves by age groups crossed

It seems like that's an arbitrary decision then. In that case I'd like recommend using 80+ instead of 90+ and I suspect that will help. Depending on what you're measuring the other usual suggestion is to make it a time dependent covariate, which sort of makes sense for age since it does not stay the same over time anyways.

Ammonite | Level 13

## Re: Kaplan Meier survival curves by age groups crossed

how do you make age a time dependent variable? my date variable in the data is 'date' by day unit, so: age(10-year group)*date as an interaction? or use the agecat*date?
Bear with me please, if my wild guess doesn't make sense 🙂
Super User

## Re: Kaplan Meier survival curves by age groups crossed

https://documentation.sas.com/?docsetId=statug&docsetVersion=15.1&docsetTarget=statug_phreg_examples...

@Cruise wrote:
how do you make age a time dependent variable? my date variable in the data is 'date' by day unit, so: age(10-year group)*date as an interaction? or use the agecat*date?
Bear with me please, if my wild guess doesn't make sense 🙂

Ammonite | Level 13

## Re: Kaplan Meier survival curves by age groups crossed

Regrouping age as below solved the crossing in the age-groups in KM curves.

``````if age1=. then agec=.;
if age1 in (0,1,2) then agec=1; else
if age1 in (3,4) then agec=2; else
if age1 in (5,6) then agec=3; else
if age1 in (7,8,9,10) then agec=4; ``````

Discussion stats
• 6 replies
• 801 views
• 0 likes
• 2 in conversation