maxstat.test {maxstat}R Documentation

Maximally Selected Rank and Gauss Statistics

Description

Performs a maximally selected rank or Gauss test on bivariate observations.

Usage

maxstat.test(x, y, event = NULL, smethod=c("Gauss", "Wilcoxon", "Median",
            "NormalQuantil","LogRank"), pmethod=c("none", "Lau92",
            "Lau94", "exactGauss", "HL", "min"),
            minprop = 0.1, maxprop=0.9, alpha = NULL, ...)
maxstat.test(formula, data, subset, na.action, ...)

Arguments

x numeric vector of data values, independent variable.
y numeric vector of data values, dependent variable.
event censoring: 0=alive, 1=dead (only meaningful with LogRank)
smethod kind of statistic to be computed.
pmethod kind of p-value approximation to be used.
minprop at least minprop*100% of the observations in the first group.
maxprop not more than minprop*100% of the observations in the first group.
alpha significance niveau, the appropriate quantile is computed if alpha is specified. Used for plotting within plot.maxtest.
formula a formula describing the model to be tested of the form y ~ x where y is the dependent and x the independent variable. For survival problems, i.e. using the log-rank statistic, the formula is of the form Surv(time, event) ~ x, see above.
data an optional data frame containing the variables in the model formula.
subset an optional vector specifying a subset of observations to be used.
na.action a function which indicates what should happen when the data contain NAs. Defaults to getOption("na.action").
... additional parameters to methods.

Details

The assessment of the predictive power of a variable x for a dependent variable y can be determined by a maximally selected rank or Gauss test.

smethod determines the kind of statistic to be used. Wilcoxon and Median denote maximally selected Wilcoxon and Median statistics. NormalQuantile and LogRank denote v.d. Waerden and log-rank scores. Gauss means a maximally selected Gauss statistic.

pmethod specifies which kind of approximation of the p-value should be used. Lau92 is the limiting distribution by a Brownian bridge (see Lausen and Schumacher, 1992, and pLausen92), Lau94 the approximation based on an improved Bonferroni inequality (see Lausen, Sauerbrei and Schumacher, 1994, and pLausen94).

exactGauss returns the exact p-value for a maximally selected Gauss statistic, see Hothorn and Lausen (2002).

HL is a small sample approximation based on the Streitberg-R"ohmel algorithm (see pperm) introduced by Hothorn and Lausen (2002). This requires integer valued scores. For v. d. Waerden and Log-rank scores we try to find integer valued scores having the same shape. This results in slightly different scores (and a different test), the procedure is described in Hothorn (2001) and Hothorn and Lausen (2002).

All the approximations are known to be conservative, so min gives the minimum p-value of all procedures.

For survival problems, i.e. using a maximally selected log-rank statistic, the interface is similar to survfit. The depended variable is a survival object Surv(time, event) (note: in contrast to Surv in package survival only time and event can be specified). The argument event may be a numeric vector of 0 (alive) and 1 (dead) or a vector of logicals with TRUE indicating death.

Value

A list of class maxtest containing the following components is returned:

statistic the value of the test statistic.
p.value the p-value for the test.
method the type of test and p-value approximation applied.
estimate the estimated cutpoint (of x) which separates y best.

plot.maxtest and print.maxtest can be used for plotting and printing.

References

Hothorn, T. and Lausen, B. (2002). On the Exact Distribution of Maximally Selected Rank Statistics. submitted

Lausen, B. and Schumacher, M. (1992). Maximally Selected Rank Statistics. Biometrics, 48, 73–85

Lausen, B., Sauerbrei, W. and Schumacher, M. (1994). Classification and Regression Trees (CART) used for the exploration of prognostic factors measured on different scales. in: P. Dirschedl and R. Ostermann (Eds), Computational Statistics, Heidelberg, Physica-Verlag, 483–496

Hothorn, T. (2001). On Exact Rank Tests in R. R News, 1, 11–12

Examples


x <- sort(runif(20))
y <- c(rnorm(10), rnorm(10, 2))

mod <- maxstat.test(y ~ x, smethod="Wilcoxon", pmethod="HL",
                    minprop=0.25, maxprop=0.75, alpha=0.05)
print(mod)
plot(mod)


[Package Contents]