c("none", "data.dep", "flat.prior", "non.informative")
install.packages("imputeMulti")
library("devtools");
install_github("alexwhitworth/imputeMulti",dependencies=TRUE)
## load library and example data
library(imputeMulti)
data(tract2221)
# usage for non-informative priors for both EM and DA
# other priors may also be specified (not shown)
test_em <- multinomial_impute(tract2221[,1:4], method= "EM",
conj_prior = "non.informative", verbose= TRUE)
test_da <- multinomial_impute(tract2221[,1:4], method= "DA",
conj_prior = "non.informative", verbose= TRUE)
# extract imputed values and parameter estimates
get_imputations(test_em)
get_parameters(test_da)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.