Md Shariful Islam
Md Shariful Islam

Reputation: 71

Using Svyciprop to get prevalence with CI across two variables

**I wanted to find the prevalence of smoking in urban and in rural area.

I used this code** enter image description here

I found this result:

enter image description here

We see that it results a little different, calculating all responses a whole. How can I use svyciprop especificially for one type of response. For example, how can I get result the prevalence of smoking in only rural area or in only urban area?

Upvotes: 0

Views: 351

Answers (1)

Anthony Damico
Anthony Damico

Reputation: 6114

looks like smoking is zero/one and urban_rural is either 'urban' or 'rural' so

svyciprop( ~ smoking , subset( svs1 , urban_rural == 'rural' ) )

svyciprop( ~ smoking , subset( svs1 , urban_rural == 'urban' ) )

Upvotes: 1

Related Questions