# NOT RUN {
# obtain SAPA items
items <- psychTools::spi[,-c(1:10)]
# }
# NOT RUN {
# weighted topological overlap
redund <- node.redundant(items, method = "wTO", type = "adapt")
# partial correlation
redund <- node.redundant(items, method = "pcor", type = "adapt")
# check redundancies
key.ind <- match(colnames(items), as.character(psychTools::spi.dictionary$item_id))
key <- as.character(psychTools::spi.dictionary$item[key.ind])
# change names in redundancy output to questionnaire item description
named.nr <- node.redundant.names(redund, key)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab