delta.calculate.extension {SurrogateRank} | R Documentation |
Calculates the rank-based test statistic for Y and S and the difference, delta, accomodating paired data and allowing for a two-sided test
Description
This function calculates the difference in treatment effects on a univariate marker
and on a continuous primary response. This extends the delta.calculate()
function to the case where samples may be paired instead of
independent, and where a two sided test is desired.
Usage
delta.calculate.extension(yone, yzero, sone, szero, paired = FALSE)
Arguments
yone |
numeric vector of primary response values in the treated group. |
yzero |
numeric vector of primary response values in the untreated group. |
sone |
matrix or dataframe of surrogate candidates in the treated group
with dimension |
szero |
matrix or dataframe of surrogate candidates in the untreated group
with dimension |
paired |
logical flag giving if the data is independent or paired. If
|
Details
This function estimates the difference (delta
) between two rank-based statistics
(e.g., Wilcoxon statistics or paired ranks) for a primary outcome and a surrogate,
under either an independent or paired design.
Value
A list with the following elements:
u.y
: Rank-based test statistic for the primary outcomeu.s
: Rank-based test statistic for the surrogatedelta.estimate
: Estimated difference between outcome and surrogate statisticssd.u.y
: Standard deviation of the outcome statisticsd.u.s
: Standard deviation of the surrogate statisticsd.delta
: Standard error of the delta estimate
Author(s)
Arthur Hughes, Layla Parast
Examples
# Load data
data("example.data")
yone <- example.data$y1
yzero <- example.data$y0
sone <- example.data$s1
szero <- example.data$s0
delta.calculate.extension.result <- delta.calculate.extension(
yone, yzero, sone, szero,
paired = TRUE
)