Is this AGE1 that you are talking about? 16071 is probably the SAS equivalent of January 1 of some year.
Sorry this is getting to be such a long question.
This age1 will give me a date and I am not sure this is what I wanted to do.
Creating a date for when each ID turned one does not help because I might not have that date in the visit_ages for some IDS.
Since we don't always have a visit for 1 year of age. Each ID has different ages, unfortunately. So if I am calculating age1 as the date for when each ID turns 1 what will happen for the IDS for which I don't have that date ?
Also my array is using variables VISIT_AGE not _VISIT_DATE.
I do have visit dates (but I might not have that 1 year old date) and I am using age variables so wouldn't it be better - and more importantly - is there a way for me to specify the following in the array ?
The visit_ages are anywhere from 0.1 to 5.0 So the 25 visits can have a big range covered (unfortunately).
The ages are NOT the same for the visits. So Visit1_age could be 0.1 for one ID and 5.0 for another. That is my issue with this data set.
Since you have visit date, you could easily calculate:
age_in_days = visit_date - dob;
That would be the age in days. Is it important to you to determine whether a birthday has passed, so 365 days is not long enough because there might be a leap year?
Besides that, it looks like many of the remaining questions are logic ... what should happen rather than how to say it in SAS. But I would be happy to examine questions where the logic is decided but how to say it in SAS is problematic.
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.