Skip to contents

This method takes vectors of event times (primary/secondary event times and observation time) and creates an epidist_linelist_data object. This format is useful when working with individual-level data where each row represents a single observation. See the other methods for other data input options.

Usage

# Default S3 method
as_epidist_linelist_data(
  data,
  ptime_upr = NULL,
  stime_lwr = NULL,
  stime_upr = NULL,
  obs_time = NULL,
  ...
)

Arguments

data

Numeric vector giving lower bounds for primary times.

ptime_upr

Numeric vector giving upper bounds for primary times.

stime_lwr, stime_upr

Numeric vectors giving lower and upper bounds for secondary times.

obs_time

Numeric vector giving observation times.

...

Additional columns to add to the epidist_linelist_data object.

Examples

as_epidist_linelist_data(
  data = c(1, 2, 3),
  ptime_upr = c(2, 3, 4),
  stime_lwr = c(3, 4, 5),
  stime_upr = c(4, 5, 6),
  obs_time = c(5, 6, 7)
)
#> # A tibble: 3 × 5
#>   ptime_lwr ptime_upr stime_lwr stime_upr obs_time
#>       <dbl>     <dbl>     <dbl>     <dbl>    <dbl>
#> 1         1         2         3         4        5
#> 2         2         3         4         5        6
#> 3         3         4         5         6        7