I have a CFA model as follows:
model_oscaf4_2order <-
'adapt =~ Q5_1 + Q7_1 + Q9_1 + Q13_1 + Q14_1 + Q15_1
align =~ Q19_1 + Q20_1 + Q24_1 + Q26_1 + Q28_1 + Q29_1 + Q30_1
collab =~ Q36_1 + Q37_1 + Q38_1 + Q39_1 + Q42_1 + Q44_1 + Q49_1 + Q50_1
learn =~ Q54_1 + Q55_1 + Q57_1 + Q60_1 + Q63_1 + Q65_1 + Q68_1 + Q69_1 + Q70_1
oscaf =~ adapt + align + collab + learn'
oscaf4_2order <- cfa(model_oscaf4_2order, d)
I created two plots using semPaths first:
semPaths_plot <- semPaths(oscaf4_2order, "std", weighted = FALSE, nCharNodes = 0, nCharEdges=3, plot=TRUE, width=7, height=7, normalize=TRUE, layout = "tree",
shapeMan = "rectangle", sizeMan = 5, sizeMan2 = 5, node.width = 1,
edge.label.cex = .75, levels = c(3,5,6,9),
style = "ram",
mar = c(5, 5, 1, 5),
rotation = 2)
Then lavaanPlot:
lavaanPlot(model=oscaf4_2order, labels = labels, node_options=list(fontsize=14, fontname="helvetica"), edge_options=list(color="grey"), coefs=TRUE, stand=TRUE, covs=TRUE)
The semPaths plot is cluttered even in vertical orientation. SemPaths plot The lavaanPlot plot is better but not legible in horizontal orientation and I want to reorient it to vertical. lavaanPlot plot
SemPaths is easy to reorient using rotation=2. Ideally I'd like to find a similar function that will work with the lavaanPlot.