Performs a nonparametric sign test of whether the median difference between two columns of paired censored data equals 0. Uses the Fong adjustment for pairs of equal values.
Usage
cen_signtest(xd, xc, yd, yc, alternative = "two.sided", printstat = TRUE)
Value
Returns the number of xd and yd values greater than, less than and tied. Corrected and uncorrected p-value for ties also displayed.
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
Fong, D.Y.T., Kwan, C.W., Lam, K.F., Lam, K.S.L., 2003. Use of the Sign Test for the Median in the Presence of Ties. The American Statistician 57, 237–240.
Helsel, D.R., 2011. Statistics for censored environmental data using Minitab and R, 2nd ed. John Wiley & Sons, USA, N.J.
#'