knobs: Run sensitivity analysis on model settings

Description Usage Arguments Details Value Examples

Description

Knobs can be parameter values or PK dosing items (e.g. amt). By design, all combinations of specified knob/values are simulated.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
knobs(x, y, ...)

## S4 method for signature 'mrgmod,missing'
knobs(x, y, ...)

## S4 method for signature 'mrgmod,knobs'
knobs(x, y, ...)

## S4 method for signature 'knobs'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S4 method for signature 'knobs,ANY'
knobs(x, y, ...)

## S4 method for signature 'knobs'
show(object)

Arguments

x

the model object

y

a knobs object

...

knobs: named numeric vectors that identify knob names and knob values for a batch run. See details.

row.names

passed to as.data.frame.data.frame

optional

passed to as.data.frame.data.frame

object

the object to show

Details

Valid knob names include: any parameter name (in param(mod)), time variables (start, end, delta), PK dosing items (amt, ii, rate, and others ...), and solver settings (atol, hmax, etc...).

Value

An object of class batch_mrgsims. Most methods for mrgsims objects also work on batch_mrgsims object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## example("knobs")

library(mrgsolve)

mod <- mrgsolve::house(end=72)

events <- ev(amt=1000, cmt=1, addl=3, ii=12)

out <- mod %>% ev(events) %>% knobs(CL=c(1,2,3))
plot(out)

out

out <- mod %>% ev(events) %>% knobs(CL=c(1,2,3), VC=c(5,20,50))
plot(out)
plot(out,CP~.)
plot(out, CP~time|VC, groups=CL, lty=2)

out <- knobs(mod, amt=c(100,300,500), cmt=1)
plot(out)

out <- mod %>% knobs(amt=c(100,300), CL=c(1,3), VC=c(5,20), cmt=1)
plot(out)
plot(out, CP~.)

out <- knobs(mod, CL=c(1,2,3))
out

out <- knobs(mod, CL=c(1,2,3))
out

mrgsolve/knobs documentation built on April 26, 2020, 12:43 a.m.