## S3 method for class 'formula':
maxstat_test(formula, data, subset = NULL, weights = NULL, \dots)
## S3 method for class 'IndependenceProblem':
maxstat_test(object,
distribution = c("asymptotic", "approximate"),
teststat = c("max", "quad"),
minprob = 0.1, maxprob = 1 - minprob, ...)
y ~ x1 + ... + xp | block
where y
and covariates x1
to xp
can be variables measured at arbitrary scales;
block
is an optional factor for stratification.~ w
defining
integer valued weights for the observations.IndependenceProblem
.asymptotic
)
or via Monte-Carlo resampling (approximate
).
Alternatively, the functions
max
) or a quadratic form
(quad
).minprob
* 100 % quantile of x
.maxprob
* 100 % quantile of x
.IndependenceTest-class
with
methods show
, statistic
, expectation
,
covariance
and pvalue
. The null distribution
can be inspected by pperm
, dperm
,
qperm
and support
methods.y
against simple cutpoint alternatives is tested. For an unordered covariate x
, all possible partitions into two
groups are evaluated. The cutpoint is then a set of levels defining
one of the two groups.
Berthold Lausen & Martin Schumacher (1992). Maximally Selected Rank Statistics. Biometrics 48, 73--85.
Torsten Hothorn & Berthold Lausen (2003). On the Exact Distribution of Maximally Selected Rank Statistics. Computational Statistics & Data Analysis 43, 121--137.
Berthold Lausen, Torsten Hothorn, Frank Bretz & Martin Schumacher (2004). Optimally Selected Prognostic Factors. Biometrical Journal 46, 364--374.
J"org M"uller & Torsten Hothorn (2004). Maximally Selected Two-Sample Statistics as a new Tool for the Identification and Assessment of Habitat Factors with an Application to Breeding Bird Communities in Oak Forests. European Journal of Forest Research, 123, 218--228.
Torsten Hothorn & Achim Zeileis (2008). Generalized maximally selected statistics, Biometrics, 64(4), 1263--1269.
### analysis of the tree pipit data in Mueller and Hothorn (2004)
maxstat_test(counts ~ coverstorey, data = treepipit)
### and for all possible covariates (simultaneously)
mt <- maxstat_test(counts ~ ., data = treepipit)
show(mt)$estimate
### reproduce applications in Sections 7.2 and 7.3
### of Hothorn & Lausen (2003) with limiting distribution
maxstat_test(Surv(time, event) ~ EF, data = hohnloser,
ytrafo = function(data) trafo(data, surv_trafo = function(x)
logrank_trafo(x, ties = "HL")))
maxstat_test(Surv(RFS, event) ~ SPF, data = sphase,
ytrafo = function(data) trafo(data, surv_trafo = function(x)
logrank_trafo(x, ties = "HL")))
Run the code above in your browser using DataLab