DataCheck5 {InterVA5} | R Documentation |
This function implements the data cleaning steps in the InterVA5 software.
DataCheck5(Input, id, probbaseV5, InSilico_check = FALSE, write)
Input |
original data vector for one observation coded by 0 (absence), 1 (presence), and NA (missing). |
id |
id for this observation |
probbaseV5 |
matrix of probbaseV5 |
InSilico_check |
logical indicator for if the check uses InSilicoVA rule. InSilicoVA rule sets all symptoms that should not be asked to missing. In contrast, the default InterVA5 rule sets these symptoms to missing only when they take the substantive value. |
write |
logical indicator of writing to file |
Output |
new data vector |
firstPass |
message for the first pass check |
secondPass |
message for the second pass check |
Jason Thomas, Zehang Li, Tyler McCormick, Sam Clark
http://www.interva.net/
data(RandomVA5)
data(probbaseV5)
probbaseV5 <- as.matrix(probbaseV5)
RandomVA5 <- as.matrix(RandomVA5)
input <- as.character(RandomVA5[1, ])
input[which(toupper(input) == "N")] <- "0"
input[which(toupper(input) == "Y")] <- "1"
input[which(input != "1" & input != "0")] <- NA
input <- as.numeric(input)
output <- DataCheck5(Input=input, id="d1", probbaseV5=probbaseV5, write=TRUE)