kendallATS.test: Kendall' tau

View source: R/kendallATS.test.R

kendallATS.testR Documentation

Kendall' tau

Description

Computes Kendall's tau for left-censored data and the Akritas and others (1995) Theil-Sen slope estimator.

Usage

kendallATS.test(x, y, na.rm = TRUE)

Arguments

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?

Value

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 x and y.

coef

the coefficients of the monotic fit line. See Note.

slope.se

an estimate of the standard error of the slope.

Note

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.

References

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.

Examples

# 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))


USGS-R/smwrQW documentation built on Oct. 11, 2022, 6:13 a.m.