Description Usage Arguments Details Value References See Also Examples

The `twopcor`

function tests whether the difference between two Pearson correlations is 0. The `twocor`

function performs the same test on a robust correlation coefficient (percentage bend correlation or Winsorized correlation).

1 2 |

`x1` |
a numeric vector. |

`y1` |
a numeric vector. |

`x2` |
a numeric vector. |

`y2` |
a numeric vector. |

`nboot` |
number of bootstrap samples. |

`corfun` |
Either |

`tr` |
amount of Winsorization. |

`beta` |
bending constant. |

It is tested whether the first correlation coefficient (based on `x1`

and `y1`

) equals to the second correlation coefficient (based on `x2`

and `y2`

). Both approaches return percentile bootstrap CIs.

`twopcor`

and `twocor`

return an object of class `"twocor"`

containing:

`r1` |
robust correlation coefficient |

`r2` |
value of the test statistic |

`ci` |
confidence interval |

`p.value` |
p-value |

`call` |
function call |

Wilcox, R. (2012). Introduction to Robust Estimation and Hypothesis Testing (3rd ed.). Elsevier.

1 2 3 4 5 6 7 8 9 10 11 | ```
ct1 <- subset(hangover, subset = (group == "control" & time == 1))$symptoms
ct2 <- subset(hangover, subset = (group == "control" & time == 2))$symptoms
at1 <- subset(hangover, subset = (group == "alcoholic" & time == 1))$symptoms
at2 <- subset(hangover, subset = (group == "alcoholic" & time == 2))$symptoms
set.seed(111)
twopcor(ct1, ct2, at1, at2)
set.seed(123)
twocor(ct1, ct2, at1, at2, corfun = "pbcor", beta = 0.15)
set.seed(224)
twocor(ct1, ct2, at1, at2, corfun = "wincor", tr = 0.15, nboot = 50)
``` |

WRS2 documentation built on May 4, 2018, 3 a.m.

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.