make_tunable: Fix parameters during optimization

Description Usage Arguments See Also Examples

Description

The methods make_fixed and make_tunable can be used to modify the 'tunability' status of parameters in a TwoStageDesign object. Tunable parameters are optimized over, non-tunable ('fixed') parameters are considered given and not altered during optimization.

Usage

1
2
3
4
5
6
7
8
9
make_tunable(x, ...)

## S4 method for signature 'TwoStageDesign'
make_tunable(x, ...)

make_fixed(x, ...)

## S4 method for signature 'TwoStageDesign'
make_fixed(x, ...)

Arguments

x

TwoStageDesign object

...

unquoted names of slots for which the tunability status should be changed.

See Also

TwoStageDesign, tunable_parameters for converting tunable parameters of a design object to a numeric vector (and back), and minimize for the actual minimzation procedure

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
design <- TwoStageDesign(25, 0, 2, 25, 2, order = 5)
# default: all parameters are tunable (except integration pivots,
# weights and tunability status itself)
design@tunable

# make n1 and the pivots of n2 fixed (not changed during optimization)
design <- make_fixed(design, n1, n2_pivots)
design@tunable

# make them tunable again
design <- make_tunable(design, n1, n2_pivots)
design@tunable

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