growth curve model w/ manifest predictors (and their interaction) + plot

363 views
Skip to first unread message

Elissa Hamlat

unread,
Nov 6, 2018, 8:01:56 PM11/6/18
to lavaan
Hello, 

I have created a linear latent growth model with 10 timepoints (every three months). The intercept and slope are regressed on two observed predictors and their interaction. 
I created the interaction term before importing into R by simply multiplying the two predictors after mean centering. (Question 1: Was this a mistake?).

It is multi-group model with "gender" as my group. 

The interaction terms significantly predicted my intercept and my slope, I wanted to probe the simple slopes, so I created a set of predictor variables +-1SD from their mean and new product terms by multiplying with the other predictor. (Question 2: Was this a mistake?).

I also am not sure how to plot the interaction. I am trying probe2WayMC with plotProbe  from semTools but from my reading, it seems this command should be used when the interaction is made up of latent variables, which is not the case. 

In addition, the interaction was only significantly for one of my groups (i.e., gender = 1) so I filtered my data to select only those cases. (Question 3: Do I have any other options for plotting my interaction?).

Thank you,

Elissa

Terrence Jorgensen

unread,
Nov 9, 2018, 5:59:24 AM11/9/18
to lavaan
Hi Elissa,

This is complicated by the fact you have a multigroup model.  Without constraining estimates across groups, you need to recognize this implies that each estimated effect within a group is actually interacting with gender, and that interaction is the difference between the groups' estimates.  There's nothing wrong with that, but it affects the way I answer your questions below.



I created the interaction term before importing into R by simply multiplying the two predictors after mean centering. (Question 1: Was this a mistake?).

No, but your interpretations differ depending on whether you centered them at the grand mean or the group means.  For estimates and interpretations to be comparable across groups, I would recommend grand-mean-centering so that your probing results separately within each group are still testing the same H0 in both groups (i.e., +/-1 SD should be the same value for everybody, otherwise the results are comparable).

The interaction terms significantly predicted my intercept and my slope, I wanted to probe the simple slopes, so I created a set of predictor variables +-1SD from their mean and new product terms by multiplying with the other predictor. (Question 2: Was this a mistake?).

That is correct.  Recalculating the interaction term is specifically necessary in order for interpretations/tests to mean what you expect them to mean.

I also am not sure how to plot the interaction. I am trying probe2WayMC with plotProbe  from semTools but from my reading, it seems this command should be used when the interaction is made up of latent variables, which is not the case.  (Question 3: Do I have any other options for plotting my interaction?).

You could treat the exogenous predictors as single indicators of latent variables.  (Secretly, that is what lavaan does behind the scenes.  See the output of lavInspect(fit, "est") to see that it has a factor with the same name in $psi, with a loading fixed to 1 in $lambda and residual variance of 0 in $theta.)  If you explicitly put them into "latent space" like that (with the product term loading onto a latent interaction factor), perhaps the semTools functions will work for you.

In addition, the interaction was only significantly for one of my groups (i.e., gender = 1) so I filtered my data to select only those cases.

Significance tests are arbitrary enough, and this is just a case of choosing an arbitrary value of a moderator at which to test whether the slope of a focal predictor is zero.  You already rejected it being zero when you detected a significant interaction.  The model implies that the slope continuously changes as the moderator increases, not that it stays zero until suddenly being positive or negative at some level of the moderator.  

Furthermore, you haven't tested the 3-way interaction by constraining the slopes of the predictor, moderator, and product term to equality across groups.  If the models fit is equivalent to the one with free estimates across groups, then there is no evidence of moderation by gender, so it would make no sense to probe separately within each sex (much less conclude "no effect" within one sex just because power might be lower for that sex).  But if there is evidence of moderation by gender, then it would make sense to probe separately as you are doing now.

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

Elissa Hamlat

unread,
Nov 9, 2018, 8:56:49 AM11/9/18
to lav...@googlegroups.com
Thank you. This is amazingly helpful.

--
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.
For more options, visit https://groups.google.com/d/optout.
--
Elissa June Hamlat, Ph.D. 
Postdoctoral Research Associate
Youth Emotion, Development, and Intervention Lab
Department of Psychology
University of Illinois Urbana-Champaign
603 E. Daniel St.
Champaign, IL 61820

Elissa Hamlat

unread,
Nov 16, 2018, 10:56:28 PM11/16/18
to lavaan
Hello again,

