# From where is initial value drawn in Multivariate Imputation by Chained Equations (_mice_)?

Based on documentation on mice from Van Buuren & Groothuis-Oudshoorn (2011)--
Starting from an initial imputation representing a value from observed data, the mice algorithm draws imputations by iterating over conditional densities.
My question: does this initial value come from any variable in the dataset? Or does it come from observed data from the variable to be imputed?

The documentation for the mice() function in the mice package says the following for the data.init argument:

data.init
A data frame of the same size and type as data, without missing data, used to initialize imputations before the start of the iterative process. The default NULL implies that starting imputation are created by a simple random draw from the data. Note that specification of data.init will start all m Gibbs sampling streams from the same imputation.

So it seems that the user can supply the initial values themself, or the algorithm will take a random draw from the observed data.

The documentation doesn't actually answer your question because you're asking whether the random draw for a missing value for a given variable can come from any observed value of any variable in the dataset. Clearly that would make no sense. If you have income in \$ and age in years in the data and they both have missing values, the algorithm will not use a random draw from the income variable to initialize a missing value for the age variable because the income values are wildly out of the range of the age variable. The only thing that makes any sense is for the initialization value to come from the same variable.

Indeed, digging through the source code of mice indicates this. When data.init is NULL, mice uses mice.impute.sample() to initialize the imputation. This takes a simple random sample of the variable to be imputed.

• Thank you. Very helpful! Commented Oct 17, 2019 at 0:33
• Another question about this initialization-- is the randomly sampled value from observed values the same for all cells with missing values for a given variable? That is, will the missing cells from an incomplete variable all take on the same value? I've played around with the source code, but cannot quite figure it out. Commented Nov 10, 2019 at 0:35
• It is not the same for all units. The initialized values are drawn randomly with replacement from the nonmissing values. This can be seen in the source code with sample(yry, size = sum(wy), replace = TRUE). yry is the nonmissing values of the variable, sum(wy) is the number of missing values.
– Noah
Commented Nov 10, 2019 at 5:13