Description Usage Arguments Details Value Note Author(s) See Also Examples
ODEmorris.ODEnetwork
performs a sensitivity analysis for objects of
class ODEnetwork
using the Morris screening method.
Package ODEnetwork
is required for this function to work.
1 2 3 4 5 |
mod |
[ |
pars |
[ |
times |
[ |
binf |
[ |
bsup |
[ |
r |
[ |
design |
[ |
scale |
[ |
ode_method |
[ |
parallel_eval |
[ |
parallel_eval_ncores |
[ |
... |
further arguments passed to or from other methods. |
If the object of class ODEnetwork
supplied for mod
doesn't
include any events, the solution of the ODE network is determined
analytically using simuNetwork
. In the presence
of events, simuNetwork
uses
ode
to solve the ODE network numerically.
The sensitivity analysis is done for all state variables and all
timepoints simultaneously using morris
from the
package sensitivity
.
For non-ODE models, values for r
are typically between 10 and 50.
However, much higher values are recommended for ODE models (the default is
r = 500
).
List of class ODEmorris
of length 2 * nrow(mod$state)
containing in each element a matrix for one state variable (all components
of the 2 state variables are analyzed independently). The matrices
themselves contain the Morris screening results for all timepoints (rows:
mu, mu.star
and sigma
for every parameter; columns:
timepoints).
In situations where the solution of the ODE model has to be determined
numerically, it might be helpful to try another ODE-solver if the
evaluation of the model function takes too long, (argument
ode_method
). The ode_method
s "vode"
, "bdf"
,
"bdf_d"
, "adams"
, "impAdams"
and "impAdams_d"
might be faster than the default "lsoda"
.
If morris
throws a warning message stating
"In ... keeping ... repetitions out of ...", try using a bigger number of
levels
in the design
argument (only possible for OAT design).
Frank Weber
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 31 32 33 34 | ##### A network of 4 mechanical oscillators connected in a circle #####
# Definition of the network using the package "ODEnetwork":
M_mat <- rep(2, 4)
K_mat <- diag(rep(2 * (2*pi*0.17)^2, 4))
K_mat[1, 2] <- K_mat[2, 3] <-
K_mat[3, 4] <- K_mat[1, 4] <- 2 * (2*pi*0.17)^2 / 10
D_mat <- diag(rep(0.05, 4))
library("ODEnetwork")
lfonet <- ODEnetwork(masses = M_mat, dampers = D_mat, springs = K_mat)
# The parameters to be included in the sensitivity analysis and their lower
# and upper boundaries:
LFOpars <- c("k.1", "k.2", "k.3", "k.4",
"d.1", "d.2", "d.3", "d.4")
LFObinf <- c(rep(0.2, 4), rep(0.01, 4))
LFObsup <- c(rep(20, 4), rep(0.1, 4))
# Setting of the initial values of the state variables:
lfonet <- setState(lfonet, state1 = rep(2, 4), state2 = rep(0, 4))
# The timepoints of interest:
LFOtimes <- seq(25, 150, by = 2.5)
# Morris screening:
set.seed(283)
# Warning: The following code might take very long!
LFOres_morris <- ODEmorris(mod = lfonet,
pars = LFOpars,
times = LFOtimes,
binf = LFObinf,
bsup = LFObsup,
r = 500,
design = list(type = "oat",
levels = 10, grid.jump = 1),
scale = TRUE,
parallel_eval = TRUE,
parallel_eval_ncores = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.