computeCvPoisson: Compute critical values for Poisson data

View source: R/MaxSprtCriticalValues.R

computeCvPoissonR Documentation

Compute critical values for Poisson data

Description

Obtains critical values for the group and continuous sequential MaxSPRT test with Poisson data, using a Wald type upper boundary, which is flat with respect to the likelihood ratio function, and with a pre-specified upper limit on the sample size.

It is often not possible to select a critical value that corresponds to the exact alpha specified. Instead, this function will select the least conservative critical value having an alpha below the one specified, so the sequential analysis is conservative.

This function is a re-implementation of the CV.Poisson function in the Sequential package, using Monte-Carlo.

Usage

computeCvPoisson(
  groupSizes,
  minimumEvents = 1,
  alpha = 0.05,
  sampleSize = 1e+06,
  nullMean = 0,
  nullSd = 0
)

Arguments

groupSizes

Vector containing the expected number of events under H0 for each test.

minimumEvents

The minimum number of events needed before the null hypothesis can be rejected.

alpha

The significance level, or the type 1 error probability, which is the probability of rejecting the null hypothesis when it is true.

sampleSize

Sample size for the Monte-Carlo simulations.

nullMean

The mean of the empirical null distribution.

nullSd

The standard deviation of the empirical null distribution.

Value

The computed critical value. The 'alpha' attribute of the result indicates the selected alpha.

Examples

groupSizes <- rep(1, 10)
computeCvPoisson(groupSizes)


EmpiricalCalibration documentation built on Aug. 9, 2022, 5:07 p.m.