cohortdeviation {APCI} | R Documentation |
calculate cohort deviation
cohortdeviation(A,
P,
C,
model = temp6,
weight = "wt",
covariate,
gee=FALSE,
unequal_interval = FALSE,
age_range = NULL,
period_range = NULL,
age_interval = NULL,
period_interval = NULL,
age_group = NULL,
period_group = NULL,
...)
A, P, C |
The numbers of age groups, period groups, and cohort groups separately. |
model |
A generalized linear regression model generated from the internal function temp_model |
weight |
An optional vector of sample weights to be used in the model fitting process. If non-NULL, the weights will be used in the first step to estimate the model. Observations with negative weights will be automatically dropped in modeling. |
covariate |
An optional vector of characters, representing the name(s) of the user-specified covariate(s) to be used in the model. If the variable(s) are not found in data, there will be an error message reminding the users to check the data again. |
gee |
logical, indicating if the data is cross-sectional data or longitudinal/panel data. If |
unequal_interval |
Logical, indicating if age and period groups are of the same width. The default is set as |
age_range, period_range |
Numeric vector indicating the actual age and period range (e.g., 10 to 59 years old from 2000 to 2019). |
age_interval, period_interval, age_group, period_group |
Numeric values or character vectors indicating how age and period are
grouped. |
... |