Description Usage Arguments Value
View source: R/hmi_mainfunctions_2016-08-12.R View source: R/hmi_mainfunctions_2016-08-02.R View source: R/hmi_mainfunctions_2016-07-27withMCMCglmm.R View source: R/hmi_mainfunctions_2016-07-13.R
The user has to passes to the function his data. Optionally he pass his analysis model formula so that hmi runs the imputation model in line with his analysis model formula. And of course he can specify some parameters for the imputation routine (like the number of imputations and iterations and the burn in percentage.) The standard usage should be that the user gives his complete dataset and his analysis model. But he also could just give y, X and Z and the cluser ID.
The user has to passes to the function his data. Optionally he pass his analysis model formula so that hmi runs the imputation model in line with his analysis model formula. And of course he can specify some parameters for the imputation routine (like the number of imputations and iterations and the burn in percentage.) The standard usage should be that the user gives his complete dataset and his analysis model. But he also could just give y, X and Z and the cluser ID.
1 2 3 4 5 6 7 8 9 | imp_multi(y_imp_multi, X_imp_multi, Z_imp_multi, clID, n.iter = 100, M = 10,
n.chains = 3, burn.in = 1/3, max.iter = 5000, allowed_max_value = Inf,
allowed_max_variable = NULL, allowed_min_value = -Inf,
allowed_min_variable = NULL)
imp_multi(y_imp_multi, X_imp_multi, Z_imp_multi, clID, n.iter = 100, M = 10,
n.chains = 3, burn.in = 1/3, max.iter = 5000, allowed_max_value = Inf,
allowed_max_variable = NULL, allowed_min_value = -Inf,
allowed_min_variable = NULL)
|
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. |
n.iter |
An integer defining the number of iterations that should be run in each bunch of iterations. |
M |
An integer defining the number of imputations that should be made. |
n.chains |
An integer defining the number of Markov chains to be made. |
burn.in |
A numeric between 0 and 1 defining the percentage of draws from the gibbs sampler that should be discarded as burn in. |
max.iter |
An integer defining the maximum number of iterations that should be run in total. |
allowed_max_value |
A single numeric Value which shall not be exceeded when values are imputed (e.g. the age of a person can be limited to 125). |
allowed_max_variable |
A character naming a variable V.
For each Y_i the value of V_i shall not exceeded
(e.g. the net income shall not exceed the gross income).
Note that a new imputed value has to satisfy both conditions of |
allowed_min_value |
Analog to |
allowed_min_variable |
Analog to |
data |
A matrix or (better) a data.frame with all variables appearing in |
model_formula |
A |
y |
A vector or data.frame with |
X |
A vector a data.frame containing the covariates influencing |
Z |
A vector a data.frame containing the covariates influencing |
cl.id |
A factor (should come as data.frame or vector) containing the cluster IDs. |
y_variable_name |
A character naming the variable to impute. |
n.iter |
An integer defining the number of iterations that should be run in each bunch of iterations. |
M |
An integer defining the number of imputations that should be made. |
n.chains |
An integer defining the number of Markov chains to be made. |
burn.in |
A numeric between 0 and 1 defining the percentage of draws from the gibbs sampler that should be discarded as burn in. |
A data.frame. It consists of the original data
and m
additional variables with the imputed values.
A data.frame. It consists of the original data
and m
additional variables with the imputed values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.