I want to see relationships in my data on a network and have used the qgraph package to do so, my data, combined.data, is used. The correlation of my data which I passed as an input has a lot of NA values. The command I used to get the network plot is
qgraph(cor(combined.data, method="spearman"),layout="spring", groups=gr, labels=nm,
label.scale=FALSE, label.cex=1)
# I chose spearman because the data variables are on ordinal scale
gr is list of the groups, nm is a vector containing the tags/labels of the nodes. The command runs well but comes with a warning
Warning message:
In qgraph(cor(combined.data, method = "spearman"), layout = "spring", :
Non-finite weights are omitted
The network has a lot of empty edges (non-finite weights) and I want to remove the nodes with the non-finite weights. I have tried to set the minimum and maximum arguments but it still comes up with those redundant nodes. Any suggestion on how to achieve this will be appreciated.