| MIXC | R Documentation |
Estimates the calibration curve using a logistic generalized linear mixed model.
MIXC(
data = NULL,
p,
y,
cluster,
grid,
method = c("slope", "intercept"),
plot = TRUE,
cluster_curves = FALSE,
nsims_pi = 10000,
CI = TRUE,
CI_method = c("naive", "delta"),
cl.level = 0.95
)
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 |
method |
character, type of mixed-effects model: |
plot |
logical, indicating whether to generate a calibration plot. Default is |
cluster_curves |
logical, whether to include cluster-specific curves in the plot.
Default is |
nsims_pi |
integer, number of simulations for prediction intervals. Default is |
CI |
logical, whether to calculate confidence intervals. Default is |
CI_method |
character, method for computing the confidence intervals of the observed proportions.
If |
cl.level |
the confidence level for the calculation of the confidence interval. Default is |
This function estimates the calibration curves using a logistic generalized linear mixed model.
A list containing:
modelThe fitted mixed-effects model object
cluster_dataData frame with calibration data for each cluster
plot_dataData frame with calibration data for the average cluster
observed_dataData frame with calibration data for individual observations
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.