Hi all,

I have run the below model (code shown below) and have some questions about the first 3 independent variables – dar, dar_sq, and dar_cub.

Description of variables:
  • dar = continuous
  • dar_sq = dar^2
  • dar_cub = dar^3
A few questions:
  • I am trying to decide how to model the relationship between dar and the dependent variable. Dar^3 is statistically significant. Does that mean it must be included in the model along with dar and dar^2? I understand including dar^3 means that there are 2 changes in direction, something I have a hard time making sense of here.
  • I looked at a simple scatterplot between dar and lex (shown below). There does not seem to be a clear relationship. Also, given the data structure requires the use of a mixed model, I am unsure whether a simple scatterplot is correct. I also plotted a spaghetti plot with id for one of the random effects (bor)– shown below.
  • I’m having hard time interpreting what the coefficients on dar, dar_sq, and dar_cub mean. Is there a way after the mixed command to create a plot what the relationship looks like for example?
Thanks in advance for any comments!


Code:
. mixed lex dar dar_sq dar_cub alp mup zol mupbyzol || _all: R.bor || _all: R.mol || _all: R.pop, reml

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0:   log restricted-likelihood =  -55055.98  
Iteration 1:   log restricted-likelihood =  -55055.98  

Computing standard errors:

Mixed-effects REML regression                   Number of obs     =     12,040
Group variable: _all                            Number of groups  =          1

                                                Obs per group:
                                                              min =     12,040
                                                              avg =   12,040.0
                                                              max =     12,040

                                                Wald chi2(7)      =     558.36
Log restricted-likelihood =  -55055.98          Prob > chi2       =     0.0000

------------------------------------------------------------------------------
         lex |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         dar |  -.1442413   .0679903    -2.12   0.034    -.2774999   -.0109827
      dar_sq |   .0039578   .0017025     2.32   0.020      .000621    .0072946
     dar_cub |  -.0000359   .0000113    -3.19   0.001     -.000058   -.0000138
         alp |    7.56537   1.792743     4.22   0.000     4.051658    11.07908
         mup |   18.59015   2.898774     6.41   0.000     12.90866    24.27164
         zol |   11.27925   .6055326    18.63   0.000     10.09243    12.46607
    mupbyzol |   -6.30276   .8396218    -7.51   0.000    -7.948388   -4.657131
       _cons |   70.63327    2.85485    24.74   0.000     65.03787    76.22868
------------------------------------------------------------------------------

------------------------------------------------------------------------------
  Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
-----------------------------+------------------------------------------------
_all: Identity               |
                  var(R.bor) |   81.68924   16.43907      55.06427    121.1881
-----------------------------+------------------------------------------------
_all: Identity               |
                  var(R.mol) |   47.87758   14.45347      26.49525    86.51596
-----------------------------+------------------------------------------------
_all: Identity               |
                  var(R.pop) |   42.53744   8.664709      28.53546       63.41
-----------------------------+------------------------------------------------
               var(Residual) |    528.271    6.84953      515.0153    541.8679
------------------------------------------------------------------------------
LR test vs. linear model: chi2(3) = 2653.43               Prob > chi2 = 0.0000

Note: LR test is conservative and provided only for reference.

scatter lex dar

spagplot lex dar, id(bor)
Array Array