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.
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 )
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 |
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.
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.
#> Akritas-Theil-Sen line for censored data #> #> ln(Blood) = -4.1556 + 0.2926 * Kidney #> Kendall's tau = 0.4217 p-value = 0.00043 #>#> Akritas-Theil-Sen line for censored data #> #> ln(Hg) = -1.7779 + 0.0214 * PctWetland #> Kendall's tau = 0.192 p-value = 0.00063 #>