Tidy Randomly Generated Logistic Tibble — tidy_logisitc • TidyDensity
Description: This function will generate n random points from a logisitc distribution with a user provided, rate, and number of random simulations to be produced. The function returns a tibble with the simulation number column the x column which corresonds to the n randomly generated points, the d_, p_ and q_ data points as well. The data is returned un-grouped. The columns that are output are: sim_number The current simulation number. x The current value of n for the current simulation. y The randomly generated data point. dx The x value from the stats::density() function. dy The y value from the stats::density() function. p The values from the resulting p_ function of the distribution family. q The values from the resulting q_ function of the distribution family.

# Tidy Randomly Generated Logistic Tibble

Source: `R/random-tidy-logistic.R`
`tidy_logisitc.Rd`

This function will generate `n` random points from a logisitc distribution with a user provided, rate, and number of random simulations to be produced. The function returns a tibble with the simulation number column the x column which corresonds to the n randomly generated points, the `d_`, `p_` and `q_` data points as well.

The data is returned un-grouped.

The columns that are output are:

- `sim_number` The current simulation number.

- `x` The current value of `n` for the current simulation.

- `y` The randomly generated data point.

- `dx` The `x` value from the `stats::density()` function.

- `dy` The `y` value from the `stats::density()` function.

- `p` The values from the resulting p_ function of the distribution family.

- `q` The values from the resulting q_ function of the distribution family.

    tidy_logisitc(.n = 50, .location = 0, .scale = 1, .num_sims = 1)

## Arguments

.n

  The number of randomly generated points you want.

.location

  The location parameter

.scale

  The scale parameter

.num_sims

  The number of randomly generated simulations you want.

## Value

A tibble of randomly generated data.

## Details

This function uses the underlying `stats::rlogis()`, and its underlying `p`, `d`, and `q` functions. For more information please see `stats::rlogis()`

## See also

https://en.wikipedia.org/wiki/Logistic_distribution

Other Data Generator: `tidy_beta()`, `tidy_exponential()`, `tidy_gamma()`, `tidy_lognormal()`, `tidy_normal()`, `tidy_poisson()`, `tidy_uniform()`, `tidy_weibull()`

## Author

Steven P. Sanderson II, MPH

## Examples

    tidy_logisitc()
    #> # A tibble: 50 x 7
    #>    sim_number     x      y    dx       dy        p       q
    #>    <fct>      <int>  <dbl> <dbl>    <dbl>    <dbl>   <dbl>
    #>  1 1              1  1.58  -6.47 0.000148 1.93e-22 -Inf
    #>  2 1              2 -1.94  -6.20 0.000500 1.43e-21   -3.87
    #>  3 1              3 -1.94  -5.94 0.00140  1.05e-20   -3.16
    #>  4 1              4 -0.579 -5.67 0.00330  7.78e-20   -2.73
    #>  5 1              5 -0.376 -5.41 0.00657  5.75e-19   -2.42
    #>  6 1              6  1.00  -5.14 0.0112   4.25e-18   -2.17
    #>  7 1              7 -0.451 -4.88 0.0169   3.14e-17   -1.97
    #>  8 1              8 -0.190 -4.61 0.0227   2.32e-16   -1.79
    #>  9 1              9  0.108 -4.35 0.0279   1.71e-15   -1.63
    #> 10 1             10  0.645 -4.08 0.0312   1.27e-14   -1.49
    #> # ... with 40 more rows