I have one question.
X <- rnorm(100)
M <- 0.5*X + rnorm(100)
Y <- 0.7*M + rnorm(100)
Data <- data.frame(X = X, Y = Y, M = M)
model <-'Y~c*X
M~a*X
Y~b*M
#indirect effect
ab:=a*b
total:=c+(a*b)
'
RNGkind("L'Ecuyer-CMRG")
fit=sem(model=model,data=Data,se="boot",iseed=123)
parameterEstimates(fit,ci=TRUE,boot.ci.type="bca.simple")
lhs op rhs label est se z pvalue ci.lower ci.upper
1 Y ~ X c 0.054 0.109 0.496 0.620 -0.153 0.275
2 M ~ X a 0.477 0.104 4.604 0.000 0.259 0.672
3 Y ~ M b 0.430 0.092 4.678 0.000 0.253 0.616
4 Y ~~ Y 0.875 0.111 7.893 0.000 0.690 1.142
5 M ~~ M 0.928 0.133 7.001 0.000 0.697 1.230
6 X ~~ X 0.821 0.000 NA NA 0.821 0.821
7 ab := a*b ab 0.205 0.067 3.061 0.002 0.095 0.367
8 total := c+(a*b) total 0.259 0.114 2.277 0.023 0.051 0.496
I have an estimate of indirect effect (ab) 0.205 and it’s 95% confidence interval is -0.095-0.367.
But how can I get the 1000 bootstrapped values for the indirect effect ab?
Keon-Woong Moon