Learn R Programming

R0 (version 1.2-10)

integrity.checks: Input parameters integrity checks

Description

Input parameters integrity checks

Usage

integrity.checks(epid, 
    t, GT, begin, end, 
    date.first.obs, time.step, 
    AR, S0, methods)

Arguments

epid

Name of epidemic dataset

t

Date vector

GT

Generation Time repartition function

begin

Begin date for estimation. Can be an integer or a date (YYYY-mm-dd or YYYY/mm/dd)

end

End date for estimation. Can be an integer or a date (YYYY-mm-dd or YYYY/mm/dd)

date.first.obs

Optional date of first observation, if t not specified

time.step

Optional. If date of first observation is specified, number of day between each incidence observation

AR

Attack rate as a percentage from total population

S0

Initial proportion of the population considered susceptible

methods

List of methods to be used for R0 estimation/comparison. Must be provided as c("method 1", "method 2", ...)

Author

Pierre-Yves Boelle, Thomas Obadia

Details

For internal use.

All integrity/class checks are handled by this core function. GT must be an object of class R0.GT, and epidemic curve along with time values are handled here. If you plan on calling manually any other estimation function, make sure data are provided with correct format.

The epidemic curve 'epid' may be provided as a vector. In that case, a vector t may be provided with the dates of observation. If t is not numeric, an attempt is made to convert to dates with as.Date. If t is not provided, dates are obtained from the names of incid, and inf not available, index values are used. Finally, one can provide an epidemic curve object generated by the Epitools package (see check.incid for details).

A quick note on 't', 'begin' and 'end' : When a date vector is provided (t), it will be used instead of index values to establish a date-related incidence. If no date vector is provided, then 'begin' and 'end' can still be forced to NUMERIC values. It then links to the corresponding index values for incidence data. If a date vector is provided, 'begin' and 'end' can either be NUMERIC values or DATES. If numeric, they will link to the correspondig index values for incidence, and afterward interpreted as the associated date. If date, they will be directly associated to incidence data. Basicly, if specified, 'begin' and 'end' must always have the same class.