make.eval.set: Creating an evaluation dataset for fitting

Description Usage Arguments Details Examples

View source: R/MakeEvalSet.R

Description

Processes the case data to generate a list of metrics required for different aspects of evaluating model fit

Usage

1
make.eval.set(fitdat, weekdates, unipix)

Arguments

fitdat

Casedata, see ?sgdat for format

weekdates

Two element vector of the start and end weeks of the simulation over which the mdoel will be evaluated over

unipix

Universal pixel lookup table, see ?make.unipix

Details

returns a list with three elements: i) weekly detialed number of cases per patch, ii) Moran's weights for each pixel (for calculating Morans I) iii) Weekly cumulative total cases

Examples

1
2
3
4
5
6
7
data(sgdat)
data(sgpop)
sgpop <- pop.process(sgpop, agg = 10)
unipix <- make.unipix(sgpop)
sgdat <- data.frame(sgdat, patchID = apply(cbind(sgdat[, 3:2]), 1, pix.id.find, unipix))
EvalSet <- make.eval.set(sgdat, weekdates = c(40, 92), unipix)
summary(EvalSet)

obrady/SpatialDengue documentation built on Nov. 27, 2020, 12:13 p.m.