Hi, I'm trying to creat new datasets that contains missing vlaues using exist data.
If I have a data that contains 7 continuous variables like below.
A B C D E F G
1 3 4 3 2 3 4
2 4 3 4 5 6 2
2 5 3 4 5 3 1
1 2 3 3 2 1 3
2 5 4 3 4 1 3
I want to make missing randomly, but same number of missing within each person like below.
data-1 (1 missing per person)
A B C D E F G
1 . 4 3 2 3 4
2 4 3 . 5 6 2
2 5 . 4 5 3 1
. 2 3 3 2 1 3
2 5 4 3 4 . 3
data-2 (2 missing per person)
A B C D E F G
1 . 4 3 . 3 4
2 4 . . 5 6 2
2 5 . 4 5 . 1
. 2 3 3 . 1 3
2 5 . 3 4 . 3
...up to 6 missings per person.
Also, is there any way to replace the missing value with mean of rest of values?
Thanks.