Hello all,
This is probably very simple for someone used to use SAS. But i am interested in making a simple "survival curve" on my data.
My dataset is containing information about prescriptions filled in a 6 months period. I have two groups i want to illustrate in the same plot. The first group in persons who did not fill a prescription in the first 10 weeks and the other group in persons who did fill a prescription.
data have;
input person_id week_of_use group
datalines;
1 3 1
1 3 1
1 7 1
2 11 2
3 8 1
3 12 1
4 23 2
5 2 1
6 13 2
6 14 2
6 20 2
6 23 2
;
I hope, you can help me
https://support.sas.com/documentation/onlinedoc/stat/151/kaplan.pdf
Examples in this chapter start with the simple and continue to the complex.
For survival analysis you need your data in the form of:
ID Duration Censor
How does that work for your data if all participants are available throughout the study? What is the time component that causes people to drop off?
Please explain your data and the graph you're trying to create.
@lone0708 wrote:
@WarrenKuhfeld,
Thanks for your reply.
The problem for me is, that i do not understand the coding of status in my particular case, as all participants are contributing in all of the study period
Why does one group start at a fixed number and drop off and one starts at nothing and grows?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.