This function creates a summary stats for population, samples and parameter(s) of interest.

stat_summary(population, samples, parameter)

Arguments

population

The virtual population

samples

The drawed samples

parameter

A string vector or a single string of parameter(s) of interest

Value

a tibble summary stats

Examples

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