I have followed the advice you listed below.  I grand-mean centered variables, I tested for measurement invariance, and I was able to graph. 

This is a multi-group (three groups, not gender) and I am graphing the interaction's effects (effect of X at high and low values of Y) on the slope for one of the groups (A).  
Does that mean the effect on slope value I am graphing (the estimate from my output) is describing how much the effect on slope for group A  differs from the effect on slope in the same model without groups?

So for example, if the mean effect on slope in the model run with no groups is -.5 and I run the multi-group version and the effect on slope for group A is -.1, then the actual effect for group A is -.4?

Do you know of a way I can graph the actual slopes for each group at high and low values of my predictors? Is there a way to extract that output in lavaan? Thank you!!

Elissa


On Fri, Nov 9, 2018 at 4:59 AM Terrence Jorgensen <tjorge...@gmail.com> wrote:
Hi Elissa,

This is complicated by the fact you have a multigroup model.  Without constraining estimates across groups, you need to recognize this implies that each estimated effect within a group is actually interacting with gender, and that interaction is the difference between the groups' estimates.  There's nothing wrong with that, but it affects the way I answer your questions below.


I created the interaction term before importing into R by simply multiplying the two predictors after mean centering. (Question 1: Was this a mistake?).

No, but your interpretations differ depending on whether you centered them at the grand mean or the group means.  For estimates and interpretations to be comparable across groups, I would recommend grand-mean-centering so that your probing results separately within each group are still testing the same H0 in both groups (i.e., +/-1 SD should be the same value for everybody, otherwise the results are comparable).

The interaction terms significantly predicted my intercept and my slope, I wanted to probe the simple slopes, so I created a set of predictor variables +-1SD from their mean and new product terms by multiplying with the other predictor. (Question 2: Was this a mistake?).

That is correct.  Recalculating the interaction term is specifically necessary in order for interpretations/tests to mean what you expect them to mean.

I also am not sure how to plot the interaction. I am trying probe2WayMC with plotProbe  from semTools but from my reading, it seems this command should be used when the interaction is made up of latent variables, which is not the case.  (Question 3: Do I have any other options for plotting my interaction?).

You could treat the exogenous predictors as single indicators of latent variables.  (Secretly, that is what lavaan does behind the scenes.  See the output of lavInspect(fit, "est") to see that it has a factor with the same name in $psi, with a loading fixed to 1 in $lambda and residual variance of 0 in $theta.)  If you explicitly put them into "latent space" like that (with the product term loading onto a latent interaction factor), perhaps the semTools functions will work for you.

In addition, the interaction was only significantly for one of my groups (i.e., gender = 1) so I filtered my data to select only those cases.

Significance tests are arbitrary enough, and this is just a case of choosing an arbitrary value of a moderator at which to test whether the slope of a focal predictor is zero.  You already rejected it being zero when you detected a significant interaction.  The model implies that the slope continuously changes as the moderator increases, not that it stays zero until suddenly being positive or negative at some level of the moderator.  

Furthermore, you haven't tested the 3-way interaction by constraining the slopes of the predictor, moderator, and product term to equality across groups.  If the models fit is equivalent to the one with free estimates across groups, then there is no evidence of moderation by gender, so it would make no sense to probe separately within each sex (much less conclude "no effect" within one sex just because power might be lower for that sex).  But if there is evidence of moderation by gender, then it would make sense to probe separately as you are doing now.

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

--
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+unsubscribe@googlegroups.com.

To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.

Terrence Jorgensen

unread,
Nov 23, 2018, 10:39:10 AM11/23/18
to lavaan
Does that mean the effect on slope value I am graphing (the estimate from my output) is describing how much the effect on slope for group A  differs from the effect on slope in the same model without groups?

If this is a multigroup model, then the estimated effect in each group is that effect in that group, not a difference from the average effect (i.e., the effect from a single-group model)

So for example, if the mean effect on slope in the model run with no groups is -.5 and I run the multi-group version and the effect on slope for group A is -.1, then the actual effect for group A is -.4?

No, the effect is -.1 in Group A if that is the estimated value.  

Do you know of a way I can graph the actual slopes for each group at high and low values of my predictors?


Is there a way to extract that output in lavaan? 

In what format?  `summary()` just prints estimates and tests to the Console, but `lavInspect(fit, "est")` provides estimates in their LISREL matrices (in a nested list: one list of LISREL matrices per group), and `coef(fit)` provides the full vector of estimates.

