mcerror | R Documentation |
Calculate Monte Carlo errors for statistics calculated by combining results of multiply imputed datasets. Monte Carlo errors are defined as the standard deviation of the results across repeated runs of the same imputation procedure using the same data. White, Royston, and Wood (2011) suggest evaluating Monte Carlo error estimates not only for parameter estimates but also for other statistics, including p-values and confidence intervals, as well as multiple imputations statistics such as RVI and FMI.
mcerror(object, dfcom = NULL, rule = NULL, conf.int = FALSE, conf.level = 0.95) ## S3 method for class 'mimcerror' print(x, ...) ## S3 method for class 'mimcerror' summary(object, ...)
object |
An object of class |
dfcom |
A positive number representing the degrees of freedom in the complete-data analysis.
Normally, this would be the number of independent observation minus the number of fitted parameters.
The default ( |
rule |
A string indicating the pooling rule.
Currently supported are |
conf.int |
Whether Monte Carlo errors for model parameter confidence intervals are to be calculated.
Defaults to |
conf.level |
Confidence level for the confidence intervals, defaulting to 0.95. |
x |
An object of class |
... |
Additional arguments to be passed to |
This function calculate and displays Monte Carlo errors for statistics calculated by the mice::pool()
function or by the summary of it.
library(mice) library(mice.mcerror) data("mheart1s20.mice") fit <- with( data = mheart1s20.mice, expr = glm( formula = attack ~ smokes + age + bmi + hsgrad + female, family = binomial(link = "logit") ) ) mce <- mcerror(fit) mce summary(mce)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.