SachaEpskamp / semPlot

Path diagrams and visual analysis of various SEM packages' output
GNU General Public License v2.0
61 stars 20 forks source link

semPlot labels not lining up with variables #22

Closed Pollyanna109 closed 4 years ago

Pollyanna109 commented 4 years ago

I am using the following code for a model developed using lavaan but having problems with the variables at the right where the lines/ labels are out of step.

I also want to remove the covariances labels between those variables

I know the code is clumsy especially the nodeLabels. I am quite new to R. I'd appreciate any suggestions to make this look better

semPaths(sem6.weights, fixedStyle = "white", exoCov = FALSE, residuals = FALSE, "est", groups = "latents", pastel = TRUE, edge.label.cex = 0.5, intercepts = FALSE, structural = FALSE, layout = "tree", rotation = 2, label.cex = .75, centerLevels = FALSE, nodeLabels = c("Q11g","Q11h", "Q17a", "Q9-6", "Q11d", "Q17e","Q20g", "Q23c", "Q23d","Q11a" ,"Q14-3", "Q17b", "Q23a", "Q23f", "Q23g", "Q26a","Q26b", "Q26c", "Q26e", "Q26f", "Q26g", "Q26h", "Q26i", "Q26j", "Q26k", "Q26l", "Semi Rural", "Rural", "Remote Rural","Maori","Pacific","Under 25","Deprivation","Primip", "Access", "Cultural", "Information"))

Rplot01

Pollyanna109 commented 4 years ago

Hi all _ managed to fix the alighnment issue by changing sizeMan = 3 which fixed the problem on the right-hand side but made the left-hand labels unreadable. Getting there though