From e6f993c160f26711b9352edf9ca3949929a3adf8 Mon Sep 17 00:00:00 2001 From: Matthew Blackwell Date: Thu, 7 Nov 2024 10:58:35 -0500 Subject: [PATCH] doc fixes --- DESCRIPTION | 2 +- R/summary.mi.R | 1 - R/write.amelia.R | 2 +- man/summary.mi.Rd | 21 +++++++++++++++++++++ man/write.amelia.Rd | 2 +- vignettes/intro-mi.Rmd | 4 +--- vignettes/using-amelia.Rmd | 2 +- 7 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 man/summary.mi.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 25a08c0..7f69c87 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: Amelia -Version: 1.8.2 +Version: 1.8.2.9000 Date: 2024-04-10 Title: A Program for Missing Data Authors@R: c( diff --git a/R/summary.mi.R b/R/summary.mi.R index 65271f7..2c35dc3 100644 --- a/R/summary.mi.R +++ b/R/summary.mi.R @@ -8,7 +8,6 @@ #' @param ... further arguments. #' #' @seealso \code{\link{amelia}} -#' @exportS3method summary.mi <- function(object, ...) { m <- length(object) diff --git a/R/write.amelia.R b/R/write.amelia.R index 59efcca..f87e3f7 100644 --- a/R/write.amelia.R +++ b/R/write.amelia.R @@ -47,7 +47,7 @@ #' then the original, unimputed dataset is included at the top of the #' stack, with its imputation number set to 0. #' -#' @seealso \code{\link{write.csv}}, \code{\link{write.table}}, \code{\link{foreign::write.dta}} +#' @seealso \code{\link{write.csv}}, \code{\link{write.table}}, \code{\link[foreign]{write.dta}} write.amelia <- function(obj, separate = TRUE, file.stem, extension = NULL, format = "csv", diff --git a/man/summary.mi.Rd b/man/summary.mi.Rd new file mode 100644 index 0000000..1428d1d --- /dev/null +++ b/man/summary.mi.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/summary.mi.R +\name{summary.mi} +\alias{summary.mi} +\title{Summary of an mi object} +\usage{ +\method{summary}{mi}(object, ...) +} +\arguments{ +\item{object}{an object of class \code{mi}. Typically, an output +from the function \code{amelia}.} + +\item{...}{further arguments.} +} +\description{ +Returns summary information about the list of multiply imputed data +sets +} +\seealso{ +\code{\link{amelia}} +} diff --git a/man/write.amelia.Rd b/man/write.amelia.Rd index a5f62ff..9eba57c 100644 --- a/man/write.amelia.Rd +++ b/man/write.amelia.Rd @@ -72,5 +72,5 @@ then the original, unimputed dataset is included at the top of the stack, with its imputation number set to 0. } \seealso{ -\code{\link{write.csv}}, \code{\link{write.table}}, \code{\link{foreign::write.dta}} +\code{\link{write.csv}}, \code{\link{write.table}}, \code{\link[foreign]{write.dta}} } diff --git a/vignettes/intro-mi.Rmd b/vignettes/intro-mi.Rmd index ac10da2..038713f 100644 --- a/vignettes/intro-mi.Rmd +++ b/vignettes/intro-mi.Rmd @@ -27,9 +27,7 @@ The Amelia program goes several significant steps beyond the capabilities of the ## What Amelia Does {#sec:what} -Multiple imputation involves imputing $m$ values for each missing cell in your data matrix and creating $m$ "completed" data sets. Across these completed data sets, the observed values are the same, but the missing values are filled in with a distribution of imputations that reflect the uncertainty about the missing data. After imputation with Amelia's EMB algorithm, you can apply whatever statistical method you would have used if there had been no missing values to each of the $m$ data sets, and use a simple procedure, described below, to combine the results[^combine]. Under normal circumstances, you only need to impute once and can then analyze the $m$ imputed data sets as many times and for as many purposes as you wish. The advantage of Amelia is that it combines the comparative speed and ease-of-use of our algorithm with the power of multiple imputation, to let you focus on your substantive research questions rather than spending time developing complex application-specific models for nonresponse in each new data set. Unless the rate of missingness is very high, $m = 5$ (the program default) is probably adequate. - -[^combine]: You can combine the results automatically by doing your data analyses within [Zelig for R](https://docs.zeligproject.org/index.html), or within [Clarify for Stata](https://gking.harvard.edu/clarify). +Multiple imputation involves imputing $m$ values for each missing cell in your data matrix and creating $m$ "completed" data sets. Across these completed data sets, the observed values are the same, but the missing values are filled in with a distribution of imputations that reflect the uncertainty about the missing data. After imputation with Amelia's EMB algorithm, you can apply whatever statistical method you would have used if there had been no missing values to each of the $m$ data sets, and use a simple procedure, described below, to combine the results. Under normal circumstances, you only need to impute once and can then analyze the $m$ imputed data sets as many times and for as many purposes as you wish. The advantage of Amelia is that it combines the comparative speed and ease-of-use of our algorithm with the power of multiple imputation, to let you focus on your substantive research questions rather than spending time developing complex application-specific models for nonresponse in each new data set. Unless the rate of missingness is very high, $m = 5$ (the program default) is probably adequate. ### Assumptions diff --git a/vignettes/using-amelia.Rmd b/vignettes/using-amelia.Rmd index 4b974ed..d724e0f 100644 --- a/vignettes/using-amelia.Rmd +++ b/vignettes/using-amelia.Rmd @@ -508,7 +508,7 @@ out <- mi.combine(imp.models, conf.int = TRUE) out ``` -The combination of the results depends on the [broom](https://broom.tidymodels.org) package and results can be combined if a `tidy()` method exists for the estimation function passed to `with()`. Other packages such as [Zelig](https://docs.zeligproject.org/index.html) can also combine imputed data sets across a number of statistical models. Furthermore, users can easily export their imputations using the `write.amelia()` function as described in \@ref(sec_saving) and use statistical packages other than R for the analysis model. +The combination of the results depends on the [broom](https://broom.tidymodels.org) package and results can be combined if a `tidy()` method exists for the estimation function passed to `with()`. Users can easily export their imputations using the `write.amelia()` function as described in \@ref(sec_saving) and use statistical packages other than R for the analysis model. In addition to the resources available in R, users can draw on Stata to implement their analysis models. As of version 11,