clt: Monte Carlo Simulations for an Inverse CDF

Description Usage Arguments Examples

View source: R/clt.R

Description

clt() runs Monte Carlo simulations for a given inverse cdf. Outputs the z-score of individual simulations for each sample size to a data frame.

Usage

1
clt(N = NULL, invcdf = NULL, B = 1000, mu = 0)

Arguments

N

The sample sizes (number of draws) you would like to test, must be a vector of integers greater than 1.

invcdf

A string representing the unevaluated inverse cdf. This MUST include the variable n (the sample size), typically enclosed by runif(), like so runif(n).

B

The number of simulations to run for each sample.

mu

The actual known mean of the pdf.

Examples

1
2
3
4
# The below will sample a uniform distribution 10000 times, drawing 2, 10,
# 40, and 500 for each simulation and output a data frame.

df <- clt(N = c(2,10,40,500), invcdf = "runif(n, -1, 1)", B = 10000)

dfsnow/clt documentation built on May 29, 2019, 12:01 p.m.