check_ech: Determine the differences in mean that I can detect for a...

View source: R/sample_bootstrap.R

check_echR Documentation

Determine the differences in mean that I can detect for a known sample size

Description

Determine the differences in mean that I can detect for a known sample size

Usage

check_ech(n, mean, sd, conf.level = 0.99, conf = 0.95, iter = 200, cut = 100)

Arguments

n

Size of my sample.

mean

Average of my reference sample.

sd

Standard deviation of my sample.

conf.level

Expected confidence on Student's test when comparing 2 samples (0 to 1)

conf

Frequency of times we wish to have the desired p-value defined

iter

Number of iterations per bootstrap

cut

Resolution (number of steps)

Value

The minimum detectable effect size (mean difference) that can be identified with the given sample size, confidence level, and other parameters. If it is not possible to find a significant variation with the provided sample size, a message will be printed.

Examples

# What minimum variation could I detect for a sample of 20 individuals (mean 170, sd 20)?
check_ech(n=20, mean = 170, sd = 20)

Antoine-Masse/KefiR documentation built on July 4, 2024, 11:40 a.m.