LoslegenKostenlos loslegen

Create a Direct Path

In this exercise, edit the epi.model to include a direct regression path between lying and neuroticism. We might expect that a person's level of neuroticism would predict their level of lying.

You can edit the model specification provided to include this path, and you can use the same model specification code that you might use when defining a regression in lm.

Diese Übung ist Teil des Kurses

Structural Equation Modeling with lavaan in R

Kurs anzeigen

Interaktive Übung

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

# Load the library and data
library(psych)
data(epi)

# Specify a three-factor model where lying is predicted by neuroticism
epi.model <- 'extraversion =~ V1 + V3 + V5 + V8
neuroticism =~ V2 + V4 + V7 + V9
lying =~ V6 + V12 + V18 + V24
___'
Code bearbeiten und ausführen