epinowcast / epidist

An R package for estimating epidemiological delay distributions
http://epidist.epinowcast.org/
Other
12 stars 4 forks source link

Function from dates to general linelist censored primary and secondary times #142

Open athowes opened 3 months ago

athowes commented 3 months ago

After completion of intial PR https://github.com/epinowcast/epidist/pull/125 adding as_latent_individual functionality we should continue to build out the range of data which can be processed and run with the latent_individual model. To enable date format data to be processed I propose to add a helper function mapping it to a format which can be accepted by existing as_latent_individual functionality. More specifically:

A. General format (as accepted by current as_latent_individual):

column type
case int
ptime_lwr num
ptime_upr num
stime_lwr num
stime_upr num
obs_at num

B. Only dates format:

column type
case int
ptime_date num or date
stime_date num or date
obs_at num

Proposed workflow would be:

A <- function_in_this_issue(B)
prep_obs <- as_latent_individual(A)

Maybe or out of scope for this issue

Uncertainties

Could argue about this approach versus prep_obs <- function_in_this_issue(B) direct routes? i.e. putting the transformation inside as_latent_individual.

New issues

athowes commented 3 months ago

Sam notes that there are multiple possible date formats. For example there could be start and end points which are dates.