Inference for a Hypothesis Test

DESCRIPTION:

Compute point estimates, $p$-values, and confidence intervals for a hypothesis test.

This function is an S Version 3 generic (see Methods); method functions can be written to handle specific S Version 3 classes of data. Classes which already have methods for this function include:
seqdesign

USAGE:

inference(x, K=<<see below>>, observed=<<see below>>, ordering="m",  
          upper=!(hypothesis(x)$type=="less"), 
          conf.level.ci=sum(conf.level(x))-1, 
          method="umvue", labels=1:length(K), ...) 

REQUIRED ARGUMENTS:

x
a group sequential design object inheriting from "seqdesign" or a list of group sequential design objects.

OPTIONAL ARGUMENTS:

K
a vector of analysis times at which to make inferences. By default, K are the analysis times of the boundaries of x.
observed
a vector of observed statistics. By default, observed are the boundaries of x. The length(observed) should equal length(K).
ordering
a character indicating how to compute the confidence intervals: "m" corresponds to sample mean ordering and "a" corresponds to analysis time ordering.
upper
if TRUE, then the $p$-value is computed for the upper alternative.
conf.level.ci
the confidence level of the confidence intervals.
method
a character string or function giving the method used for computing a point estimate.
labels
the names of the data pairs (K, observed); the length(labels) should equal length(K). This is used for printing and plotting.
...
additional arguments can be passed to method.

VALUE:

If x is a "seqdesign" object, then the function returns an object of class "inference.seqdesign". Otherwise, if x is a list of "seqdesign" objects, then function returns a list of "inference.seqdesign" objects. A "inference.seqdesign" is a list with components
K
a vector of analysis times.
observed
a vector of the observed statistics.
sample.size
a vector of the sample size at the analysis times.
p.value
a vector of the $p$-values of the observed statistics.
estimate
a vector of the point estimates using method method.
ci
a length(K) by 2 matrix giving lower and upper bounds on the confidence interval.
labels
labels for printing and plotting.

SEE ALSO:

, , , .

EXAMPLES:

des <- seqdesign(sample.size=c(45,65,90), conf.level=.95, model=model, P=1) 
observed <- c(10/45, 13/65)  
inference(des1, c(1,2), observed)