Create quality indicators
create_quality.Rd
This function generates a data frame or a list of data frames containing the quality indicators for population-based cancer registries (PBCRs). These indicators include various metrics such as:
fbs
: Number of incident cases.fbl
: Incidence rate.sws
: Number of death cases.swl
: Mortality rate.mv
: Percentage of cases with microscopic verification.mi
: Mortality-to-incidence ratio.And other relevant quality metrics for cancer data evaluation.
Usage
create_quality(x, ..., decimal = 2)
# S3 method for class 'canreg'
create_quality(x, ..., cancer_type = "big")
# S3 method for class 'canregs'
create_quality(x, ..., cancer_type = "big")
# S3 method for class 'fbswicds'
create_quality(x, ..., decimal = 2)
# S3 method for class 'fbswicd'
create_quality(x, ..., decimal = 2)
Arguments
- x
The input data, object with class of
'fbswicd'
,'fbswicds'
,'canreg'
, or'canregs'
.- ...
One or more variables used for stratification. For example, you can stratify by
sex
,year
,cancer
, or just byyear
. If sex is not passed as a parameter, the output will be the result for the combined gender.- decimal
The number of decimal places to include in the resulting quality indicator values. Defaults to 2.
- cancer_type
A character string specifying the classification method used to categorize ICD-10 codes. This determines how ICD-10 codes are classified. Options include
"big"
(classify ICD-10 codes into 26 cancer categories),"small"
(classify ICD-10 codes into 59 cancer categories, more specific categories),"system"
(classify ICD-10 codes into organ system), and"gco"
(classify ICD-10 code into cancer categories same as classification published by the Global Cancer Observatory). This parameter is only available when the input data is a vector of ICD-10 codes, or object with class of'canreg'
or'canregs'
.
Value
The function returns a data frame (if applied to a single registry
object, 'canreg' or 'fbswicd') or a list of data frames (if applied
to a grouped registry object, 'canregs' or 'fbswicds') with a class
of either 'quality'
or 'qualities'
. Each output data frame
contains the computed quality indicators for the registry or subgroup.
Examples
data <- load_canreg()
qua <- create_quality(data, year, sex, cancer, cancer_type = "big")
head(qua)
#> # A tibble: 6 × 14
#> year sex cancer rks fbs fbl sws swl mi mv dco ub
#> <int> <int> <int> <int> <int> <dbl> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 2016 1 60 455653 1183 260. 920 202. 0.78 65.8 2.62 0.68
#> 2 2016 1 61 455653 1175 258. 917 201. 0.78 65.5 2.64 0.68
#> 3 2016 1 101 455653 13 2.85 10 2.19 0.77 100 0 0
#> 4 2016 1 102 455653 7 1.54 7 1.54 1 100 0 0
#> 5 2016 1 103 455653 157 34.5 127 27.9 0.81 86.0 2.55 0
#> 6 2016 1 104 455653 135 29.6 107 23.5 0.79 91.1 2.22 0
#> # ℹ 2 more variables: sub <dbl>, m8000 <dbl>
fbsw <- count_canreg(data, cancer_type = "system")
qua2 <- create_quality(fbsw, year, sex, cancer)
head(qua2)
#> # A tibble: 6 × 14
#> year sex cancer rks fbs fbl sws swl mi mv dco ub
#> <int> <int> <int> <int> <int> <dbl> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 2016 1 60 455653 1155 253. 897 197. 0.78 66.4 2.68 0.69
#> 2 2016 1 61 455653 1147 252. 894 196. 0.78 66.2 2.7 0.7
#> 3 2016 1 201 455653 20 4.39 17 3.73 0.85 100 0 0
#> 4 2016 1 202 455653 591 130. 475 104. 0.8 67.7 2.88 0.17
#> 5 2016 1 203 455653 336 73.7 284 62.3 0.85 54.8 2.38 0
#> 6 2016 1 204 455653 21 4.61 12 2.63 0.57 81.0 4.76 0
#> # ℹ 2 more variables: sub <dbl>, m8000 <dbl>