powered by
Simulates missing value at random as NA for a given matrix.
missar(x, miss.rate = 0.2, miss.var = 1)
x a matrix with missing values in "NA".
a matrix to be used to fill in missing values as NA.
a value of missing rate within the range (0, 1) for variables that contain missing values.
proportion of variables (columns) that contain missing values.
Zhongli Jiang happycatstat@gmail.com
misspi
# \donttest{ set.seed(0) data(toxicity, package = "misspi") toxicity.miss <- missar(toxicity, 0.4, 1) toxicity.miss[1:5, 1:5]# }
Run the code above in your browser using DataLab