| checkStrata {LTASR} | R Documentation | 
Checks all strata in py_table are contained in rate file
Description
Checks all strata in py_table are contained in rate file
Usage
checkStrata(py_table, rateobj)
Arguments
| py_table | A stratified cohort created by  | 
| rateobj | A rate object created by  | 
Value
A list containing:
- The py_table with strata removed not found in rateobj 
- The observations from py_table that were removed 
Examples
library(LTASR)
library(dplyr)
library(purrr)
#Import example person file
person <- person_example %>%
  mutate(dob = as.Date(dob, format='%m/%d/%Y'),
         pybegin = as.Date(pybegin, format='%m/%d/%Y'),
         dlo = as.Date(dlo, format='%m/%d/%Y'))
#Import default rate object
rateobj <- us_119ucod_19602021
#Stratify person table
py_table <- get_table(person, rateobj)
#Check Strata are in rate file
checkStrata(py_table, rateobj)
[Package LTASR version 0.1.3 Index]