Description Usage Arguments Value Examples

This function performs multiple hot deck imputation on an input data frame with missing observations using either the “best cell” method (default) or the “probabilistic draw” method as described in Cranmer and Gill (2013). This technique is best suited for missingness in discrete variables, though it also performs well on continuous missing data.

1 2 3 |

`data` |
A data frame with missing values to be imputed using multiple hot deck imputation. |

`m` |
Number of imputed datasets required. |

`method` |
Method used to draw donors based on affinity either “best.cell” (the default) or “p.draw” for probabilistic draw. |

`cutoff` |
A numeric scalar such that any variable with fewer than |

`sdCutoff` |
Number of standard deviations between observations such that observations fewer than |

`optimizeSD` |
Logical indicating whether the |

`optimStep` |
The size of the steps in the optimization if |

`optimStop` |
The value at which optimization should stop if it has not already found a value that produces no thin cells. If this value is reached and thin cells still exist, a warning will be returned, though the routine will continue using |

`weightedAffinity` |
Logical indicating whether a correlation-weighted affinity score should be used. |

`impContinuous` |
Character string indicating how continuous missing data should be imputed. Valid options are “HD” (the default) in which case hot-deck imputation will be used, or “mice” in which case multiple imputation by chained equations will be used. |

`IDvars` |
A character vector of variable names not to be used in the imputation, but to be included in the final imputed datasets. |

`...` |
Optional additional arguments to be passed down to the |

The output is a list with the following elements:

dataAn object of class

`mi`

which contains`m`

imputed datasets.affinityA matrix of affinity scores see

`affinity`

.donorsA list of donors for each missing observation based on the affinity score.

drawsThe

`m`

observations drawn from donors that were used for the multiple imputations.max.emp.affNormalization constant for each row of affinity scores; the maximum possible value of the affinity scores if correlation-weighting is used.

max.the.affNormalization constant for each row of affinity scores; the number of columns in the original data.

1 2 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.