| CGC | R Documentation |
Estimates the calibration curves using the CGC approach. The function supports two grouping methods:
equal-sized groups ("grouped") or interval-based groups ("interval").
Optionally, a calibration plot can be produced with cluster-specific curves.
CGC(
data = NULL,
p,
y,
cluster,
cl.level = 0.95,
ntiles = 10,
cluster_curves = FALSE,
plot = TRUE,
size = 1,
linewidth = 0.4,
univariate = FALSE,
method = c("grouped", "interval")
)
data |
optional data frame containing the variables |
p |
predicted probabilities (numeric vector) or name of the column in
|
y |
binary outcome variable or the name of the column in |
cluster |
cluster identifier (factor, character, or integer) or name of
the column in |
cl.level |
the confidence level for the calculation of the confidence interval. Default is |
ntiles |
integer, number of groups (tiles) for calibration. Default is |
cluster_curves |
logical, whether to include cluster-specific calibration
curves in the plot. Default is |
plot |
logical, whether to return a calibration plot. Default is |
size |
numeric, point size for plotted curves. Default is |
linewidth |
numeric, line width for plotted curves. Default is |
univariate |
logical, whether to use univariate meta-analysis. Default is |
method |
character, grouping method: |
When method = "grouped", the predictions are divided into equal-sized bins using quantiles.
Conversely, if method ="interval", the predictions are divided into fixed-width bins across [0, 1].
The function performs a meta-analysis within each group. This can be either a univariate or bivariate analysis,
which is specified in the univariate argument. The univariate analysis is performed using the
metaprop function and the bivariate analysis employs the rma.mv function.
Hereafter, the results are aggregated and plotted as calibration curves.
A list containing:
plot_dataData frame of meta-analysis calibration estimates.
trad_groupedData frame with traditional grouped calibration results.
observed_dataData frame with per-observation calibration data.
cluster_dataData frame with cluster-specific calibration summaries.
plotA ggplot2 object if plot = TRUE, otherwise NULL.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.