countimp: 'countimp' Wrapper function

View source: R/countimp.R

countimpR Documentation

countimp Wrapper function

Description

Depending on the entries of mice's method argument, this function either calls mice directly or calls our variant to impute flat file zero-inflated count data.

Usage

countimp(...)

Arguments

...

mice() arguments see help("mice")

Author(s)

Kristian Kleinke

Examples

data(crim4w)
ini <- countimp(crim4w, maxit=0)
meth <- ini$method
meth[6:7] <- "hp"
meth[8:9] <- "pmm"
pred <- ini$predictorMatrix
pred[,"id"] <- 0
pred["ACRIM",] <- c(0,1,3,2,0,3,3,2,1)
imp <- countimp( data = crim4w, method = meth, predictorMatrix = pred)
imp$method

kkleinke/countimp documentation built on Nov. 5, 2024, 11:51 a.m.