Function used by other functions to plot the Akritas-Theil-Sen (ATS) line for censored data. Only one x variable allowed. Both Y and X variables may be censored.
y1: The column of y (response variable) values plus detection limits
ycen: The y-variable indicators, where 1 (or TRUE) indicates a detection limit in the y.var column, and 0 (or FALSE) indicates a detected value in y.var.
x1: The column of x (explanatory variable) values plus detection limits
xcen: The x-variable indicators, where 1 (or TRUE) indicates a detection limit in the x.var column, and 0 (or FALSE) indicates a detected value in x.var.
atsline: Indicator of whether to draw the ATS line or not. Default is FALSE.
xnam: Custom label for the x axis of plots. Default is x variable column name.
ynam: Custom label for the y axis of plots. Default is y variable column name.
Title: Custom title for plots. Default is "Akritas - Theil - Sen line".
ylim: argument consistent with base plotting to adjust y-axis limits; see par for more details
xlim: argument consistent with base plotting to adjust x-axis limits; see par for more details
pch: argument consistent with base plotting to adjust point type, see par for more details
cex: argument consistent with base plotting to adjust point size; see par for more details
xaxs: argument consistent with base plotting to adjust x-axis type; see par for more details
yaxs: argument consistent with base plotting to adjust y-axis type; see par for more details
...: argument to adjust other base plotting functions; see par for more details
Returns
Scatterplot of data plus ATS line. Censored values are drawn for both X and Y variables as dashed lines up to the detection limits.
Examples
# Both y and x are censoreddata(PbHeron)with(PbHeron, kenplot(Blood, BloodCen, Kidney, KidneyCen))# x is not censoreddata(Brumbaugh)with(Brumbaugh, kenplot(Hg, HgCen, PctWetland,rep(0, times=length(PctWetland))))
References
Helsel, D.R., 2011. Statistics for Censored Environmental Data using Minitab and R, 2nd ed. John Wiley & Sons, USA, N.J.