Operating Characteristics

DESCRIPTION:

Computes the upper and lower power, ASN, and stopping probabilities for hypothesis tests.

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:

operating.char(x, theta=<<see below>>, how.many=50,  
               range.theta=<<see below>>, power.range=c(.01,.99),  
               upper=!(hypothesis(x)$type=="less"), 
               lower=!(hypothesis(x)$type=="greater")) 

REQUIRED ARGUMENTS:

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

OPTIONAL ARGUMENTS:

theta
a vector giving the values of $theta$ at which the operating characteristics are to be computed. By default, theta is initialized as how.many equally spaced values from range.theta[1] to range.theta[2].
how.many
the length of theta; only used if theta not provided.
range.theta
the range of theta; only used if theta not provided. By default, range.theta=inv.power(x, power.range, upper=upper, lower=lower); i.e., theta spans values which achieve the maximum and minimum power as specified by power.range.
power.range
power.range is used to determine range.theta (see above). Only used if range.theta not provided.
upper
if TRUE, then the upper power is used to determine range.theta.
lower
if TRUE, then the lower power is used to determine range.theta.

VALUE:

If x is a "seqdesign" object, then the function returns an object of class "operating.char.seqdesign". Otherwise, if x is a list of "seqdesign" objects, then function returns a list of "operating.char.seqdesign" objects. A "operating.char.seqdesign" is a matrix with length(theta) rows and the following columns
theta
the values of $theta$ at which the operating characteristics are computed.
power.lower
the lower power function defined by $Pr ( S <= a sub {sM} ; theta)$.
power.upper
the upper power function defined by $Pr ( S >= d sub {sM} ; theta)$.
asn
the average sample size function is defined by $sum from {k=1} to K {N sub k} Pr(M = k; theta)$.
lower.stop.prob(1) $...$ lower.stop.prob(K)
$K$ columns giving the probability of stopping for the lower alternative at times $1$, $...$, $K$.
null.stop.prob(1) $...$ null.stop.prob(K)
$K$ columns giving the probability of stopping for the null at times $1$, $...$, $K$.
upper.stop.prob(1) $...$ upper.stop.prob(K)
$K$ columns giving the probability of stopping for the upper alternative at times $1$, $...$, $K$.

DETAILS:

The C routine Sseq_OperatingChar is called.

SEE ALSO:

, , , , , .

EXAMPLES:

des <- seqdesign(sample.size=c(60,90,120), P=.5, not.stop="") 
## Compute operating characteristics for five values of 
## theta spanning the lower and upper alternative hypothesis; 
## this is the default behaviour of the summary function 
theta.min <- min(theta.alt(des)) 
theta.null <- theta0(des) 
theta.max <- max(theta.alt(des)) 
operating.char(des, theta=c(theta.min, mean(theta.min+theta.null), 
            theta.null, mean(theta.max+theta.null), theta.max)