Announcement

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

  • Catplot with survey weights

    I need to use catplot to make plots of proportions of categorical variables over time. However, it seems like this command does not take into account survey weights. Does anyone know how I can incorporate survey weights in these plots. svy: command does not work with either catplot or graph commands.

    Thanks,
    R. Swaminathan

  • #2
    As is documented in its help, catplot (SSC, as you are asked to explain) supports various kinds of weights, so it's up to the user to decide how or indeed whether to implement survey weights.

    That said, I wouldn't especially recommend catplot for plotting change over time. It won't or can't be smart about irregular spacing, for example.

    Comment


    • #3
      Why do you need to declare to catplot that weights are survey weights? Survey weights are particular relevant for how standard errors are calculated, not how the estimates themselves are calculated. [Treating your survey weight as an aweight should surely work fine here?]

      Meanwhile, welcome to the Forum. It would be appreciated if you re-registered to use your real name (firstname lastname) for the reasons discussed in the Forum FAQ. It's easy to do this,. Hit the Contact Us button at bottom left of screen, and make your request. (More about this in the FAQ.) Thank you.

      Comment


      • #4
        My time variable is a categorical variable for decadal birth cohorts so I believe there's no irregular spacing.

        When I try using fweight with catplot, there are thousands of lines in the graph, which makes me think there's a bar for every observation. Are my fweight values not what they're supposed to be? I have 33,111 observations while there are about 1,500 unique observations for fweight.

        Comment


        • #5
          Please tell us more about your data and your exact syntax. Stephen has already recommended that you study the FAQ Advice. I would like to request close study of Section 12, in all earnestness.

          Comment

          Working...
          X