missar | R Documentation |
Simulates missing value at random as NA for a given matrix.
missar(x, miss.rate = 0.2, miss.var = 1)
x |
a matrix to be used to fill in missing values as NA. |
miss.rate |
a value of missing rate within the range (0, 1) for variables that contain missing values. |
miss.var |
proportion of variables (columns) that contain missing values. |
x a matrix with missing values in "NA".
Zhongli Jiang jiang548@purdue.edu
misspi
set.seed(0)
data(toxicity, package = "misspi")
toxicity.miss <- missar(toxicity, 0.4, 1)
toxicity.miss[1:5, 1:5]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.