hhh4_W: Power-Law and Nonparametric Neighbourhood Weights for...

Description Usage Arguments Value Author(s) References See Also Examples

Description

Set up power-law or nonparametric weights for the neighbourhood component of hhh4-models as proposed by Meyer and Held (2014). Without normalization, power-law weights are w_ji = o_ji^-d, where o_ji is the order of neighbourhood between regions i and j, see nbOrder, and d is to be estimated. In the nonparametric formulation, maxlag-1 order-specific log-weights are to be estimated (the first-order weight is always fixed to 1 for identifiability).

Usage

1
2
3
4
5
W_powerlaw(maxlag, normalize = TRUE,
           log = FALSE, initial = if (log) 0 else 1)

W_np(maxlag, to0 = TRUE, normalize = TRUE,
     initial = log(zetaweights(2:maxlag)))

Arguments

maxlag

a single integer specifying a limiting order of neighbourhood. If spatial dependence is not to be truncated at some high order, maxlag should be set to the maximum neighbourhood order in the network of regions.

to0

W_np represents order-specific log-weights up to order maxlag. Higher orders are by default (to0=TRUE) assumed to have 0 weight as for W_powerlaw. Alternatively, to0=FALSE requests that the weight at order maxlag should be carried forward to higher orders.

normalize

logical indicating if the weights should be normalized such that the rows of the weight matrix sum to 1 (default). Note that normalization does not work with islands, i.e., regions without neighbours.

log

logical indicating if the decay parameter d should be estimated on the log-scale to ensure positivity.

initial

initial value of the parameter vector.

Value

a list which can be passed as a specification of parametric neighbourhood weights in the control$ne$weights argument of hhh4.

Author(s)

Sebastian Meyer

References

Meyer, S. and Held, L. (2014): Power-law models for infectious disease spread. The Annals of Applied Statistics, 8 (3), 1612-1639.
DOI-Link: http://dx.doi.org/10.1214/14-AOAS743

See Also

nbOrder to determine the matrix of neighbourhood orders from a binary adjacency matrix.

siaf.powerlaw, and siaf.step for modelling distance decay as power law or step function in twinstim space-time point process models.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
data("measlesWeserEms")

## data contains neighbourhood orders as required for parametric weights
neighbourhood(measlesWeserEms)[1:6,1:6]
max(neighbourhood(measlesWeserEms))  # max order is 5

## fit a power-law decay of spatial interaction
## in a hhh4 model with seasonality and random intercepts in the endemic part
measlesModel <- list(
    ar = list(f = ~ 1),
    ne = list(f = ~ 1, weights = W_powerlaw(maxlag=5, normalize=TRUE, log=FALSE)),
    end = list(f = addSeason2formula(~-1 + ri(), S=1, period=52),
               offset = population(measlesWeserEms)),
    family = "NegBin1")

## fit the model
set.seed(1)  # random intercepts are initialized randomly
measlesFit <- hhh4(measlesWeserEms, measlesModel)
summary(measlesFit)  # "neweights.d" is the decay parameter d

## plot the spatio-temporal weights o_ji^-d / sum_k o_jk^-d
## as a function of neighbourhood order
plot(measlesFit, type="neweights")
## Due to normalization, same distance does not necessarily mean same weight.
## There is no evidence for a power law of spatial interaction in this
## small observation region with only 17 districts.
## A possible simpler model is first-order dependence, i.e., using
## 'weights = neighbourhood(measlesWeserEms) == 1' in the 'ne' component.

jimhester/surveillance documentation built on May 19, 2019, 10:33 a.m.