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

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Testing the difference in residuals across groups

- 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
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-05-2010 12:11 PM

Hello,

Is there an efficient way or an existing procedure within SAS to test whether the average residuals from an OLS model are the same between two subgroups of the estimation sample? Note that for a variaty of reasons, including indicators for subgroups in the model is not an option.

I have found an user generated macro, which however uses PROC IML, and I do not have that as part of my SAS installation. If I have to code the test from cratch, is there an alternative to PROC IML to get the matrix cross products (for the s.e. estimate of the difference in the residuals)?

Any thoughts or suggestions would be appreciated.

Thanks

Is there an efficient way or an existing procedure within SAS to test whether the average residuals from an OLS model are the same between two subgroups of the estimation sample? Note that for a variaty of reasons, including indicators for subgroups in the model is not an option.

I have found an user generated macro, which however uses PROC IML, and I do not have that as part of my SAS installation. If I have to code the test from cratch, is there an alternative to PROC IML to get the matrix cross products (for the s.e. estimate of the difference in the residuals)?

Any thoughts or suggestions would be appreciated.

Thanks

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

Posted in reply to deleted_user

02-05-2010 06:34 PM

You are not clear about what it is that you want to compare - residual mean values or the variance of the residuals. You state that you want to test whether the "average residuals" are the same for subgroups of the sample. That sounds like a comparison of residual mean values.

Of course, residual mean value differences across subgroups is just differences in mean values across subgroups. And a test for mean differences is obtained when you include the group variable in a CLASS statement as well as on the right hand side of a model statement. But it sounds like you don't want to do that. Why?

Or am I misinterpreting your question? Do you want to examine differences in residual variance across groups?

Of course, residual mean value differences across subgroups is just differences in mean values across subgroups. And a test for mean differences is obtained when you include the group variable in a CLASS statement as well as on the right hand side of a model statement. But it sounds like you don't want to do that. Why?

Or am I misinterpreting your question? Do you want to examine differences in residual variance across groups?

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

Posted in reply to deleted_user

02-05-2010 06:58 PM

Dale,

I want to compare the residual means, not variances. The reason I do not want to include the group variable in the CLASS statement and also in the model is because the means in residuals comparison needs to be made for many smaller sub-sets of the data and the model is too complex to be estimated over these smaller sub-sets.

Thanks

I want to compare the residual means, not variances. The reason I do not want to include the group variable in the CLASS statement and also in the model is because the means in residuals comparison needs to be made for many smaller sub-sets of the data and the model is too complex to be estimated over these smaller sub-sets.

Thanks