This is my script by now (I added a few explanations as my variables are in german terms):
library(lavaan)
library(semTools)
meine.daten <- read.csv("Befragungsergebnisse3.csv", header = TRUE, sep = ';')
daten.inter <- indProd(...) #I could only find examples with three variables, so I'm not sure if this is the right funktion to use with my numerous variables?
# Mein Modell
mein.modell <- '
# Messmodell
QA =~ QA_1 + QA_2 +QA_3 + QA_4 + QA_5.2 + QA_6.2 + QA_7 #quantitative Anforderungen (workload)
I =~ I_1 + I_2 + I_3 + I_4 + I_5 + I_6 + I_7 + I_8 #Irritation (irritation)
W =~ W_1 + W_2 + W_3 + W_4 + W_5 #Wohlbefinden (well-being)
GF_FK =~ GF_FK_1.2 + GF_FK_2.2 + GF_FK_3.2 + GF_FK_4.2 + GF_FK_5 + GF_FK_6 + GF_FK_7 + GF_FK_8 + GF_FK_9 + GF_FK_10 #Selbstführung der Führungskraft (health-oriented self-management of the leader)
GF_MA =~ GF_MA_1 + GF_MA_2 + GF_MA_3 + GF_MA_4 + GF_MA_5 + GF_MA_6 + GF_MA_7 + GF_MA_8 #Selbstführung des Mitarbeiters (health-oriented self-management of the employee)
GMF =~ GMF_1 + GMF_2 + GMF_3 + GMF_4 + GMF_5 + GMF_6 + GMF_7 + GMF_8 + GMF_9 + GMF_10 #Mitarbeiterführung (health-oriented leadership behaviour)
KU =~ KU_1 + KU_2 + KU_3 + KU_4.2 + KU_5.2 + KU_6.2 #Kontrollüberzeugung (control conviction)
BQ =~ BQ_1 + BQ_2 + BQ_3 + BQ_4 + BQ_5 + BQ_6 + BQ_7 + BQ_8 + BQ_9 + BQ_10 + BQ_11 + BQ_12 #Beziehungsqualität (relationship quality)
#Interaktionen
QA.GMF =~ QA:GMF
QA.GF_MA =~ QA:GF_MA
I.GMF =~ I:GMF
I.GF_MA =~ I:GF_MA
QA.GMF.BQ =~ QA.GMF:BQ
QA.GF_MA.KU =~ QA.GF_MA:KU
I.GMF.BQ =~ I.GMF:BQ
I.GF_MA.KU =~ I.GF_MA:KU
# Strukturmodell
GF_MA ~ GF_FK + GMF
GMF ~ GF_FK
I ~ QA + QA.GMF.BQ + QA.GF_MA.KU
W ~ I + I.GMF.BQ + I.GF_MA.KU'
# Modell analysieren
ergebnis <- sem(model=mein.modell, data=daten.inter, estimator='mlr')
summary(ergebnis, fit.measures=TRUE, standardized=TRUE)
Running my code as is (without the indProd function) I get the error:
Warning messages:
1: In lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, :
lavaan WARNING:
Could not compute standard errors! The information matrix could
not be inverted. This may be a symptom that the model is not
identified.
2: In lav_test_yuan_bentler(lavobject = NULL, lavsamplestats = lavsamplestats, :
lavaan WARNING: could not invert information matrix
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/5bb99b93-cd73-40b0-b554-69c8a198ffb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
look at the indProd() function in the semTools package for creating products of indicators and I would consider double-mean centering.