Announcement

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

  • Group-level Predictors in Multilevel Model

    Hi, all.

    First time poster, but I've found this forum to be so helpful in the past! I'm looking for some assistance making sure I am coding multilevel model commands correctly.

    For context: I'm a doctoral student in social sciences working on a portion of my dissertation that will use multilevel modeling to compare organizations grouped by type. I have a panel dataset with 5 years' of observations for each organization and a categorical variable for type groups, so I'm developing a 3-level model. Currently, my model has varying intercepts, but I'm wanting to include varying slopes as well.

    I've been working from Gelman and Hill (2007) to learn the concepts I need, but that text mostly demonstrates using R, so I'm having difficulty making sure I'm doing things correctly in Stata. G&H note without going into detail that Stata users creating models with varying intercepts and slopes (instead of just intercepts) need to generate a group-level predictor to include in their regression commands. Gelman explains why in a little bit more depth here and another note he co-authors mentions the need to interact these predictors with other variables on pages 9-10 here. Again, though, there is a lack of detail as to how to do this in Stata.

    I have a pretty firm grasp on the concepts and feel confident generating the variables I need and working up to this point, but run into the following questions:
    • I'm assuming that the new group-predictor is just a the mean of each existing independent variable, sorted/group/assigned by categorical type. Am I wrong?
    • Do I need to generate a group-level predictor for every independent and control variable in my equation, and include all of them in my regression commands? Or just specific variables of interest?
    • Likewise, do I need to code for an interaction between every group-level variable and its observation-level equivalent when entering my commands in Stata?
    Please forgive if this is a silly question--I've looked through posts and the Stata manual for multilevel modeling but haven't encountered this exact topic. Any insight or suggestion would be very appreciated!

    Happy to provide clarification on anything above if needed, but can't share actual examples from my dataset due to some legal restrictions.

    Thank you all in advance!
Working...
X