Reputation: 21
I am able to use to generate basic and attribute upset plots using the UpsetR package. But, I am not able to generate plots using survey data. Has anyone tried making upset plots in survey data? Thanks.
My error is:
"cannot coerce class ‘c("survey.design2", "survey.design")’ to a data.frame".
Upvotes: 0
Views: 366
Reputation: 11
It is possible but you have to work around a little bit. I have done this with a survey with binary responses. First you consider all the possible response arrays and multiply each response array by the weighted frequency. After that you can use UpsetR on the resulting data matrix. You can find our paper detailing the method here:
'Constructing UpSet plot for survey data with weights using SAS and R software' https://www.tandfonline.com/doi/abs/10.1080/03610918.2021.1904142?journalCode=lssp20
Although the method uses SAS to calculate the weighted frequencies you can do that step with R as well.
Upvotes: 1