Announcement

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

  • xtmixed produces different results from mixed

    I am planning to run a mixed effects model and I am trying the various xtreg, xtmixed and mixed options.

    xtmixed and xtreg are producing similar results, as they should do. However, the mixed command gives very different results for the random-effects parameters. Why is this? Previous posts on the topic states that xtmixed and mixed are interchangeable. And if they were different, I would expect mixed to atleast produce similar results to xtreg?

    I run the commands:
    xtset ExternalReference OP
    xtreg phq_tot_T AAQ Age Sex Education MaritalStatus Diabetes DS14 Psychmed, re
    mixed phq_tot_T AAQ Age Sex Education MaritalStatus Diabetes DS14 Psychmed || ExternalReference:
    xtmixed phq_tot_T AAQ Age Sex Education MaritalStatus Diabetes DS14 Psychmed || ExternalReference:

    (OP is the Observation Point variable)

    xtreg gives:
    sigma_u | 2.1066733
    sigma_e | 2.4060045
    rho | .43395939 (fraction of variance due to u_i)

    The random-effects parameter estimates for xtmixed are:
    sd(_cons) | 2.120249
    sd(Residual) | 2.391614

    The random-effects parameter estimates for mixed are:
    var(_cons) | 4.495457
    var(Residual) | 5.719819

    Thank you

  • #2
    The first two are reporting standard deviations and the last is reporting variance. Try the stddeviations of mixed.

    Comment


    • #3
      Try the stddeviations of mixed. → Try the stddeviations option of mixed.

      Comment


      • #4
        Thank you very much Joseph, that resolved the issue

        Comment

        Working...
        X