Announcement

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

  • How to accomplish Cross Classified Random Coefficient Model using Stata

    Stata-using friends, I have some troubles in handling the accomplishment of Cross Classified Random Coefficient Model using Stata.I have two cross classified variables, cohort and period variable in unnested level two and level three. I have found the stata command, "xtmixed weight week || _all: R.id || _all: R.week", but it serves to do random intercept model. however, i want to do random coefficient model, it seems not to provide a stata command. Who could help me realize it ? thanks.



  • #2
    If you haven't already, you might want to take a look at this post and this Stata Blog entry.

    Comment


    • #3
      Thanks Joseph Coveney. It is helpful for my case. But another question faced is that I have two independent variables(sex and race) to be estimated simultaneously on the cross-classified random coefficient. So could you give me some help handle this? Sincerely appreciated .
      or may i accomplish it through the following command?(i have tried this ,but stata give this Iteration 102: log likelihood = -88776.865 (backed up))
      tab wave, gen(id1_)
      foreach var of varlist id1_*{
      gen `var'Xsex = `var' *sex
      gen `var'Xrace = `var' *race
      }
      xtmixed lninc age sqage sex race || _all:R.wave || _all:id1_*Xsex, noconstant cov(identity) || _all:id1_*Xrace, noconstant cov(identity) || cohort: sex race

      Comment

      Working...
      X