pairedPratt.test: Test for difference in left-censored samples

View source: R/pairedPratt.test.R

pairedPratt.testR Documentation

Test for difference in left-censored samples

Description

Tests for differences in paired left-censored samples from two groups using Pratt's (1959) adjustment for ties.

Usage

pairedPratt.test(x, y, alternative = "two.sided", mu = 0, data.names)

Arguments

x

the paired samples to y. Forced to class "lcens." Missing values are removed before the analysis.

y

the paired values to x. Missing values are removed before the analysis.

alternative

character string describing the alternative hypothesis for (x - y compared to mu. Must be one of "two.sided," "greater," or "less."

mu

a numeric value specifying the test difference between x and y.

data.names

character string to be used to explain the data. Default names are derived from the data arguments.

Value

An object of class "htest" that inherits "ppw."

Null Hypothesis

The null hypothesis is that the distributions are not different from one another.

Note

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.

References

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.

See Also

ppw.test, lcens-class

Examples


# 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

USGS-R/smwrQW documentation built on Oct. 11, 2022, 6:13 a.m.