| ciftest | R Documentation |
Provides a formula-based interface for log-rank, Fleming-Harrington, Gray,
and augmented score tests. test = "auto" selects log-rank for survival
outcomes and the augmented score test for competing-risk outcomes. The
"early" and "late" presets select that same outcome-specific test with
Fleming–Harrington parameters (rho, gamma) = (1, 0) and (0, 1),
respectively. Analysis strata can be specified independently with strata.
For augmented tests, working Aalen-Johansen distributions are estimated
within exposure-by-strata.competing.risk cells, censoring distributions
are estimated within strata.censor, and the closed-form augmentation is
used. Setting iteration to a positive integer applies that many Scheike
fixed-point refinements. Finite iterates are anchored as the closed-form
score plus the change in the AIPWCC image from the seed to the refined
direction, preserving the zeroth-step identity in the observed sample.
ciftest(
formula,
data,
weights = NULL,
subset.condition = NULL,
na.action = na.omit,
outcome.type = "auto",
test = "auto",
code.event1 = 1,
code.event2 = 2,
code.censoring = 0,
rho = NULL,
gamma = NULL,
iteration = 0L,
tolerance = NULL,
strata = NULL,
strata.censor = NULL,
strata.competing.risk = NULL,
tau = NULL,
prob.bound = 1e-07,
prob.truncation = NULL,
...
)
formula |
A two-sided formula with an |
data |
A data frame containing variables in the formula. |
weights |
Optional numeric case weights or the name of a weight column. The standard Gray branch currently accepts integer frequency weights. |
subset.condition |
Optional character string giving a logical condition to subset
|
na.action |
A function specifying the action to take on missing values (default |
outcome.type |
One of |
test |
One of |
code.event1 |
Integer code of the event of interest (default |
code.event2 |
Integer code of the competing risk (default |
code.censoring |
Integer code of censoring (default |
rho, gamma |
Optional non-negative Fleming-Harrington weight
parameters. Omitted values default to zero. They cannot be combined with
the fixed |
iteration |
Non-negative integer giving the number of Scheike
fixed-point refinements. |
tolerance |
Optional positive convergence tolerance. |
strata |
Optional character vector of one or more column names defining analysis strata. Multiple columns define their observed interaction. The grouping variable cannot be included. Event risk sets, null event distributions, and Fleming–Harrington weight processes are constructed separately within these strata, and their score vectors are summed. This is distinct from the two nuisance-model strata. |
strata.censor |
Optional character vector of one or more column names defining censoring Kaplan-Meier strata. The grouping variable may be included explicitly when group-specific censoring distributions are required. |
strata.competing.risk |
Optional character vector of one or more column names defining the exposure-by-stratum working Aalen-Johansen models used for the competing-risk nuisance distribution. The grouping variable must not be included because it is crossed with these strata automatically. |
tau |
Optional finite non-negative analysis horizon. |
prob.bound |
Strictly positive numerical/positivity bound. Required nuisance probabilities at or below this value produce an error rather than being silently replaced. |
prob.truncation |
Optional probability lower truncation strictly above
|
... |
Reserved for future extensions. |
An object inheriting from "ciftest" and "htest", with a
test-specific subclass. An ordinary unweighted log-rank result also
inherits from "survdiff" and contains a fully compatible object in
survdiff. Every score-based branch returns an analysis-row by contrast
matrix of individual null-score contributions in score.iid.
Augmented results include score.iid.base,
score.iid.censor, and score.iid.augment matrices and use their summed
empirical cross-product as vcov.score. Standard Gray results retain the
classical Gray covariance. If the optional standard-Gray score-IID
diagnostic cannot be constructed, the Gray test is still returned; its
score-IID matrices contain NA and the reason is recorded in
diagnostics$score.iid.error. Positive iteration values return the
requested finite-iteration score, its subject-level score matrix,
anchoring diagnostics, and fixed-point diagnostics. The event-time FH
process actually used by the fit is returned in
diagnostics$fh.weight.process, including whether it came from the pooled
or event-stratified AJ left limit or the native Gray subdistribution
construction.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.