Multiple interactions with a latent variable in lavaan

666 views
Skip to first unread message

Jorge Fresneda

unread,
Apr 15, 2016, 5:16:56 PM4/15/16
to lav...@googlegroups.com
Hi!! I'm a new user of lavaan
The model I'm trying to fit is this one on the picture  

 As you can see, there is one latent variable, called x. The main problems of my code, I guess, are the interactions of this latent variable x with z1, z2, and z3 (i.e.,xz1, xz2, and x*z3). I have no idea about how to specify the right side of my model.

The code I've employed to specify the model is this:

model.1<-'
## Latent variable (formative)
x<~y1+y2+y3+y4
## Residual covariances 
y1~~y2+y3
y2~~y3+z1
y3~~z1
## Define regressions
w~lambda1*x
w~lambda2*z1
w~lambda3*z2
w~lambda4*z3
## Define interactions
interac:=lambda1*lambda2+lambda1*lambda3+lambda1*lambda4'

Suggestions on how to fix it and define the interactions with the latent variable? Am I missing anything? Sorry if the answer is too obvious, I have no experience with lavaan at all.

Thanks in advance!!

Terrence Jorgensen

unread,
Apr 16, 2016, 9:43:42 AM4/16/16
to lavaan
 As you can see, there is one latent variable, called x. The main problems of my code, I guess, are the interactions of this latent variable x with z1, z2, and z3 (i.e.,xz1, xz2, and x*z3). I have no idea about how to specify the right side of my model.

Well, you are currently defining the "interac" parameter as a function of other parameters.  The slope of an interaction term is not a function of other parameters; rather, you estimate the slope of an interaction like you would the slopes of any other predictors, but the slope of an interaction will be the effect of the product of the predictors that interact.  In other functions like lm() and glm() that accept formula objects, you can just specify interactions by using the asterisk or colon operators in the formula, but lavaan syntax does not work that way.  You would have to calculate product terms yourself as new variables in your data set, then regress the outcome(s) on those variable names in your model syntax.  You can search topics for "interaction" or "moderation" to see other examples in previous posts in this group.

This is a strange scenario because you have a formative construct.  The only way I can think to get this done is to consider the statistically equivalent model in which X is measured reflectively by W, and the Ys are simply exogenous predictors.   Because X would be a single indicator construct in that perspective (which is statistically indistinguishable from your theory), you don't need X at all.  You could just model the effects of the Ys and the Zs directly on W, and estimate the interactions between the Ys and Zs by calculating their products as new variables in your data set, then including those products as predictors in your model syntax.

There are others who work more with formative constructs and PLS software than I do, and they might have better suggestions.  Consider posting on SEMNET, too.  I think this might be a curiosity regardless of the SEM software you use, and there is a larger audience there.

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

Mikko Rönkkö

unread,
Apr 16, 2016, 10:03:21 AM4/16/16
to lav...@googlegroups.com
Hi

On 16 Apr 2016, at 24:16 , Jorge Fresneda <jorge.e....@gmail.com> wrote:

Hi!! I'm a new user of lavaan
The model I'm trying to fit is this one on the picture  <stackmodel.png>
<stackmodel.png>

 As you can see, there is one latent variable, called x. The main problems of my code, I guess, are the interactions of this latent variable x with z1, z2, and z3 (i.e.,xz1, xz2, and x*z3). I have no idea about how to specify the right side of my model.

You either do not need lavaan for estimating this model or cannot meaningfully estimate the model with lavaan. There are two ways to interpret what you are trying to do. If x truly is a latent variable, it cannot be expressed as a function of y1-y4. In this case the model is not identified because you need two outgoing paths to identify a formative latent variable. Non identified models are in most cases not useful because the estimates that you get are arbitrary.

If x just a weighted sum of y1-y4 (a composite) then you can estimate the model using the following strategy:

1) Regress w on y1-y4
2) Take the fitted values: this is your x
3) Regress w on x z1 z2 z3 x*z1 x*z2 x*z3

You just need the lm command to do this.

Mikko
Reply all
Reply to author
Forward
0 new messages