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
Rhodochrosite | Level 12

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
Rhodochrosite | Level 12

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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1260 views
  • 0 likes
  • 2 in conversation