Learn R Programming

adoptr (version 0.2.2)

ConditionalPower-class: (Conditional) Power of a Design

Description

This score evaluates . Note that the distribution of is the posterior predictive after observing .

Usage

ConditionalPower(dist, prior)

Power(dist, prior)

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

Arguments

dist

a univariate distribution object

prior

a Prior object

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

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab