prodna {clusterMI} | R Documentation |
Introduce missing values using a missing completely at random mechanism
Description
prodna
generates an incomplete dataset by removing a proportion of observed values
Usage
prodna(X, pct = 0.3)
Arguments
X |
a data frame (or matrix). |
pct |
proportion of missing values. By default pct = 0.3. |
Value
an incomplete data frame
Examples
n <- 1000
p <- 5
X <- matrix(runif(n*p), nrow = n, ncol = p)
summary(X)
X.na <- prodna(X)
colMeans(is.na(X.na))
[Package clusterMI version 1.2.1 Index]