| create.disProg {surveillance} | R Documentation |
Creates an object of class disProg from a vector with the weeknumber
(week) and matrices with the observed number of counts (observed) and the
respective state chains (state), where each column represents an individual
time series. The matrices neighbourhood and populationFrac provide
information about neighbouring units and population proportions.
create.disProg(week, observed, state, neighbourhood=NULL,
populationFrac=NULL)
week |
number of week |
observed |
matrix with parallel time series of counts where rows are time points and columns are the individual time series for unit/area i, i=1,...,m |
state |
matrix with corresponding states |
neighbourhood |
neighbourhood matrix N of dimension m times m with elements n_{ij}=1 if units i and j are adjacent and 0 otherwise |
populationFrac |
matrix with corresponding population proportions |
disProg |
object of class disProg
|
M. Paul
# create an univariate disProg object for the salmonella.agona data
data(salmonella.agona)
week <- nrow(salmonella.agona)
salmonellaDisProg <- create.disProg(week=week, observed=salmonella.agona$observed,
state=salmonella.agona$state)
# plot salmonella cases
title <- "Salmonella Agona cases in the UK"
plot(salmonellaDisProg, title = title, xaxis.years=TRUE, legend=FALSE,
startyear = 1990, firstweek = 1)