Hello everybody,
I hope my question is appropriate. I read other discussions on this matter here and the guide from prof. Williams on interaction of discrete-by-continuous variables but I am still struggling at making sense of my results.
I am running a very simple pooled OLS regression from artificial data. I am regressing Y = the total fraction of infected individuals in the population at the end of the simulation (frac_infected) on X = the frequency of vaccine inoculation in the population (inoc_frequency) and Z = the removal speed of infected (measured in days from start of the simulation) from the population.
As expected, the individual effect of X and Z on Y is negative and strongly significant. However, the joint effect is positive and significant. I truly struggle in understanding how is this possible. A draw of the
I am running the following commands:
The margins returns the following figure: https://ibb.co/FzSxT56
I fail to understand the positive interaction term also in light of the contour plot of the relationship between X, Y, Z:
The picture of the level curve plotting is enclose at the following link: https://ibb.co/kQG1Ww2
Thank you for having read up to here
I hope my question is appropriate. I read other discussions on this matter here and the guide from prof. Williams on interaction of discrete-by-continuous variables but I am still struggling at making sense of my results.
I am running a very simple pooled OLS regression from artificial data. I am regressing Y = the total fraction of infected individuals in the population at the end of the simulation (frac_infected) on X = the frequency of vaccine inoculation in the population (inoc_frequency) and Z = the removal speed of infected (measured in days from start of the simulation) from the population.
As expected, the individual effect of X and Z on Y is negative and strongly significant. However, the joint effect is positive and significant. I truly struggle in understanding how is this possible. A draw of the
I am running the following commands:
Code:
reg frac_infected rem_speed inoc_frequency c.rem_speed##c.inoc_frequency, robust margins, at(rem_speed=(0(0.5)10) r_inoc_frequency=(0(0.05)1)) vce(unconditional) saving(predictions, replace) marginsplot
Code:
Linear regression Number of obs = 121
F(3, 117) = 46.25
Prob > F = 0.0000
R-squared = 0.6617
Root MSE = .12903
-----------------------------------------------------------------------------------------
| Robust
frac_infected | Coefficient std. err. t P>|t| [95% conf. interval]
------------------------+----------------------------------------------------------------
rem_speed | -.0714626 .0073392 -9.74 0.000 -.0859976 -.0569276
inoc_frequency | -.7095715 .1104472 -6.42 0.000 -.9283063 -.4908367
rem_speed | 0 (omitted)
inoc_frequency | 0 (omitted)
|
c.rem_speed#c.inoc_frequency | .0822156 .0137412 5.98 0.000 .0550018 .1094293
|
_cons | .6270409 .0574339 10.92 0.000 .5132962 .7407857
-----------------------------------------------------------------------------------------
The margins returns the following figure: https://ibb.co/FzSxT56
I fail to understand the positive interaction term also in light of the contour plot of the relationship between X, Y, Z:
Code:
twoway contour frac_infected inoc_frequency rem_speed
Thank you for having read up to here

Comment