turn on suggestions

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
- /
- General Programming
- /
- how to control interaction of class variables in G...

Topic Options

- 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

05-22-2014 09:31 AM

Hi,

I am using GLM regression with two class variable A & B. I do want A * B, but not in a explode way. For example, A has 4 elements, and B has 3 elements, I do not want final 4 * 3 = 12 parameters, I want 4 parameters for A and 3 parameters for B, and these 4 parameters times these 3 paramters are my 12 paramters for estimation. In other way, I do not care the correlation between A and B. Thanks.

Jian

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

05-22-2014 09:47 AM

I'm confused. On the one hand, it sounds like you are saying you want the A*B interaction but then it sounds to me like you say you don't want it. If you include the A*B interaction in the model, it will have 12 parameters, some of which cannot be estimated, resulting in (4-1)*(3-1)=6 degrees of freedom (assuming you also include the main effects in the model)

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

05-22-2014 12:12 PM

This comes under the heading of wild a** guess, or possibly entertaining. Add a dummy variable to the data which always has the value of 1 and use

A*dummy B*dummy

I have no evidence this will work but should prevent 12 parameters.

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

05-22-2014 01:02 PM

When you say "*I do not care the correlation between A and B*", do you mean that you do not care if the effect of B is not the same on every level of A? Or equivalently, if the effect of A is not the same on every level of B? If you do not care or if you want to assume that the effect of A is independent from the effect of B, i.e. that the effect of A and B is simply the sum of the effect of A and the effect of B, then you don't need the interaction effect in your model. [model y = A B;]

If, on the other hand, you don't care about the individual effects of A and B but only care for their combined effect, then you don't need the main effects in your model [model y = A*B;].

But if you can't assume independence (of A and B) or do care about main effects (of A or B), then you need to test the full model [model y = A B A*B;] first.

PG

PG