System of ordinary differential equations to simulate the effect of sterilization and immigration on population dynamics.
1 2 
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. 
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.
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.
Logistic growth models are not intended for scenarios in which population size is greater than carrying capacity and growth rate is negative.
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. 300304.
Soetaert K, Cash J and Mazzia F (2012). Solving differential equations in R. Springer.
http://oswaldosantos.github.io/capm
ode.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  # Parameters and initial conditions from estimates
# obtained in examples section from svysumm function but
# estimating a proportion insted of a total for births.
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.
solvesi.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.
solvesi.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')

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.