Displaying 1 result from an estimated 1 matches for "misscol".
Did you mean:
misscols
2011 Jun 01
1
Missing completely at random
Hello!
I would like to sample 5 % of cases and from 1 to 3 variables within selected
cases and set them as NA (MCAR-Missing completely at random). I managed to
sample cases and variables, but I don’t know how to set them as NA.
R code:
N <- 1000 ####number of cases
n <- 12 ####number of variables
X <- matrix(rnorm(N * n), N, n) ####matrix
pMiss <- 0.05