SolveSI {capm} | R Documentation |
Modelling of sterilization and immigration of comapnion animals.
Description
System of ordinary differential equations to simulate the effect of sterilization and immigration on population dynamics.
Usage
SolveSI(pars = NULL, init = NULL, time = NULL, dd = "b", im = 0,
s.range = NULL, ...)
Arguments
pars |
|
init |
|
time |
time sequence for which output is wanted; the first value of times must be the initial time. |
dd |
string equal to |
im |
a number representing the total of immigrants per time unit. |
s.range |
optional sequence (between 0 and 1) of the sterilization rates to be simulated. |
... |
further arguments passed to ode function. |
Details
The implemented model is described by Amaku, et. al., 2009 and the function is a wrapper around the defaults of ode function, whose help page must be consulted for details.
Value
list
. The first element, name
, is a string with the name of the function, the second element, model
, is the model function. The third, fourth and fifth elements are vectors (pars
, init
, time
, respectively) containing the pars
, init
and time
arguments of the function. The sisxth element results
is a data.frame
with up to as many rows as elements in time. First column contains the time, second column the population size and third column the proportion of sterilized animals. If s.range
is specified, fourth column contains its specific instances.
Note
Logistic growth models are not intended for scenarios in which population size is greater than carrying capacity and growth rate is negative.
References
Amaku M, Dias R and Ferreira F (2009). Dinamica populacional canina: potenciais efeitos de campanhas de esterilizacao. Revista Panamericana de Salud Publica, 25(4), pp. 300-304.
Soetaert K, Cash J and Mazzia F (2012). Solving differential equations in R. Springer.
http://oswaldosantos.github.io/capm
See Also
ode.
Examples
# Parameters and initial conditions.
pars_solve_si = c(b = 0.245, d = 0.101,
k = 98050, s = 0.048)
init_solve_si = c(n = 89137, q = 0.198)
# Solve for a specific sterilization rate.
solve_si_pt = SolveSI(pars = pars_solve_si,
init = init_solve_si,
time = 0:15, dd = "b",
im = 100, method = "rk4")
# Solve for a range of sterilization rates.
solve_si_rg = SolveSI(pars = pars_solve_si,
init = init_solve_si,
time = 0:15, dd = "b", im = 100,
s.range = seq(0, .4, l = 50),
method = "rk4")