DATA Step, Macro, Functions and more

Intck vs. Yrdif

Reply
N/A
Posts: 1

Intck vs. Yrdif

Can you tell me why the Intck function and the Yrdif function will produce two different values when the input dates are the same? I am trying to calculate time at age of entry for patients, and if I use the Intck funciton I am getting some differences than when I use the Yrdif function. Thanks!
Valued Guide
Posts: 2,174

Re: Intck vs. Yrdif

age is an interestingly challenging assumption
(who knows how many ways there are to calculate age? ;-)
-- what would you like ?
- remember years have differing numbers of days
- decide when those born on a 29th Feb should celebrate their 18th and 21st birthdays

age nearest?
age next birthday?
number of days old is probably the only reliable calculation

so again, how would you like to calculate age - what are your rules?

peterC

P.S.
yrdif() is deprecated for age calculations, see SAS USAGE NOTE:
36977 - Using the YRDIF function to calculate age can give incorrect results
at http://support.sas.com/kb/36/977.html
Ask a Question
Discussion stats
  • 1 reply
  • 280 views
  • 0 likes
  • 2 in conversation