ConditionalSampleSize-class {adoptr}R Documentation

(Conditional) Sample Size of a Design

Description

This score simply evaluates n(d, x1) for a design d and the first-stage outcome x1. The data distribution and prior are only relevant when it is integrated.

Usage

ConditionalSampleSize()

ExpectedSampleSize(dist, prior)

## S4 method for signature 'ConditionalSampleSize,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

design <- TwoStageDesign(50, .0, 2.0, 50, 2.0, order = 5L)
prior  <- PointMassPrior(.4, 1)

css   <- ConditionalSampleSize()
evaluate(css, design, c(0, .5, 3))

ess   <- ExpectedSampleSize(Normal(), prior)

# those two are equivalent
evaluate(ess, design)
evaluate(expected(css, Normal(), prior), design)


[Package adoptr version 0.2.2 Index]