BookmarkSubscribeRSS Feed
Alberto90
Calcite | Level 5

Dear All,

 

I am running a quantile regression and I would love to have in the output SAS the tests I am performing.

I am using this code:

 

proc quantreg data=datain.Input ci=none outest=Dataout.Output ;
by segment;
model Y= Variable1 Variable2
/ quantile=0.90
covB CorrB;
test Variable1 Variable2/ wald lr ;
run;

 

In this way, in the table I see only the coefficients of the regression.

If I use this other code below, I can  see only the tests.

 

ods output Tests=Dataout.Output

proc quantreg data=datain.Input ci=none  ;
by segment;
model Y= Variable1 Variable2
/ quantile=0.90
covB CorrB;
test Variable1 Variable2/ wald lr ;
run;

 

How can I have in the same table the likelihood ratio and the coefficients of the regression?

 

Thank you so much. I really appreciate your help.

1 REPLY 1
Rick_SAS
SAS Super FREQ

In general, your request is handled in SAS by creating two data tables and then merging the results. So use

 

ods output Tests=OutTests;

proc quantreg data=datain.Input ci=none outest=OutCoeff ;
by segment;

...

run;


data Dataout.Output;
merge OutCoeff OutTests;
by segment;
run;

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
  • 1 reply
  • 1182 views
  • 0 likes
  • 2 in conversation