Distribution of Violin Plot
1
0
Entering edit mode
2.6 years ago
Okiedokie • 0

Can someone explain why the violin plot on the right has more peaks than another? The distribution of data points is almost the same between the two sides but shapes are different. enter image description here

ggplot2 ggplot Violin Plot • 737 views
ADD COMMENT
3
Entering edit mode
2.6 years ago

The violin plot is just a reversed and mirrored density plot. Both are based on a Kernell density estimate which require an important parameter called the bandwidth (h on the figure below). The higher the bandwidth, the smoother the curve (like for the violin plot on the left), while with lower bandwidth, individual data points have more impact.

bandwidth

ADD COMMENT
0
Entering edit mode

Thank you! That is really helpful!

ADD REPLY

Login before adding your answer.

Traffic: 1640 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6