BookmarkSubscribeRSS Feed
JWH1
Calcite | Level 5

Hi,

I have a dataset of pensioners that is left-truncated and right-censored. I would like to compare (for males vs females) the estimated probability of surviving to e.g. age 70  conditioned on surviving to age 65. I also have a variable indicating last known annual pension amount that I'd like to use to adjust for socioeconomic status. The dataset includes pensioners alive as of 1/1/2010 and mortality was assessed during the period 2010-2016. 

 

data p;

  input BirthYr PensionYr DeathYr Pension_amt Gender Age2010 Dead;

  datalines;

 

1921 1948 2014 84400 0 89 1
1927 1950 2014 80000 1 83 1
1962 1984 2016 54700 1 48 0
1951 1986 2016 76500 1 59 0
1923 1957 2016 14700 1 87 1
1940 1960 2016 25200 1 70 1
1939 1965 2011 51500 0 71 1
1947 1974 2011 10000 1 63 1
1944 1979 2010 79000 0 66 1
1918 1947 2010 36100 1 92 1

 

Would appreciate any suggestions..

3 REPLIES 3
mkeintz
PROC Star

Look up SAS examples for PROC LIFETEST.  I believe it will  nicely provide the hazards you are asking for.

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
JWH1
Calcite | Level 5
thank you...I don't believe I can use PROC LIFETEST for left-truncated data.
mkeintz
PROC Star

Am I correct in assuming that "conditioned on surviving to age 65" is what you mean by left-censored?

 

If so then "the estimated probability of surviving to e.g. age 70  conditioned on surviving to age 65" is, iirc, is the very definition of the 5-year hazard rate (or actually 1 minus the 5-year hazard rate) for 65 to 70 period, which I'm guessing can be produced by LIFETEST.  And even if LIFETEST doesn't produce something literally called hazard-rate, isn't what you want equivalent to the probability of surviving to 70 divided by the probability of surviving to 65?  Those values would certainly be generated by LIFETEST, no?

 

It's been a long time since I was exposed to survival analysis, so I admit to being a bit insecure about these statements.

 

 

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 336 views
  • 0 likes
  • 2 in conversation