Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Venn diagram

    Hi I'm trying to do a Venn diagram with 4 variables but the code pvenn allows only 3 variables maximum. I also tried to use the code vendiag but STATA crash.
    I tried also with twoway code but I wasn't able.
    Do you have any advice?


    Thanks for your help.

    Vittorio

  • #2
    Venn diagrams often disappoint in practice despite the widespread familiarity and appeal of the principle.

    I have to guess that's one reason there are just a few community-contributed commands, and also problem reports like yours.

    They are also tricky to program. . Getting out a truly general command that always yields good-looking displays is quite a problem. People often want subsets with few members to be drawn as small areas too, which is a real complication.

    With 4 variables you have at a minimum 2^4 = 16 possible subsets. You may have many more. If this were my problem I would reduce the problem to two composite variables and use tabplot from the Stata Journal to show their joint frequencies. Schematically

    Code:
    egen y  = group(a b), label 
    egen x = group(c d), label 
    
    tabplot y x, showval
    If there are too many categories for that to work nicely would a Venn diagram look much better?

    Venn diagrams are likely to be well supported in R, although I have no idea about packages or how well they perform.



    Comment

    Working...
    X