Solved
Contributor
Posts: 30

# Help with Proc Surveyreg and Interaction terms

Hi Everyone,

I am using proc surveyreg on an unbalanced panel data. Here is my model:

Y = X1 + X2 + X3 + C + X1*X2 + X1*X3 + X2*X3 + X1*X2*X3 (no intercept)

where.

X1 and X2 are dummy variables

X3 is Continous Variable

C are Control Variables

If I create percentile based on X3 (Low. medium, & high), and I want to find the interaction between X1, X2, & X3, how would I do that? More specifically, do I still include the continous variable X3 and then have dummy variables for percentile values, such LowX3, MedX3, and HighX3? What about the interaction term?

The rock

Accepted Solutions
Solution
‎02-10-2016 03:40 PM
SAS Super FREQ
Posts: 93

## Re: Help with Proc Surveyreg and Interaction terms

The one  i mentioned would allow different X3 slopes for different X3 percentile values. Which one is better? I would start with the model you proposed and add additional complexity such as the terms included in the model i mentioned to see if they add any significant value in terms of goodness-of-fit or validation using a holdout data. Typically, however, the simplier the model, the better.

Cheers

All Replies
SAS Super FREQ
Posts: 93

## Re: Help with Proc Surveyreg and Interaction terms

I think you should include X3 in addition to the percentile dummies. You can test X3 to see if it is significant after inlcuding the percentile dummies. Also interations are possible predictors to be considered if data shows different slop of X3 for each percentile value.

Contributor
Posts: 30

## Re: Help with Proc Surveyreg and Interaction terms

So how would you actually model it?

Thanks!

SAS Super FREQ
Posts: 93

## Re: Help with Proc Surveyreg and Interaction terms

you would need 2 dummy variables for the percenticle values: LowX3 and MedX3 (or whichever 2 you pick). X3 with high percentile values can be represented by setting LowX3 = MedX3 = 0.

original model

X1 + X2 + X3 + C + X1*X2 + X1*X3 + X2*X3 + X1*X2*X3

New model

X1 + X2 + X3 + C + X1*X2 + X1*X3 + X2*X3 + X1*X2*X3

+ LowX3 + MedX3

+ X1*LowX3*X3 + X1*MedX3*X3 + X2*LowX3*X3 + X2*MedX3*X3

+ X1*X2*X3*LowX3 + X1*X2*X3*MedX3

Contributor
Posts: 30

## Re: Help with Proc Surveyreg and Interaction terms

Thanks for quick reply. A question:

What would the difference be between the one you mentioned and this one:

New model

X1 + X2 + X3 + C + X1*X2 + LowX3 + MedX3

+ X1*LowX3 + X1*MedX3 + X2*LowX3 + X2*MedX3

+ X1*X2*LowX3 + X1*X2*MedX3

Which one is better?

Thanks so much!

Solution
‎02-10-2016 03:40 PM
SAS Super FREQ
Posts: 93

## Re: Help with Proc Surveyreg and Interaction terms

The one  i mentioned would allow different X3 slopes for different X3 percentile values. Which one is better? I would start with the model you proposed and add additional complexity such as the terms included in the model i mentioned to see if they add any significant value in terms of goodness-of-fit or validation using a holdout data. Typically, however, the simplier the model, the better.

Cheers

☑ This topic is solved.