# Sample sd of indirect effects in a multilevel mediation model

Posted by Yuling Yao on May 03, 2020.       Tag: modeling

M asked me a question which essentially looks like this: In a mediation model a and b are regression coefficient through the mediation path, and the final quantity of interest is therefore the product $ab$. In a multilevel model, for each group $j$, we model both a[j] and b[j] varying within group, where we could model in Stan as a multivariate normal

According to literature xxx, we could estimate the expectation of ab in a typical group by (the sample mean of)

for $\sigma_{12}$ the off-diagonal element in $\Sigma$. Does it makes sense to summarize the uncertainty by the sample sd of the draws above?

The answer is No. The formula really comes from point estimation context with

The law of total variance says

The sample deviation of $a_0 b_0 + \sigma_{12}^2$ draws only amounts to the second term and I don’t think it means anything. The easiest way to solve the problem is to obtain posterior draws of group-level indirect effects $a_jb_j$ directly.