I am learning to use the excellent "expss" R package.
I need to know if it is possible to use this package to make a contingency table between a multiple choice variable and a categorical variable, considering a weight variable
The categorical variable is "sex" in this dataframe, and the weight variable is "survey_weight":
demo <- tribble(
~dummy1, ~dummy2, ~dummy3, ~survey_weight, ~sex,
1, 0, 0, 1.5, "male",
1, 1, 0, 1.5, "female",
1, 1, 1, .5, "female",
0, 1, 1, 1.5, "male",
1, 1, 1, .5, "male",
0, 0, 1, .5, "male",
)
demo
I need to calculate the percentage based on total respondents who answered the question, and not on total responses.
Thanks in advance!