Dear all,
Many thanks for your time.
I am running moderation analyses with panel data, where the independent variable is endogenous and is treated with instruments.
My command looks like this: xtivreg Sales (X1 = Z1) X2 W1 X2*W1 X2*X2 X2*X2*W1 C1 C2 C3, fe
Normally, after xtreg command, we can use the following commands to generate moderation plot, with detailed confidence intervals for each of the X2 effects at different levels of W1, i.e., a spotlight analysis:
margins, at(X2=(0(1)5) W1=(-1 0 1))
marginsplot
However, this approach does not seem applicable to xtivreg command, especially if I am interested in the "X1 is moderated by W2" senario.
If I manually calculate the predicted values of DV against the IV at different levels of W, and generate the moderation plot via "twoway" command, I will not be able to obtain the confidence intervals of the IV.
Can anyone help me on this issue, how to generate non-linear moderation plot with confidence intervals after using -xtivreg, fe-?
Much appreciated for your help.
Best regards,
Chuanqi
Many thanks for your time.
I am running moderation analyses with panel data, where the independent variable is endogenous and is treated with instruments.
My command looks like this: xtivreg Sales (X1 = Z1) X2 W1 X2*W1 X2*X2 X2*X2*W1 C1 C2 C3, fe
Normally, after xtreg command, we can use the following commands to generate moderation plot, with detailed confidence intervals for each of the X2 effects at different levels of W1, i.e., a spotlight analysis:
margins, at(X2=(0(1)5) W1=(-1 0 1))
marginsplot
However, this approach does not seem applicable to xtivreg command, especially if I am interested in the "X1 is moderated by W2" senario.
If I manually calculate the predicted values of DV against the IV at different levels of W, and generate the moderation plot via "twoway" command, I will not be able to obtain the confidence intervals of the IV.
Can anyone help me on this issue, how to generate non-linear moderation plot with confidence intervals after using -xtivreg, fe-?
Much appreciated for your help.
Best regards,
Chuanqi