Announcement

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

  • Trouble applying pweights when using mixed in three-level model

    Hello,

    I've been attempting to conduct analyses for a three-level multilevel model, where time (level 1) is nested within students (level 2), and students are nested within schools. There are two different sampling weights (i.e. pweights in Stata) that I need to apply: the student weight and the school weight. I don't believe I need to apply a weight for time since there was no sampling at level 1. My problem is that I keep getting an error message that the pweights must be positive, which they are. Here is how I am writing my syntax in Stata, which keeps resulting in an error.

    mixed DV IVs || school_id:, pw(school_weight) || student_id:, pw(student_weight)

    The only way I can get the model to run is by listing the student weight first, like this:

    mixed DV IVs [pw = student_weight] || school_id:, pw(school_weight) || student_id:

    However, my concern with the syntax directly above is that Stata is misinterpreting the student weight as being assigned to level 1, which is time and not students. Given all of this information, I have two questions:

    1. Is the second way I have written my syntax (mixed DV IVs [pw = student_weight] || school_id:, pw(school_weight) || student_id correct, or is the concern I raised above accurate?

    2. If the second way I have written my syntax above is NOT accurate, how can I get the model to run? I've already tried to include a pweight for time that is equal to 1 for all participants in my dataset as is summarized below, and doing so has not resolved the issue:

    mixed DV IVs [pw = time_weight] || school_id:, pw(school_weight) || student_id:, pw(student_weight)

    Any help or insight would be much appreciated!

    Thanks,

    Alison
Working...
X