I am doing an SEM analysis in R using lavaan. My analysis is complete, but I am not satisfied with the diagrams of the measurement model and structural model provided by semPlot and lavaanPlot. In lavaanPlot, the path arrows are curly, giving a hand-drawn impression, in semPlot, the variables and paths are a bit cluttered.
Is it possible to mimic diagrams produced by AMOS in R (not necessarily the colours etc. But at least the overall structure)? I tried using semPlotModel_AMOS(model.fit) (here model.fit is the object I got by fitting my SEM model to data).
But it throws an error,
Error in file.info(object) : invalid filename argument
In addition: Warning message:
In semPlotModel_Amos(model3.fit) :
(Residual) variances of Amos model is not yet supported
You can use the
Onyxpackage to build alavaan(orOpenMx) model starting with the path diagram, similar to how Amos works. I think the WebSEM site still provides similar functionality if you want to fit your model using a web interface.To automatically design a graphic from a fitted
lavaanmodel, I am unaware of options other than thesemPlotandlavaanPlotpackages you already mentioned. But you could fairly easily build your own custom path diagram using theDiagrammeRpackage (see their video demonstration). Unfortunately, there must always be a trade-off between ease-of-use/automation and flexibility/control to get exactly the picture you want.