calculate_c: Calculates exact value of C

View source: R/calculate_c.R

calculate_cR Documentation

Calculates exact value of C

Description

This function replicates the function in Mukhopadhyay \& de Silva (chapter 6, section 2) for the exact sample size given the variance, significance level, and confidence interval width for a fixed width confidence interval for the population mean of normal random variables.

Usage

calculate_c(var, alpha, d)

Arguments

var

The population variance.

alpha

The chosen Type I error rate (complement of the confidence coefficient).

d

Half of the confidence interval width. That is the confidence interval is 2d wide.

Value

The optimal sample size $C$, the “optimal fixed sample size required."

References

Mukhopadhyay, N., \& de Silva, B. M. (2009). Sequential Methods and Their Applications. New York: CRC Press.

Examples

calculate_c(var = 1, alpha = 0.05, d = 0.75)



yelleKneK/SMSD documentation built on Nov. 23, 2022, 6:40 p.m.