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")) )

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
    neighbours
    if TRUE an autoregressive parameter for adjacent units phi is included, if neighbours is a vector of logicals, unit-specific parameters phi_i are included
    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 nseason; 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 meanResponse

Value

list
    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

Author(s)

M.Paul, L. Held


[Package surveillance version 0.9-9 Index]