Learn R Programming

NSM3 (version 1.1)

pMackSkil: Mack-Skillings

Description

Function to compute the P-value for the observed Mack-Skillings MS statistic.

Usage

pMackSkil(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 datacnumber of repetitions for each treatment and block combinationobs.statthe observed MS 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: pMackSkil(x=array(c(1,2,3,4,5,6),dim=c(1,2,3)) pMackSkil(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.9 Determination of Niacin in Bran Flakes
niacin<-array(dim=c(3,4,3))
niacin[,,1]<-c(7.58,7.87,7.71,8,8.27,8,7.6,7.3,7.82,8.03,7.35,7.66)
niacin[,,2]<-c(11.63,11.87,11.4,12.2,11.7,11.8,11.04,11.5,11.49,11.5,10.10,11.7)
niacin[,,3]<-c(15,15.92,15.58,16.6,16.4,15.9,15.87,15.91,16.28,15.1,14.8,15.7)

Run the code above in your browser using DataLab