seq_fwd_nexp_mean: seq_fwd_nexp_mean

View source: R/seq_fwd_nexp_mean.R

seq_fwd_nexp_meanR Documentation

seq_fwd_nexp_mean

Description

Purely Sequential approach to Get Fixed Width Confidence Interval for the mean of negative exponential random variables.

Usage

seq_fwd_nexp_mean(
  data,
  d,
  alpha,
  gamma,
  pilot = FALSE,
  verbose = FALSE,
  na.rm = TRUE
)

Arguments

data

The data for which to calculate the confidence interval. A numeric vector.

d

Half of the confidence interval width, must be a non-zero positive value.

alpha

The significance level. A value between 0 and 1.

gamma

gamma

pilot

Should a pilot sample be generated. TRUE/FALSE value. default value is FALSE.

verbose

Should the criterion be printed. Default is FALSE.

na.rm

This parameter controls whether NA values are removed from the data prior to calculation. Default is TRUE.

Value

The calculated confidence interval, the sample size, data mean, and an indicator of if the criterion was satisfied.

Author(s)

Bhargab Chattopadhyay Bhargab@iiitvadodara.ac.in, Neetu Shah 201451015@iiitvadodara.ac.in, Ken Kelley kkelley@nd.edu

References

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

Examples

pilot_ss <- seq_fwd_nexp_mean(alpha=0.05, d=0.2, gamma=1, pilot=TRUE)
SLS <- rexp(pilot_ss, rate=1)
seq_fwd_nexp_mean(data=SLS, d=0.2, alpha=0.05, pilot=FALSE)

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