Say I have below example data, where rows are observations and columns are variables, and NAs stand for missing values.
1 2 NA 4 5 6 14 5 2
6 13 7 1 11 4 NA 9 6
15 12 3 12 NA 8 3 7 12
8 1 NA 7 8 9 4 6 1
I want to impute the missing values by regression (I know I can impute by means, but I need to see how regression performs). There is a CRAN package named 'Amelia' for imputation by regression, but it gives an error for above data saying that #observations is smaller than #variables. 'mi' package also gives an error. I can code myself, but I do not want to reinvent the wheel since I am sure there is already a package for that which would work faster than the one I write (Speed is important since I will run this imputation for thousands of variables and hundreds of observations with lots of missing values). So, does anybody know about a package which would impute the values above by regression? Thanks.
regressionImp
in package VIM $\endgroup$Hmisc
packagearegImpute
function a try. But your sample size for testing all this is not adequate for any analysis. $\endgroup$Amelia
gave me the best results: gking.harvard.edu/amelia $\endgroup$