ppw.test | R Documentation |
Tests for differences in paired left-censored samples from two groups using the PPW test (O'Brien and Fleming, 1987).
ppw.test(x, y, alternative = "two.sided", OBrienFleming = TRUE, data.names)
x |
the paired samples to |
y |
the paired values to |
alternative |
character string describing the alternative hypothesis. Must be one of "two.sided," "greater," or "less." |
OBrienFleming |
logical, if |
data.names |
character string to be used to explain the data. Default names are derived from the data arguments. |
The O'Brien-Fleming adjustment forces the score for all paired censored values to be equal to each other. It also forces equality between observed values that are less than the detection limit in the paried sample by setting the value to less than the detection limit.
An object of class "htest" that inherits "ppw."
The null hypothesis is that the distributions are not different from one another.
The ppw.test
function uses the survfit
function. Helsel (2012) describes flipping
the left-censored data so that small values become large and left-censored
values become right-censored values and adapt nonparametric techniques from
survival analysis.
A plot
method is supported for the returned object.
Helsel, D.R. 2012, Statistics for Censored Environmental Data Using Minitab
and R: New York, Wiley, 324 p.
O'Brien, P.C. and Fleming, T.R., 1987, A paired Prentice-Wilcoxon test for censored paried data: Biometrics, v. 43, p. 451–455.
survdiff
, survfit
,
lcens-class
# Compare uncensored results set.seed(699) Xu <- sort(rlnorm(22, 0, 1)) Yu <- sort(rlnorm(22, .425, 1)) # Treat as paired samples ppw.test(Xu, Yu) wilcox.test(Xu, Yu, paired=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.