Learn R Programming

NSM3 (version 1.1)

cAnsBrad: Function to compute a critical value for the Ansari-Bradley C distribution.

Description

This function uses pAnsari and qAnsari from the base stats package to compute the critical value for the Ansari-Bradley C distribution at (or typically in the "Exact" case, close to) the given alpha level. The program is reasonably quick for large data, well after the asymptotic approximation suffices, so Monte Carlo methods are not included.

Usage

cAnsBrad(alpha, m, n, method = NA, n.mc = 10000)

Arguments

Value

Returns a list with "NSM3Ch5c" class containing the following components:mnumber of observations in the first data group (X)nnumber of observations in the second data group (Y)cutoff.Uupper tail cutoff at or below user-specified alphatrue.alpha.Utrue alpha level corresponding to cutoff.U (if method="Exact")cutoff.Llower tail cutoff at or below user-specified alphatrue.alpha.Ltrue alpha level corresponding to cutoff.L (if method="Exact")

References

This function uses the source code ansari.c from the stats package by: R Core Team (2013). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL http://www.R-project.org/.

See Also

Also see ansari.test()

Examples

Run this code
##Hollander, Wolfe, Chicken - NSM3 - Example 5.1 (Serum Iron Determination):
cAnsBrad(0.05,20,20,"Asymptotic")
cAnsBrad(0.05,20,20,"Exact")

##Bigger data
cAnsBrad(0.05,100,100,"Exact")

Run the code above in your browser using DataLab