Learn R Programming

NSM3 (version 1.1)

pSkilMack: Skillings-Mack

Description

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

Usage

pSkilMack(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 datassnumber of treatments per blockobs.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: pSkilMack(x=matrix(c(1,2,3,4,5,6),ncol=2,byrow=T)) pSkilMack(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.8 Effect of Rhythmicity of a Metronome on Speech Fluency
rhythmicity<-matrix(c(3, 5, 15, 1, 3, 18, 5, 4, 21, 2, NA, 6, 0, 2, 17, 0, 2, 10, 0, 3, 8,
0, 2, 13),ncol=3,byrow=TRUE)
#pSkilMack(rhythmicity)
pSkilMack(rhythmicity,n.mc=5000)

Run the code above in your browser using DataLab