BookmarkSubscribeRSS Feed
starz4ever2007
Quartz | Level 8

subj            drug                week              q1

1                 a                       16                  0

2                 b                        5                  0

3                 a                        4                  0

4                 c                       16                  1

5                 a                        3                  0

6                 e                       16                  .

 

I would like to do a kaplan meier analysis (median time to responding?) on this data set where i want to find how long does it take subjects to reach q1=0 by each drug type. Note: I do have missing q1 (not sure what to do with those either)...

 

I was thinking this is the code, but I am not sure:

proc lifetest data=mine (where=(q1=1 or q1=0)) method=km plots=survival;

strata drug;

time week*q1(0);

run;

4 REPLIES 4
rayIII
SAS Employee

Hi, Starz.

 

I think your code has 0 as the censored value when you really want it as your event value since you are estimating time to transition from 1 to 0. 

 

https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_lifetest_se...

 

For the observation with the missing value, does the missing value indicate that you don't know its status (0 vs. 1) at 16 weeks? I'm wondering if it is really a censored observation (i.e., a 1) in disguise. If you really don't know its status at 16 weeks, can you find out its status at 15 weeks, etc.? Methods like KM allow you to use as much information as you have about each observation, even if they dropped out before the study period ended, and therefore save you from discarding observations unnecessarily.


Ray

 

 

(edited to fix a typo)

starz4ever2007
Quartz | Level 8

so to ask a question to your question....how are missing values assessed in this type of analyis? is a missing value treated the same way as a not censored value. I do know for a fact that if at Week 16 the value was ., then there is no way that at Week 15 or any week prior would be "1" (as you describle as the correct censored value). But there is a possiblility that at Week 15 or any week prior that the subject can be a "0".

rayIII
SAS Employee

Hi. 

 

Proc Lifetest excludes any observations with missing time or event status variables. (There is an option to include missing strata values but that doesn't seem to be an issue for you.)

 

In a typical (let's say 'basic') survival study, all subjects start with status=nonevent. Some transition to status=event during the observation period. The rest are censored (event may have occurred but you don't know when).

 

If a subject with a missing value at  week 16 could not have had a 1 at any time prior, doesn't that mean they start the study already experiencing the event? 

 

Or are there multiple states in your study (event and more than one type of nonevent)? 

 

Sorry if I'm confused. 

starz4ever2007
Quartz | Level 8

Hi, Thank you for the response.

 

So I want to see when (how quickly) the subject clears (q1=1) a symptom (q1). So my subjects start at q1=0, in which they are experiencing the symptom. And somwhere throughout the 16 weeks they will reach q1=1 (clear) or they will not (either because week 16 is missing (dropout or symptom occurence wasn't collected) or they still have q1=0 (still have symptom) by Week 16).

 

So my censored value is (1)?

 

Hopefully that explanation makes a bit more sense...

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 4 replies
  • 2105 views
  • 3 likes
  • 2 in conversation