Create mixture model data and resulting density and line plots.
Usage
tidy_mixture_density(...)
Value
A list object
Arguments
...
The random data you want to pass. Example rnorm(50,0,1) or something
like tidy_normal(.mean = 5, .sd = 1)
Author
Steven P. Sanderson II, MPH
Details
This function allows you to make mixture model data. It allows you
to produce density data and plots for data that is not strictly of one family
or of one single type of distribution with a given set of parameters.
For example this function will allow you to mix say tidy_normal(.mean = 0, .sd = 1)
and tidy_normal(.mean = 5, .sd = 1) or you can mix and match distributions.
The output is a list object with three components.
Data
input_data (The random data passed)
dist_tbl (A tibble of the passed random data)
density_tbl (A tibble of the x and y data from stats::density())
Plots
line_plot - Plots the dist_tbl
dens_plot - Plots the density_tbl
Input Functions
input_fns - A list of the functions and their parameters passed to the function
itself