Generate Multiple Tidy Distributions of a single type — tidy_multi_single_dist • TidyDensity
Description: Generate multiple distributions of data from the same tidy_ distribution function.

Skip to contents

# Generate Multiple Tidy Distributions of a single type

Source: `R/combine-multi-single-dist-tbl.R`
`tidy_multi_single_dist.Rd`

Generate multiple distributions of data from the same `tidy_` distribution function.

## Usage

    tidy_multi_single_dist(.tidy_dist = NULL, .param_list = list())

## Arguments

.tidy_dist

  The type of `tidy_` distribution that you want to run. You can only choose one.

.param_list

  This must be a `list()` object of the parameters that you want to pass through to the TidyDensity `tidy_` distribution function.

## Value

A tibble

## Details

Generate multiple distributions of data from the same `tidy_` distribution function. This allows you to simulate multiple distributions of the same family in order to view how shapes change with parameter changes. You can then visualize the differences however you choose.

## See also

Other Multiple Distribution: `tidy_combine_distributions()`

## Author

Steven P. Sanderson II, MPH

## Examples

    tidy_multi_single_dist(
      .tidy_dist = "tidy_normal",
      .param_list = list(
        .n = 50,
        .mean = c(-1, 0, 1),
        .sd = 1,
        .num_sims = 3
      )
    )
    #> # A tibble: 450 × 8
    #>    sim_number dist_name             x      y    dx       dy      p      q
    #>    <fct>      <fct>             <int>  <dbl> <dbl>    <dbl>  <dbl>  <dbl>
    #>  1 1          Gaussian c(-1, 1)     1 -1.38  -3.94 0.000456 0.352  -1.38
    #>  2 1          Gaussian c(-1, 1)     2 -1.16  -3.82 0.00127  0.436  -1.16
    #>  3 1          Gaussian c(-1, 1)     3 -0.848 -3.71 0.00317  0.560  -0.848
    #>  4 1          Gaussian c(-1, 1)     4 -0.664 -3.59 0.00715  0.632  -0.664
    #>  5 1          Gaussian c(-1, 1)     5 -0.516 -3.47 0.0145   0.686  -0.516
    #>  6 1          Gaussian c(-1, 1)     6 -1.44  -3.35 0.0267   0.328  -1.44
    #>  7 1          Gaussian c(-1, 1)     7  0.305 -3.23 0.0444   0.904   0.305
    #>  8 1          Gaussian c(-1, 1)     8 -0.337 -3.11 0.0672   0.746  -0.337
    #>  9 1          Gaussian c(-1, 1)     9 -2.32  -3.00 0.0931   0.0940 -2.32
    #> 10 1          Gaussian c(-1, 1)    10 -2.60  -2.88 0.119    0.0552 -2.60
    #> # ℹ 440 more rows