cen_paired | R Documentation |
Performs a parametric test of whether the mean difference between two columns of paired censored data equals 0. Assumes that the paired differences follow a gaussian (normal) distribution.
cen_paired(xd, xc, yd, yc, alternative = "two.sided", printstat = TRUE)
xd |
The first column of data values plus detection limits |
xc |
The column of censoring indicators, where 1 (or |
yd |
The second column of data values plus detection limits, or a single number representing a standard / guideline value. |
yc |
The column of censoring indicators for yd, where 1 (or |
alternative |
The usual notation for the alternate hypothesis. Default is |
printstat |
Logical |
You may also test for whether the mean of the xd
data exceeds a standard by entering the single number for the standard as yd
. In that case no yc
is required.
A list of statistics containing the following components:
n
Number of observations
Z
The value of the test statistic
p.value
the p-value of the test
Mean difference
the mean difference between xd
and yd
Helsel, D.R., 2011. Statistics for Censored Environmental Data using Minitab and R, 2nd ed. John Wiley & Sons, USA, N.J.
survival::survreg
data(atrazine)
cen_paired(atrazine$June,atrazine$JuneCen,atrazine$Sept,atrazine$SeptCen)
# Comparing standard/guieline value
cen_paired(atrazine$June, atrazine$JuneCen, 0.01, alternative = "greater")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.