Create age specific rate
create_age_rate.Rd
Creates a data frame of age-specific rates based on the class of data
(fbswicd
or canreg
).
Usage
create_age_rate(
x,
...,
event = fbs,
cancer_type = "big",
format = "long",
mp = 1e+05,
decimal = 6,
show_pop = FALSE
)
# S3 method for class 'canreg'
create_age_rate(x, ..., cancer_type = "big")
# S3 method for class 'fbswicds'
create_age_rate(
x,
...,
event = fbs,
format = "long",
mp = 1e+05,
decimal = 6,
show_pop = FALSE
)
# S3 method for class 'fbswicd'
create_age_rate(
x,
...,
event = fbs,
format = "long",
mp = 1e+05,
decimal = 6,
show_pop = FALSE
)
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.- event
A variable used to specify the type of calculation, options are fbs or sws, fbs for cancer incidence, and sws for cancer mortality.
- 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'
.- format
Format of the output data frame, either "long" or "wide".
- mp
A constant to multiply rates by (e.g. mp=1000 for rates per 1000).
- decimal
This parameter specifies the number of decimal places to round the results. The default is 2, which means rates will be rounded to two decimal places.
- show_pop
Logical value whether output population or not.