proxInd.ef {QuantPsyc} | R Documentation |
Calculates the indirect effect from proximal.med
in a form useful to send to boot
proxInd.ef(data, i)
data |
data.frame used in proximal.med |
i |
i is a 'count' placeholder necessary for use in boot |
This function is not useful of itself. It is specifically created as an intermediate step in bootstrapping the indirect effect.
indirect effect that is passed to boot for each bootstrap sample
Thomas D. Fletcher tom.fletcher.mp7e@statefarm.com
Davison, A. C. & Hinkley, D. V. (1997). Bootstrap methods and their application. Cambridge, UK: Cambridge University Press.
MacKinnon, D. P., Lockwood, C. M., Hoffman, J. M., West, S. G., & Sheets, V. (2002). A comparison of methods to test mediation and other intervening variable effects. Psychological Methods, 7, 83-104.
MacKinnon, D. P., Lockwood, C. M., & Williams, J. (2004). Confidence limit for indirect effect: distribution of the product and resampling methods. Multivariate Behavioral Research, 39, 99-128.
library(boot) data(tra) tmp.tra <- tra names(tmp.tra) <- c('x','z','m','y') med.boot <- boot(tmp.tra, proxInd.ef, R=999) sort(med.boot$t)[c(25,975)] #95% CI plot(density(med.boot$t)) # Distribution of bootstapped indirect effect summary(med.boot$t)