clt_eval: Evaluating Z-Scores Created by 'clt()'

Description Usage Arguments Examples

View source: R/clt_eval.R

Description

clt_eval() evaluates the results from clt(). It outputs the percentage of z-scores which fell outside the specified critical values.

Usage

1
clt_eval(data = NULL, ci = 1.96, zonly = TRUE)

Arguments

data

The data frame of z-scores to be evaluated.

ci

The confidence interval you would like to evaluate at.

zonly

If true, outputs only z-scores as a vector. If false, outputs z-scores paired with N size as a data frame.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# The below will sample a uniform distribution 10000 times, drawing 2, 10,
# 40, and 500 for each simulation and output a data frame. It will the output
# the percentage of each N's simulated z-scores which were above the critical
# value specified. 

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

# You can also use the pipe operator to pass the results of \code{clt()} to \code{clt_eval()}.

clt(N = c(2,10,40,500), invcdf = "runif(n, -1, 1)", B = 10000) %>% clt_eval()

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