Learn R Programming

NSM3 (version 1.1)

pLepage: Lepage

Description

Function to compute the P-value for the observed Lepage D statistic.

Usage

pLepage(x,y=NA,g=NA,method=NA,n.mc=10000)

Arguments

Value

Returns a list with "NSM3Ch5p" class containing the following components:mnumber of observations in the first data group (X)nnumber of observations in the second data group (Y)obs.statthe observed C statisticp.valupper tail P-value

Details

The data entry is intended to be flexible, so that the two groups of data can be entered in any of three ways. For data a=1,2 and b=3,4 all of the following are equivalent: pLepage(x=c(1,2),y=c(3,4)) pLepage(x=list(c(1,2),c(3,4))) pLepage(x=c(1,2,3,4),g=c(1,1,2,2))

Examples

Run this code
##Hollander-Wolfe-Chicken Example 5.3 Platelet Counts of Newborn Infants
platelet.counts<-list(x = c(120000, 124000, 215000, 90000, 67000, 95000, 
190000, 180000, 135000, 399000), y = c(12000, 20000, 112000, 
32000, 60000, 40000))

pLepage(platelet.counts)

##or equivalently,

pLepage(platelet.counts$x,platelet.counts$y)

Run the code above in your browser using DataLab