LoslegenKostenlos loslegen

Edit the Layout

The tree layout in semPaths() is the default view, where the rotation is set to 1. Setting the rotation to 2 can often help non-statisticians understand models because the model reads left to right, where the latent variables on the left predict the responses to the manifest variables on the right. Update the model picture to use these settings.

Diese Übung ist Teil des Kurses

Structural Equation Modeling with lavaan in R

Kurs anzeigen

Anleitung zur Übung

  • Add the layout argument to the semPaths() function.
  • Add the rotation argument to the semPaths() function.
  • Set layout equal to "tree" and rotation equal to 2.

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Load the semPlot library
library(semPlot)

# Update the default picture
semPaths(object = adopt.fit, 
         ___,
         ___)
Code bearbeiten und ausführen