I am analyzing NHANES data (https://wwwn.cdc.gov/nchs/nhanes/) which use a complex, multistage, probability sampling design.
I want to plot some data in Stata using a contour plot. With non-weighted data, I would use the following command
twoway contour dbq700 bmxbmi ridageyr if cohort == 1
For survey data, however, I need weights. Once I try to consider this using the following command below, I get an error message ( " weights not allowed ")
twoway contour dbq700 bmxbmi ridageyr if cohort == 1 [aw = wtdrd6y]
It doesn't work with the svy
commands either. Is it impossible to draw contour plots in Stata with survey data?
I tried:
twoway contour dbq700 bmxbmi ridageyr if cohort == 1 [aw = wtdrd6y]
I got an error message as specified above.