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
- /
- Analytics
- /
- Stat Procs
- /
- PROC PANEL: How to include an interaction term int...

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

07-29-2014 07:33 AM

Hi,

I have a balanced panel data set for t=2. I want to estimate a fixed effects model in the following way:

Y= β(0) + β(1)*x + β(2)*z + β(3)*(x*z) + μ + ε

I don't know how to include an interaction term in the PROC PANEL procedure. Hence, I thought about manually calculating a variable w=x*y and including it in the model. However, considering that a fixed effects model uses deviations of the individual specific means for each variable, this seems to be wrong.

Does anybody know how this has to be done?

Any help would be greatly appreciated!

Accepted Solutions

Solution

07-29-2014
09:08 AM

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

07-29-2014 09:08 AM

If x and z are CLASS variables, you should be able to specify the model using GLM-like syntax. I suspect however that they are continuous variables. In that case, the interaction variable can be constructed as (x{i} - xbar) * (z{i} - zbar), where xbar and zbar are the means of the two values. May need scaling but not sure.

Steve Denham

All Replies

Solution

07-29-2014
09:08 AM

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

07-29-2014 09:08 AM

If x and z are CLASS variables, you should be able to specify the model using GLM-like syntax. I suspect however that they are continuous variables. In that case, the interaction variable can be constructed as (x{i} - xbar) * (z{i} - zbar), where xbar and zbar are the means of the two values. May need scaling but not sure.

Steve Denham

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

07-30-2014 01:28 PM

Thanks for your answer. Since t=2, I decided to use a first difference model which is equivalent to a fixed effects model an easier to implement in SAS, since I can implement the interactions directly in GLM.

What do you mean by "may need scaling"? I want to mean-center x and z and again I am wondering whether I have to mean-center the first-difference of x and z (d_x & d_z) or the actual variables x and z?

And another question: why does PROC PANEL let me include t as a variable? If I include the difference of t in the first difference model, then d_t=1 for each observation and therefore exlcuded from the model. What does PROC PANEL do differently here?

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

07-31-2014 07:30 AM

I would stick with mean-centering the variables, rather than first differences, but that is just a gut feeling. If everything is equally spaced with no missing values, the only way I see it coming out differently is if the first or last variable are extreme. That is just a 50:50 thought though.

The last question is certainly beyond my scope--the guys in the Econometrics and Forecasting forum may have an answer. Calling on and - any help on this one?

Steve Denham