Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Interaction Terms in (non-linear) models with log-transformed (continuous) DV and log-transformed (continuous) IV

    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





  • #2
    Steve,

    thanks for the detailed question. Although I have not read the complete post very carefully, here are some hints, that I hope help you.

    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.
    First, be aware of the fact that a linear model estimated via OLS does not require the predictors to be normal. Neither does it require the response variable to be normal. Constant variance (no heteroskedasticity) is indeed assumed - but also for the residuals, not the variables themselves. Normality of the residuals is required only for significance testing in (very) small samples (neither for consistent nor efficient estimates), while with reasonable sample size, in practice somehow bell-shaped residuals are fine. All this is to say, do not transform more than you really need in terms of (i) underlying theory and/or (ii) linearity. The reason is the same that inspired your question: With transformed variables interpretation can get quite tricky.If theroy does not suggest otherwise, I would run the regression without log-transforming and look at the residuals, then decide what and how to transform. Depending on how child mortality is measured you might consider alternatives to a linear model. Also see Bill Gould's excellent discussion of log-linear models in this context.

    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).
    You might be better of using margins (and marginsplot). Patrick Royston has the nice marginscontplot (SJ, I guess) that might be useful for plotting interactions and is useful for transformed predictors.

    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.
    In my experience, this (20 years old) suggestion can largely be ignored. From a theoretical point of view, mean-centering does make a lot of sense in a lot of situations. In non-linear models, estimated via ML, it is even claimed to facilitate estimation, because all values will be in the observed range. However, there a lots of papers that suggest that mean-centering does not reduce the problem implied by multicollinearity, but merely reduces some of the measures used to asses it (e.g. VIF). IN this context also see Paul Allison's rather recent blog entry. Anyway, modern software as Stata can deal very well with pretty high collinearity regardless of mean-centering. Bill Gould (again) talks about this here. So, bottom line, do mean-center to facilitate interpretation. Do not mean-center for "technical" reasons.

    As an aside, please give full references, as not everyone on Statalist (e.g. me) will be familiar with e.g. Berry/Golder/Milton (2012) and will probably avoid looking up the full reference themselves.

    I hope this helps you think about the problem.

    Best
    Daniel
    Last edited by daniel klein; 21 May 2015, 00:55.

    Comment


    • #3
      Dear Daniel,
      thank you very much for your quick reply! Excellent thoughts and very helpful links!
      Indeed I have to repeat checks of violating OLS assumptions and rethink transformation. Also thanks for your valuable hint on the mcp package, didn't know that before.
      However, if I would conclude that logX and logY is necessary, can you recommend any literature where I can read about how to interpret such results and calculate the parameter for confidence intervals? Intuitively, I would simply interpret the relationship as elasticities because both X and Y are in logs (and as far as I see Royston just provides examples of log transformed predictors).

      Thanks ones again for help!

      please give full references
      :-)

      Brambor, Thomas; Clark, William Roberts; Golder, Matt (2005): „Understanding Interaction Models: Improving Empirical Analyses“. In: Political Analysis. 14 (1), S. 63–82.
      Cohen, Jacob; Cohen, Patrici; West, Stephen G.; u. a. (2003): Applied Multiple Regression/ Correlation Analysis for the Behavioral Sciences. 3. Aufl. London: Lawrence Erlbaum Associates.
      Karaca-Mandic, Pinar; Norton, Edward C.; Dowd, Bryan (2012): „Interaction terms in nonlinear models“. In: Health Services Research. 47 (1 PART 1), S. 255–274.

      Comment

      Working...
      X