make.design {surveillance} | R Documentation |
Create the design matrices
Description
Creates the design matrices needed for meanResponse
Usage
make.design(disProgObj, control=list(lambda=TRUE, neighbours=FALSE,
linear=FALSE, nseason=0,
negbin=c("none", "single", "multiple"),
proportion=c("none", "single", "multiple"),lag.range=NULL) )
Arguments
disProgObj |
object of class disProg
|
control |
control object:
lambda If TRUE an autoregressive
parameter λ is included, if lambda is a vector of logicals,
unit-specific parameters λ_i are included. By default, observations y_t-lag
at the previous time points, i.e. lag=1, are used for the autoregression. Other lags can be
used by specifying lambda as a vector of integers, see algo.hhh for details.
neighbours If TRUE an autoregressive parameter for
adjacent units φ is included, if neighbours is a vector of logicals,
unit-specific parameters φ_i are included. By default, observations y_t-lag
at the previous time points, i.e. lag=1, are used for the autoregression. Other lags can be
used by specifying neighbours as a vector of integers.
linear a logical (or a vector of logicals) indicating wether a linear
trend β (or a linear trend β_i for each unit)
is included
nseason Integer number of Fourier frequencies; if nseason is a vector
of integers, each unit i gets its own seasonal parameters
negbin if "single" negative binomial rather than poisson is used,
if "multiple" unit-specific overdispersion parameters are used.
proportion see details in algo.hhh
lag.range determines which observations are used to fit the model
|
Value
Returns a list with elements
Y |
matrix with number of cases y_it in unit i at
time t as elements, i.e. data without the first time point.
|
Ym1 |
matrix with previous number of cases y_i,t-1,
i.e data without the last time point.
|
Ym1.neighbours |
matrix with weighted sum of earlier counts of adjacent units
sum_(j ~ i) w_ji * y_j,t-1
|
nOfNeighbours |
vector with number of neighbours for each unit i
|
X.trendSeason |
design matrix for linear trend and seasonal components
|
populationFrac |
matrix with corresponding population proportions
|
dimTheta |
list with number of parameters used in model
|
control |
control object
|
disProgObj |
Object of class disProg
|
lag |
which lag is used for the autoregressive parameters λ and φ
|
nObs |
number of observations
|
Author(s)
M.Paul, L. Held
[Package
surveillance version 1.17.0.9000
Index]