Learn R Programming

NSM3 (version 1.1)

pFrd: Function to compute the P-value for the observed Friedman, Kendall-Babington Smith S statistic.

Description

The method used to compute the P-value is from the reference by Van de Wiel, Bucchianico, and Van der Laan.

Usage

pFrd(x,b=NA,trt=NA,method=NA, n.mc=10000)

Arguments

Value

Returns a list with "NSM3Ch7p" class containing the following components:knumber of treatments in the datannumber of blocks in the dataobs.statthe observed D statisticp.valupper tail P-value

Details

The data entry is intended to be flexible, so that the data can be entered in either of two ways. The following are equivalent: pFrd(x=matrix(c(1,2,3,4,5,6),ncol=2,byrow=T)) pFrd(x=c(1,2,3,4,5,6),b=c(1,1,2,2,3,3),trt=c(1,2,1,2,1,2))

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

Also see the coin package.

Examples

Run this code
##Hollander-Wolfe-Chicken Example 7.1 Rounding First Base
rounding.times<-matrix(c(5.40, 5.50, 5.55,
                         5.85, 5.70, 5.75,
                         5.20, 5.60, 5.50,
                         5.55, 5.50, 5.40,
                         5.90, 5.85, 5.70,
                         5.45, 5.55, 5.60,
                         5.40, 5.40, 5.35,
                         5.45, 5.50, 5.35,
                         5.25, 5.15, 5.00,
                         5.85, 5.80, 5.70,
                         5.25, 5.20, 5.10,
                         5.65, 5.55, 5.45,
                         5.60, 5.35, 5.45,
                         5.05, 5.00, 4.95,
                         5.50, 5.50, 5.40,
                         5.45, 5.55, 5.50,
                         5.55, 5.55, 5.35,
                         5.45, 5.50, 5.55,
                         5.50, 5.45, 5.25,
                         5.65, 5.60, 5.40,
                         5.70, 5.65, 5.55,
                         6.30, 6.30, 6.25),ncol=3,byrow=TRUE)
#pFrd(rounding.times,n.mc=20000)
pFrd(rounding.times,n.mc=2000)

Run the code above in your browser using DataLab