I am trying to introduce missing values into a complete dataset(adult dataset) using MAR, MNAR and MCAR mechanisms. Including missing values such as using df = df.mask(np.random.random(df.shape) < .2)
can be included. But I am unable to do it using MAR, MNAR and MCAR mechanisms.
Asked
Active
Viewed 306 times
0

wasif khan
- 27
- 6
-
Can you show us the code with which you've tried it? Perhaps there's an easy fix but we can't know without seeing your code – Ofer Sadan Sep 05 '21 at 08:33
-
1I use this one (https://rmisstastic.netlify.app/how-to/python/generate_html/how%20to%20generate%20missing%20values) but it only for numerical data, this one is in R [https://stackoverflow.com/questions/50528719/simulate-data-and-randomly-add-missing-values-to-dataframe/50543195#50543195] . – wasif khan Sep 05 '21 at 08:39
-
what is the problem? – Hanna Oct 19 '21 at 21:47
-
How to include missingness in a dataset. For example, I have Iris dataset, I want to include missing values in the dataset using missing at random mechanism. – wasif khan Oct 21 '21 at 15:28