Specification of the GPC model
There are two way to specify the GPC model in BuyseTest
.
A Formula interface via the argument formula
where the response variable should be a binary variable defining the treatment arms.
The rest of the formula should indicate the endpoints by order of priority and the strata variables (if any).
A Vector interface using the following arguments
treatment
: [character] name of the treatment variable identifying the control and the experimental group.
Must have only two levels (e.g. 0
and 1
).
endpoint
: [character vector] the name of the endpoint variable(s).
threshold
: [numeric vector] critical values used to compare the pairs (threshold of minimal important difference).
A pair will be classified as neutral if the difference in endpoint is strictly below this threshold.
There must be one threshold for each endpoint variable; it must be NA
for binary endpoints and positive for continuous or time to event endpoints.
status
: [character vector] the name of the binary variable(s) indicating whether the endpoint was observed or censored.
Must value NA
when the endpoint is not a time to event.
operator
: [character vector] the sign defining a favorable endpoint.
">0"
indicates that higher values are favorable while "<0" indicates the opposite.
type
: [character vector] indicates whether it is
a binary outcome ("b"
, "bin"
, or "binary"
),
a continuous outcome ("c"
, "cont"
, or "continuous"
),
or a time to event outcome ("t"
, "tte"
, "time"
, or "timetoevent"
)
censoring
: [character vector] is the endpoint subject to right or left censoring ("left"
or "right"
). The default is right-censoring and left-censoring is only implemented with the Gehan's scoring rule.
restriction
: [numeric vector] value above which any difference is classified as neutral.
strata
: [character vector] if not NULL
, the GPC will be applied within each group of patient defined by the strata variable(s).
The formula interface can be more concise, especially when considering few outcomes, but may be more difficult to apprehend for new users.
Note that arguments endpoint
, threshold
, status
, operator
, type
, and censoring
must have the same length.
GPC procedure
The GPC procedure form all pairs of observations, one belonging to the experimental group and the other to the control group, and class them in 4 categories:
Favorable pair: the endpoint is better for the observation in the experimental group.
Unfavorable pair: the endpoint is better for the observation in the control group.
Neutral pair: the difference between the endpoints of the two observations is (in absolute value) below the threshold. When threshold=0
, neutral pairs correspond to pairs with equal endpoint. Lower-priority outcomes (if any) are then used to classified the pair into favorable/unfavorable.
Uninformative pair: censoring/missingness prevents from classifying into favorable, unfavorable or neutral.
With complete data, pairs can be decidely classified as favorable/unfavorable/neutral.
In presence of missing values, the GPC procedure uses the scoring rule (argument scoring.rule
) and the correction for uninformative pairs (argument correction.uninf
) to classify the pairs.
The classification may not be 0,1, e.g. the probability that the pair is favorable/unfavorable/neutral with the Peron's/Efron's scoring rule.
To export the classification of each pair set the argument keep.pairScore
to TRUE
and call the function getPairScore
on the result of the BuyseTest
function.
Handling missing values: the recommended default approach is to use the Peron's scoring rule with a restriction time if a non-neglectable part of the survival is unknown and otherwise analyse uniformative pairs using the following endpoint(s) if any.
scoring.rule
: indicates how to handle right-censoring in time to event endpoints using information from the survival curves.
scoring.rule="Gehan"
When no observations is censored or only the pair with the largest timepoint is censored, the pair is decidedly classified as favorable, unfavorable, or neutral. Otherwise pairs are classified as uninformative.
scoring.rule="Peron"
Score pairs involving censored observations using the (group-specific) survival curves. It may still lead to uninformative pairs when the survival curve is only partially known.
scoring.rule="Efron"
Same as the Peron's scoring rule except that the survival curve is extrapolated to 0 when its tail is unknown. Only relevant when using a (stratified) Kaplan-Meier estimator and no competing risks.
correction.uninf
: indicates how to handle pairs that were classified as uninformative by the scoring rule.
correction.uninf=0
treat them as uninformative: this is an equivalent to complete case analysis when neutral.as.uninf=FALSE
, while when neutral.as.uninf=TRUE
, uninformative pairs are treated as neutral, i.e., analyzed at the following endpoint (if any). This approach will (generally) lead to biased estimates for the proportion of favorable, unfavorable, or neutral pairs.
correction.uninf=1
imputes to the uninformative pairs the average score of the informative pairs, i.e. assumes that uninformative pairs would on average behave like informative pairs. This is therefore the recommanded approach when this assumption is resonnable, typically when the the tail of the survival function estimated by the Kaplan–Meier method is close to 0.
correction.uninf=2
up-weight informative pairs to represent uninformative pairs. It also assumes that uninformative pairs would on average behave like informative pairs and is only recommanded when the analysis is stopped after the first endpoint with uninformative pairs.
Statistical inference
The argument method.inference
defines how to approximate the distribution of the GPC estimators and so how standard errors, confidence intervals, and p-values are computed.
Available methods are:
argument method.inference="none"
: only the point estimate is computed which makes the execution of the BuyseTest
faster than with the other methods.
argument method.inference="u-statistic"
: compute the variance of the estimate using a H-projection of order 1 (default option) or 2 (see BuyseTest.options
). The first order is downward biased but consistent. When considering the Gehan scoring rule, no transformation nor correction, the second order is unbiased and equivalent to the variance of the bootstrap distribution. P-values and confidence intervals are then evaluated assuming that the estimates follow a Gaussian distribution.
WARNING: the current implementation of the H-projection is not valid when using corrections for uninformative pairs (correction.uninf=1
, or correction.uninf=2
).
argument method.inference="permutation"
: perform a permutation test, estimating in each sample the summary statistics (net benefit, win ratio).
argument method.inference="studentized permutation"
: perform a permutation test, estimating in each sample the summary statistics (net benefit, win ratio) and the variance-covariance matrix of the estimate.
argument method.inference="varExact permutation"
: compute the variance of the permutation distribution using a closed-form formula (Anderson and Verbeeck 2023). P-values and confidence intervals are then evaluated assuming that the estimates follow a Gaussian distribution.
WARNING: the current implementation of the variance estimator for the permutation distribution is not valid when using the Peron scoring rule or corrections for uninformative pairs.
argument method.inference="bootstrap"
: perform a non-parametric boostrap, estimating in each sample the summary statistics (net benefit, win ratio).
argument method.inference="studentized bootstrap"
: perform a non-parametric boostrap, estimating in each sample the summary statistics (net benefit, win ratio) and the variance-covariance matrix of the estimator.
Additional arguments for permutation and bootstrap resampling:
strata.resampling
If NA
or of length 0, the permutation/non-parametric boostrap will be performed by resampling in the whole sample.
Otherwise, the permutation/non-parametric boostrap will be performed separately for each level that the variable defined in strata.resampling
take.
n.resampling
set the number of permutations/samples used.
A large number of permutations (e.g. n.resampling=10000
) are needed to obtain accurate CI and p.value. See (Buyse et al., 2010) for more details.
seed
: the seed is used to generate one seed per sample. These seeds are the same whether one or several CPUs are used.
cpus
indicates whether the resampling procedure can be splitted on several cpus to save time. Can be set to "all"
to use all available cpus.
The detection of the number of cpus relies on the detectCores
function from the parallel package.
Pooling results across strata
Consider \(K\) strata and denote by \(m_k\) and \(n_k\) the sample size in the control and active arm (respectively) for strata \(k\). Let \(\sigma_k\) be the standard error of the strata-specific summary statistic (e.g. net benefit). The strata specific weights, \(w_k\), are given by:
"CMH"
: \(w_k=\frac{\frac{m_k \times n_k}{m_k + n_k}}{\sum_{l=1}^K \frac{m_l \times n_l}{m_l + n_l}}\). Optimal if the if the odds ratios are constant across strata.
"equal"
: \(w_k=\frac{1}{K}\)
"Buyse"
: \(w_k=\frac{m_k \times n_k}{\sum_{l=1}^K m_l \times n_l}\). Optimal if the risk difference is constant across strata
"var-*"
(e.g. "var-netBenefit"
): . \(w_k=\frac{1/\sigma^2_k}{\sum_{l=1}^K 1/\sigma^2_k}\)
Only when using "var-winRatio"
, the pooled Win Ratio is computed by pooling the strata-specific win-ratios. Otherwise the pooled Win Ratio is obtained by dividing the pooled number of favorable pairs divided by the pooled number of unfavorable pairs, possibly adding half the pooled neutral pairs, according to formula (1) in Dong et al. (2018).
Default values
The default of the arguments
scoring.rule
, correction.uninf
, method.inference
, n.resampling
,
hierarchical
, neutral.as.uninf
, keep.pairScore
, strata.resampling
,
cpus
, trace
is read from BuyseTest.options()
.
Additional (hidden) arguments are
alternative
[character] the alternative hypothesis. Must be one of "two.sided", "greater" or "less" (used by confint
).
conf.level
[numeric] level for the confidence intervals (used by confint
).
keep.survival
[logical] export the survival values used by the Peron's scoring rule.
order.Hprojection
[1 or 2] the order of the H-projection used to compute the variance when method.inference="u-statistic"
.