Hi,
I'm relatively new to R and the lavaan package so excuse me if some of the questions sound very basic. I'm trying to fit a structural equation model to my experimental data. I have three IVs (all categorical with two levels:0,1), some control variables - age, gender, work experience, industry- (all categorical), one mediator (measured using three items on 7-point Likert scale) and two dependent variables (both measured using three items on 7-point Likert scale).
I need to do conformity factor analysis for the three measured variables as well as mediation analysis to fit the model. Here is my syntax for only one of the DVs and without considering control variables. I was wondering whether this is the right way of do the analysis? how I can add my control variables? and is it possible to have two DVs?
SEM.model.buffering <- '
#measurement model
Blame =~ Q1a + Q1b + Q1c
Buffering =~ Q2a + Q2b + Q2c
#direct effects
Buffering ~ s*Severity + r*Relational_Norms + c*Controllability + b*Blame
#mediator
Blame ~ sb*Severity + rb*Relational_Norms + cb* Controllability
# indirect effect
sbb := sb*b
rbb:= rb*b
cbb:= cb*b
# total effect
total := s + (sb*b) + r + (rb*b) + c + (cb*b)'
fit <- sem(SEM.model.buffering, data=Data)