BookmarkSubscribeRSS Feed
cwc9
Calcite | Level 5

I am running a median regression and a few of my independent variables such as severity of stroke is categorized into 5 categories. When I run proc quantreg, I do not get medians, IQR, number of observations for each separate subgroup(severity of stroke as none/minor/moder....). I would like to report this as there are missing values in my data set due to its retrospective nature, so I need to get information specific to the model. The question I am trying to answer is looking at a measure of stroke severity at discharge and how that depends on admission severity of stroke and other variables like age and so on. I am wondering how to get this data. My current code is below. Btw this is my first time using SAS 9.4.

 

proc quantreg data=filtereddata ci=resampling;
class corticalinvolvement sex alcohol age_cat admission_nihss_score;
model last_nihss_score = age_cat sex alcohol prophylaxis admission_nihss_score infarctsize corticalinvolvement / quantile = .5;
estimate 'Diff in Medians' sex 1 -1 / CL;
run;

 

Thank you for any insight!

1 REPLY 1
Rick_SAS
SAS Super FREQ

It's not clear to me whether you want the univariate statistics (median, IQR,...) or whether you are asking for the dependent variable of the quantile regression.

 

If you want the univariate statistics, use PROC UNIVARIATE. You can use the BY statement if you want information for subgroups.

 

For the quantile regression, you can get a predicted (conditional) median for each value of the explanatory variables. Similarly, you can look at the 25th and 75th predicted quantiles to get a conditional IQR for each value of the explanatory variables. The value of the median and IQR depend on the value for the explanatory variables.

 

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 1 reply
  • 481 views
  • 0 likes
  • 2 in conversation