tidy_mixture_density {TidyDensity}R Documentation

Tidy Mixture Data

Description

Create mixture model data and resulting density and line plots.

Usage

tidy_mixture_density(...)

Arguments

...

The random data you want to pass. Example rnorm(50,0,1) or something like tidy_normal(.mean = 5, .sd = 1)

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.

  1. Data

  1. Plots

  1. Input Functions

Value

A list object

Author(s)

Steven P. Sanderson II, MPH

Examples

output <- tidy_mixture_density(rnorm(100, 0, 1), tidy_normal(.mean = 5, .sd = 1))

output$data

output$plots

output$input_fns


[Package TidyDensity version 1.5.0 Index]