A network analysis of empathy, Psychological Reports (2024)

This is a short HOWTO describing the code for the paper “Using Bayesian Networks to Investigate Psychological Constructs: The Case of Empathy” by Briganti, Decety, Scutari, McNally and Linkowski (2024, Psychological Reports).

Loading and preparing the data

The data used in the paper comprise 10 variables, all measured on Likert scales.

> empathy = readRDS("empathy.rds")
> head(empathy)
  E4 E8 E9 E10 E12 E14 E19 E23 E24 E26
1  3  2  4   3   4   4   1   4   2   0
2  3  3  4   3   4   4   1   4   3   4
3  2  3  3   2   4   2   1   3   1   3
4  3  3  4   3   4   2   1   3   1   3
5  3  3  3   3   4   3   1   3   1   3
6  3  3  3   1   4   4   1   1   1   1

The meaning of the variables, from Figure 1 in the paper, is the following:

  1. E4: Empathic Concern ("Sometimes I don't feel very sorry for other people when they have problems.", on a reversed scale).
  2. E8: Perspective Taking ("I try to look at everybody's side of a disagreement before I make a decision.").
  3. E9: Empathic Concern ("When I see someone being taken advantage of, I feel kind of protective towards them.").
  4. E10: Personal Distress ("I sometimes feel helpless when I am in the middle of a very emotional situation.").
  5. E12: Fantasy ("Becoming extremely involved in a good book or movie is somewhat rare for me", on a reversed scale).
  6. E14: Empathic Concern ("Other people's misfortunes do not usually disturb me a great deal", on a reversed scale).
  7. E19: Personal Distress ("I am usually pretty effective in dealing with emergencies.", on a reversed scale).
  8. E23: Fantasy ("When I watch a good movie, I can very easily put myself in the place of a leading character.").
  9. E24: Distress ("I tend to lose control during emergencies.").
  10. E26: Fantasy ("When I am reading an interesting story or novel, I imagine how I would feel if the events in the story were happening to me.").

Learning a causal network with model averaging

We implemented structure learning with the default combination of boot.strength() (documented here) and averaged.network() (documented here).

> BST = boot.strength(empathy, R = 1000, algorithm = "hc", shuffle = FALSE)
> plot(BST)
plot of chunk unnamed-chunk-3

As we can see from the plot above, there is a clear gap between the arcs that are well-supported by the data and those that are less so. Any arc strength threshold between 0.5 and 0.85 gives essentilly the same averaged network.

> avgnet = averaged.network(BST, threshold = 0.85)
> strength.plot(avgnet, BST)
plot of chunk unnamed-chunk-4

For comparison, we aklso learned a(n undirected) correlation network from the same data. Some arcs from the causal network appear in the correlation network as well, but the overlap between the two is not perfect.

> library(bootnet)
> ug = estimateNetwork(empathy, default = "EBICglasso", corMethod = "cor",
+        corArgs = list(method = "spearman"), threshold = TRUE)
Estimating Network. Using package::function:
  - qgraph::EBICglasso for EBIC model selection
    - using glasso::glasso
Note: Network with lowest lambda selected as best network: assumption of sparsity might be violated.
> plot(ug)
plot of chunk unnamed-chunk-5
Last updated on Thu Jan 11 11:31:47 2024 with bnlearn 5.0-20240103 and R version 4.3.2 (2023-10-31).