Last chance! 50% off unlimited learning
Sale ends in
ab(type,n=25000,a=0.15,sa=0.01,b=log(1.19),sb=0.01,alpha=0.05,fold=1)
Kline RB. Principles and practice of structural equation modeling, Second Edition. The Guilford Press 2005.
MacKinnon DP. Introduction to Statistical Mediation Analysis. Taylor & Francis Group 2008.
Preacher KJ, Leonardelli GJ. Calculation for the Sobel Test-An interactive calculation tool for mediation tests http://www.people.ku.edu/~preacher/sobel/sobel.htm
ccsize
ab()
n <- power <- vector()
for (j in 1:10)
{
z <- ab(fold=j*0.01)
n[j] <- z[1]
power[j] <- z[2]
}
plot(n,power,xlab="Sample size",ylab="Power")
title("SNP-BMI-T2D association in EPIC-Norfolk study")
Run the code above in your browser using DataLab