Announcement

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

  • Linear regression with two non-nested random effects (mixed)

    Dear Statalists,

    I am estimating a linear model using the -mixed command in Stata 14.I want to specify to non-nested random intercepts (I have multiple observations for two different variables, advertisers and websites, which are non-nested).

    I have specified the model as: mixed DV IV || _all: R.id_ads||id_websites:

    My question is: what does the R. after the _all: exactly do? If I estimate the same model without the R. (i.e., mixed DV IV || _all: id_ads||id_websites: ) the estimates vary substantially. Any hint on what causes these differences would be highly appreciated and very helpful.

    Thank you very much in advance.

    Regards,

    Eda

    Last edited by Edlira Shehu; 19 Jul 2016, 05:30.

  • #2
    The R. tells Stata to create a random effect at each level of id_ads. Without the R, your specification treats id_ads as if it were a continuous variable and Stata tries to fit a model with a random slope on id_ads. The version with R is what you want, given your description of the problem.

    Comment

    Working...
    X