Hi everyone, thanks in advance for any help.
I have a dataset of reproductive-aged women that includes information about reasons why they are not using contraception. Respondents could choose as many reasons as they liked from a list of 21 reasons ("I'm worried about side effects," "I don't have frequent sex," "I had a hysterectomy," etc.). I'm using Tim Morris and Nick Cox's excellent upsetplot in Stata 18 to graph the frequencies of each set of responses. I'd like to show just the, say, top 10 most frequent sets, but I'm having trouble with the select option. I can't share the dataset but I've reproduced the problem below.

As we can see above, the three most common combinations have frequencies of 8494, 2077, and 1110. However, when I include select(1/3), I get the 6th, 7th, and 9th bars, not the first three as expected.

Am I misunderstanding the select option? Is something else going on? Any help is appreciated!
I have a dataset of reproductive-aged women that includes information about reasons why they are not using contraception. Respondents could choose as many reasons as they liked from a list of 21 reasons ("I'm worried about side effects," "I don't have frequent sex," "I had a hysterectomy," etc.). I'm using Tim Morris and Nick Cox's excellent upsetplot in Stata 18 to graph the frequencies of each set of responses. I'd like to show just the, say, top 10 most frequent sets, but I'm having trouble with the select option. I can't share the dataset but I've reproduced the problem below.
Code:
clear input Rice Maize Sorghum Arabidopsis freq 1 0 0 0 1110 1 1 0 0 229 0 1 0 0 465 1 0 1 0 661 1 1 1 0 2077 0 1 1 0 405 0 0 1 0 265 1 0 1 1 304 1 1 1 1 8494 0 1 1 1 112 0 0 1 1 34 1 0 0 1 81 1 1 0 1 96 0 1 0 1 11 0 0 0 1 1058 end label var Arabidopsis "{it:Arabidopsis}" local toptitle "t1title(Number of gene families)" upsetplot A R M S [fw=freq], varlabels baropts(`toptitle' `bcolour')
As we can see above, the three most common combinations have frequencies of 8494, 2077, and 1110. However, when I include select(1/3), I get the 6th, 7th, and 9th bars, not the first three as expected.
Code:
upsetplot A R M S [fw=freq], varlabels baropts(`toptitle' `bcolour') select(1/3)
Am I misunderstanding the select option? Is something else going on? Any help is appreciated!