SolveTC {capm}R Documentation

Modelling of reversible contraception for companion animals

Description

System of ordinary differential equations to simulate the effect of reversible contraception in a population at equilibrium, where deaths are compensated by births and net immigration.

Usage

SolveTC(pars = NULL, init = NULL, time = NULL, f.range = NULL,
  s.range = NULL, z.range = NULL, ...)

Arguments

pars

a named vector of length 5. The values are point estimates of the death rate (d), the fertility recovery rate (f), the sterilization rate (s), the proportion of infertile immigrants (z) and the proportion of the death rate compensated by immigration (r). Abreviations in parentheses indicate the names that must be given to the values.

init

a named vector of length 2, with the total number of fertile (n) and infertile (g) animals.

time

time sequence for which output is wanted; the first value of times must be the initial time.

f.range

optional sequence (between 0 and 1) with the fertility recovery rates to be simulated.

s.range

optional vector of length 2, with a range of sterilization rates to be assessed. If given, the rates evaluated are those specified by the argument plus the point estimate given in pars.

z.range

optional vector of length 2, with a range of the proportion of infertile immigrants. If given, the rates evaluated are those specified by the argument plus the point estimate given in pars.

...

further arguments passed to ode function.

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 sisxthth element results is a data.frame with up to as many rows as elements in time. The first fourth columns contain the time and the variables: n, g and u. When *.range arguments are given, additional columns contain the variables f, s and z.

References

http://oswaldosantos.github.io/capm

Baquero, O. S., Brandao, A. P. D., Amaku, M., & Ferreira, F. (2016). Effectiveness of reversible contraception in dog population management. Acta Scientiae Veterinariae, 44, 01-06.

See Also

ode.

Examples

# Parameters and initial conditions.
pars_solvetc <- c(d = 1 / 6, f = 0.5, s = 0.2, 
                   z = 0.2, r = 0.8)

init_solvetc <- c(n = 950, g = 50)

# Solve for point estimates.
solve_tc_pt <- SolveTC(pars = pars_solvetc, 
                      init = init_solvetc, 
                      time = 0:10, method = "rk4")

# Solve for parameter ranges.
solve_tc_rg <- SolveTC(pars = pars_solvetc, 
                      init = init_solvetc, 
                      time = 0:15,
                      f.range = seq(0, 1, 0.1), 
                      s.range = c(0.05, 0.4), 
                      z.range = c(0.05, 0.4),
                      method = "rk4")


[Package capm version 0.14.0 Index]