Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72840

Mediation with bootstrap standard errors and confidence intervals

$
0
0
Hello-

I am trying to use the program indireff.ado to get bootstrap CIs for the indirect effects in a mediation analysis using SEM. I cannot get it to run and keep getting the error message, "type mismatch
an error occurred when bootstrap executed indireff." I have posted the original program below. Can anyone with better programming knowledge help me understand which parts of the program I need to personalize to my data besides the variable names? I get the error after I try to run the final line of the program.

Thanks!
program indireff, rclass sem (read <- math)(science <- read math) estat teffects mat bi = r(indirect) mat bd = r(direct) mat bt = r(total) return scalar indir = el(bi,1,3) return scalar direct = el(bd,1,3) return scalar total = el(bt,1,3) end
sem (read <- math)(science <- read math) quietly estat teffects matrix list r(indirect)
matrix list r(direct)
matrix list r(total)
set seed 358395 bootstrap r(indir) r(direct) r(total), reps(200): indireff

Viewing all articles
Browse latest Browse all 72840

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>