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 |

`init` |
a named |

`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 |

`z.range` |
optional |

`...` |
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")
```

*capm*version 0.14.0 Index]