# interaction effects

#### Sanna Utke

##### New Member
Dear forum,
I'm working on a paper with a logistic regression (logistics in Stata). One reviewer wants me to include an interaction term between two variables, which sounds reasonable. One of the variables is a categorical variable (1-4) with only very few values (2) in one of the categories the other is a binary variable. STATA runs into problems and omits it in the model and I can only show the margins when I use the following command, margins, dydx(VAR1) at(VAR2=(1(1)3)) thus practically only showing category 1-3 and not 4. Is there any convention how to report this in a journal or am I running into any fundamental problems I'm not thinking about at the moment?
I'd really appreciate your feedback! Thanks!

#### hlsmith

##### Not a robit
Can you post two tables, stratified by the binary predator, so we can see how sparse these data are.

#### Sanna Utke

##### New Member
I'm not sure what you mean, but does this help?

. tab VAR2 VAR1

| VAR2
VAR1| 1 2 3 4 | Total
-----------+--------------------------------------------+----------
0.00 | 73 2 13 2 | 90
1.00 | 283 17 54 3 | 357
-----------+--------------------------------------------+----------
Total | 356 19 67 5 | 447

#### hlsmith

##### Not a robit
Close, i am looking for zeros, etc. So split that table one more time by the outcome. You may have to do exact or penalize logistic reg to get it to work. Your SE will appropriately get wide.

#### Sanna Utke

##### New Member
This would be the tab with the DV and VAR2
| VAR 2
DV| 1 2 3 4 | Total
-----------+--------------------------------------------+----------
0 | 368 11 44 6 | 429
1 | 74 12 41 1 | 128
-----------+--------------------------------------------+----------
Total | 442 23 85 7 | 557

#### Sanna Utke

##### New Member
And here DV and VAR1:

| VAR1
DV| 0 1 | Total
-----------+----------------------+----------
0 | 73 273 | 346
1 | 17 84 | 101
-----------+----------------------+----------
Total | 90 357 | 447

I thought exact log reg was only for smaller dataset, so I'm not sure this will solve my problem with the interaction effect and the problems STATA seems to have with VAR 1 and its fourth category.