Last chance! 50% off unlimited learning
Sale ends in
Randomly impose a monotone missingness pattern by replacing the ends
of each column of the input matrix by a random number of NA
s
rmono(x, m = 7, ab = NULL)
data matrix
minimum number of non-NA
entries in each column
a two-vector of ab[1]
) and
ab[2]
) parameters to a
BetaNA
entries in each column.
The default setting ab = NULL
yields a uniform distribution
returns a matrix
with the same dimensions as the input x
The returned x
always has one (randomly selected)
complete column, and no column has fewer than m
non-missing entries. Otherwise, the proportion of missing entries
in each column can be uniform, or it can have a beta
distribution with parameters ab[1]
) and
ab[2]
)
randmvn
# NOT RUN {
out <- randmvn(10, 3)
rmono(out$x)
# }
Run the code above in your browser using DataLab