Skip to contents

Takes a numeric vector and will return the ecdf probability.

Usage

bootstrap_p_augment(.data, .value, .names = "auto")

Arguments

.data

The data being passed that will be augmented by the function.

.value

This is passed rlang::enquo() to capture the vectors you want to augment.

.names

The default is "auto"

Value

A augmented tibble

Details

Takes a numeric vector and will return the ecdf probability of that vector. This function is intended to be used on its own in order to add columns to a tibble.

Author

Steven P. Sanderson II, MPH

Examples

x <- mtcars$mpg
tidy_bootstrap(x) %>%
  bootstrap_unnest_tbl() %>%
  bootstrap_p_augment(y)
#> # A tibble: 50,000 × 3
#>    sim_number     y     p
#>    <fct>      <dbl> <dbl>
#>  1 1           17.8 0.405
#>  2 1           33.9 1    
#>  3 1           19.2 0.530
#>  4 1           30.4 0.937
#>  5 1           24.4 0.813
#>  6 1           30.4 0.937
#>  7 1           19.7 0.561
#>  8 1           21.4 0.686
#>  9 1           21.4 0.686
#> 10 1           15.8 0.313
#> # ℹ 49,990 more rows