
System of ordinary differential equations to simulate the effect of immigration of owned dogs, abandonment, sterilization of owned and stray dogs and adoption, on population dynamics.
SolveIASA(pars = NULL, init = NULL, time = NULL, s.range = NULL,
a.range = NULL, alpha.range = NULL, v.range = NULL, s.fm = TRUE, ...)
a named vector
of length 21, with point estimates of model parameters (see details).
a named vector
of length 8, with point estimates of model parameters (see details).
time sequence for which output is wanted; the first value of times must be the initial time.
optional sequence (between 0 and 1) of the sterilization rates to be simulated.
optional vector
of length 2, with range (ie, confidence interval) of abandonment rates to be assessed. If given, the rates evaluated are those specified by the argument plus the point estimate given in pars
.
optional vector
of length 2, with range (ie, confidence interval) of adoption rates to be assessed. If given, the rates evaluated are those specified by the argument plus the point estimate given in pars
.
optional vector
of length 2, with range of values of immigration rates to be assessed. This must be expressed as a percentage of owned animals carrying capacity.
logical. If TRUE
, s.range is used for females and males and if FALSE
, it is used only for females (for males, the point estimate given in pars
is used.)
further arguments passed to ode function.
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 sixth element results
is a data.frame
with up to as many rows as elements in time. The first column contain the time and subsequent columns contain the size of specific subpopulations, named according to conventions above. The group
column differentiate between owned and strays. When *.range arguments are given, the last fourth columsn specify their instances.
The implemented model is described by Baquero, et. al., 2016 and the function is a wrapper around the defaults of ode function, whose help page must be consulted for details.
The pars
argument must contain named values, using the following conventions: 1
: owned animals; 2
: stray animals; f
: females; m
: males. Then:
b1
and b2
: number of births.
df1
, dm1
, df2
and dm2
: death rate.
sf1
, sm1
, sf2
and sm2
: sterilization rate.
k1
and k2
: carrying capacity.
h1
and h2
: mean harem size.
a
: abandonment rate.
alpha
: adoption rate.
v
: immigration rate.
z
: proportion of sterilized immigrants.
The init
argument must contain named values for the inital number of animals, using the following conventions: 1
: owned animals; 2
: stray animals; f
: females; m
: males; and s
: sterilized. Then, the names are:
f1
, fs1
, m1
, ms1
, f2
, fs2
, m2
and ms2
.
If any range is specified (e.g s.range
), the remaining ranges must be specified too (a.range
, alpha.range
and v.range
).
The function is a wrapper around the defaults of ode function, whose help page must be consulted for details. An exception is the method argument, which here has "rk4" as a default.
http://oswaldosantos.github.io/capm
Baquero, O. S., Akamine, L. A., Amaku, M., & Ferreira, F. (2016). Defining priorities for dog population management through mathematical modeling. Preventive veterinary medicine, 123, 121-127.
ode.
# NOT RUN {
# Parameters and initial conditions.
pars_solve_iasa = c(
b1 = 21871, b2 = 4374,
df1 = 0.104, dm1 = 0.098, df2 = 0.125, dm2 = 0.118,
sf1 = 0.069, sf2 = 0.05, sm1 = 0.028, sm2 = 0.05,
k1 = 98050, k2 = 8055, h1 = 1, h2 = 0.5,
a = 0.054, alpha = 0.1, v = 0.2, z = 0.1)
init_solve_iasa = c(
f1 = 33425, fs1 = 10865,
m1 = 38039, ms1 = 6808,
f2 = 3343, fs2 = 109,
m2 = 3804, ms2 = 68)
# Solve for point estimates.
solve_iasa_pt <- SolveIASA(pars = pars_solve_iasa,
init = init_solve_iasa,
time = 0:8, method = "rk4")
# Solve for parameter ranges.
solve_iasa_rg <- SolveIASA(pars = pars_solve_iasa,
init = init_solve_iasa,
time = 0:8,
s.range = seq(0, .4, l = 15),
a.range = c(0, .2),
alpha.range = c(0, .2),
v.range = c(0, .1),
method = "rk4")
# }
Run the code above in your browser using DataLab