N1-class: Regularize n1

N1-classR Documentation

Regularize n1

Description

N1 is a class that computes the n1 value of a design. This can be used as a score in minimize.

Usage

N1(label = NA_character_)

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

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.

...

further optional arguments

Value

an object of class N1

See Also

See AverageN2 for a regularization of the second-stage sample size.

Examples

n1_score <- N1()

evaluate(
   N1(),
   TwoStageDesign(70, 0, 2, rep(60, 6), rep(1.7, 6))
) # 70


kkmann/adoptr documentation built on Feb. 3, 2024, 6:55 p.m.