15
$\begingroup$

I have a series of left-skewed/heavy tailed distributions that I would like to show. There are 42 distributions across three factors (labeled as A, B and C below). Also, the variation is shrinking across factor B.

The issue I have is that the distributions are hard to differentiate across the scale of the outcome (a ratio or fold-change):

enter image description here

Logging the data seems to over-emphasizes the left skewness and moves more samples into the tails (creating a mash of outlier points):

enter image description here

Does anyone have suggestions on other techniques for visualizing these data?

$\endgroup$
5
  • 6
    $\begingroup$ Logging is often used to reduce right-skewness, so it can be expected to increase left-skewness. The exp() transformation is its inverse, but that is probably far too strong here. Squaring is a milder alternative. You don't say what sample size(s) you have. It is not obvious that the main problem is really left skewness, rather than a few moderate outliers in the left tail in B1. Is there no science here to throw light on this? $\endgroup$
    – Nick Cox
    Mar 25, 2014 at 0:55
  • 1
    $\begingroup$ The sample size per box plot is about 100. The values are speed-ups achieved by a new computational algorithm (i.e. old run-time/new run time). There are occasions where it does not produce significant time savings so the distributions tend to trail off to the left. $\endgroup$
    – topepo
    Mar 25, 2014 at 1:25
  • $\begingroup$ Thanks. The number of points beyond the whiskers seems to be rather small then. $\endgroup$
    – Nick Cox
    Mar 25, 2014 at 1:49
  • 7
    $\begingroup$ What is it about these distributions that you want to see better? The current plot looks good to me: C makes very little, if any, difference; higher B makes tighter & lower distributions; & higher A goes w/ higher values. $\endgroup$ Nov 30, 2016 at 18:20
  • 1
    $\begingroup$ If you are looking at something multiplicative, like fold change, then a logarithmic scale often makes sense. (See also stats.stackexchange.com/a/361263) It might increase "outliers" but maybe that's just what you have and you should not hide this with transformations (if you want to hide them then you can just as well not plot them). To me the log scale graph looks more intuitive because it shows that the variance is more or less equal. (The lower variance for larger factor b on the linear scale seems partly because it is a smaller value and the smaller values have all lower variance) $\endgroup$ Sep 25, 2021 at 19:17

2 Answers 2

0
$\begingroup$

Just an idea: if you can describe the distributions you got relatively well with a normal distribution, you can do 2-dimensional plots showing the impact of A, B and C on the fitted distributions parameters: mean and standart deviation.

Or you try to find other describing measures for the distribution that you got and show the impact of the three variables on them.

If you find that two variables have interactions, you can do a 3d plot. Lets hope they do not all interact with one another. ;)

$\endgroup$
0
$\begingroup$

Something you can consider is a density plot that is staggered within the same plane, then facet by each factor so its more visible. With many factors this can be still hard, but at least you can crunch a lot of information in a tinier space this way. First I load three requisite libraries in the program R: tidyverse for data wrangling, lavaan for a the Holzinger data, and ggridges for the ridge plot. The rest of the code is fairly specific and would require some familiarity with R, but it is just to show you how and what it will look like. I have added annotations in hashtags if that is helpful.

#### Load Libraries ####
library(lavaan)
library(tidyverse)
library(ggridges)

#### Plot Density by Stagger ####
HolzingerSwineford1939 %>% # take this data
  as_tibble() %>% # make it easy to read 
  select(school,sex,7:15) %>% # select only these columns (7:15 are "X" items)
  mutate(sex = ifelse(sex==1,"Male","Female")) %>% # change gender coding
  pivot_longer(cols = 3:11) %>% # pivot data 
  ggplot(aes(x=value, # plot values of survey data here
             y=name, # arrange by name
             fill=factor(sex)))+ # fill color by sex
  geom_density_ridges()+ # plot ridges
  facet_grid(school~sex)+ # facet ridges by these factors
  scale_fill_manual(values = c("darkred","hotpink"))+ # fill with these colors
  theme_bw()+ # edit theme
  theme(legend.position = "none")+ # remove legend (redundant)
  labs(x="Value",
       y="Name",
       title = "By Gender Density of X Values") # label plot

You should get a plot like this. The y axis represents 9 different test items, while the frame labels represent which factor the densities belong to. You can now plainly see which items are skewed and how they skew based off each factor:

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.