rmono: Randomly Impose a Monotone Missingness Pattern

rmonoR Documentation

Randomly Impose a Monotone Missingness Pattern

Description

Randomly impose a monotone missingness pattern by replacing the ends of each column of the input matrix by a random number of NAs

Usage

rmono(x, m = 7, ab = NULL)

Arguments

x

data matrix

m

minimum number of non-NA entries in each column

ab

a two-vector of \alpha (ab[1]) and \beta (ab[2]) parameters to a Beta(\alpha, \beta) distribution describing the proportion of NA entries in each column. The default setting ab = NULL yields a uniform distribution

Details

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 \alpha (ab[1]) and \beta (ab[2])

Value

returns a matrix with the same dimensions as the input x

Author(s)

Robert B. Gramacy rbg@vt.edu

References

https://bobby.gramacy.com/r_packages/monomvn/

See Also

randmvn

Examples

out <- randmvn(10, 3)
rmono(out$x)

monomvn documentation built on Aug. 21, 2023, 9:11 a.m.