- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 09-19-2020 03:25 PM
(750 views)
Hi,
I would like to make a Kaplan-Meier curve using Proc lifetest.
I have a time variable, which was calculated from the interval between two dates. Currently, the unit is in days. How do I covert the the days iinto months so that I can plot the graph with 1-12 months on the X-axis?
Thank you!
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Suppose you know the initial date or maybe is part of the data you can calculate the 12
dates by next code:
/* date1 is the initial date */
do m = 1 to 12;
date = intnx('month',date1,m);
putlog m= date= date9.;
end;
Having a sample of your data and posting the wanted output, it will enable to give you more
precise code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Simply associate the format MONTH3. with your time (days) variable.
PG