Learn R Programming

RBesT (version 1.2-2)

oc1Sdecision: Decision Function for 1 Sample Operating Characteristics

Description

The function sets up a 1 sample one-sided decision function with an arbitrary number of conditions which have all to be met.

Usage

oc1Sdecision(pc = 0.975, qc = 0, lower.tail = TRUE)

Arguments

pc

vector of critical cumulative probabilities of the difference distribution.

qc

vector of respective critical values of the difference distribution. Must match the length of pc.

lower.tail

logical value selecting if the threshold is a lower or upper bound.

Details

The function creates a one-sided decision function which takes two arguments. The first argument is expected to be a mixture (posterior) distribution. This distribution is tested whether it fulfills all the required threshold conditions specified with the pc and qc arguments and returns 1 of all conditions are met and 0 otherwise. Hence, for lower.tail=TRUE condition \(i\) is equivalent to

$$P(x \leq q_{c,i}) > p_{c,i}$$

and the decision function is implemented as indicator function on the basis of the heavy-side step function \(H\) which is \(0\) for \(x \leq 0\) and \(1\) for \(x > 0\). As all conditions must be met, the final indicator function returns

$$\Pi_i H_i(P(x \leq q_{c,i}) - p_{c,i} ).$$

When the second argument is set to TRUE a distance metric is returned component wise as

$$ D_i = \log(P(p < q_{c,i})) - \log(p_{c,i}) .$$

These indicator functions can be used as input for 1-sample OC calculations using oc1S.

See Also

oc1S