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$

1 Answer 1

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 and acknowledge you have read our privacy policy.

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