A function for generating
Arguments
- type
three missing type MCAR,MAR,MNAR
- param
must be a list and
param$data
must be a data.frame- n
the length of original data
- printFlag
print intermediate results and plots, default is T
Examples
if (FALSE) generate.missing_index(type = "MNAR", n=length(data$y),param = list(data = data.frame(y=data$y,x=data$x), MNAR.type = "increasing", coeff = c(0.5,-1,0), MNAR.drawplot = c(TRUE, "y")))$missing_index