Learn R Programming

imputeMulti (version 0.8.4)

multinomial_impute: Impute Values for missing multinomial values

Description

Impute values for multivariate multinomial data using either EM or Data Augmentation.

Usage

multinomial_impute(
  dat,
  method = c("EM", "DA"),
  conj_prior = c("none", "data.dep", "flat.prior", "non.informative"),
  alpha = NULL,
  verbose = FALSE,
  ...
)

Value

An object of class imputeMulti-class

Arguments

dat

A data.frame. All variables must be factors.

method

c("EM", "DA") A string specifying EM or Data Augmentation (DA)

conj_prior

A string specifying the conjugate prior. One of c("none", "data.dep", "flat.prior", "non.informative").

alpha

The vector of counts \(\alpha\) for a \(Dir(\alpha)\) prior. Must be specified if conj_prior is either c("data.dep", "flat.prior"). If flat.prior, specify as a scalar. If data.dep, specify as a vector with key matching enum_comp.

verbose

Logical. If TRUE, provide verbose output on each iteration.

...

Arguments to be passed to other methods

References

Schafer, Joseph L. Analysis of incomplete multivariate data. Chapter 7. CRC press, 1997.

See Also

data_dep_prior_multi, multinomial_em

Examples

Run this code
if (FALSE) {
 data(tract2221)
 imputeEM <- multinomial_impute(tract2221[,1:4], method= "EM",
                   conj_prior = "none", verbose= TRUE)
 imputeDA <- multinomial_impute(tract2221[,1:4], method= "DA",
                   conj_prior = "non.informative", verbose= TRUE)
}

Run the code above in your browser using DataLab