Skip to contents

Formats observations for use in the stan model. Note that the censoring limit is set internally in this function based on the minimum cycle threshold value present for a censored test. The package stan code (accessed using epict_model()) has more extensive documentation.

Usage

epict_obs_as_list(obs)

Arguments

obs

A data.frame with the following variables:

  • id: An integer vector uniquely identifying eahc infection.

  • test_id: An integer vector uniquely identiying each test

  • ct_value: Numeric cycle threshold value.

  • t: Relative (to a baseline) time of the test yielding a Ct value.

  • t_rel_uncensored: Time of test relative to the first uncensored Ct value for that id.

  • onset_t: Relative (to a baseline) time of onset for each infection

  • onset_t_rel_uncensored: Time of onset relative to the first uncensored Ct value for that id. (optional). NA if unavailable/asymptomatic.

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

Value

A list as required by stan.

Author

Sam Abbott