Title: | Rank-Based Test to Evaluate a Surrogate Marker |
---|---|
Description: | Uses a novel rank-based nonparametric approach to evaluate a surrogate marker in a small sample size setting. |
Authors: | Layla Parast [aut, cre] |
Maintainer: | Layla Parast <[email protected]> |
License: | GPL |
Version: | 1.0 |
Built: | 2025-02-04 03:38:11 UTC |
Source: | https://github.com/laylaparast/surrogaterank |
Calculates the rank-based test statistic for Y and the rank-based test statistic for S and the difference, delta, along with corresponding standard error estimates
delta.calculate(full.data = NULL, yone = NULL, yzero = NULL, sone = NULL, szero = NULL)
delta.calculate(full.data = NULL, yone = NULL, yzero = NULL, sone = NULL, szero = NULL)
full.data |
either full.data or yone, yzero, sone, szero must be supplied; if full data is supplied it must be in the following format: one observation per row, Y is in the first column, S is in the second column, treatment group (0 or 1) is in the third column. |
yone |
primary outcome, Y, in group 1 |
yzero |
primary outcome, Y, in group 0 |
sone |
surrogate marker, S, in group 1 |
szero |
surrogate marker, S, in group 0 |
u.y |
rank-based test statistic for Y |
u.s |
rank-based test statistic for S |
delta |
difference, u.y-u.s |
sd.u.y |
standard error estimate of u.y |
sd.u.s |
standard error estimate of u.s |
sd.delta |
standard error estimate of delta |
Layla Parast
data(example.data) delta.calculate(yone = example.data$y1, yzero = example.data$y0, sone = example.data$s1, szero = example.data$s0)
data(example.data) delta.calculate(yone = example.data$y1, yzero = example.data$y0, sone = example.data$s1, szero = example.data$s0)
Calculates the estimated power to detect a valid surrogate given a total sample size and specified alternative
est.power(n.total, rho = 0.8, u.y.alt, delta.alt, power.want.s = 0.7)
est.power(n.total, rho = 0.8, u.y.alt, delta.alt, power.want.s = 0.7)
n.total |
total sample size in study |
rho |
rank correlation between Y and S in group 0, default is 0.8 |
u.y.alt |
specified alternative for u.y |
delta.alt |
specified alternative for u.s |
power.want.s |
desired power for u.s, default is 0.7 |
estimated power
Layla Parast
est.power(n.total = 50, rho = 0.8, u.y.alt=0.9, delta.alt = 0.1)
est.power(n.total = 50, rho = 0.8, u.y.alt=0.9, delta.alt = 0.1)
Example data use to illustrate the functions
data("example.data")
data("example.data")
A list with 4 elements representing 25 observations from a treatment group (group 1) and 25 observations from a control group (group 0):
y1
the primary outcome,Y, in group 1
y0
the primary outcome, Y, in group 0
s1
the surrogate marker, S, in group 1
s0
the surrogate marker, S, in group 0
data(example.data)
data(example.data)
Calculates the rank-based test statistic for Y and the rank-based test statistic for S and the difference, delta, along with corresponding standard error estimates, then tests whether the surrogate is valid
test.surrogate(full.data = NULL, yone = NULL, yzero = NULL, sone = NULL, szero = NULL, epsilon = NULL, power.want.s = 0.7, u.y.hyp = NULL)
test.surrogate(full.data = NULL, yone = NULL, yzero = NULL, sone = NULL, szero = NULL, epsilon = NULL, power.want.s = 0.7, u.y.hyp = NULL)
full.data |
either full.data or yone, yzero, sone, szero must be supplied; if full data is supplied it must be in the following format: one observation per row, Y is in the first column, S is in the second column, treatment group (0 or 1) is in the third column. |
yone |
primary outcome, Y, in group 1 |
yzero |
primary outcome, Y, in group 0 |
sone |
surrogate marker, S, in group 1 |
szero |
surrogate marker, S, in group 0 |
epsilon |
threshold to use for delta, default calculates epsilon as a function of desired power for S |
power.want.s |
desired power for S, default is 0.7 |
u.y.hyp |
hypothesized value of u.y used in the calculation of epsilon, default uses estimated valued of u.y |
u.y |
rank-based test statistic for Y |
u.s |
rank-based test statistic for S |
delta |
difference, u.y-u.s |
sd.u.y |
standard error estimate of u.y |
sd.u.s |
standard error estimate of u.s |
sd.delta |
standard error estimate of delta |
ci.delta |
1-sided confidence interval for delta |
epsilon.used |
the epsilon value used for the test |
is.surrogate |
logical, TRUE if test indicates S is a good surrogate, FALSE otherwise |
Layla Parast
data(example.data) test.surrogate(yone = example.data$y1, yzero = example.data$y0, sone = example.data$s1, szero = example.data$s0)
data(example.data) test.surrogate(yone = example.data$y1, yzero = example.data$y0, sone = example.data$s1, szero = example.data$s0)