I am new in SEM, and trying to figure out how to possibly get proportion of direct/indirect effect of a categorical variable with more than 2 levels over its total effect.
We have a categorical variable Intervention
with 3 levels, coded as A1
and A2
dummy variables. We measure Outcome
, and have another Mediator
variable that mediates between the dummy variables and Outcome. Both continuous.
A1-> Outcome[label='a1']
A2-> Outcome[label='a2']
A1-> Mediator[label='b1']
A2-> Mediator[label='b2']
Mediator-> Outcome[label='c']
We are interested in the effect of Intervention to Outcome, and whether it is mediated through Mediator. We are using lavaan in R to calculate a path model, using the following formula
Outcome ~ a1*A1 + a2*A2 + c*Mediator
Mediator ~ b1*A1 + b2*A2
# computing parameters
direct := a1 + a2
indirect := b1*c + b2*c
total := direct + indirect
proportion := indirect/total
I am not sure if the computed parameters above, summing paths starting from each of the two dummy variables, have any meaning. In particular,
- Would "proportion" above be meaningful in terms of mediation?
- Is there any way here to consider the direct combined effect of the two dummy variables together as "Intervention"? Is the "direct" parameter above meaningful as the direct effect of intervention on outcome? If not in any absolute/magnitude terms, at least in terms of statistical significance?
I suspect (2) to be partially true, as the z and p-value associated to "direct" does not seem to change depending on how the dummy variables are coded (but the estimates do change), so it seems to refer to the intervention itself. Similarly for (1), "proportion" is constant across codings. But I am still unsure whether/how any this is meaningful.