AddMissingness.m is a Matlab function to add missing data in the form of NaNs to a dataset. The pattern, level, and tolerance can be specified. Full details concerning the inputs can be found in the m file. AddMissingnessTestScript is an example of several of the patterns and should run as is.