Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

knobs

Run sensitivity analysis on model settings


Description

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

Usage

knobs(x, y, ...)

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

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

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

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

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

Arguments

x

the model object

y

a batch_mrgsims 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

## example("knobs")

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

Simulate from ODE-Based Models

v0.11.1
GPL (>= 2)
Authors
Kyle T Baron [aut, cre] (<https://orcid.org/0000-0001-7252-5656>), Bill Gillespie [ctb], Charles Margossian [ctb], Devin Pastoor [ctb], Bill Denney [ctb] (<https://orcid.org/0000-0002-5759-428X>), Dilawar Singh [ctb], Felicien Le Louedec [ctb] (<https://orcid.org/0000-0003-3699-2729>), Timothy Waterhouse [ctb] (<https://orcid.org/0000-0002-0954-9660>), Metrum Research Group [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.