View source: R/bruceR-stats_1_basic.R

cor_diff | R Documentation |

Test the difference between two correlations.

cor_diff(r1, n1, r2, n2, n = NULL, rcov = NULL)

`r1, r2` |
Correlation coefficients (Pearson's |

`n, n1, n2` |
Sample sizes. |

`rcov` |
[Optional] Only for nonindependent
then, as Y and Z are also correlated, we should also consider |

Invisibly return the *p* value.

# two independent rs (X~Y vs. Z~W) cor_diff(r1=0.20, n1=100, r2=0.45, n2=100) # two nonindependent rs (X~Y vs. X~Z, with Y and Z also correlated [rcov]) cor_diff(r1=0.20, r2=0.45, n=100, rcov=0.80)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.