Learn R Programming

NSM3 (version 1.18)

cFrd: Computes a critical value for the Friedman, Kendall-Babington Smith S distribution.

Description

This function computes the critical value for the Friedman, Kendall-Babington Smith S distribution at (or typically in the "Exact" and "Monte Carlo" cases, close to) the given alpha level. The method used to compute the distribution is from the reference by Van de Wiel, Bucchianico, and Van der Laan.

Usage

cFrd(alpha, k, n, method=NA, n.mc=10000, return.full.distribution=FALSE)

Value

Returns a list with "NSM3Ch7c" class containing the following components:

k

number of treatments

n

number of blocks

cutoff.U

upper tail cutoff at or below user-specified alpha

true.alpha.U

true alpha level corresponding to cutoff.U (if method="Exact" or "Monte Carlo")

full.distribution

probability mass function of S

Arguments

alpha

A numeric value between 0 and 1.

k

A numeric value indicating the number of treatments.

n

A numeric value indicating the number of blocks.

method

Either "Exact", "Monte Carlo" or "Asymptotic", indicating the desired distribution. When method=NA, "Exact" will be used if the number of permutations is 10,000 or less. Otherwise, "Monte Carlo" will be used.

n.mc

If method="Monte Carlo", the number of Monte Carlo samples used to estimate the distribution. Otherwise, not used.

return.full.distribution

If TRUE, and the method used is not asymptotic, the entire probability mass function of S will be returned.

Author

Grant Schneider

References

Van de Wiel, M. A., A. Di Bucchianico, and P. Van der Laan. "Symbolic computation and exact distributions of nonparametric test statistics." Journal of the Royal Statistical Society: Series D (The Statistician) 48.4 (1999): 507-516.

See Also

The coin package.

Examples

Run this code
##Hollander-Wolfe-Chicken Example 7.1 Rounding First Base
#cFrd(0.01,3,22,"Exact")
cFrd(0.01,3,22,n.mc=5000)
cFrd(0.01,3,22,"Asymptotic")

Run the code above in your browser using DataLab