You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It can extract the edge list/connection matrix from lavaan or lm class objects and automatically plot them. The results are not very pretty and hard to deal with because it's based on base plot. So I'm looking for some ggplot2 based solution for plotting SEMs. Right now I manually draw SEMs using e.g. draw.io or Google Draw. This is quite time-consuming, especially when updating numbers on paths.
I managed to convert that into an igraph object and plot it.
Just to let others know, I'm working on some code that can seamlessly input a lavaan fit object and then output an igraph class object ready for plotting with ggraph, including with the correct directional links and their coefficients.
I've never worked with network analysis like this before, so there is some learning involved on my part. So far, have the adjacency matrix worked out. Need to add the path coefficients, but I think I know how to do that from reading this igraph tutorial.
The difficult part after that is having it automatically select a layout that's mostly acceptable. It's my understanding that there's a bunch of algos for this already, but they often produce not quite good results. Maybe there's some theorem that one cannot make an algo that consistently produces decent outcomes, but I'm inclined to try (and maybe it is futile).
It would be neat if this package could implement the functionality that semPlot has.
http://sachaepskamp.com/semPlot/examples#Lavaan
It can extract the edge list/connection matrix from lavaan or lm class objects and automatically plot them. The results are not very pretty and hard to deal with because it's based on base plot. So I'm looking for some ggplot2 based solution for plotting SEMs. Right now I manually draw SEMs using e.g. draw.io or Google Draw. This is quite time-consuming, especially when updating numbers on paths.
I managed to convert that into an igraph object and plot it.
I was not able to get further because of #34.
The text was updated successfully, but these errors were encountered: