Announcement

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

  • Interpretation of mixed linear regression models outputs

    Hello statalist users.
    I have cross-sectional data and I need to conduct my analysis controlled for a random factor. The analysis that I need to perform are regression analysis but I have quadractic functions. Since I am conducting my analysis in the mixed linear command I am introducing both x and x square so that I can have a quadratic adjustment.
    I have different models (by gender and age) and I would like to report my results in a way that I can be able to understand which models has the best adjustment. If I was conducting regression analysis without the random effect I would report by r square, but in this case I have some doubts on how I should report my results… Since I have x and x square as my independent variables reporting the beta coefficients will not help me in comparing my models.
    In attach is an example of the output that I obtain.
    Does anyone can help me with this?
    Thank you
    Attached Files

  • #2
    Hola Diana,

    The first intuition is to calculate McFadden's pseudo \(R^2\) for each model. The problem is that mixed does not store the loglikelihood for the model with just a constant, only the log likelihoods for the estimated model and the one without the random coefficients. So you would have to estimate the model with just a constant to get that log-likelihood. Consider the following.

    Code:
    set more off
    sysuse auto, clear
    
    * Regular model
    mixed price c.mpg##c.mpg || foreign:
    scalar llu = e(ll)
    
    * Constant only model
    qui mixed price || foreign:
    scalar llr = e(ll)
    
    * Computation of the pseudo r2
    scalar pr2 = 1 - llu/llr
    di "Pseudo-R2: " pr2
    The approach of comparing pseudo-\(R^2\)s is limited in the same sense that comparing \(R^2\)s is: it does not adjust for differences in degrees of freedom, i.e. in number of observations or number of explanatory variables used in each estimation. If both are the same between estimations then comparing them is appropriate.

    Best,

    Alfonso
    Alfonso Sanchez-Penalver

    Comment


    • #3
      Olá Alfonso!

      This information was very helpful! I tried this in my analysis and it seems to be working. I will conduct all analysis using this approach.
      Thank you for your help

      Best,
      Diana

      Comment

      Working...
      X