Description Usage Arguments Value
Function to do one imputation cycle on the given data. The function cycles through every variable sequentially imputing the values, that are NA in the original data set in that current variable. The function determines the type of the variable and calls the suitable imputation function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | imputationcycle(
data_before,
original_data,
NA_locator,
fe,
interaction_names,
list_of_types,
nitt,
burnin,
thin,
pvalue = 0.2,
mn,
k = Inf,
spike = NULL,
rounding_degrees = NULL,
rounding_covariates
)
|
data_before |
The n x p data.frame with the variables to impute. It was prepared for imputation in the |
original_data |
The original data.frame the user passed to |
NA_locator |
A n x p matrix localizing the missing values in the original dataset. The elements are TRUE if the original data are missing and FALSE if the are observed. |
fe |
A list with the decomposed elements of the |
interaction_names |
A list with the names of the variables that have been generated as interaction variables |
list_of_types |
a list where each list element has the name of a variable
in the data.frame. The elements have to contain a single character denoting the type of the variable.
See |
nitt |
An integer defining number of MCMC iterations (see |
burnin |
burnin A numeric value between 0 and 1 for the desired percentage of Gibbs samples that shall be regarded as burnin. |
thin |
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),
the |
pvalue |
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. |
mn |
An integer defining the minimum number of individuals per cluster. |
k |
An integer defining the allowed maximum of levels in a factor covariate. |
spike |
A numeric value saying which value in the semi-continuous data might be the spike.
Or a list with with such values and names identical to the variables with spikes
(see |
rounding_degrees |
A numeric vector with the presumed rounding degrees. Or a list with rounding degrees,
where each list element has the name of a rounded continuous variable. Such a list can be generated
using |
rounding_covariates |
A list for each rounded continuous variable with a character vector containing the covariate names from the original rounding formula. The transformation takes place in the wrapper function. |
A data.frame where the values, that have a missing value in the original dataset, are imputed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.