lepage.test | R Documentation |
Performs the Lepage test for the two-sample location scale problem.
lepage.test(x, y = NA, g = NA, method = NA, n.mc = 10000)
x |
Either a list or a vector containing either all or the first group of data. |
y |
If x contains the first group of data, y contains the second group of data. Otherwise, not used. |
g |
If x contains a vector of all of the data, g is a vector of 1's and 2's corresponding to group labels. Otherwise, not used. |
method |
Either "Exact", "Monte Carlo" or "Asymptotic", indicating the desired distribution. When method=NA, "Exact" will be used if the number of permutations is 10,000 or less. Otherwise, "Monte Carlo" will be used. |
n.mc |
If method="Monte Carlo", the number of Monte Carlo samples used to estimate the distribution. Otherwise, not used. |
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:
lepage.test(x=c(1,2),y=c(3,4))
lepage.test(x=list(c(1,2),c(3,4)))
lepage.test(x=c(1,2,3,4),g=c(1,1,2,2))
Returns a list containing the following components:
m |
Number of observations in the first data group (X). |
n |
Number of observations in the second data group (Y). |
obs.stat |
The observed C statistic. |
p.value |
Upper tail P-value. |
This function was adapted slightly from the pLepage
function in the NSM3
(version 1.1) package.
Grant Schneider, Theo Pepler
Lepage, Y. (1971). A combination of Wilcoxon's and Ansari-Bradley's statistics. Biometrika, 58(1): 213-217.
Hollander, M., Wolfe, D.A. and Chicken, E. (2014). Nonparametric Statistical Methods. Wiley.
##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))
lepage.test(platelet.counts)
##or equivalently,
lepage.test(platelet.counts$x,platelet.counts$y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.