interactive_sampling: compstatslib interactive_sampling() function

View source: R/sampling_interactive.R

interactive_samplingR Documentation

compstatslib interactive_sampling() function

Description

Interactive visualization to sample from a population and see how a given sampling statistic (theta) is distributed.

Usage

interactive_sampling()

After running, click on the gears in the top-left of the plotting area to draw more samples or change simulation parameters.

Arguments

population

A vector of values following any population distribution you wish to simulate.

sample_size

The size of each sample to draw from the population

theta

The function that computes the statistic of interest from each sample (e.g., mean or median).

Examples

## Not run: 
interactive_sampling(rnorm(100000))

interactive_sampling(c(rnorm(100000, mean = 4), rnorm(100000, mean=-4)), theta = median)

## End(Not run)

soumyaray/compstatslib documentation built on March 11, 2023, 8:39 p.m.