Description Usage Arguments Details Value Note Author(s) References Examples

This is a non-parametric K-sample test that tests equality of distribution of a variable between k populations based on samples from each of the populations.

1 | ```
AndersonDarling(data, number.cases)
``` |

`data` |
A single vector consisting of concatenation of the k samples data being used for the test |

`number.cases` |
A vector consisting of the number of cases in samples 1, 2, ..., k, respectively |

The data is a vector including all the k samples to be used for the test. The j-th element of number.cases is the number of cases in sample j (included in data), for j= 1,...,k.

`pn ` |
The test's p-value. |

`adk.all ` |
The Anderson Darling test statistic corresponding to each group. |

`adl ` |
The sum of elements of adk.all. |

`var.sdk ` |
The variance of the finite sample distribution of the Anderson Darling test statistic under the null. |

The test does not adjust for tie observations.

Mortaza Jamshidian, Siavash Jalal, and Camden Jansen

Scholz, F.W. and Stephens, M.A. (1987). ”K-Sample Anderson-Darling Tests,”
*Journal of the American Statistical Association*, 82, 918-924.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
#---- Example 1
set.seed(50)
n1 <- 30
n2 <- 45
n3 <- 60
v1 <- rnorm(n1)
v2 <- runif(n2)
v3 <- rnorm(n3, 2, 3)
AndersonDarling(data = c(v1, v2, v3), number.cases=c(n1, n2, n3))
#---- Example 2
set.seed(50)
n1 <- 30
n2 <- 45
n3 <- 60
v1 <- rt(n1,4)
v2 <- rt(n2,4)
v3 <- rt(n3,4)
AndersonDarling(data=c(v1, v2, v3), number.cases=c(n1, n2, n3))
``` |

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.