BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
chinna0369
Pyrite | Level 9

Hi, 

 

I am trying to get stratified and unstratified P-values and Hazard ratios. can anyone help me to identify the difference between stratified and unstratified proc lifetest code and proc phreg code in sas? 

 

Thank you in advance!

 

Adithya

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
unstratified is what you had before - ie no STRATA statement.

View solution in original post

7 REPLIES 7
Reeza
Super User

Both have STRATA statements to specify the STRATA specifically, which would allow you to easily see if the analysis was stratified or no. 

 

Is there something else you're looking for?

 


@chinna0369 wrote:

Hi, 

 

I am trying to get stratified and unstratified P-values and Hazard ratios. can anyone help me to identify the difference between stratified and unstratified proc lifetest code and proc phreg code in sas? 

 

Thank you in advance!

 

Adithya


 

chinna0369
Pyrite | Level 9

Hi Reeza, 

 

Thank you for your reply!

 

below code I am using,

 

** P-value;
ods trace on;
ods output LogUniChiSq=pval;

proc lifetest data=adtte outsurv=surv alpha=0.05;
time aval * cnsr(1);
test trtpn;
run;

ods trace off;
ods output close;

 

From the output of above code, how can I recognize the values is from stratified or unstratified? 

 

Thanks,

Reeza
Super User
You don't have a STRATA statement so you have no stratification.
Reeza
Super User

This assumes you're referring to the statistical concept of stratification which is analyzing data by strata/groups creating separate models that use the same terms. If you're not using that definition, which I'm starting to suspect then the answer will differ. Please clarify.

 

 

chinna0369
Pyrite | Level 9

Hi Reeza, 

 

I understand now and I have updated my code as below:

 

ods output HomTests=pval;

proc lifetest data=adtte outsurv=surv alpha=0.05;
time aval * cnsr(1);
strata ACCRES/group= trtpn;
run;

 

and now I am getting statified P-values based on Two-sided stratified Log-Rank test based on the stratification of ACCRES. 

 

Now how can I get p-value based on Two-sided unstratified Log-Rank test? by using above code?

 

Thank you in advance! 

 

Adithya

Reeza
Super User
unstratified is what you had before - ie no STRATA statement.
chinna0369
Pyrite | Level 9
Thank you so much!

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 3936 views
  • 0 likes
  • 2 in conversation