setup_C: Normalised contact rate matrix

Description Usage Arguments Value Examples

View source: R/final_size.R

Description

Given a matrix of contact frequency between age classes and a matrix of true population sizes, gives the scaled, normalised contact rate matrix for each age/titre class.

Usage

1
setup_C(C1, Ns)

Arguments

C1

the non-normalised contact matrix of contact frequencies between each age class

Ns

the matrix of population sizes for each age/titre combination (non-normalised)

Value

a matrix of the normalised contact rates between all age/titre class combinations.

Examples

1
2
3
4
5
6
7
C <- matrix(c(2,.5,.4,0.3),ncol=2,nrow=2)
N11 <- 1000
N12 <- 1000
N21 <- 2000
N22 <- 750
N <- matrix(c(N11,N21,N12,N22),ncol=2,nrow=2)
C1 <- setup_C(C,N)

jameshay218/episize documentation built on May 18, 2019, 11:20 a.m.