wrap.bm: Simulate a normal sample and compute a bootstrap distribution

Description Usage Arguments Value Examples

Description

Wraps boot.dist.1d, generating a normal sample and computing a bootstrap distribution for a statistic of interest. Plots a histogram of the bootstrap distribution and returns a list containing the mean and standard deviation of the bootstrap distribution.

Usage

1
wrap.bm(n, B, mu = 0, sigma = 1, FUN = mean, ...)

Arguments

n

The size of the normal sample to draw.

B

The number of bootstrap samples to draw from the normal sample.

mu

The expectation of the normal distribution from which the data are drawn.

sigma

The standard deviation of the normal distribution from which the data are drawn.

FUN

A function that computes the statistic of interest. FUN must have a vector of data as its first argument and must return a numeric vector of length 1 (i.e. a scalar).

...

Additional arguments passed to FUN.

Value

A list containing the mean and standard deviation of the bootstrap distribution.

Examples

1
wrap.bm(50, 1000, FUN = median)

mdedge/stfspack documentation built on May 9, 2019, 8:17 a.m.