Skip to contents

A function to replace NA in the data frame by Amelia::amelia().

Usage

impute_amelia(missdf, verbose = FALSE, ...)

Arguments

missdf

a data frame with missing values to be imputed containing features in columns and samples in rows.

verbose

boolean, if TRUE, prints the typical prompts of Amelia::amelia().

...

other parameters of Amelia::amelia() besides x and m.

Value

A data.frame with imputed values by Amelia::amelia().

Details

amelia() allows users to customize the number of imputed datasets to create. As one of the aims of the imputomics is to standardize the input and the output, the m is being set to 1.

References

Honaker J, King G, Blackwell M (2011). “Amelia II: A Program for Missing Data.” Journal of Statistical Software, 45, 1--47. ISSN 1548-7660, doi:10.18637/jss.v045.i07 .

See also

Examples

data(sim_miss)
impute_amelia(sim_miss)
#> Warning: You have a small number of observations, relative to the number, of variables in the imputation model.  Consider removing some variables, or reducing the order of time polynomials to reduce the number of parameters.
#>              X1         X2        X3           X4          X5         X6
#> 1   0.155050833 0.88115677 0.1302830 0.1194841210 0.600405471 0.79561010
#> 2   0.968378809 0.60748407 0.6337790 0.6181194666 0.008132938 0.75207300
#> 3   0.468263086 0.57452956 0.2476089 0.4258912963 0.370125689 0.73651251
#> 4   0.776819652 0.80313329 0.5513393 0.1459775318 0.724248714 0.84777606
#> 5   0.407885741 0.79911692 0.2347611 0.1897135850 0.418270750 0.70873497
#> 6   0.538797149 0.80186265 0.2586147 0.5754945197 0.238248518 1.04092439
#> 7   0.830082966 0.75207300 0.9528881 0.0001881735 0.887881226 0.48833525
#> 8   0.187103555 0.57546133 0.8568746 0.3283282877 0.577775384 0.34722847
#> 9   0.779969688 0.94421829 0.7111265 0.0782780354 0.739950257 0.20304801
#> 10  0.193943927 0.21898736 0.5545242 0.6041721753 0.160679622 0.73995026
#> 11  0.434231178 0.47799791 0.8769438 0.3267990556 0.529571799 0.89369752
#> 12  0.002274518 0.04466879 0.8018626 0.7904525734 0.574529562 0.57452956
#> 13  0.834692139 0.16848571 0.5467373 0.8300829662 0.960086967 0.08444870
#> 14 -1.203669142 0.36828087 0.2327532 0.8100510929 0.398616886 0.14825833
#> 15  0.956967818 0.56331137 0.6022678 0.2027530000 0.408468068 0.37028128
#> 16  0.948497073 0.55100519 0.7125391 0.5060450307 0.613321482 0.86117762
#> 17  0.600729976 0.73432757 0.6489036 0.5206679751 0.706590850 0.83668180
#> 18  0.261807405 0.70365677 0.1875624 0.0842680801 0.799116918 0.74054705
#> 19  0.643034251 0.73682406 0.2383929 0.2687653562 0.161331222 0.98576580
#> 20  0.526233507 0.04183916 1.4184151 0.8147157354 0.885932416 0.03208182