## S3 method for class 'default':
cscores(y, type=c("Data", "Wilcoxon", "NormalQuantile",
"AnsariBradley", "Median", "Savage", "ConSal"), int=FALSE,
maxs=length(y), ...)
## S3 method for class 'factor':
cscores(y, \dots)
## S3 method for class 'Surv':
cscores(y, type="LogRank", int=FALSE, maxs=nrow(y), ...)
Surv
.Data
just returns y
if
y
is numeric.int=TRUE
.y
with an attribute scores
indicating
the kind of scores used is returned.The logrank scores are computed as given in Hothorn & Lausen (2002).
If integer valued scores are requested (int = TRUE
), the
scores
are mapped into integers by
round(scores*length(scores)/max(scores))
. See dperm
for
more details.
type
is self descriptive, except for ConSal
which implements
scores suggested by Conover & Salsburg (1988).
William J. Conover & David S. Salsburg (1988), Locally most powerful tests for detecting treatment effects when only a subset of patients can be expected to "respond" to treatment. Biometrics, 44, 189-196.
y <- rnorm(50)
# v.d. Waerden scores
nq <- cscores(y, type="Normal", int=TRUE)
# quantile for m=20 observations in the first group
qperm(0.1, nq, 20)
Run the code above in your browser using DataLab