I've conducted a multivariable logistic regression to assess the impact of various characteristics (demographics, region, disease) on the continuous outcome- days spent in hospital. I'm interested in looking at the Q1 and Q3 quartile information of the adjusted estimate for each of the cohorts I'm looking at. What is the best way to do that?
I can't seem to find how to add that within the ls means statement
proc logistic data= data;
class gender race education cancer heart_failure cohort
model days= cohort gender age race cancer heart_failure education;
lsmeans cohort;
run;
I think you are going to have to export a dataset with all of the predicted values for each observation, and then post-process that dataset (probably with PROC MEANS or SUMMARY) to get the quantile estimates. I suppose my question on this approach would be: why not do that with the raw data?
The other possibility is to use an option on the LSMEANS statement, with ALPHA=0.25 and CL. That should give the 25th percentile as the lower bound and the 75th percentile as the upper bound. From there you can post-process as needed.
SteveDenham
I think you are going to have to export a dataset with all of the predicted values for each observation, and then post-process that dataset (probably with PROC MEANS or SUMMARY) to get the quantile estimates. I suppose my question on this approach would be: why not do that with the raw data?
The other possibility is to use an option on the LSMEANS statement, with ALPHA=0.25 and CL. That should give the 25th percentile as the lower bound and the 75th percentile as the upper bound. From there you can post-process as needed.
SteveDenham
Thanks the lsmeans alpha solution worked!
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.