Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ampute.mcar

Multivariate amputation under a MCAR mechanism


Description

This function creates a missing data indicator for each pattern, based on a MCAR missingness mechanism. The function is used in the multivariate amputation function ampute.

Usage

ampute.mcar(P, patterns, prop)

Arguments

P

A vector containing the pattern numbers of the cases' candidates. For each case, a value between 1 and #patterns is given. For example, a case with value 2 is candidate for missing data pattern 2.

patterns

A matrix of size #patterns by #variables where 0 indicates a variable should have missing values and 1 indicates a variable should remain complete. The user may specify as many patterns as desired. One pattern (a vector) is also possible. Could be the result of ampute.default.patterns, default will be a square matrix of size #variables where each pattern has missingness on one variable only.

prop

A scalar specifying the proportion of missingness. Should be a value between 0 and 1. Default is a missingness proportion of 0.5.

Value

A list containing vectors with 0 if a case should be made missing and 1 if a case should remain complete. The first vector refers to the first pattern, the second vector to the second pattern, etcetera.

Author(s)

Rianne Schouten, 2016

See Also


mice

Multivariate Imputation by Chained Equations

v3.13.0
GPL-2 | GPL-3
Authors
Stef van Buuren [aut, cre], Karin Groothuis-Oudshoorn [aut], Gerko Vink [ctb], Rianne Schouten [ctb], Alexander Robitzsch [ctb], Patrick Rockenschaub [ctb], Lisa Doove [ctb], Shahab Jolani [ctb], Margarita Moreno-Betancur [ctb], Ian White [ctb], Philipp Gaffert [ctb], Florian Meinfelder [ctb], Bernie Gray [ctb], Vincent Arel-Bundock [ctb]
Initial release
2021-01-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.