make_h_nr_tibble: Make a tibble of h_nr values from a tibble of symptom onset...

Description Usage Arguments Value Author(s)

View source: R/utilities.R

Description

Given a tibble (such as delay_data) with columns reported_date, symptom_onset_date (both dates) and time_to_report (numeric), create a tibble with columns n (symptom onset day), r (day of reporting) and h_nr (number of cases whose symptoms started on day n and case was reported on day r). Day start at 0, so $n, r \geq 0$. Do not need zero h_nr counts, so this is a bit easier to work with than the matrix form. TODO Needs expanding for ICU and hospitalisation data.

Usage

1
make_h_nr_tibble(input, day_0 = NULL, day_N = NULL)

Arguments

input

tibble containing columns reported_date, symptom_onset_date (both dates) and time_to_report (numeric), such as delay-data

day_0

date to consider as day 0. If NULL then uses min(input$symptom_onset_date)

day_N

date to consider as day N. If NULL then uses max(input$reported_date)

Value

tibble with columns n, r and h_nr

Author(s)

Andrew Edwards


andrew-edwards/rightTruncation documentation built on Jan. 18, 2021, 7:43 p.m.