missar {misspi}R Documentation

Generate Data that is Missing At Random (MAR)

Description

Simulates missing value at random as NA for a given matrix.

Usage

missar(x, miss.rate = 0.2, miss.var = 1)

Arguments

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.

Value

x a matrix with missing values in "NA".

Author(s)

Zhongli Jiang jiang548@purdue.edu

See Also

misspi

Examples



set.seed(0)
data(toxicity, package = "misspi")
toxicity.miss <- missar(toxicity, 0.4, 1)
toxicity.miss[1:5, 1:5]


[Package misspi version 0.1.0 Index]