gehanScores: Gehan Test Scores

View source: R/gehanScores.R

gehanScoresR Documentation

Gehan Test Scores

Description

Computes Gehan scores that compare the values in one group to the values in another group.

Usage

gehanScores(x, y, na.rm = FALSE)

Arguments

x

any object that can be converted to class "mcens." Missing values are permitted and result in corresponding missing values in the output.

y

any object that can be converted to class "mcens." Missing values are permitted but result in missing values in the output unless na.rm is TRUE. See Details.

na.rm

remove missing values from y before comparing to x?

Details

If y is missing, then x is compared to itself (with NAs removed) and the output is the u-score described in Helsel (2012).

Value

A numeric vector that is the result of the comparison of each value in x to all values in y. It is the equivalent of the "h" score in described by Helsel, but the signs are reversed so that larger values in x have larger values in the output.

Note

If the output is the u-score, y is missing, then the values can be converted to ranks by dividing by 2 and adding the mean rank, (length(x) + 1)/2.

References

Gehan, E.A., 1965, A generalized Wilcoxon test for comparing arbitraritly singly censored samples: Biometrika, v. 52, p. 203-223.

Helsel, D.R. 2012, Statistics for Censored Environmental Data Using Minitab and R: New York, Wiley, 324 p.

See Also

survdiff, survfit, lcens-class


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