| MAC2 | R Documentation |
Computes meta-analytical calibration curves using multiple methods (logistic regression, loess or splines) and performs meta-analysis across clusters to generate aggregated calibration curves with confidence and prediction intervals.
MAC2(
data = NULL,
p,
y,
cluster,
grid,
cl.level = 0.95,
alpha.lr = 0.05/3,
plot = TRUE,
cluster_curves = FALSE,
knots = 3,
transf = "logit",
method_choice = c("splines", "log", "loess"),
method.tau = "REML",
prediction = TRUE,
random = TRUE,
sm = "PLOGIT",
hakn = FALSE,
linewidth = 1,
method.predict = "HTS",
verbose = FALSE
)
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 |
grid |
the grid for the calibration curve evaluation |
cl.level |
the confidence level for the calculation of the confidence interval. Default is |
alpha.lr |
the alpha-level used for the likelihood ratio test, selecting the number of knots for the restricted cubic splines |
plot |
logical, indicates whether to plot the calibration curves. Default is |
cluster_curves |
logical, whether to include cluster-specific curves in the plot. Default is |
knots |
integer, number of knots for splines. Default is |
transf |
character, transformation for predictions: |
method_choice |
character, which method to use for meta-analysis. Options are:
|
method.tau |
character, method for between-study heterogeneity estimation. Default is |
prediction |
logical, whether to compute prediction intervals. Default is |
random |
logical, whether to use random-effects model. Default is |
sm |
character, summary measure for meta-analysis. Default is |
hakn |
logical, whether to use Hartung-Knapp adjustment. Default is |
linewidth |
numeric, line width for the meta-curve. Default is |
method.predict |
character, method for prediction intervals. Default is |
verbose |
logical, indicates whether progress has to be printed in the console. |
This function estimates the center-specific calibration curves using logistic regression,
loess or splines. Hereafter, it aggregates the calibration curves using meta-analytical techniques.
The meta-analysis is performed using the function metagen from the meta
package. The method_choice argument determines which method is for the meta-analytical aggregation.
A list containing:
cluster_dataData frame with linear predictors and standard errors for each method per cluster
plot_dataData frame with meta-analysis results including predictions and intervals
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.