Announcement

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

  • Accounting for Multiple Sample Weights in Longitudinal Data

    Hi,

    I am using Stata17 and am trying to analyze multiple years of BRFSS data. The data sets have two different pweights: _LLCPWT and _LCPWTV2. I am unsure on how to set the survey set to account for these two pweights. When examining them individually, I use the syntax:

    svyset [pweight = _LLCPWT], strata(_STSTR) psu(_PSU) singleunit(centered)

    I want to analyze the years together and then do a logistic regression on them. I tried to use some of the online examples but receive an error for invalid syntax r(198). The syntax I tried was:

    svyset [pweight = _LLCPWT if IYEAR=="2019" | IYEAR=="2020"] || IYEAR:, pweight(_LCPWTV2) strata (_STSTR) psu(_PSU) singleunit(centered)

    I would appreciate any syntax assistance.

    Thanks,
    Mary

  • #2
    These might help: https://www.statalist.org/forums/for...se-sample-size
    https://www.statalist.org/forums/for...ratum-variable

    Comment


    • #3
      Thank you, Mark, for the resources. I appreciate them. If I am understanding the two past threads correctly, I can account for the variation in yearly sample sizes by including the IYEAR variable into the logistic regression model?

      -Mary

      Comment

      Working...
      X