computeS | R Documentation |
Computes a Kendall rank correlation S-statistic for permutations of censored data. Collectively these represent the variation in S expected when the null hypothesis is true. Called by censeaken. computeS is not expected to be of much use to users on its own.
computeS(x, y, ycen, seas = NULL, R = R)
x |
Column of the time variable, either a sequence of days or decimal times, etc. Time data for one season. |
y |
The column of y (response variable) values plus detection limits for one season. |
ycen |
The y-variable indicators, where 1 (or |
seas |
Name of a single season classification. Usually though not necessarily a text variable. |
R |
The number of repetitions in the permutation process. R is often between 999 and 9999 (+ the 1 observed test statistic produces 1000 to 10000 realizations). |
An Rx1 matrix containing an S-value for each of the R data permutations.
Helsel, D.R., Hirsch, R.M., Ryberg, K.R., Archfield, S.A., Gilroy, E.J., 2020. Statistical Methods in Water Resources. U.S. Geological Survey Techniques and Methods, book 4, chapter A3, 458p., https://doi.org/10.3133/tm4a3.
Kendall::Kendall
data(Brumbaugh)
#Artifical time and season variables for demonstration purposes
Brumbaugh$time=1:nrow(Brumbaugh)
Brumbaugh$sea=as.factor(round(runif(nrow(Brumbaugh),1,4),0))
with(Brumbaugh,computeS(time,Hg,HgCen,sea,R=100))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.