
Last chance! 50% off unlimited learning
Sale ends in
Updates epidemic model parameters originally set with
param.net
and adds new parameters.
update_params(x, new.param.list)
Object of class param.net
, output from function of same name.
Named list of new parameters to add to original parameters.
An updated list object of class param.net
, which can be passed to
EpiModel function netsim
.
This function allows for updating any original parameters specified with
param.net
and adding new parameters. This function would be
used when the inputs to param.net
may be a long list of
fixed model parameters that may need supplemental replacements or additions
for particular model runs (e.g., changing an intervention efficacy parameter
but leaving all other parameters fixed).
The new.param.list
object should be a named list object that may
named parameters matching those already in x
(in which case those
original parameter values will be replaced) or not matching (in which case
new parameters will be added to x
).
# NOT RUN {
x <- param.net(inf.prob = 0.5, act.rate = 2)
y <- list(inf.prob = 0.75, dx.rate = 0.2)
z <- update_params(x, y)
print(z)
# }
Run the code above in your browser using DataLab