multisample: Generate multiple samples

Description Usage Arguments Value Author(s) Examples

View source: R/multisample.r

Description

Function samples many times from the same population.

Usage

1
multisample(population, size, permutations = 1000, CLT = FALSE)

Arguments

population

A vector of data for the whole population

size

The size of the sample

permutations

The number of times to sample from the population

CLT

A logical value to indicate if summary statistics should be generated, # based on the central limit theorem.

Value

The function returns a list of samples. If CLT = TRUE, it also returns summary statistics from the samples, plus expected values based on the central limit theorem.

Author(s)

Michael Collyer

Examples

1
2
3
4
5
6
7
8
Y <- rnorm(10000)
mySamples <- multisample(population = Y, size = 50, permutations = 100, CLT = FALSE)
summary(mySamples)
mySamples$samples[1:3]

mySamples <- multisample(population = Y, size = 50, permutations = 100, CLT = TRUE)
summary(mySamples)
plot(mySamples)

mlcollyer/chatham.bio532 documentation built on May 23, 2019, 2:08 a.m.