imp_semicont_multi: The function for hierarchical imputation of semicontinous...

Description Usage Arguments Value

View source: R/hmi_imp_semicont_multi_2018_04-17.R View source: R/hmi_imp_semicont_multi_2018_02_27.R View source: R/hmi_imp_semicont_multi_2017-10-12.R View source: R/hmi_imp_semicont_multi_2017-04-11.R View source: R/hmi_imp_semicont_multi_2017-01-10.R View source: R/hmi_imp_semicont_multi_2016-09-14.R View source: R/hmi_imp_semicont_multi.R

Description

The function is called by the wrapper. We consider data to be "semicontinuous" when more than 5% of the (non categorical) observations.
For example in surveys a certain portion of people, when asked for their income, report "0", which clearly violates the assumption of income to be (log-) normally distributed.

Usage

1
2
imp_semicont_multi(y_imp_multi, X_imp_multi, Z_imp_multi, clID, model_formula,
  heap = 0, M = 10, nitt = 3000, thin = 10, burnin = 1000)

Arguments

y_imp_multi

A Vector with the variable to impute.

X_imp_multi

A data.frame with the fixed effects variables.

Z_imp_multi

A data.frame with the random effects variables.

clID

A vector with the cluster ID.

model_formula

A formula used for the analysis model.

heap

A numeric saying to which (single) values the data might be heaped.

M

An integer defining the number of imputations that should be made.

nitt

An integer defining number of MCMC iterations (see MCMCglmm).

thin

An integer defining the thinning interval (see MCMCglmm).

burnin

An integer defining the percentage of draws from the gibbs sampler that should be discarded as burn in (see MCMCglmm).

Value

A n x M matrix. Each column is one of M imputed y-variables.


matthiasspeidel/hmi documentation built on Aug. 18, 2020, 4:37 p.m.