Learn R Programming

NADA2 (version 1.1.8)

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

Description

Performs a nonparametric Paired Prentice-Wilcoxon test of whether the median difference between two columns of paired censored data equals 0 (O'Brien and Fleming, 1987)

Usage

ppw.test(xd, xc, yd, yc, alternative = "two.sided", printstat = TRUE)

Value

Paired Prentice-Wilcoxon test results including Z-statistic, n (sample size), p-value and median difference

Arguments

xd

The first column of data values plus detection limits

xc

The column of censoring indicators, where 1 (or TRUE) indicates a detection limit in the xd column, and 0 (or FALSE) indicates a detected value in xd.

yd

The second column of data values plus detection limits

yc

The column of censoring indicators, where 1 (or TRUE) indicates a detection limit in the yd column, and 0 (or FALSE) indicates a detected value in yd

alternative

The usual notation for the alternate hypothesis. Default is “two.sided”. Options are “greater” or “less”.

printstat

Logical TRUE/FALSE option of whether to print the resulting statistics in the console window, or not. Default is TRUE.

References

Helsel, D.R., 2011. Statistics for Censored Environmental Data using Minitab and R, 2nd ed. John Wiley & Sons, USA, N.J.

O’Brien, P.C., Fleming, T.R., 1987. A Paired Prentice-Wilcoxon Test for Censored Paired Data. Biometrics 43, 169–180. https://doi.org/10.2307/2531957

See Also

Examples

Run this code
data(PbHeron)
ppw.test(PbHeron$Liver,PbHeron$LiverCen,PbHeron$Bone,PbHeron$BoneCen)

Run the code above in your browser using DataLab