This function creates a summary stats for population, samples and parameter(s) of interest.
stat_summary(population, samples, parameter)
population | The virtual population |
---|---|
samples | The drawed samples |
parameter | A string vector or a single string of parameter(s) of interest |
a tibble summary stats
pop <- generate_virtual_pop(100000, "Height", rexp, 5) samples <- draw_samples(pop, 1, c(1)) stat_summary(pop, samples, c('mean', 'sd'))#> data mean sd #> 1 population 0.1996243 0.2000499 #> 2 samples 0.2466659 NA