Description Usage Arguments Details Value Author(s) See Also Examples

Performs the Harbin test for two groups. (PLEASE NOTE that this method is experimental and still undergoing testing.)

1 | ```
harbin.test(x, y, reps = 1000)
``` |

`x ` |
First dataset, as a vector. |

`y ` |
Second dataset, as a vector. |

`reps ` |
Number of bootstrap replications to use. |

The Harbin test is a non-parametric test for two-sample location-scale-shape problem, testing the hypothesis that two datasets originated from population distributions which can be described by the same probability distribution function. The alternative hypothesis is that the location, variability and/or shapes of the two population distributions differ.

The test statistic is calculated from quantiles of the pooled datasets, and compared to a bootstrap distribution of the statistic under the null hypothesis.

Returns a list with the following components:

`statistic ` |
Test statistic (the proportion of samples in the first dataset for which the labels have changed when the second dataset was added. |

`crit.val ` |
95% critical value for the test. |

`p.value ` |
P-value for the test. |

Theo Pepler

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
# Example 1: Difference in location
data1 <- rnorm(n = 30, mean = 0, sd = 1)
data2 <- rnorm(n = 20, mean = 0.5, sd = 1)
harbin.test(x = data1, y = data2)
# Example 2: Difference in location and variability
data1 <- rnorm(n = 30, mean = 0, sd = 1)
data2 <- rnorm(n = 20, mean = 0.2, sd = 1.5)
harbin.test(x = data1, y = data2)
# Example 3: Difference in location and shape
data1 <- rnorm(n = 30, mean = 0, sd = 1)
data2 <- runif(n = 20, min = -2.5, max = 3.5)
harbin.test(x = data1, y = data2)
``` |

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.