Skip to contents

Raises specific errors when encountering issues in the data.

Usage

check_data(data, model)

Arguments

data

data.frame to check

model

srpmodel object used to fit data

Value

data.frame, same as input but all censoring events after terminal states are removed.

Examples

tbl <- data.frame(group_id = "A", subject_id = "A1", t = 0, state = "stable")
mdl <- create_srpmodel(A = define_srp_prior())
check_data(tbl, mdl)
#> # A tibble: 1 × 4
#>   group_id subject_id     t state 
#>   <chr>    <chr>      <dbl> <chr> 
#> 1 A        A1             0 stable