R/initialize.chain.R

Defines functions initialize.chain

initialize.chain <- function(blocks, maxit, m) {
  vars <- unique(unlist(blocks))
  chain <- array(NA, dim = c(length(vars), maxit, m))
  dimnames(chain) <- list(
    vars,
    seq_len(maxit),
    paste("Chain", seq_len(m))
  )
  chain
}

Try the mice package in your browser

Any scripts or data that you put into this service are public.

mice documentation built on June 7, 2023, 5:38 p.m.