View source: R/pairedPratt.test.R
pairedPratt.test | R Documentation |
Tests for differences in paired left-censored samples from two groups using Pratt's (1959) adjustment for ties.
pairedPratt.test(x, y, alternative = "two.sided", mu = 0, data.names)
x |
the paired samples to |
y |
the paired values to |
alternative |
character string describing the alternative hypothesis for
( |
mu |
a numeric value specifying the test difference between |
data.names |
character string to be used to explain the data. Default names are derived from the data arguments. |
An object of class "htest" that inherits "ppw."
The null hypothesis is that the distributions are not different from one another.
The Pratt (1959) adjustment to the Wilcoxon signed-rank test was
used by Lindsey and Rupert (2012) to evaluate decadal changes in groundwater
quality. Lindsey and Rupert (2012) used a fixed reporting level (0.06,
the largest among all of the data) and used a simple
substitute value 0.0599 for the censored values. The approach in pairedPratt.test
is to recensor values at the largest reporting limit, use one-half that value as the
simple substitute and round differences greater than the simple substitute value
to multiples of the largest reporting limit; nonzero differences less than or equal to the
simple substitute value are rounded to that value. That rounding scheme
eliminates the ambiguity of comparing interval values created by the difference
between a censored value and an uncensored value.
A plot
method is supported for the returned object.
Lindsey, B.D., and Rupert, M.G., 2012, Methods for evaluating temporal groundwater quality data and results of decadal-scale changes in chloride, dissolved solids, and nitrate concentrations in groundwater in the United States, 1988–2010: U.S. Geological Survey Scientific Investigations Report 2012–5049, 46 p.
Pratt, J.W., 1959, Remarks on zeros and ties in the Wilcoxon signed rank procedures: Journal of the American Statistical Association, v. 54, no. 287 p. 655–667.
ppw.test
, lcens-class
# Compare uncensored results set.seed(699) Xu <- sort(rlnorm(22, 0, 1)) Yu <- sort(rlnorm(22, .425, 1)) # Treat as paired samples pairedPratt.test(Xu, Yu) wilcox.test(Xu, Yu, paired=TRUE) # The differences in the p-values are due to use of approximate p-value for # the Pratt test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.