Announcement

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

  • weight must be constant within practice_code

    Hi guys,
    I'm trying to compare the percentages of satisfaction of gp practices in different waves (year). I averaged the number of respondents per practice over the sample period to use as my weight, then I got say 130 responses in the year 2012 for all the gp practices, and 140 responses in the year 2013 and so on. However, when I used xtdidregress (q18_1) (gmpost), group(practice_code) time(wave),[aw=average_base], I got an error 'weight must be constant within practice_code'. The thing is, different practice_code in different waves could not be the same. I wonder how can I weigh it properly, or how can I compare the percentages using Stata? Thanks a lot!
    Last edited by Yuxin Wang; 18 Aug 2022, 20:58. Reason: weight

  • #2
    problem fixed. Thx!

    Comment

    Working...
    X