SolveIASA {capm}R Documentation

Modelling of immigration, abandonment, sterilization and adoption of companion animals

Description

System of ordinary differential equations to simulate the effect of immigration of owned dogs, abandonment, sterilization of owned and unowned dogs and adoption, on population dynamics.

Usage

SolveIASA(pars = NULL, init = NULL, time = NULL,
  alpha.owned = TRUE, immigration.reference = "N1", s.range = NULL,
  a.range = NULL, alpha.range = NULL, v.range = NULL, s.fm = TRUE,
  ...)

Arguments

pars

a named vector of length 21, with point estimates of model parameters (see details).

init

a named vector of length 8, with point estimates of model parameters (see details).

time

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

alpha.owned

logical. If TRUE (default), adoption rate is relative to the owned population (proportion of the owned population). If FALSE, it is relative to the unowned population.

immigration.reference

character indicating the value of reference to calculate the immigration rate. If "N1" (default), the total of immigrants is the product of the owned population size times the immigration rate (N1 \* v). If k1, it is the product of the owned carrying capacity times the immigration rate (k1 \* v).

s.range

optional sequence (between 0 and 1) of the sterilization rates to be simulated.

a.range

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.

alpha.range

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.

v.range

optional vector of length 2, with range of values of immigration rates to be assessed.

s.fm

logical. If TRUE, s.range is used for females and males and if FALSE, it is used for only females (for males, the point estimate given in pars is used.)

...

further arguments passed to ode function.

Details

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: unowned 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: unowned 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.

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 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 unowned. When *.range arguments are given, the last fourth columsn specify their 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

Baquero, O. S., Marconcin, S., Rocha, A., & Garcia, R. D. C. M. (2018). Companion animal demography and population management in Pinhais, Brazil. Preventive Veterinary Medicine. 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.

http://oswaldosantos.github.io/capm

See Also

ode.

Examples

## Parameters and intial conditions.
data(dogs)
dogs_iasa <- GetDataIASA(dogs,
                         destination.label = "Pinhais",
                         total.estimate = 50444)

# Solve for point estimates.
solve_iasa_pt <- SolveIASA(pars = dogs_iasa$pars,
                           init = dogs_iasa$init,
                           time = 0:15,
                           alpha.owned = TRUE,
                           method = 'rk4')
solve_iasa_rg <- SolveIASA(pars = dogs_iasa$pars,
                           init = dogs_iasa$init, 
                           time = 0:10,
                           alpha.owned = TRUE,
                           s.range = seq(0, .4, l = 15), 
                           a.range = c(0, .2), 
                           alpha.range = c(0, .05),
                           v.range = c(0, .1),
                           method = 'rk4')


[Package capm version 0.14.0 Index]