Description Usage Arguments Details Value Author(s) References See Also Examples
This function aims to search for optimal values of the tuning parameters for the wNNSel imputation.
1 2 3 4 |
x |
a |
kernel |
kernel function to be used in nearest neighbors imputation. Default kernel function is "gaussian". |
x.dist |
distance to compute, The default is |
method |
convex function, performs selection of variables. If |
m.values |
a |
c.values |
a |
lambda.values |
a |
times.max |
maximum number of repititions for the cross validation procedure. |
testNA.prop |
proportion of values to be deleted artificially for
cross validation in the missing matrix |
Some values are artificially deleted and wNNSel is run multiple times, varying λ and m. For each pair of λ and m, compute MSIE on the subset of the data matrix x for which the the values were deleted artificially. (See References for more detail).
a list containing
lambda.opt |
optimal parameter selected by cross validation |
m.opt |
optimal parameter selected by cross validation |
MSIE.cv |
cross validation error |
Shahla Faisal <shahla_ramzan@yahoo.com>
Tutz, G. and Ramzan,S. (2015). Improved methods for the imputation of missing data by nearest neighbor methods. Computational Statistics and Data Analysis, Vol. 90, pp. 84-99.
Faisal, S. and Tutz, G. (2017). Missing value imputation for gene expression data by tailored nearest neighbors. Statistical Application in Genetics and Molecular Biology. Vol. 16(2), pp. 95-106.
1 2 3 4 5 6 7 8 9 10 11 12 13 | set.seed(3)
x.true = matrix(rnorm(100),10,10)
## create 10% missing values in x
x.miss = artifNA(x.true, 0.10)
## use cross validation to find optimal values
result = cv.wNNSel(x.miss)
## optimal values are
result$lambda.opt
result$m.opt
## Now use these values to get final imputation
x.impute = wNNSel.impute(x.miss, lambda=result$lambda.opt, m=result$m.opt)
## and final MSIE
computeMSIE(x.miss, x.impute, x.true)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.