## Interaction between dummy variables

For econometric discussions not necessarily related to EViews.

Moderators: EViews Gareth, EViews Moderator

Rubayat Sarwar
Posts: 5
Joined: Wed Oct 27, 2021 7:19 pm

### Interaction between dummy variables

Hello,
I used below regression formula with Binary probit method to find out interaction:
y c contribution @expand(x2,@dropfirst) @expand(x3,@dropfirst) @expand(x2,x3,@dropfirst)

X2= female, male,
X3= democratic, republican
X4= challenger, incumbent, open.
y= winning probability (binary dependent)

But the result of the regression comes out with multicollinearity. Std err, P value all become NA. It shows below:
Failure to improve likelihood (singular hessian) after 7 iterations
Coefficient covariance computed using observed Hessian
WARNING: Singular covariance - coefficients are not unique

I need to find interaction result along with keeping the variables separately in the regression. It means main effect and interaction effect both. Would you help me please?

startz
Non-normality and collinearity are NOT problems!
Posts: 3719
Joined: Wed Sep 17, 2008 2:25 pm

### Re: Interaction between dummy variables

There are a number of possibilities. One is that you need to try different starting values. As a useful diagnostic you might try running the same equation by least squares and see what happens.

Rubayat Sarwar
Posts: 5
Joined: Wed Oct 27, 2021 7:19 pm

### Re: Interaction between dummy variables

But least square shows 'near singular matrix'. I have found result when I did below:
y c contribution @expand(x2,@dropfirst) @expand(x3,@dropfirst)
or
y c contribution @expand(x2,x3,@dropfirst)

But when I tried y c contribution @expand(x2,@dropfirst) @expand(x3,@dropfirst) @expand(x2,x3,@dropfirst), it showed multicollinearity. I need to know - doesn't EViews show main effect and interaction effect together in case of dummy variables?

startz
Non-normality and collinearity are NOT problems!
Posts: 3719
Joined: Wed Sep 17, 2008 2:25 pm

### Re: Interaction between dummy variables

This means you really do have perfect multicollinearity. You might want to post your EViews workfile (including the command you used) to see if anyone can spot what's going on.

Rubayat Sarwar
Posts: 5
Joined: Wed Oct 27, 2021 7:19 pm

### Re: Interaction between dummy variables

Workfile is here.

I tried with different different options of commands, but got the error as I mentioned below. Please have a look:

y_it c log_contribution @expand(x2,@dropfirst) @expand(x3,@dropfirst) @expand(x2,x3,@dropfirst) .
with LS, I found: near singular matrix
with Binary probit, I found: multicollinearity

y_it c log_contribution @expand(x2,@dropfirst) @expand(x3,@dropfirst) @expand(x2*x3, @dropfirst)
Both with LS and Binary probit, I found Numeric operator applied to string data in "X2*X3".

y_it c log_contribution gender party gender*party
Both with LS and Binary probit, I found: No index provided for group

y_it c log_contribution gender party ineraction1
with LS, I found: near singular matrix
with Binary probit, I found:Objective function evaluates to NA for one or more observations
Attachments
data_rubayat_22.10.21.wf1

startz
Non-normality and collinearity are NOT problems!
Posts: 3719
Joined: Wed Sep 17, 2008 2:25 pm

### Re: Interaction between dummy variables

I think I know what's going on.

X2 is male or female and X3 is democrat or republican. So there are four possibilities. @expand(x2,x3,@dropfirst) plus a constant covers all four. The non-interacted dummies really are redundant. Hence, the perfect multicollinearity.

Rubayat Sarwar
Posts: 5
Joined: Wed Oct 27, 2021 7:19 pm

### Re: Interaction between dummy variables

But, if I do not put non-interacted dummies in the regression, I won't get the main effect of the variables. Please let me know -doesn't EViews show main effect and interaction effect together in case of dummy variables?

startz
Non-normality and collinearity are NOT problems!
Posts: 3719
Joined: Wed Sep 17, 2008 2:25 pm

### Re: Interaction between dummy variables

This has nothing to do with EViews.

I'm not sure what you mean by main effect, separately from the interacted terms.

Rubayat Sarwar
Posts: 5
Joined: Wed Oct 27, 2021 7:19 pm

### Re: Interaction between dummy variables

Yes, main effect is separate from the interacted terms. Thanks for your time and effort.

startz
Non-normality and collinearity are NOT problems!
Posts: 3719
Joined: Wed Sep 17, 2008 2:25 pm

### Re: Interaction between dummy variables

If I understand your data, there are four cells. The interacted coefficients cover all four. There is nothing further to estimate. EViews is notifying you of a mistake.