BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
EveningstarRick
Calcite | Level 5

I have two proc reg statements below. SAS prints the adjrsq sse and aic information, but can these fit statistics be outputted to another data-set and then printed and sorted according to their values?  Also, I do not see the regression coefficients in my printed output when I used these statements.  How do you force SAS to show you the regression coefficients?

 

Can someone help me with the necessary coding?  

 

proc reg data=lime;
model LRE62 = EC SOM Alext ExchAlp CEC pH
/selection=adjrsq sse aic;

 

proc reg data=lime;
model LRE60 = EC SOM Alext ExchAlp CEC pH
/selection=adjrsq sse aic;

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

First thing to realize is that Proc Reg will allow multiple Model statements.

Second the OUTEST option creates a data set containing estimates for each model and the fit statistics you have requested. You will want to read the documentation for details of the structure of the data set.

So you could reduce your code to:

 

proc reg data=lime outest=myestimates;
First: model LRE62 = EC SOM Alext ExchAlp CEC pH
    /selection=adjrsq sse aic;
Second: model LRE60 = EC SOM Alext ExchAlp CEC pH
   /selection=adjrsq sse aic;
run; 
quit;

The text with the : before the Model statement is a Label. The output will have this word to identify which model the output pertains to and in the output data set to indicate which model the parameter and fit statistics are for. Likely I would use the name of the dependent variable if that varies in your models but used something else to show any short word should work.

 

View solution in original post

1 REPLY 1
ballardw
Super User

First thing to realize is that Proc Reg will allow multiple Model statements.

Second the OUTEST option creates a data set containing estimates for each model and the fit statistics you have requested. You will want to read the documentation for details of the structure of the data set.

So you could reduce your code to:

 

proc reg data=lime outest=myestimates;
First: model LRE62 = EC SOM Alext ExchAlp CEC pH
    /selection=adjrsq sse aic;
Second: model LRE60 = EC SOM Alext ExchAlp CEC pH
   /selection=adjrsq sse aic;
run; 
quit;

The text with the : before the Model statement is a Label. The output will have this word to identify which model the output pertains to and in the output data set to indicate which model the parameter and fit statistics are for. Likely I would use the name of the dependent variable if that varies in your models but used something else to show any short word should work.

 

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