Description Usage Arguments Value Author(s) References See Also Examples
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).
1 2 3 4 5 |
maxlag |
a single integer specifying a limiting order of
neighbourhood. If spatial dependence is not to be truncated at some
high order, |
to0 |
|
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. |
a list which can be passed as a specification of parametric
neighbourhood weights in the control$ne$weights
argument of
hhh4
.
Sebastian Meyer
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
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.
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.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.