BookmarkSubscribeRSS Feed
lmyers2
Obsidian | Level 7

Hello,

 

I'm using SAS 9.4 full edition. I am trying to do a median regression analysis. I pasted the base code below but it's not working. I also pasted the error messages below. 

 

proc quantreg ci=resampling;

class VARIABLE1 (param=ref ref='CONTROL');

model COST=VARIABLE1 VARIABLE2 VARIABLE3 / quantile=0.25 0.5 0.75; 

run;

ERROR 22-322: Syntax error, expecting one of the following: a name, ;, -, /, :, _ALL_,
_CHARACTER_, _CHAR_, _NUMERIC_.
ERROR 76-322: Syntax error, statement will be ignored.

 

Thanks very much in advance for the help!

Best

Laura

3 REPLIES 3
WarrenKuhfeld
Ammonite | Level 13

http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_qreg_syntax0...

 

Different procedures have different CLASS statements due to historical evolution.  You are specifying options that do not exist in quantreg.  I provide a link to the syntax.

lmyers2
Obsidian | Level 7

Thanks - the manual doesn't mention how to program the reference group though using class statement in proc quantreg.  Would someone mind posting sample code?  

 

Best

Laura

WarrenKuhfeld
Ammonite | Level 13

You can't.  You can change the level in a data step.  Prepend a 'Z' or something to the level you want to be the last level so it sorts last.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 3 replies
  • 1716 views
  • 0 likes
  • 2 in conversation