I am trying to create a directed acyclic graph (DAG) highlighting the role of a mediator. I am using the dagitty and ggdag packages. Example code:
coords <- list(
x = c(y = 5, x =2, m = 4),
y = c(y = 2, x =2, m = 2)
)
mydag_basic <- dagify(y ~ m + x ,
m ~ x,
outcome = "y",
coords = coords)
ggdag_status(mydag_basic) + theme_dag()
This creates the DAG as in the attached image.
However, the direct arrow from x to y is not very visible, hidden by the mediator. I could change this by shifting the x upwards/downwards but I am wondering whether it is possible to simply have a curved arrow that goes from x->y instead.