multinomial_data_aug function

Data Augmentation algorithm for multinomial data

Data Augmentation algorithm for multinomial data

Implement the Data Augmentation algorithm for multvariate multinomial data given observed counts of complete and missing data (YobsY_obs and YmisY_mis). Allows for specification of a Dirichlet conjugate prior.

multinomial_data_aug( x_y, z_Os_y, enum_comp, conj_prior = c("none", "data.dep", "flat.prior", "non.informative"), alpha = NULL, burnin = 100, post_draws = 1000, verbose = FALSE )

Arguments

  • x_y: A data.frame of observed counts for complete observations.
  • z_Os_y: A data.frame of observed marginal-counts for incomplete observations.
  • enum_comp: A data.frame specifying a vector of all possible observed patterns.
  • 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(α)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.
  • burnin: A scalar specifying the number of iterations to use as a burnin. Defaults to 100.
  • post_draws: An integer specifying the number of draws from the posterior distribution. Defaults to 1000.
  • verbose: Logical. If TRUE, provide verbose output on each iteration.

Returns

An object of class mod_imputeMulti-class.

Examples

## Not run: data(tract2221) x_y <- multinomial_stats(tract2221[,1:4], output= "x_y") z_Os_y <- multinomial_stats(tract2221[,1:4], output= "z_Os_y") x_possible <- multinomial_stats(tract2221[,1:4], output= "possible.obs") imputeDA_mle <- multinomial_data_aug(x_y, z_Os_y, x_possible, n_obs= nrow(tract2221), conj_prior= "none", verbose= TRUE) ## End(Not run)

See Also

multinomial_em, multinomial_impute

  • Maintainer: Alex Whitworth
  • License: GPL-3
  • Last published: 2023-02-18

Useful links