View source: R/delta.calculate.extension.R
delta.calculate.extension | R Documentation |
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.
delta.calculate.extension(yone, yzero, sone, szero, paired = FALSE)
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
|
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.
A list with the following elements:
u.y
: Rank-based test statistic for the primary outcome
u.s
: Rank-based test statistic for the surrogate
delta.estimate
: Estimated difference between outcome and surrogate statistics
sd.u.y
: Standard deviation of the outcome statistic
sd.u.s
: Standard deviation of the surrogate statistic
sd.delta
: Standard error of the delta estimate
Arthur Hughes, Layla Parast
# 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
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.