Moderated moderation model with latent variables

133 views
Skip to first unread message

Iris Diekemper

unread,
May 15, 2019, 12:28:11 PM5/15/19
to lavaan
Hello everybody,

I'm currently writing my masterthesis and I'm stuck trying to calculate the moderated moderation. I never used R before, so I might have gone wrong all the way. This is my structure model:

Strukturgleichungsmodell.jpg


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



Is this the right way to calculate my SEM? (My number of observations is 168)
I'm thankful for any suggestions!


Christopher David Desjardins

unread,
May 16, 2019, 3:31:58 PM5/16/19
to lavaan
First, with 168 observations you probably shouldn't be fitting this model. That's not very many observations for the number of parameters you're estimating. You might be down to like 2:1 or 3:1 for number of subjects/parameter estimated.

Second, as far as I knew you can't create interactions between latent variables in lavaan doing this:

QA.GMF =~ QA:GMF

Instead, look at the indProd() function in the semTools package for creating products of indicators and I would consider double-mean centering. See this paper[1], which is cited b the indProd() function.

This thread, https://groups.google.com/forum/#!topic/lavaan/19ATRohxJTI, may also be helpful, in particular Ed's comments.

Chris

[1]: Lin, G. C., Wen, Z., Marsh, H. W., & Lin, H. S. (2010). Structural equation models of latent interactions: Clarification of orthogonalizing and double-mean-centering strategies. Structural Equation Modeling, 17(3), 374–391. doi:10.1080/10705511.2010.488999



--
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.

Terrence Jorgensen

unread,
May 17, 2019, 10:00:08 AM5/17/19
to lavaan
look at the indProd() function in the semTools package for creating products of indicators and I would consider double-mean centering. 

Also see the functions probe3WayMC() and probe3WayRC() in semTools.  The nlsem package offers LMS estimation, but it is quite a tedious effort and estimation takes some time.

Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Iris Diekemper

unread,
May 18, 2019, 2:39:44 AM5/18/19
to lavaan
Thank you very much to both of you. I really appreciate it!
Reply all
Reply to author
Forward
0 new messages