You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Violinplots appear different with near-zero variance vs zero variance.
The reason for this is that in lattice the limits are pulled from range(density(data)$x) which returns a large interval when there is no variance
Just looking at the plot it is not clear that a has zero variance which could lead to incorrect interpretation if published. It would be more clear that it has zero variance if a single line is draw representing a point mass with probability one.
Description
Converting this internal discussion into an issue for better visability: https://github.com/uclahs-cds/project-cohort-PrecisionHealth-WXPH-000086-150KPH/pull/12
Lattice issue here: deepayan/lattice#27
Violinplots appear different with near-zero variance vs zero variance.
The reason for this is that in lattice the limits are pulled from
range(density(data)$x)
which returns a large interval when there is no varianceOriginally posted in deepayan/lattice#27 (comment)
Example
The most dangerous case is when we have multiple categories and we plot without knowing that we have zero variance in one of the categories.
Just looking at the plot it is not clear that
a
has zero variance which could lead to incorrect interpretation if published. It would be more clear that it has zero variance if a single line is draw representing a point mass with probability one.Created on 2023-02-15 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: