BookmarkSubscribeRSS Feed
Mike13
Calcite | Level 5

Consider the following regression:

 

Proc surveyreg data = DataAA; cluster Customer;
   Model X = Y1 Y2 / ADJRSQ;
   ods output ParameterEstimates=ParmEst; run;

 

The output for the regression is:

 

Parameter       Estimate             StdErr        tValue

Intercept       0.02560560      0.00092415     27.71

Y1                 0.67594259      0.01029547     65.65

Y2                 0.11135813       0.01836023       6.07

 

I would like to create separate variables for each parameter and tvalue and adjrsq for this regression, but I cannot figure out how to do this. When I check the SAS Guide, I can find lots of information about how to create an output file, but not how to access the data in the output file. Eventually, I want to run annual regressions and merge the output file with the original data set so that each observation in a year will show the parameter estimates, t-values and adjrsq for that year. 

 

When I access the output file, I am able to get the mean value for the three estimates, three t-values, but no adj R2. What must I do to get the value of each parameter estimate, t-value, and adjR2?

1 REPLY 1
Reeza
Super User

R-Squared is likely in a different ODS table. Find the correct table name (in the docs) and use a similar method that you’re currently using for the parameter estimates. 

 


@Mike13 wrote:

Consider the following regression:

 

Proc surveyreg data = DataAA; cluster Customer;
   Model X = Y1 Y2 / ADJRSQ;
   ods output ParameterEstimates=ParmEst; run;

 

The output for the regression is:

 

Parameter       Estimate             StdErr        tValue

Intercept       0.02560560      0.00092415     27.71

Y1                 0.67594259      0.01029547     65.65

Y2                 0.11135813       0.01836023       6.07

 

I would like to create separate variables for each parameter and tvalue and adjrsq for this regression, but I cannot figure out how to do this. When I check the SAS Guide, I can find lots of information about how to create an output file, but not how to access the data in the output file. Eventually, I want to run annual regressions and merge the output file with the original data set so that each observation in a year will show the parameter estimates, t-values and adjrsq for that year. 

 

When I access the output file, I am able to get the mean value for the three estimates, three t-values, but no adj R2. What must I do to get the value of each parameter estimate, t-value, and adjR2?


 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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