# example data for one common index
# compare cor(V1, V2) to cor(V1, V3)
# subject V1 V2 V3
#
# 1 1.2 2.3 0.8
# 2 -0.0 1.1 0.7
# 3 1.9 -0.4 -2.3
# 4 0.7 1.3 0.4
# 5 2.1 -0.1 0.8
# ... ... ... ...
# 1000 -0.5 2.7 -1.7
# V1: socio-economic status (common)
# V2: pretest
# V3: post-test
power.z.twocors.steiger(rho12 = 0.35, rho13 = 0.45, rho23 = 0.05,
n = 1000, power = NULL, alpha = 0.05,
alternative = "two.sided",
common.index = TRUE)
# example data for no common index
# compare cor(V1, V2) to cor(V3, V4)
# subject V1 V2 V3 V4
#
# 1 1.2 2.3 0.8 1.2
# 2 -0.0 1.1 0.7 0.9
# 3 1.9 -0.4 -2.3 -0.1
# 4 0.7 1.3 0.4 -0.3
# 5 2.1 -0.1 0.8 2.7
# ... ... ... ... ...
# 1000 -0.5 2.7 -1.7 0.8
# V1: pretest reading
# V2: pretest math
# V3: post-test reading
# V4: post-test math
power.z.twocors.steiger(rho12 = 0.45, rho13 = 0.45, rho23 = 0.50,
rho14 = 0.50, rho24 = 0.80, rho34 = 0.55,
n = 1000, power = NULL, alpha = 0.05,
alternative = "two.sided",
common.index = FALSE)
Run the code above in your browser using DataLab