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
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
Comment