Exporting factor analysis path diagrams to Mermaid

I’ve been playing around with making diagrams using Mermaid lately, and wanted to see if it was possible to easily export path diagrams for factor analysis models to Mermaid code. I thought that this could be useful as Mermaid can be used with Quarto , which I use for writing reports to clients. A path diagram Here’s an example of a exploratory factor analysis model using the attitudes data (taken…