CalculatePopChange {capm} R Documentation

## Population change.

### Description

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

### Usage

CalculatePopChange(model.out = NULL, variable = NULL, t1 = NULL,
t2 = NULL, ratio = TRUE)


### Arguments

 model.out output from one of the following functions or a list with equivalent structure: SolveIASA, SolveSI, SolveTC or CalculateGlobalSens. When the last function is used, its all argument must be TRUE. variable string with the name of the the output variable for which the change are to be calculated (see the variable argument for PlotModels. t1 value specifying the first time. t2 value specifying the second time. ratio logical. When TRUE, the calculated change is based on poulation size at t2 divided by population size at t1. When FALSE, the calculated change is based on poulation size at t2 minus population size at t1.

### Value

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.

### 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.

### Examples

## IASA model

## 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')

# Calculate the population change (ratio) between times 0 and 15.
CalculatePopChange(solve_iasa_pt, variable = 'N1', t2 = 15, t1 = 0)

# Calculate the population change (difference) between times 0 and 15.
CalculatePopChange(solve_iasa_pt, variable = 'N1', t2 = 15,
t1 = 0, ratio = FALSE)

# Calculate the population zises at time 15.
CalculatePopChange(solve_iasa_pt, variable = 'N1', t2 = 15)



[Package capm version 0.14.0 Index]