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.
imp_semicont_multi(y_imp, X_imp, Z_imp, clID, spike = NULL,
nitt = 22000, burnin = 2000, thin = 20, pvalue = 0.2, k = Inf)
A Vector with the variable to impute.
A data.frame with the fixed effects variables.
A data.frame with the random effects variables.
A vector with the cluster ID.
A numeric value saying to which values Y might be spiked
An integer defining number of MCMC iterations (see MCMCglmm).
burnin A numeric value between 0 and 1 for the desired percentage of Gibbs samples that shall be regarded as burnin.
An integer to set the thinning interval range. If thin = 1, every iteration of the Gibbs-sampling chain will be kept. For highly autocorrelated chains, that are only examined by few iterations (say less than 1000).
A numeric between 0 and 1 denoting the threshold of p-values a variable in the imputation model should not exceed. If they do, they are excluded from the imputation model.
An integer defining the allowed maximum of levels in a factor covariate.
A list with 1. 'y_ret' the n x 1 data.frame with the original and imputed values. 2. 'Sol' the Gibbs-samples for the fixed effects parameters. 3. 'VCV' the Gibbs-samples for variance parameters.