I am making a graph from a table of data from a paper. It has a column of categories of relationships, then two columns of numerical variables: the number of observations for each category and then the iq correlation:
relation num corr
spouse 3817 0.33
MZ-twin-tog 4671 0.86
MZ-twin-ap 65 0.72
DZ-twin-tog 5546 0.6
sib-tog 26473 0.47
sib-ap 203 0.24
off-par 8433 0.42
off-midpar 992 0.5
off-par-ap 814 0.22
I want to make a boxplot of (corr ~ relation) but I want the widths to be proportional to the number of observations for each category. Unfortuntately varwidth = TRUE won't work because I effectively just have one observation per category since I'm not working with the full data set.
Does anyone know how to work with this since I don't have the complete data, just the results.
P.S. I know boxplot is not exactly an appropriate graph for this limited data set, but I don't know how else to display (numerical ~ categorical). Suggestions are welcome!
Thank you in advance for any advice!