Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- How to get regression results out?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-21-2008 04:21 PM

I am now running regression using proc reg function. My data set is a panel dataset. It contains 16 years data and for each year, it has thousands of observations. What I want to do is to run regression by each year first and after I get all the regression results out (16 groups of coefficients), I need to get the average of all the coefficients and R-squares. Now by the following statement, I am able to get the average of all the coefficients, but I am not able to get the average of R-squares. Is it possible to get averaged R-squares? Could anyone help me with it? Thanks very much.

ods listing close;

ods output parameterestimates=pe;

proc reg data=dset;

by year;

model depvar = indvars; run;

quit;

ods listing;

proc means data=pe mean std t probt;

var estimate; class variable;

run; Message was edited by: GingerLee

ods listing close;

ods output parameterestimates=pe;

proc reg data=dset;

by year;

model depvar = indvars; run;

quit;

ods listing;

proc means data=pe mean std t probt;

var estimate; class variable;

run; Message was edited by: GingerLee

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-23-2008 03:35 AM

Hi.

You should create a second dataset containing R-squares.

[pre]

ods output parameterestimates=pe fitStatistics=fs ;

[/pre]

And then process it in the same way as you did with the coefficients.

Regards.

Olivier

You should create a second dataset containing R-squares.

[pre]

ods output parameterestimates=pe fitStatistics=fs ;

[/pre]

And then process it in the same way as you did with the coefficients.

Regards.

Olivier

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-23-2008 12:42 PM

Thanks very much, Olivier. I followed what you told me and got the results.

Best,

gingerLee

Best,

gingerLee