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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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