Announcement

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

  • syntax for including covarites in a multilevel crossed-effects model

    Hello,
    Thank you for taking the time to read this. I would greatly appreciate some feedback on the following issue:

    How do I include covariates in a cross-classified model to allow for random slopes?
    My data are three waves from a repeated cross-sectional survey (Note: not longitudinal) with respondents nested in periods, cohorts and countries:
    Click image for larger version

Name:	BARE SLET.png
Views:	1
Size:	3.7 KB
ID:	1378502






    I'm interested in estimating the random effect of each of these three for two level-1 variables (in addition to the random intercept). Let's term them: opinion_1(ordinal) and opinion_2(ordinal). The dependent variable is a binary measure for political support. Let's call it "support".
    (My inspiration for this type of model comes from here, table 7.6)

    Thanks to this forum and other materials, I can write the syntax for a logistic crossed-effect model (but without random slopes):
    Code:
     xtmelogit support age age^2 opinion_1 opinion_2 || _all: R.cohort || _all: R.period || _all: R.country
    I would like to extend this to estimate a random slope for each the two variables. I've tried this the following way:
    Code:
    xtmelogit support age age^2 opinion_1 opinion_2 || _all: R.cohort: opinion_1 opinion_2 /// || _all: R.period: opinion_1 opinion_2 /// || _all: R.country: opinion_1 opinion_2
    However, I came across this interesting blog. Thus, my approach simply seems wrong and I don't know how to proceed. I'm unsure how to translate the blog to my model as I'm interested in estimating random slopes for the same variables for every level-2 regressors. I'm using STATA 14.

    Thank you very much
    /Fred
    Last edited by Frederik Larsen; 14 Mar 2017, 22:04.

  • #2
    This is my issue as well. I would appreciate any comments

    Comment


    • #3
      Fredrik, I think this link will answer your question:

      https://blog.stata.com/2010/12/22/in...ffects-models/

      Comment

      Working...
      X