Calculate the change in population size between two times. When only one time is specified, the population size at that time is returned.

1 2 |

`model.out` |
an output from one of the following functions or a |

`variable` |
string with the name of the the output variable for which the change needs to be calculated (see the variable argument for |

`t1` |
value specifying the first time. |

`t2` |
value specifying the second time. |

`ratio` |
logical. When |

Value representing the ratio (if `ratio`

is `TRUE`

) or the difference (if `ratio`

is `FALSE`

) between population size at time t2 and t1. If only one time is specified, the value is the population size at that time.

http://oswaldosantos.github.io/capm

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ```
###################
## SolveSI model ##
###################
# Parameters and initial conditions.
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.
solve.si.pt = SolveSI(pars = pars.solve.si,
init = init.solve.si,
time = 0:15, dd = 'b',
im = 100, method = 'rk4')
# Calculate the population change (ratio) between times 0 and 15.
CalculatePopChange(solve.si.pt, variable = 'n', t2 = 15, t1 = 0)
# Calculate the population change (difference) between times 0 and 15.
CalculatePopChange(solve.si.pt, variable = 'n', t2 = 15,
t1 = 0, ratio = FALSE)
# Calculate the population zises at time 15.
CalculatePopChange(solve.si.pt, variable = 'n', t2 = 15)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.