Compare the distribution, using a violin plot, of the original and shifted exposures. The shifted exposures are obtained applying a shift function, that can be multiplicative or additive.

explore_shift(dat, shift_type, shift_amount)

Arguments

dat

A dataframe containing the variables of interest. A dataframe.

shift_type

A string indicating whether to apply a multiplicative (mul) or additive (add) type of shift. A string.

shift_amount

The shift value to be applied. A double.

Value

A ggplot object.