ConditionalPower-class: (Conditional) Power of a Design

Description Usage Arguments See Also Examples

Description

This score evaluates P[X2 > c2(design, X1) | X1 = x1]. Note that the distribution of X2 is the posterior predictive after observing X1 = x1.

Usage

1
2
3
4
5
6
ConditionalPower(dist, prior, label = "Pr[x2>=c2(x1)|x1]")

Power(dist, prior, label = "Pr[x2>=c2(x1)]")

## S4 method for signature 'ConditionalPower,TwoStageDesign'
evaluate(s, design, x1, optimization = FALSE, ...)

Arguments

dist

a univariate distribution object

prior

a Prior object

label

object label (string)

s

Score object

design

object

x1

stage-one test statistic

optimization

logical, if TRUE uses a relaxation to real parameters of the underlying design; used for smooth optimization.

...

further optional arguments

See Also

Scores

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
prior <- PointMassPrior(.4, 1)
cp <- ConditionalPower(Normal(), prior)
evaluate(
   cp,
   TwoStageDesign(50, .0, 2.0, 50, 2.0, order = 5L),
   x1 = 1
)
# these two are equivalent:
expected(cp, Normal(), prior)
Power(Normal(), prior)

adoptr documentation built on June 28, 2021, 5:11 p.m.