AverageN2-class: Regularization via L1 norm

Description Usage Arguments Value See Also Examples

Description

Implements the L1-norm of the design's stage-two sample size function. The average of the stage-two sample size without weighting with the data distribution is computed. This can be interpreted as integration over a unifrom prior on the continuation region.

Usage

1
2
3
4
AverageN2(label = NA_character_)

## S4 method for signature 'AverageN2,TwoStageDesign'
evaluate(s, design, optimization = FALSE, subdivisions = 10000L, ...)

Arguments

label

object label (string)

s

Score object

design

object

optimization

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

subdivisions

number of subdivisions to use for adaptive integration (only affects non-optimization code)

...

further optional arguments

Value

an object of class AverageN2

See Also

N1 for penalizing n1 values

Examples

1
2
3
4
5
6
avn2 <- AverageN2()

evaluate(
   AverageN2(),
   TwoStageDesign(100, 0.5, 1.5, 60.0, 1.96, order = 5L)
) # 60

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