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;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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