ATS {NADA2} | R Documentation |
Akritas-Theil-Sen line for censored data
Description
Computes Kendall's tau and the Akritas-Theil-Sen (ATS) line for censored data, along with the test that the slope (and Kendall's tau) equal zero. For one x variable regression.
Usage
ATS(
y.var,
y.cen,
x.var,
x.cen = rep(0, times = length(x.var)),
LOG = TRUE,
retrans = FALSE,
xlabel = NULL,
ylabel = NULL,
printstat = TRUE
)
Arguments
y.var |
The column of y (response variable) values plus detection limits |
y.cen |
The y-variable indicators, where 1 (or |
x.var |
The column of x (explanatory variable) values plus detection limits |
x.cen |
The x-variable indicators, where 1 (or |
LOG |
Indicator of whether to compute the ATS line in the original y units, or for their logarithms. The default is to use the logarithms ( |
retrans |
Indicator of whether to retransform the plot and line back to original Y-variable units. Not needed when |
xlabel |
Custom label for the x axis of plots. Default is x variable column name. |
ylabel |
Custom label for the y axis of plots. Default is y variable column name. |
printstat |
Logical |
Value
Coefficients (intercept and slope) for the ATS line are printed, along with Kendall's tau correlation coefficient, test statistic S, and the (single) p-value for the test that tau and slope both equal zero. A scatterplot with the fitted trend-line superimposed is also drawn.
References
Akritas, M.G., Murphy, S.A., LaValley, M.P., 1995. The Theil-Sen Estimator With Doubly Censored Data and Applications to Astronomy. Journal of the American Statistical Association 90, 170–177. https://doi.org/10.2307/2291140
Helsel, D.R., 2011. Statistics for Censored Environmental Data using Minitab and R, 2nd ed. John Wiley & Sons, USA, N.J.
Examples
# Both y and x are censored
data(PbHeron)
with(PbHeron, ATS(Blood, BloodCen, Kidney, KidneyCen))
# x is not censored
data(Brumbaugh)
with(Brumbaugh,ATS(Hg, HgCen, PctWetland))