14

I am using R lavaan package to estimate a structural equation model. Let's say the model consists of 1 endogenous manifest variable with 1 latent and 2 manifest explanatory variables:

group = {0,1}
attitude1 = latent,scale
age = respondent's age

The desired lavaan model is then (doesn't work):

model <- '
attitude1 =~ att1 + att2 + att3
outcome ~ age*group + attitude1*group'

My goal is, in the lines of what can be done in linear regression, to establish main and interaction effects between each variable and group. Can this be done?

Rose Hartman
  • 2,095
  • 7
  • 30
Maxim.K
  • 560
  • 7
  • 20

1 Answers1

9

There isn't currently a method implemented at the model level, but you can create a new variable that is just attitude1*group, or you can just use multigroup analysis, which may be more appropriate in this case.

Nick Stauner
  • 11,558
  • 5
  • 47
  • 105
jebyrnes
  • 835
  • 6
  • 16
  • 1
    Thanks. Unfortunately, the group invariability analysis gives really weird results (one of the groups is much smaller), while the linear regression makes sense, but SEM is more appropriate due to having scales as independent. – Maxim.K May 31 '13 at 10:38
  • Yeah, then try calculating an interaction effect variable. – jebyrnes Jun 02 '13 at 03:50
  • 6
    Note - the latest version of lavaan introduces the `a:b` syntax for observed variables. – jebyrnes Sep 03 '16 at 19:36