BookmarkSubscribeRSS Feed
rajredy7172012
Calcite | Level 5

Hi:

I'm looking to get KM stats for 25th percentile, median & 75th percentile, but can't understand what's the issue. I have 2 treatment groups instead of 3. 1 group with missing data. Below is the data and the program.

rajredy7172012_0-1653496799349.png

Program:

ods output Quartiles=quartiles;
proc lifetest data=adtte1 method=KM alpha=0.05 conftype=loglog;
where trtpn ^= 2;
time AVAL*CNSR(1);
strata trtpn/notest;
run;
10 REPLIES 10
Reeza
Super User
What is the issue? What's happening that is unexpected?
rajredy7172012
Calcite | Level 5

Issue is I don't get the stats for each treatment group. Each treatment group has 2 records.

Reeza
Super User
The data shown is all your input data? 2 records per each group and you want to calculate quartiles off this data?
rajredy7172012
Calcite | Level 5

Yes, that's right. The data is in a developing stage, but keeping my program ready. Just want to make sure the syntax is right.

Reeza
Super User

Your syntax is correct, but you cannot calculate quartiles off 2 data points per group. 

Reeza
Super User
The documentation has fake data you can use to ensure you code will report the correct stats, assuming you have data that supports the analysis.
ballardw
Super User

Are you sure that where Trtpn ^= 2 leaves three treatment groups in the data? From that output it looks like the WHERE statement removed the level 2 values.

 

 

rajredy7172012
Calcite | Level 5

Yes, for trtpn=2 i removed the values since they don't have any records.

ballardw
Super User

@rajredy7172012 wrote:

Yes, for trtpn=2 i removed the values since they don't have any records.


So if you have 3 levels of the variable trtpn and you remove one why would you expect any data in the output for it? And missing records means that you only had two levels to begin with. So really, where is the expectation of getting output for non-existent values?

OsoGris
SAS Employee
Your syntax looks OK to me but with only 2 observations per strata I'm not very surprised you are not getting the Quartiles to be computed. For this to happen the survival curve has to drop below the points of S(t) = .75, .50 and .25 for the first, second and third quartiles respectively.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 10 replies
  • 1431 views
  • 1 like
  • 4 in conversation