Skip to contents

Given past incidence in N locations, this function (a) jointly estimates the reproduction number and the probability of movement, or (b) if pmovement is not NULL, estimates only the reproduction number

Usage

spatial_estimate(
  x,
  si,
  window = 7L,
  pmovement = NULL,
  population,
  distance,
  alpha,
  beta,
  K,
  model = "poisson",
  priors,
  ...
)

Arguments

x

A matrix of past incidence (integer). The matrix has 1 column for each location; that is, each column is interpreted as the incidence in a location.

si

A matrix of discretised serial interval, assumed to be the same same for all locations. These can be generated easily using the package EpiEstim. See vignettes for examples.

window

integer indicating the length of the window over which Rt is to be estimated. Window length is assumed to be the same for all locations. Default value is 7 i.e. Rt is estimated over a weekly window. Currently only non-overlapping windows are supported.

pmovement

either NULL or a N X N matrix where N is the number of locations. If pmovement is NULL, then this function jointly estimates the parameters of gravity and branching process models. The gravity model describes the population movement and the brancing process model describes the underlying transmission process.

population

a vector of length N giving the populations of each location. Silently ignored if pmovement is not NULL

distance

N X N matrix of the distances between the N locations. Silently ignored if pmovement is not NULL

alpha

gravity model paramater; exponent on source population

beta

gravity model paramater; exponent on destination population

K

gravity model paramater

model

Currently only "poisson" is supported

priors

a list specifying priors for the model. To use the default priors, use the function `spatial_priors`

...

Additional parameters to be passed to stan

Value

Fitted stan model, a stanfit object

Author

Sangeeta Bhatia