BookmarkSubscribeRSS Feed
andresmorago
Calcite | Level 5

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 ;
 
 

Jb80U

1 REPLY 1
Reeza
Super User

Couple of ways:

  1. Run both in the same proc
  2. Store the input data set name when appending the files
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 ;
 
 

Jb80U


 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 329 views
  • 0 likes
  • 2 in conversation