- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks the lsmeans alpha solution worked!