Announcement

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

  • Mixed effect model with observation within individual = xtmixed?

    I have a question that I am sure you can help me with.

    I have data on 100 individuals from an experiment, including a bunch of characteristics for each of these individuals (gender, field of specialty, etc...).

    These individuals were during the experiment subjected to two successive and different treatments, in random order. A dependant continuous variable (risk-taking) was measured for each treatment. I therefore have two measures of this dependent variable per participant, one for each treatment. I am interested both in the effect of the treatment and the effect of the individual characteristics (gender, field of specialty, etc..) on risk-taking. See scheme below (with ID the identifying number of the individual).



    I was advised on StackExchange to use a "mixed effect model with observations within persons", which makes sense to me. I think the correct operationalization in Stata would be:

    Code:
     xtmixed Risk Gender Specialty Treatment ... || ID:
    Is it correct or am I on the wrong path?

    Thank you in advance!

  • #2
    This looks right. There is also a panel estimation approach that may give you the same results. One think to worry about is whether mixed forces the id effects to be uncorrelated with the iv's. However, most simple approaches require assuming uncorrelated panel (person) effects if you want to estimate stable person characteristics.

    Comment


    • #3
      Thank you!

      Interestingly, I used, in the end, two methods:

      Code:
       
        xtmixed Risk Gender Specialty Treatment ... || ID:
      And

      Code:
       
        xtreg Risk Gender Specialty Treatment ... , mle
      That both give me the exact same results. I think in my case the mixed model effect that I estimate reduces to a random effect model, estimated via maximum likelihood.

      Comment

      Working...
      X