transition: Matrix time transition function

Description Usage Arguments Details Examples

View source: R/Transition.R

Description

As rows indicate time in each state, at the end of the timestep, each of the matrix-based states need to be moved down a row

Usage

1
transition(base, plus, minus)

Arguments

base

matrix, the model state, e.g. mos_E

plus

vector, new additions to the state, e.g. newmosE

minus

matrix, new subtractions from the state, e.g. newmosD

Details

Removes those who graduate from the state, shuffles down the rows by one then adds new additions to the first row of the matrix

Examples

1
2
3
4
mos_Es = matrix(round(runif(100, 5, 10), 0), nrow = 10, ncol = 10)
newmosE = round(runif(10, 0, 2), 0)
newmosD = matrix(round(runif(100, 0, 1), 0), nrow = 10, ncol = 10)
mos_EsT2 <- transition(mos_Es, newmosE, newmosD)

obrady/SpatialDengue documentation built on Nov. 27, 2020, 12:13 p.m.