Programming the statistical procedures from SAS

PROC PANEL: How to include an interaction term into a fixed effect model?

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

PROC PANEL: How to include an interaction term into a fixed effect model?

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
Respected Advisor
Posts: 2,655

Re: PROC PANEL: How to include an interaction term into a fixed effect model?

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

View solution in original post


All Replies
Solution
‎07-29-2014 09:08 AM
Respected Advisor
Posts: 2,655

Re: PROC PANEL: How to include an interaction term into a fixed effect model?

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

New Contributor
Posts: 2

Re: PROC PANEL: How to include an interaction term into a fixed effect model?

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?

Respected Advisor
Posts: 2,655

Re: PROC PANEL: How to include an interaction term into a fixed effect model?

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

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 937 views
  • 0 likes
  • 2 in conversation