Usage
id_trafo(x)
rank_trafo(x, ties.method = c("mid-ranks", "random"))
normal_trafo(x, ties.method = c("mid-ranks", "average-scores"))
median_trafo(x, mid.score = c("0", "0.5", "1"))
savage_trafo(x, ties.method = c("mid-ranks", "average-scores"))
consal_trafo(x, ties.method = c("mid-ranks", "average-scores"), a = 5)
koziol_trafo(x, ties.method = c("mid-ranks", "average-scores"), j = 1)
klotz_trafo(x, ties.method = c("mid-ranks", "average-scores"))
mood_trafo(x, ties.method = c("mid-ranks", "average-scores"))
ansari_trafo(x, ties.method = c("mid-ranks", "average-scores"))
fligner_trafo(x, ties.method = c("mid-ranks", "average-scores"))
logrank_trafo(x, ties.method = c("mid-ranks", "Hothorn-Lausen",
"average-scores"),
weight = logrank_weight, ...)
logrank_weight(time, n.risk, n.event,
type = c("logrank", "Gehan-Breslow", "Tarone-Ware", "Prentice",
"Prentice-Marek", "Andersen-Borgan-Gill-Keiding",
"Fleming-Harrington", "Self"),
rho = NULL, gamma = NULL)
f_trafo(x)
of_trafo(x, scores = NULL)
maxstat_trafo(x, minprob = 0.1, maxprob = 1 - minprob)
fmaxstat_trafo(x, minprob = 0.1, maxprob = 1 - minprob)
ofmaxstat_trafo(x, minprob = 0.1, maxprob = 1 - minprob)
trafo(data, numeric_trafo = id_trafo, factor_trafo = f_trafo,
ordered_trafo = of_trafo, surv_trafo = logrank_trafo,
var_trafo = NULL, block = NULL)
mcp_trafo(...)
Arguments
x
an object of class "numeric"
, "factor"
, "ordered"
or
"Surv"
.
ties.method
a character, the method used to handle ties. The score generating function
either uses the mid-ranks ("mid-ranks"
, default) or, in the case of
rank_trafo
, randomly broken ties ("random"
). Alternatively,
mid.score
a character, the score assigned to observations exactly equal to the median:
either 0 ("0"
, default), 0.5 ("0.5"
) or 1 ("1"
); see
median_test
. a
a numeric vector, the values taken as the constant $a$ in the
Conover-Salsburg scores. Defaults to 5
.
j
a numeric, the value taken as the constant $j$ in the Koziol-Nemec
scores. Defaults to 1
.
weight
a function where the first three arguments must correspond to time
,
n.risk
, and n.event
given below. Defaults to
logrank_weight
.
time
a numeric vector, the ordered distinct time points.
n.risk
a numeric vector, the number of subjects at risk at each time point
specified in time
.
n.event
a numeric vector, the number of events at each time point specified in
time
.
type
a character, one of "logrank"
(default), "Gehan-Breslow"
,
"Tarone-Ware"
, "Prentice"
, "Prentice-Marek"
,
"Andersen-Borgan-Gill-Keiding"
, "Fleming-Harrington"
rho
a numeric vector, the $\rho$ constant when type
is
"Tarone-Ware"
, "Fleming-Harrington"
or "Self"
; see
logrank_test
. Defaults to NULL
gamma
a numeric vector, the $\gamma$ constant when type
is
"Fleming-Harrington"
or "Self"
; see
logrank_test
. Defaults to NULL
, implying 0
scores
a numeric vector or list, the scores corresponding to each level of an
ordered factor. Defaults to NULL
, implying 1:nlevels(x)
.
minprob
a numeric, a fraction between 0 and 0.5; see maxstat_test
.
Defaults to 0.1
. maxprob
a numeric, a fraction between 0.5 and 1; see maxstat_test
.
Defaults to 1 - minprob
. data
an object of class "data.frame"
.
numeric_trafo
a function to be applied to elements of class "numeric"
in
data
, returning a matrix with nrow(data)
rows and an arbitrary
number of columns. Defaults to id_trafo
.
factor_trafo
a function to be applied to elements of class "factor"
in
data
, returning a matrix with nrow(data)
rows and an arbitrary
number of columns. Defaults to f_trafo
.
ordered_trafo
a function to be applied to elements of class "ordered"
in
data
, returning a matrix with nrow(data)
rows and an arbitrary
number of columns. Defaults to of_trafo
.
surv_trafo
a function to be applied to elements of class "Surv"
in data
,
returning a matrix with nrow(data)
rows and an arbitrary number of
columns. Defaults to logrank_trafo
.
var_trafo
an optional named list of functions to be applied to the corresponding
variables in data
. Defaults to NULL
.
block
an optional factor whose levels are interpreted as blocks. trafo
is
applied to each level of block
separately. Defaults to NULL
.
...
logrank_trafo
: further arguments to be passed to weight
. mcp_trafo
: factor name and contrast matrix (as matrix or character)
in a tag = value format for multiple comparisons based on a single