smr_minor {LTASR}R Documentation

Calculate SMRs for Minors

Description

smr_minor calculates SMRs for all minor groupings found within the rate object, rateobj, for the stratified cohort py_table

Usage

smr_minor(py_table, rateobj)

Arguments

py_table

A stratified cohort created by get_table, or the included rate object us_119ucod_19602021.

rateobj

A rate object created by parseRate

Value

A dataframe/tibble containing the expected and observed number of deaths as well as SMRs, lower CI and upper CI for each minor found in the rate object rateobj

Examples

library(LTASR)
library(dplyr)

#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)

#Calculate SMRs for all minors
smr_minor(py_table, rateobj)


[Package LTASR version 0.1.3 Index]