Shinyapp: Scoring and Reliability Analysis of Psychometric Network

Published

March 1, 2024

Minimal Example

Loading required package: pacman
⌘+C
exp1 <- matrix(c(
  0, .8, .5,
  .8, 0, 0.1,
  .5, .1, 0
), nrow = 3, ncol = 3, byrow = T)
rownames(exp1) = colnames(exp1) = c("A", "B", "C")
qgraph::qgraph(input = exp1, edge.labels=T, edge.label.cex = 1.7, edge.label.color = "black")

The centrality measures for three nodes:

⌘+C
mykbl(centrality(exp1))
node Betweenness Closeness Strength ExpectedInfluence
A 1.155 1.114 1.044 1.044
B -0.577 -0.295 -0.095 -0.095
C -0.577 -0.819 -0.949 -0.949

Assume that there are two individuals with different scores on three items:

⌘+C
response <- data.frame(
  A = c(1, 5),
  B = c(1, 1),
  C = c(5, 1)
)
rownames(response) <- c("Person1", "Person2")
mykbl(response)
A B C
Person1 1 1 5
Person2 5 1 1

We can calculate the weighted network scores for them based on Strength centrality measures and their item scores

⌘+C
as.matrix(response) %*% centrality(exp1)[['Strength']] |> mykbl()
Person1 -3.797
Person2 4.176

The strength-based network score reflect one’s overall level of clusters of nodes in a network.

Back to top