Announcement

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

  • Testing for the presence of a U-shape in multilevel model (xtmixed)

    Dear all,

    I am testing an inverted u-shaped relationship in a multilevel model. I am using the xtmixed estimation command.

    To test for the actual presence of my hypothesized inverted u-shaped relationship, I wanted to follow the procedure as suggested by Lind & Mehlum (2010) and I was happy to find the utest module. However, it seems that the utest command does not work after xtmixed (to check, I also estimated my model with "regress" and thereafter, the utest command worked perfectly).

    Are there any other post estimation commands I could use for testing for the presence of the u-shape that also work after xtmixed/mixed? Alternatively, does anyone have an advice on how to estimate the slopes at the high and low end of x and the location of the turning point "manually"?

    Thank you very much in advance.

    Sophie

  • #2
    Probably the simplest way to do this is to run -mixed- (-xtmixed is the old names; it has been called -mixed- since at least version 14) with a linear and quadratic term. I assume that you are fitting a single overall quadratic model, not a quadratic model whose parameters are themselves random effects at the group level. Thus

    Code:
    mixed y c.x##c.x /*perhaps other variables as well*/ || group:
    Whether there is an effect of x at all in this model can be tested with
    Code:
     test x x#x
    If you want to contrast quadratic and simple linear models, I would recommend running the model both ways and the looking at the AIC and BIC (-estat ic- after each estimation).

    To locate the turning point, assuming you stay with your quadratic model, it's

    Code:
    nlcom -_b[x]/(2*_b[x#x])
    For slopes at high and low ends of x, I would pick representative high and low values of x, call them `x_high' and `x_low' and then run

    Code:
    margins, dydx(x) at(x = (`x_low' `x_high'))

    Comment


    • #3
      Thank you very much!

      I also learned that the results in the coefficient matrix are saved with the DV as a prefix when I use mixed. I need to indicate that when using utest --> utest x xsquared, pre(y)


      Comment

      Working...
      X