Elissa Hamlat

unread,
Nov 27, 2018, 11:35:06 AM11/27/18
to lavaan
Thank you for your help. I just need to clear one more thing up as I think I was confused in my last query to you. 


In the multigroup model, are the the estimated effects due to the interaction of my predictors: a) the actual estimated slope or b) the effect on the slope without predictors (e.g., if in model without predictors the slope (s intercept) is -.5 and  the effect on slope of the predictors is -.1, the actual slope (or slope w/ predictors is -.4). 

So for example, if the mean effect on slope in the model run with no groups is -.5 and I run the multi-group version and the effect on slope for group A is -.1, then the actual effect for group A is -.4?
 

Terrence Jorgensen

unread,
Nov 29, 2018, 5:23:04 AM11/29/18
to lavaan
I just need to clear one more thing up as I think I was confused in my last query to you. 

The language is confusing.  Please post the relevant part of your syntax, label your parameters, and ask me questions about the labels so that I can be certain I understand your question.

Elissa Hamlat

unread,
Nov 29, 2018, 8:31:49 PM11/29/18
to lav...@googlegroups.com
Thank you. I apologize for the confusion.

I created a linear growth model for externalizing symptoms over 10 timepoints. The slope was linearly decreasing (-.05)

I then regressed the intercept and slope on pubertal timing (pt), peer stress (peerC), and their interaction (ptXpeer).

intercept of externalizing ~ pt + peerC + ptXpeer
slope of externalizing ~ pt + peerC + ptXpeer

The interaction had a significant effect on  both the intercept (-0.57) and the slope (0.05).

At low  pt (1SD-), peerC has a sig effect on intercept  (0.85) and slope (-0.05), I am interpreting this as a higher intercept and slower decrease in slope. 

a) Is that correct? 
b) How do I calculate the actual slope values at high and low values of pt and peerC as I would like to graph these? Any other suggestions for how I should graph this interaction?



--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/2BieRxOUh3s/unsubscribe.
To unsubscribe from this group and all its topics, 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.
For more options, visit https://groups.google.com/d/optout.

Elissa Hamlat

unread,
Nov 29, 2018, 8:34:54 PM11/29/18
to lav...@googlegroups.com
Apologies but values have been amended below in bold.
On Thu, Nov 29, 2018 at 7:31 PM Elissa Hamlat <elissa...@gmail.com> wrote:
Thank you. I apologize for the confusion.

I created a linear growth model for externalizing symptoms over 10 timepoints. The slope was linearly decreasing (-.05)

I then regressed the intercept and slope on pubertal timing (pt), peer stress (peerC), and their interaction (ptXpeer).

intercept of externalizing ~ pt + peerC + ptXpeer
slope of externalizing ~ pt + peerC + ptXpeer

The interaction had a significant effect on  both the intercept (-0.57) and the slope (0.05).

At low  pt (1SD-), peerC has a sig effect on intercept  (1.43) and slope (-0.10), I am interpreting this as a higher intercept and slower decrease in slope. 

Christopher Desjardins

unread,
Nov 29, 2018, 8:37:24 PM11/29/18
to lav...@googlegroups.com
Hi Elissa,

May I suggest you take a look here: http://www.quantpsy.org/interact/

Preacher has a lot of great stuff on their for probing interactions as well as R code.

Chris

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.

Elissa Hamlat

unread,
Nov 29, 2018, 8:41:05 PM11/29/18
to lav...@googlegroups.com
Thank you, that is very helpful. 

Elissa Hamlat

unread,
Nov 29, 2018, 8:41:11 PM11/29/18
to lav...@googlegroups.com
I also don't know if this will change the interpretation but this is a multigroup model, and this but not for girls (intercept, b = -0.10, p = .70; slope, b = 0.02, p = .48). 

Elissa Hamlat

unread,
Nov 29, 2018, 8:44:00 PM11/29/18
to lav...@googlegroups.com
sorry, the interaction is significant for boys and not girls. Ugh, I need sleep :) 

Christopher Desjardins

unread,
Nov 29, 2018, 8:45:41 PM11/29/18
to lav...@googlegroups.com
Hi Elissa,

I still think that website will give you every thing you need. Click through it and take a look at his calculators.

Chris

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.
Reply all
Reply to author
Forward
0 new messages