Learn R Programming

MSPRT (version 2.1)

error.summary: Error probabilities of a MSPRT

Description

This function post processes the outputs of overshoot.oneProp(), overshoot.oneZ(), overshoot.oneT(), overshoot.twoZ() and overshoot.twoT(), and then calculates the Type 1 or Type 2 error probabilities of a MSPRT.

Usage

error.summary(error.type, delta, root, count, inconclusive.vec, R,
              type1, type2)

Arguments

error.type

a character;

``type1'' for computing Type 1 error probability.

``type2'' for computing Type 2 error probability.

delta

a positive numeric; the termination threshold.

root

a numeric; given this, (error probability - root) is returned.

count

a numeric (integer);

same as the ``count'' output from overshoot.oneProp(), overshoot.oneZ(), overshoot.oneT(), overshoot.twoZ() and overshoot.twoT() of the same error.type.

inconclusive.vec

a numeric vector;

same as the ``inconclusive.vec'' output from overshoot.oneProp(), overshoot.oneZ(), overshoot.oneT(), overshoot.twoZ() and overshoot.twoT() of the same error.type.

R

a numeric (integer); number of replications in Monte Carlo method that is used in overshoot.oneProp(), overshoot.oneZ(), overshoot.oneT(), overshoot.twoZ() and overshoot.twoT() of the same error.type.

type1

a numeric in (0,1); the probability at which we want to control the Type 1 error of the MSPRT.

type2

a numeric in (0,1); the probability at which we want to control the Type 2 error of the MSPRT.

Value

a numeric; the difference (error probability of the MSPRT - root).

Details

Suppose we have the Monte Carlo outputs from overshoot.oneProp() or overshoot.oneZ() or overshoot.oneT() or overshoot.twoZ() or overshoot.twoT() corresponding to some error.type. Given these, the function returns the difference (error probability - root) for the MSPRT whose termination threshold is delta.