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.

create_quality(x, ..., decimal = 2, collapse = TRUE)

# S3 method for class 'canreg'
create_quality(x, ..., cancer_type = "big")

# S3 method for class 'canregs'
create_quality(x, ..., cancer_type = "big", collapse = TRUE)

# S3 method for class 'fbswicds'
create_quality(x, ..., decimal = 2, collapse = TRUE)

# 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 by year. 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.

collapse

Logical value whether output result as quality or qualites.

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("canregs")
data <- canregs[[1]]
qua <- create_quality(data, year, sex, cancer, cancer_type = "big")
head(qua)
#> # A tibble: 6 × 14
#>    year   sex cancer    rks   fbs  inci   sws  mort    mi    mv   dco    ub
#>   <int> <dbl> <chr>   <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1  2021     0 101    683110    27  3.95    10  1.46  0.37  55.6  3.7      0
#> 2  2021     0 102    683110     7  1.02     2  0.29  0.29  57.1  0        0
#> 3  2021     0 103    683110    65  9.52    43  6.29  0.66  86.2  1.54     0
#> 4  2021     0 104    683110   101 14.8     78 11.4   0.77  71.3  2.97     0
#> 5  2021     0 105    683110   180 26.4    102 14.9   0.57  81.7  2.78     0
#> 6  2021     0 106    683110   127 18.6     99 14.5   0.78  67.7  3.15     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  inci   sws  mort    mi    mv   dco    ub
#>   <int> <dbl> <chr>   <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1  2021     0 201    683110    34  4.98    14  2.05  0.41  55.9  2.94  0   
#> 2  2021     0 202    683110   574 84.0    422 61.8   0.74  74.6  2.61  0.35
#> 3  2021     0 203    683110   466 68.2    228 33.4   0.49  76.6  1.29  0   
#> 4  2021     0 204    683110    44  6.44    15  2.2   0.34  79.6  0     0   
#> 5  2021     0 205    683110   245 35.9     41  6     0.17  90.6  0     0   
#> 6  2021     0 208    683110   115 16.8     45  6.59  0.39  76.5  1.74  0   
#> # ℹ 2 more variables: sub <dbl>, m8000 <dbl>