View source: R/kendallATS.test.R
kendallATS.test | R Documentation |
Computes Kendall's tau for left-censored data and the Akritas and others (1995) Theil-Sen slope estimator.
kendallATS.test(x, y, na.rm = TRUE)
x |
any data that can be converted to a left-censored data object. |
y |
any data that can be converted to a left-censored data object. |
na.rm |
remove missing values before performing the test? |
an object of class "htest" having these components:
statistic |
the value of the taub statistic. |
p.value |
the attained p-value for the test. |
data.name |
a character string describing the name of the data used in the test. |
method |
a description of the method. |
alternative |
a description alternate hypotheses, always "two-sided." |
null.value |
the value of taub for the null hypothesis. |
estimate |
the ATS slope, and medians of |
coef |
the coefficients of the monotic fit line. See Note. |
slope.se |
an estimate of the standard error of the slope. |
The intercept is computed as slope * -median.x + median.y. The coef vector is designed to graphically represent the relation between x and y. It is not intended for prediction proposes.
Akritas, M.G., Murphy, S.A., and LaValley, M.P., 1995,
The Theil-Sen estimator with doubly-censored data and applications to
astronomy: Journal of the American Statistical Association, v. 90, p.
170–177.
Helsel, D.R. 2005, Nondetects and data analysis: New York, Wiley, 266 p.
# Simple no censoring set.seed(450) tmp.X <- rnorm(25) tmp.Y <- tmp.X/2 + rnorm(25) cor.test(tmp.X, tmp.Y, method="k", exact=FALSE, continuity=TRUE) kendallATS.test(tmp.X, tmp.Y) # Some censoring kendallATS.test(as.lcens(tmp.X, -1), as.lcens(tmp.Y, -1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.