Hi all,
I have a question related to a regression that I am currently running.
I am doing a research on business practices during the covid pandemic. I have a dummy variable (X1) for the covid period (2020 + 2021 = 1; 2018 + 2019 = 0).
Covid is my independent variable. I already found significant results for the main regression, meaning that my dependent variable (Y) is significantly higher during covid.
Now I considered doing an additional analysis, where I want to regard a third variable (X2), which is also a dummy variable.
X2 also has a significant influence on Y. What I want do is to examine if the influence from X2 on Y is higher during covid. In two t-tests, it seems like that.
But is there a another good way to compare the moderating influence of X2 on Y during covid = 0 and covid = 1?
Below you can see the results of both t-tests. I expect the diff. in the first test (-.0071798) to be significantly different from the second one (-.0104994).
Thanks in advance!
I have a question related to a regression that I am currently running.
I am doing a research on business practices during the covid pandemic. I have a dummy variable (X1) for the covid period (2020 + 2021 = 1; 2018 + 2019 = 0).
Covid is my independent variable. I already found significant results for the main regression, meaning that my dependent variable (Y) is significantly higher during covid.
Now I considered doing an additional analysis, where I want to regard a third variable (X2), which is also a dummy variable.
X2 also has a significant influence on Y. What I want do is to examine if the influence from X2 on Y is higher during covid. In two t-tests, it seems like that.
But is there a another good way to compare the moderating influence of X2 on Y during covid = 0 and covid = 1?
Below you can see the results of both t-tests. I expect the diff. in the first test (-.0071798) to be significantly different from the second one (-.0104994).
Code:
ttest Y if X2 == 1, by(covid) Two-sample t test with equal variances ------------------------------------------------------------------------------ Group | Obs Mean Std. err. Std. dev. [95% conf. interval] ---------+-------------------------------------------------------------------- 0 | 1,678 .0624532 .0017159 .0702872 .0590878 .0658186 1 | 1,678 .069633 .0017752 .0727183 .0661511 .0731148 ---------+-------------------------------------------------------------------- Combined | 3,356 .0660431 .0012358 .0715925 .06362 .0684661 ---------+-------------------------------------------------------------------- diff | -.0071798 .0024689 -.0120205 -.002339 ------------------------------------------------------------------------------ diff = mean(0) - mean(1) t = -2.9081 H0: diff = 0 Degrees of freedom = 3354 Ha: diff < 0 Ha: diff != 0 Ha: diff > 0 Pr(T < t) = 0.0018 Pr(|T| > |t|) = 0.0037 Pr(T > t) = 0.9982 . ttest Y if X2 == 0, by(covid) Two-sample t test with equal variances ------------------------------------------------------------------------------ Group | Obs Mean Std. err. Std. dev. [95% conf. interval] ---------+-------------------------------------------------------------------- 0 | 798 .0687837 .0025951 .0733075 .0636898 .0738777 1 | 798 .0792831 .0028946 .0817696 .0736011 .0849651 ---------+-------------------------------------------------------------------- Combined | 1,596 .0740334 .0019476 .077807 .0702133 .0778535 ---------+-------------------------------------------------------------------- diff | -.0104994 .0038876 -.0181246 -.0028741 ------------------------------------------------------------------------------ diff = mean(0) - mean(1) t = -2.7008 H0: diff = 0 Degrees of freedom = 1594 Ha: diff < 0 Ha: diff != 0 Ha: diff > 0 Pr(T < t) = 0.0035 Pr(|T| > |t|) = 0.0070 Pr(T > t) = 0.9965
Comment