bootSequence {ResearchMethods}R Documentation

A demonstration of how bootstrapping works, taking multiple bootstrap samples and watching how the means of those samples begin to normalize.

Description

This function uses a graphical user interface (GUI) to demonstrate how bootstrapping works, by bootstrapping from a submitted dataset sequentially and watching the sampled means move towards a normal distribution. The confidence intervals also narrow.

Usage

  bootSequence(dat)

Arguments

dat the dataset to sample from.

Details

This function produces two windows. The Tk window, or the control window, contains three sampling buttons: the top button takes a single bootstrap sample, and the bottom two buttons take 10 and 100 bootstrap samples.

The second window is a visual demonstration of bootstrapping. There are three windows: the top-left window is the histogram of the submitted dataset. The top right window is a histogram of the most recent bootstrap sample (for the 10 and 100 size samples, this plot is blank), and the bottom plot is a histogram of the means of the sample.

The histogram at the bottom has the 95% confidence intervals, calculated as the 2.5% and 97.5% qunatiles of the bootstrapped means. The blocks outside the confidence interval are coloured red.

Value

No value is returned.

Author(s)

Mohamed Abdolell <mohamed.abdolell@dal.ca> and Sam Stewart <samstewart11@gmail.com>

References

This function was designed for a course by Mohamed Abdolell

See Also

bootSingle

Examples

 
  data(agpop)
  bootSequence(agpop$farms92)
  data(MFSV)
  bootSequence(MFSV$MF)


[Package ResearchMethods version 1.01 Index]