Hello,
I'm trying to visualize data of a 'score' variable for two different groups. I used the SSC command violinplot in Stata 17.0 to create a violin plot on the small dataset. The dataset only contains the 'scores' for the two different groups: pre01 and post01.
Part of the dataset:
pre01 post01
45 55
30 75
40 50
45 80
60 65
I used the following code:
This results in the following violin plot:

However, I want to extend the length of the whiskers to go from the largest value (max) to the smallest value (min), instead of the 1.5 IQR rule.
How should I change my code to accomplish this?
Many thanks in advance!
Best,
Laura
I'm trying to visualize data of a 'score' variable for two different groups. I used the SSC command violinplot in Stata 17.0 to create a violin plot on the small dataset. The dataset only contains the 'scores' for the two different groups: pre01 and post01.
Part of the dataset:
pre01 post01
45 55
30 75
40 50
45 80
60 65
I used the following code:
Code:
. violinplot pre01 post01, fill vertical absolute rag(spread(30) msymbol(o) mcolor(%40) mlc(%0) pstyle(p2)) ylabel(, nogrid) whiskers box median colors(sb)
However, I want to extend the length of the whiskers to go from the largest value (max) to the smallest value (min), instead of the 1.5 IQR rule.
How should I change my code to accomplish this?
Many thanks in advance!
Best,
Laura
Comment