Additional Plots and Stats with ggquickeda

Samer Mouksassi

2022-05-16

In this vignette we will expand what we have learned in the Introduction to ggquickeda vignette.

Multiple Y variables, recoding continuous variables to categories and Medina/PI:

This first section will illustrate how to use more than one y variable and how to generate a Median and a Ribbon showing a 95% Prediction interval (default) over the x variable (Time).

Using the built-in demo dataset:

cut a continuous variable to categorical

MedianPI

We can see that Dose does not change over time and that the highest Age category is only present in the second and third weight categories (older subjects have higher weights).

Boxplots, Median/PI, Mean:

MedianPI

MedianPI

Boxplots

MEANDIAMOND

Continuous and categorical variables descriptive stats:

In the following part we will generate a descriptive stats table that reflect the plot that we just did and then add Race.

DescStats

Univariate Plots:

Remove all y variable(s) and any column splits keeping Age as x variable gives a barplot since Age has been categorized.

barplots

Remove Age from Recode into Quantile Categories so it goes back to a numeric variable and the generated distribution will be a density plot instead of a barplot. Reapply the ID in One Row by ID(s) as the data manipulation steps are sequential and changing something in the first tab will reset the steps in the subsequent ones.

distribution

Play with the options in the Histograms/Density/Bar to see how they affect the generated plots.