imposeMissing(data.mat, cov = 0, pmMCAR = 0, pmMAR = 0, nforms = 0,
itemGroups = 0, twoMethod = 0, prAttr = 0, timePoints = 1,
ignoreCols = 0, threshold = 0, logical = new("NullMatrix"))
TRUE/FALSE
). If a value in the dataset is corresponding to the TRUE
in the logical matrix, the value will be missing.NA
s introduced in the way specified by the arguments.data <- matrix(rep(rnorm(10,1,1),19),ncol=19)
datac <- cbind(data,rnorm(10,0,1),rnorm(10,5,5))
# Imposing Missing with the following arguments produces no missing values
imposeMissing(data)
imposeMissing(data,cov=c(1,2))
imposeMissing(data,pmMCAR=0)
imposeMissing(data,pmMAR=0)
imposeMissing(data,nforms=0)
#Some more usage examples
imposeMissing(data,cov=c(1,2),pmMCAR=.1)
imposeMissing(data,nforms=3)
imposeMissing(data,nforms=3,itemGroups=list(c(1,2,3,4,5),c(6,7,8,9,10),c(11,12,13,14,15),c(16,17,18,19)))
imposeMissing(datac,cov=c(20,21),nforms=3)
imposeMissing(data,twoMethod=c(19,.8))
imposeMissing(datac,cov=21,prAttr=.1,timePoints=5)
Run the code above in your browser using DataLab