Skip to contents

Checks the available raw data for required variables and returns informative errors, warnings, and messages about the structure of the observations. It can be used both on datasets referenced using dates and datasets referenced using relative time.

Usage

epict_check_raw_obs(obs, dates_available = TRUE, check_onset = FALSE)

Arguments

obs

A data.frame with the following variables:

  • id: An integer vector uniquely identifying each infection.

  • test_id: An integer vector uniquely identiying each test

  • ct_value: Numeric cycle threshold value.

  • test_date: Date of the test yielding a Ct value. (optional)

  • t: Time of test relative to a baseline date. Optional but required if test_date is not present.

  • onset_date:e Date of onset for each infection (optional). NA if unavailable/asymptomatic

  • onset_t: Time on onset relative to a baseline date (optional).

  • censored: Logical, indicating if the Ct has been censored.

dates_available

Logical, defaults to TRUE. Are dates available in the observed data. If FALSE it is assumed that relative times should be available instead.

check_onset

Logical, defaults to FALSE. Should observations be checked for the presence of symptom onset data.

Value

Input observations are returned.

Author

Sam Abbott