Programming the statistical procedures from SAS

How can I access parameter estimates and t-values in SAS in output file

Reply
New User
Posts: 1

How can I access parameter estimates and t-values in SAS in output file

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?

Super User
Posts: 23,683

Re: How can I access parameter estimates and t-values in SAS in output file

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?


 

Ask a Question
Discussion stats
  • 1 reply
  • 113 views
  • 0 likes
  • 2 in conversation