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
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
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,
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.
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
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.