artifNA.cv {wNNSel} | R Documentation |
Introduce MCAR Missing Values in a matrix for cross validation
Description
This function introduces additional missing values in a missing data matrix artificially. The missing values are introduced under missing completely at random (MCAR) mechanism.
Usage
artifNA.cv(x, testNA.prop = 0.1)
Arguments
x |
a matrix, in which missing values are to be created. |
testNA.prop |
proportion of missing values |
Value
a list contatining a matrix with artifical missing values, removed indices and the provided x matrix
See Also
Examples
set.seed(3)
x = matrix(rnorm(100),10,10)
## create 10% missing values in x
x.miss<- artifNA(x, 0.10)
## create another 10% missing values in x
x.miss.cv<- artifNA.cv(x, 0.10)
summary(x.miss)
summary(x.miss.cv)
[Package wNNSel version 0.1 Index]