I have a question on creating a dotchart using the following data:
Patient ID Day Dosage of Drug (mg)
1552 1 .3
1552 7 .8
1552 14 1.2
1663 1 .2
1663 7 .7
1663 18 1.4
I can create the dotchart with the x-axis as "day" and y-axis as each patient so that for Patient ID 1552, there are three points at days 1, 7, and 14. No problems there. But now I want to make it so that the dot sizes are proportional to the amount of dosage taken on that day so that the dot on day 14 will be larger than 7 and 1 on the same Patient ID line. Is there any way I can do this?
I know the dotchart()
function has a modifiable cex
element that changes the y-axis font/dot size but it does so uniformly. Is there any way of plotting each point separately and each time making the dot size a different size according to the Dose data?