CP.stats.SM {CLAST}R Documentation

Calculates all possible Clopper-Pearson limits.

Description

Calculates all possible Clopper-Pearson limits for p from an object that contains all possible data sets from a group sequential trial.

Usage

CP.stats.SM(obj, alpha = 0.05, type = "upper")

Arguments

obj

a list with elements S, M and design, containing all possible values of total successes S and stopping stage M based on the given design. Typically this is the output of function sample.space or sample.space.2 and will also have elements Y and decision.

alpha

coverage error of exact limits

type

character, either "upper" or "lower"

Value

a list with element "lims" as well as all elements of argument obj. The extra element contains the CP limit for each possible outcome.

Author(s)

Chris J. LLoyd

References

Clopper, C. and Pearson, E. S. (1934). The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika, 26 (4): 404-413. doi: 10.2307/2331986

Examples

n=c(5,6,5,9)
a=c(2,4,5,12)
b=c(5,9,11,13)
# There are 364 possible outcomes from this design which are
# listed in a natural systematic order by function sample.space.
all.samples=sample.space(n,a,b)
attributes(all.samples)
# Y contains the 364 possible sequential binary outcomes;
# M contains how many stages before the decision;
# S contains the total number of success that produces the decision;
# decision the final binary test result of H0 or H1.
CP.stats.SM(obj=all.samples)


[Package CLAST version 1.0.1 Index]