Rj: Calculate reproductive numbers

View source: R/Rj.R

RjR Documentation

Calculate reproductive numbers

Description

Calculate individual reproductive numbers given data (n-length vectors : t, x, y) and prespecified likelihood functions (lpdf_GI, lpdf_SP)

Usage

Rj(
  t,
  x,
  y,
  adjSP = TRUE,
  GI.pdf = lpdf_GI(),
  SW.pdf = lpdf_SW(),
  unit_coord = c("degree", "meter")
)

Arguments

t

Vector of time of data points.

x

Vector of x coordinates of data points.

y

Vector of y coordinates of data points.

adjSP

Logical; if TRUE, reproductive numbers will be calculated with spatial adjustment; if FALSE, static plotting non-interactive thematic map reproductive numbers will be calculated only considering temporal relation.

GI.pdf

Probability distribution of generation interval; it can be generated by function 'lpdf_GI'.

SW.pdf

Probability distribution (exponential distribution) of tranmission distance; it can be generated by function 'lpdf_SW'.

unit_coord

The unit of the coordination; if 'degree' then calculate distance througth 'distLongLat'; if 'meter' then calculate distance directly.

Examples

data("EpiTrans")

res_adj = Rj(t = dengue$date, x = dengue$long, y = dengue$lat,GI.pdf = lpdf_GI(),SW.pdf = lpdf_SW(), adjSP = TRUE)
res = Rj(t = dengue$date, GI.pdf = lpdf_GI(), adjSP = FALSE)

wenlab501/EpiTrans documentation built on July 8, 2022, 9:14 a.m.