Dear all,
I want to estimate the effect of foreign aid per capita (X) on child mortality (Y) for different values of institutional quality (Z). However, Y and X are log-transformed in order to achieve constant variance and normality of errors and linearity. Z is an index of institutions quality between 0 and 1, which is almost normally distributed.
So, the OLS model is the following: logY = B0 + B1logX + B2Z + B3(logX*Z) + B4log(control1) + B5log(control2)...
(All predictors are lagged.)
Based on Berry/Golder/Milton (2012) I want to draw a marginal effect plot and therefore calculate the ME = B1 + B3(logX*Z) and other relevant information manually after OLS-regression (see below).
So, my first question is, whether this is correct, i.e. whether the code below can be used to estimate such a non-linear model with logY and logX. As far as I understand Karaca-Mandic/Norton/Dowd (2012), who focus on logit/probit-models, the ME in logY-transformed models with IA-terms differs from linear models with IA-terms (although they do not consider transformed X)? But how could I calculate B1, B2 and B3 in a model with logY and logX?
My second question refers to Aiken/West (1991) and Cohen/Cohen/Aiken/West (2003) who strongly recommend to center all the predictor variables in order to reduce multicollinearity. Does that mean, that I - according to my model - should 1) log X and then center it, 2) center Z and 3) multiplicate X with Z in order to include it in the regression? And if so, may I still calculate the ME = B1 + B3(logX*Z) if X and Z are centered?
So far I just checked empirically the transformed and untransformed model for uncentered data and find tremendous differences:
According to the log-transformed model above (i.e. as specified below) the regression results show that B1 and B3 are significant and the ME-plot shows that the effect of X on Y for most values of Z is significantly different from zero (not embracing the zero line) and decreasing in strength (which is non-intuitive!). Here the variance inflation factor (vif) is above 70 for X and XZ.
However, if I use the raw data and estimate: Y = B1X + B2Z + B3(X*Z) + B4controls.... all coefficients B1, B2 and B3 are insignificant in the regression table, but the ME-plot shows a significant effect for a half the range of Z (where half of the observations are distributed), which is increasing for higher values of Z. Here vif is above 40 for X and XZ.
I would be very happy to receive any advice! Thank you in advance!
Steve
reg logY logX Z (logX*Z) log(control1) log(control2)...
matrix b=e(b)
matlist b
matrix V=e(V)
matlist V
scalar b1=b[1,1]
scalar b3=b[1,3]
scalar varb1=V[1,1]
scalar varb3=V[3,3]
scalar covb1b3=V[1,3]
scalar list b1 b3 varb1 varb3 covb1b3
generate MVZ=((_n-1)/100) // generate the moderator variable Z over the range of Z
replace MVZ=. if _n>101
gen conbx=b1+b3*MVZ if _n<102 // generate the ME-line for all values of Z
gen consx=sqrt(varb1+varb3*(MVZ^2)+2*covb1b3*MVZ) if _n<102
gen ax=1.96*cons // to plot confidence interval
gen upperx=conbx+ax
gen lowerx=conbx-ax
I want to estimate the effect of foreign aid per capita (X) on child mortality (Y) for different values of institutional quality (Z). However, Y and X are log-transformed in order to achieve constant variance and normality of errors and linearity. Z is an index of institutions quality between 0 and 1, which is almost normally distributed.
So, the OLS model is the following: logY = B0 + B1logX + B2Z + B3(logX*Z) + B4log(control1) + B5log(control2)...
(All predictors are lagged.)
Based on Berry/Golder/Milton (2012) I want to draw a marginal effect plot and therefore calculate the ME = B1 + B3(logX*Z) and other relevant information manually after OLS-regression (see below).
So, my first question is, whether this is correct, i.e. whether the code below can be used to estimate such a non-linear model with logY and logX. As far as I understand Karaca-Mandic/Norton/Dowd (2012), who focus on logit/probit-models, the ME in logY-transformed models with IA-terms differs from linear models with IA-terms (although they do not consider transformed X)? But how could I calculate B1, B2 and B3 in a model with logY and logX?
My second question refers to Aiken/West (1991) and Cohen/Cohen/Aiken/West (2003) who strongly recommend to center all the predictor variables in order to reduce multicollinearity. Does that mean, that I - according to my model - should 1) log X and then center it, 2) center Z and 3) multiplicate X with Z in order to include it in the regression? And if so, may I still calculate the ME = B1 + B3(logX*Z) if X and Z are centered?
So far I just checked empirically the transformed and untransformed model for uncentered data and find tremendous differences:
According to the log-transformed model above (i.e. as specified below) the regression results show that B1 and B3 are significant and the ME-plot shows that the effect of X on Y for most values of Z is significantly different from zero (not embracing the zero line) and decreasing in strength (which is non-intuitive!). Here the variance inflation factor (vif) is above 70 for X and XZ.
However, if I use the raw data and estimate: Y = B1X + B2Z + B3(X*Z) + B4controls.... all coefficients B1, B2 and B3 are insignificant in the regression table, but the ME-plot shows a significant effect for a half the range of Z (where half of the observations are distributed), which is increasing for higher values of Z. Here vif is above 40 for X and XZ.
I would be very happy to receive any advice! Thank you in advance!
Steve
reg logY logX Z (logX*Z) log(control1) log(control2)...
matrix b=e(b)
matlist b
matrix V=e(V)
matlist V
scalar b1=b[1,1]
scalar b3=b[1,3]
scalar varb1=V[1,1]
scalar varb3=V[3,3]
scalar covb1b3=V[1,3]
scalar list b1 b3 varb1 varb3 covb1b3
generate MVZ=((_n-1)/100) // generate the moderator variable Z over the range of Z
replace MVZ=. if _n>101
gen conbx=b1+b3*MVZ if _n<102 // generate the ME-line for all values of Z
gen consx=sqrt(varb1+varb3*(MVZ^2)+2*covb1b3*MVZ) if _n<102
gen ax=1.96*cons // to plot confidence interval
gen upperx=conbx+ax
gen lowerx=conbx-ax
Comment