# independent (same x-y pairing across groups)
p_2r(100, r.ab=.5, r.ab2=.6)
# return cocor object for further analysis
p_2r(100, r.ab=.5, r.ab2=.6, return_analysis = TRUE)
# \donttest{
# estimate empirical power
p_2r(n=100, r.ab=.5, r.ab2=.6) |> Spower()
# estimate n required to reach 80% power
p_2r(n=interval(100, 5000), r.ab=.5, r.ab2=.6) |> Spower(power=.80)
# }
# overlap (same y, different xs)
# H0: r.ab = r.bc
p_2r(100, r.ab=.5, r.ac=.3, r.bc=.2)
# nonoverlap (different ys, different xs)
# H0: r.ab = r.cd
p_2r(100, r.ab=.5, r.ac=.3, r.bc=.2, r.ad=.2, r.bd=.4, r.cd=.2)
Run the code above in your browser using DataLab