MICE: Multivariate Imputation by Chained Equations

MICE is an R package implementing multiple imputation of
incomplete multivariate data according the principle of
Fully Conditional Specification (FCS).

Questions and suggestions about MICE can be directed to

    https://github.com/stefvanbuuren/mice/issues


CHANGELOG MICE
~~~~~~~~~~~~~~
V3.0.5   Track .R instead of .r

V3.0.4   Patch issue with updateLog

V3.0.3   Extend README

V3.0.2   Repair issue #90. md.pattern. GV

V3.0.1   Repair issue #89. Add check on m. SvB

V3.0.0   24may2018 SvB
         Major new version. 
         See https://github.com/stefvanbuuren/mice for an overview

V2.46.9  08dec2017 SvB
UPDATE   simplify code for mids object in mice (thanks stephematician) (#61)

V2.46.8  08dec2017 SvB
UPDATE   simplify code in rbind.mids (thanks stephematician) (#59)

V2.46.7  06dec2017 SvB
FIXED    bug in pool.compare in handling factors (#60)

V2.46.6  06dec2017 SvB
FIXED    bug in rbind.mids in handling `where` (#59)

V2.46.5  05dec2017 SvB
ADDED    new arguments to as.mids()
ADDED    as() syntax
UPDATE   contact info

V2.46.2  27nov2017 SvB
FIXED    resolve cart not accepting a matrix (thanks Joerg Drechsler)

V2.46.1  14nov2017 SvB
ADDED    Generalize pool() to list of models

V2.46.0  23oct2017 SvB
UPDATE   Switch to 3-digit versioning

V2.46    22oct2017 SvB
FIXED    Allow for capitals in imputation methods

V2.45    21oct2017 SvB
UPDATE   Reorganized vignettes to land on GitHUB pages

V2.44    18oct2017 SvB
UPDATE   Code changes for robustness, style and efficiency (Bernie Gray)

V2.43    20jul2017 SvB
UPDATE   Updates to ampute function and vignettes (Rianne Schouten)

V2.42    11jul2017 SvB
UPDATE   Rename mice.impute.2l.sys to mice.impute.2l.lmer

V2.41    10jul2017 SvB
ADDED    New feature: `where`argument to mice
ADDED    New `wy` argument to imputation functions
ADDED    New mice.impute.2l.sys(), author Shahab Jolani
UPDATE   Many simplifications and code enhancements
FIXED    Broken cbind() function
FIXED    Bug that made the pad element disappear from mids object

V2.40    07jul2017 SvB
FIXED    Integration with lattice package

V2.39    27jun2017 SvB
UPDATE   Colors in xyplot.mads

V2.38    22may2017 SvB
ADDED    Support for factors in mice.impute.2lonly.pmm()

V2.37    22may2017 SvB
UPDATE   More robust version of as.mids()

V2.36    15may2017 SvB
UPDATE   Substantial update of ampute() by Rianne Schouten

V2.35    03may2017 SvB
FIXED    Fix timestamp problem by rebuilding vignette using R 3.4.0.

V2.34    24apr2017 SvB
UPDATE   Update to roxygen 6.0.1

V2.33    11apr2017 SvB
CHANGED  Stylistic changes to mice function (thanks Ben Ogorek)
CHANGED  calls to cbind.mids() replaced by calls to cbind()

V2.31    23feb2017 SvB
ADDED    link to miceVignettes on github (thanks Gerko Vink)
ADDED    package documentation

V2.30    04feb2017 SvB
ADDED    README for GitHub
ADDED    new ampute functions and vignette (thanks Rianne Schouten)
CHANGED  rename ccn-->ncc, icn-->nic
CHANGED  helpers cc(), ncc(), cci(), ic(), nic() and ici() use S3 dispatch
CHANGED  issues tracker now on Github - add BugReports URL #21
FIXED    multinom MaxNWts type fix in polyreg and polr #9
FIXED    better checking of nested models in pool.compare #12
FIXED    bug fix in as.mids if names not same as all columns #11
FIXED    extension for glmer models #5

V2.29    05oct2016 SvB
ADDED    midastouch: predictive mean matching for small samples (thanks Philip Gaffert, Florian Meinfelder)

V2.28    05oct2016 SvB
FIXED    repaired dots problem in rpart call

V2.27    27jul2016 SvB
FIXED    add ridge to 2l.norm()

V2.26    12may2016 SvB
FIXED    removed .o files

V2.25    09nov2015 SvB
FIXED    fix as.mids() bug that crashed miceadds::mice.1chain()

V2.23    04nov2015 SvB
FIXED    update of example code on /doc
FIXED    remove lots of dependencies, general cleanup 
FIXED    impute.polyreg() bug that bombed if there were no predictors (thanks Jan Graffelman)
FIXED    as.mids() bug that gave incorrect m (several users)
FIXED    pool.compare() error for lmer object (thanks Claudio Bustos)
FIXED    error in mice.impute.2l.norm() if just one NA (thanks Jeroen Hoogland)

V2.22    11jun2014 SvB
ADDED    about six times faster predictive mean matching
ADDED    pool.scalar() now can do Barnard-Rubin adjustment
ADDED    pool() now handles class 'lmerMod' from the 'lme4' package
CHANGED  added automatic bounds on donors in .pmm.match() for safety
CHANGED  added donors argument to mice.impute.pmm() for increased visibility
CHANGED  default number of trees in mice.impute.rf() from 100 to 10 (thanks Anoop Shah) 
DELETED  long2mids() deprecated. Use as.mids() instead
FIXED    put lattice back into DEPENDS to find generic xyplot() and friends
FIXED    error in 2lonly.pmm (thanks Alexander Robitzsch, Gerko Vink, Judith Godin)
FIXED    number of imputations in as.mids() (thanks Tommy Nyberg, Gerko Vink)
FIXED    colors to mdc() in example mice.impute.quadratic()
FIXED    error in mice.impute.rf() if just one NA (thanks Anoop Shah)
FIXED    error in summary.mipo() when names(x$qbar) equals NULL (thanks Aiko Kuhn)
FIXED    improper testing in ncol() in mice.impute.2lonly.mean() 

V2.21    02-05-2014 SvB
FIXED    compilation problem in match.cpp on solaris CC 

V2.20    02-02-2014 SvB
ADDED    experimental fastpmm() function using Rcpp
FIXED    fixes to mice.impute.cart() and mice.impute.rf() (thanks Anoop Shah)

V2.19    21-01-2014 SvB
ADDED    mice.impute.rf() for random forest imputation (thanks Lisa Doove)
CHANGED  default number of donors in mice.impute.pmm() changed from 3 to 5.
         Use mice(..., donors = 3) to get the old behavior.
CHANGED  speedup in .norm.draw() by using crossprod() (thanks Alexander Robitzsch)
CHANGED  speedup in .imputation.level2() (thanks Alexander Robitzsch)
FIXED    define MASS, nnet, lattice as imports instead of depends
FIXED    proper handling of rare case in remove.lindep() that removed all predictors (thanks Jaap Brand)

V2.18    31-07-2013 SvB
ADDED    as.mids() for converting long format in a mids object (thanks Gerko Vink)
FIXED    mice.impute.logreg.boot() now properly exported (thanks Suresh Pujar)
FIXED    two bugs in rbind.mids() (thanks Gerko Vink)

V2.17    10-05-2013 SvB
ADDED    new form argument to mice() to specify imputation models using forms (contributed Ross Boylan)
FIXED    with.mids(), is.mids(), is.mira() and is.mipo() exported
FIXED    eliminated errors in the documentation of pool.scalar()
FIXED    error in mice.impute.ri() (thanks Shahab Jolani)

V2.16    27-04-2013 SvB
ADDED    random indicator imputation by mice.impute.ri() for nonignorable models (thanks Shahab Jolani)
ADDED    workhorse functions .norm.draw() and .pmm.match() are exported
FIXED    bug in 2.14 and 2.15 in mice.impute.pmm() that produced an error on factors
FIXED    bug that crashed R when the class variable was incomplete (thanks Robert Long)
FIXED    bug in 2l.pan and 2l.norm by convert a class factor to integer (thanks Robert Long)
FIXED    warning eliminated caused by character variables (thanks Robert Long)

V2.15 - 02-04-2013 SvB
CHANGED  complete reorganization of documentation and source files
ADDED    source published on GitHub.com
ADDED    new imputation method mice.impute.cart() (thanks Lisa Doove)
FIXED    calculation of degrees of freedom in pool.compare() (thanks Lorenz Uhlmann)
FIXED    error in DESCRIPTION file (thanks Kurt Hornik)

V2.14 - 11-03-2013 / SvB
ADDED    mice.impute.2l.mean() for imputing class means at level 2
ADDED    sampler(): new checks of degrees of freedom per variable at iteration 1
ADDED    function check.df() to throw a warning about low degrees of freedom
FIXED    tolower() added in "2l" test in sampler()
FIXED    conversion of factors that have other roles (multilevel) in padModel()
FIXED    family argument in call to glm() in glm.mids() (thanks Nicholas Horton)
FIXED    .norm.draw(): evading NaN imputed values by setting df in rchisq() to a minimum of 1
FIXED    bug in mice.df() that prevented the classic Rubin df calculation (thanks Jean-Batiste Pingaul)
FIXED    bug fixed in mice.impute.2l.norm() (thanks Robert Long)
CHANGED  faster .pmm.match2() from version 2.12 renamed to default .pmm.match()

V2.13 - 03-07-2012 / SvB
ADDED    new multilevel functions 2l.pan(), 2lonly.norm(), 2lonly.pmm() (contributed by Alexander Robitzsch)
ADDED    new quadratic imputation function: quadratic() (contributed by Gerko Vink)
ADDED    pmm2(), five times faster than pmm()
ADDED    new argument data.init in mice() for initialization (suggested by Alexander Robitzsch)
ADDED    mice() now accepts pmm as method for (ordered) factors
ADDED    warning and a note to 2l.norm() that advises to use type=2 for the predictors
FIXED    bug that chrashed plot.mids() if there was only one incomplete variable (thanks Dennis Prangle)
FIXED    bug in sample() in .pmm.match() when donor=1 (thanks Alexander Robitzsch)
FIXED    bug in sample() in mice.impute.sample()
FIXED    fixed '?data' bug in check.method()
REMOVED	 wp.twin(). Now available from the AGD package

V2.12 - 25-03-2012 / SvB
UPDATE   version for launch of Flexible Imputation of Missing Data (FIMD)
ADDED    code fimd1.r-fim9.r to inst/doc for calculating solutions in FIMD
FIXED    more robust version of supports.transparent() (thanks Brian Ripley)
ADDED    auxiliary functions ifdo(), long2mids(), appendbreak(), extractBS(), wp.twin()
ADDED    getfit() function
ADDED    datasets: tbc, potthoffroy, selfreport, walking, fdd, fdgs, pattern1-pattern4, mammalsleep
FIXED    as.mira() added to namespace
ADDED 	 functions flux(), fluxplot() and fico() for missing data patterns
ADDED    function nelsonaalen() for imputing survival data
CHANGED  rm.whitespace() shortened
FIXED    bug in pool() that crashed on nonstandard behavior of survreg() (thanks Erich Studerus)
CHANGED  pool() streamlined, warnings about incompatibility in lengths of coef() and vcov()
FIXED    mdc() bug that ignored transparent=FALSE argument, now made visible
FIXED    bug in md.pattern() for >32 variables (thanks Sascha Vieweg, Joshua Wiley)

V2.11 - 21-11-2011 / SvB
UPDATED  definite reference to JSS paper
ADDED    rm.whitespace() to do string manipulation (thanks Gerko Vink)
ADDED    function mids2mplus() to export data to Mplus (thanks Gerko Vink)
CHANGED  plot.mids() changed into trellis version
ADDED    code used in JSS-paper
FIXED    bug in check.method() (thanks Gerko Vink)

V2.10 - 14-09-2011 / SvB
FIXED:  arguments dec and sep in mids2spss (thanks Nicole Haag)
FIXED:  bug in keyword "monotone" in mice() (thanks Alain D)

V2.9 - 31-08-2011 / SvB
FIXED:   appropriate trimming of ynames and xnames in Trellis plots
FIXED:   exported: spss2mids(), mice.impute.2L.norm()
ADDED:   mice.impute.norm.predict(), mice.impute.norm.boot(), mice.impute.logreg.boot()
ADDED:   supports.transparent() to detect whether .Device can do semi-transparent colors
FIXED:   stringr package is now properly loaded
ADDED:   trellis version of plot.mids()
ADDED:   automatic semi-transparancy detection in mdc()
FIXED:   documentation of mira class (thanks Sandro Tsang)

V2.8 - 24-03-2011 / SvB
FIXED:   bug fixed in find.collinear() that bombed when only one variable was left

V2.7 - 16-03-2011 / SvB
CHANGED: check.data(), remove.lindep(): fully missing variables are imputed if allow.na=TRUE (Alexander Robitzsch)
FIXED:   bug in check.data(). Now checks collinearity in predictors only (Alexander Robitzsch)
CHANGED: abbreviations of arguments eliminated to evade linux warnings

V2.6 - 03-03-2011 / SvB
ADDED:   bwplot(), stripplot(), densityplot() and xyplot() for creating Trellis graphs
ADDED:   function mdc() and mice.theme() for graphical parameters
ADDED:   argument passing from mice() to lower-level functions (requested by Juned Siddique)
FIXED:   erroneous rgamma() replaced by rchisq() in .norm.draw, lowers variance a bit for small n
ADDED:   with.mids() extended to handle expression objects
FIXED:   reporting bug in summary.mipo()
CHANGED: df calculation in pool(), intervals may become slightly wider
ADDED:   internal functions mice.df() and df.residual()
FIXED:   error in rm calculation for "likelihood" in pool.compare()
CHANGED: default ridge parameter changed

V2.5 - 06-01-2011 / SvB
ADDED:   various stability enhancements and code clean-up
ADDED:   find.collinear() function
CHANGED: automatic removal of constant and collinear variables
ADDED:   ridge parameter in .norm.draw() and .norm.fix()
ADDED:   mice.impute.polr() for ordered factors
FIXED:   chainMean and chainVar in mice.mids()
FIXED:   iteration counter for mice.mids and sampler()
ADDED:   component 'loggedEvents' to mids-object for logging actions
REMOVED: annoying warnings about removed predictors
ADDED:   updateLog() function
CHANGED: smarter handling of model setup in mice()
CHANGED: .pmm.match() now draws from the three closest donors
ADDED:   mids2spss() for shipping a mids-object to SPSS
FIXED:   change in summary.mipo() to work with as.mira()
ADDED:   function mice.impute.2L.norm.noint()
ADDED:   function as.mira()
FIXED:   global assign() removed from mice.impute.polyreg()
FIXED:   improved handling of factors by complete()
FIXED:   improved labeling of nhanes2 data

V2.4 - 17-10-2010 / SvB
ADDED:   pool() now supports class 'polr' (Jean-Baptiste Pingault)
FIXED:   solved problem in mice.impute.polyreg when one of the variables was named y or x
FIXED:   remove.lindep: intercept prediction bug
ADDED:   version() function
ADDED:   cc(), cci() and ccn() convenience functions

V2.3 - 14-02-2010 / SvB
FIXED:   check.method: logicals are now treated as binary variables (Emmanuel Charpentier)
FIXED:   complete: the NULL imputation case is now properly handled
FIXED:   mice.impute.pmm: now creates between imputation variability for univariate predictor
FIXED:   remove.lindep: returns 'keep' vector instead of data

V2.2 - 13-01-2010 / SvB
ADDED:   pool() now supports class 'multinom' (Jean-Baptiste Pingault)
FIXED:   bug fixed in check.data for data consisting of two columns (Rogier Donders, Thomas Koepsell)
ADDED:   new function remove.lindep() that removes predictors that are (almost) linearly dependent
FIXED:   bug fixed in pool() that produced an (innocent) warning message (Qi Zheng)

V2.1 - 14-09-2009 / SvB
ADDED:   pool() now also supports class 'mer'
CHANGED: nlme and lme4 are now only loaded if needed (by pool())
FIXED:   bug fixed in mice.impute.polyreg() when there was one missing entry (Emmanuel Charpentier)
FIXED:   bug fixed in plot.mids() when there was one missing entry (Emmanuel Charpentier)
CHANGED: NAMESPACE expanded to allow easy access to function code
FIXED:   mice() can now find mice.impute.xxx() functions in the .GlobalEnv

v2.0 - 26-08-2009 / SvB, KO 	Major upgrade for JSS manuscript
ADDED:   new functions cbind.mids(), rbind.mids(), ibind()
ADDED:   new argument in mice(): 'post' in post-processing imputations
ADDED:   new functions: pool.scaler(), pool.compare(), pool.r.squared()
ADDED:	 new data: boys, popmis, windspeed
FIXED:	 function summary.mipo all(object$df) command fixed
DELETED: data.frame.to.matrix replaced by the internal data.matrix function
ADDED:   new imputation method mice.impute.2l.norm() for multilevel data
CHANGED: pool now works for any class having a vcov() method
ADDED:   with.mids() provides a general complete-data analysis
ADDED:   type checking in mice() to ensure appropriate imputation methods
ADDED:   warning added in mice() for constant predictors
ADDED:   prevention of perfect prediction in mice.impute.logreg() and mice.impute.polyreg()
CHANGED: mice.impute.norm.improper() changed into mice.impute.norm.nob()
DELETED: mice.impute.polyreg2() deleted
ADDED:   new 'include' argument in complete()
ADDED:   support for the empty imputation method in mice()
ADDED:   new function md.pairs()
ADDED:   support for intercept imputation
ADDED:   new function quickpred()
FIXED:   plot.mids() bug fix when number of variables > 5


v1.21 - 15/3/2009 SvB  Maintainance release

FIXED:   Stricter type checking on logicals in mice() to evade warnings.
CHANGED: Modernization of all help files.
FIXED:   padModel: treatment changed to contr.treatment
CHANGED: Functions check.visitSequence, check.predictorMatrix, check.imputationMethod are now coded as local to mice()
FIXED:   existsFunction in check.imputationMethod now works both under S-Plus and R

v1.16 - 6/25/2007

FIXED: The impution function impute.logreg used convergence criteria that were too optimistic when fitting a GLM with glm.fit. Thanks to Ulrike Gromping.

v1.15 - 01/09/2006

FIXED: In the lm.mids and glm.mids functions, parameters were not passed through to glm and lm.

v1.14R - 9/26/2005 11:44AM
FIXED: Passive imputation works again. (Roel de Jong)
CHANGED: Random seed is now left alone, UNLESS the argument "seed" is specified. This means that unless you
specify identical seed values, imputations of the same dataset will be different for multiple calls to mice. (Roel de Jong)
FIXED (docs): Documentation for "impute.mean" (Roel de Jong)
FIXED: Function 'summary.mids' now works (Roel de Jong)
FIXED: Imputation function 'impute.polyreg' and 'impute.lda' should now work under R

v1.13
Changed function checkImputationMethod, Feb 6, 2004

v1.12
Maintainance, S-Plus 6.1 and R 1.8 unicode, January 2004

v1.1
R version (with help of Peter Malewski and Frank Harrell), Feb 2001

v1.0
Original S-PLUS release, June 14 2000


