Hi
Im running 2 different regressions from the same dataset. I would like to name them differently to prevent confusion. How can i assign the label name?
proc reg data = main outest = main_regression1; model x= a b c; run ;
proc reg data = main outest = main_regression2; model x= a b d; run ;
data regression_summary ; set main_regression1 main_regression2 ; run ;
Couple of ways:
ods select parameterEstimates = regEst;
proc reg data = main outest = main_regression1;
model1: model x= a b c;
model2: model x = a b d;
run ; quit;
data regression_summary ;
length source input_dsn $50.;
set main_regression1 main_regression2 INDSNAME=source ;
input_dsn = source;
run ;
@andresmorago wrote:
Hi
Im running 2 different regressions from the same dataset. I would like to name them differently to prevent confusion. How can i assign the label name?
proc reg data = main outest = main_regression1; model x= a b c; run ;proc reg data = main outest = main_regression2; model x= a b d; run ;data regression_summary ; set main_regression1 main_regression2 ; run ;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.