Learn R Programming

NSM3 (version 1.1)

pPage: Page

Description

Function to compute the P-value for the observed Page L statistic.

Usage

pPage(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 L 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: pPage(x=matrix(c(1,2,3,4,5,6),ncol=2,byrow=T)) pPage(x=c(1,2,3,4,5,6),b=c(1,1,2,2,3,3),trt=c(1,2,1,2,1,2))

Examples

Run this code
##Hollander-Wolfe-Chicken Example 7.2 Breaking Strength of Cotton Fibers
strength.index<-matrix(c(7.46, 7.68, 7.21, 7.17, 7.57, 7.80, 7.76, 7.73, 7.74, 8.14, 8.15,
7.87, 7.63, 8.00, 7.93),byrow=FALSE,ncol=5)

#pPage(strength.index,method="Exact")
pPage(strength.index,method="Monte Carlo")

Run the code above in your browser using DataLab