Reputation: 71
**I wanted to find the prevalence of smoking in urban and in rural area.
I found this result:
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
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