0
$\begingroup$

I am analysing survey data. Since my demographic categories are discrete I can summarise responses within demographics using prop.table. However, I would also like to be able to summarise responses using survey weights. How do I do that?

$\endgroup$
2
$\begingroup$

The survey package is your friend.

See the functions svybyand svymean for some nice examples. Note that you have to specify the survey design via svydesign, which takes the weights as an argument, before applying the other functions.

Hope this helps!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.