Package 'SurrogateRank'

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

Help Index


Calculates the rank-based test statistic for Y and S and the difference, delta

Description

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

Usage

delta.calculate(full.data = NULL, yone = NULL, yzero = NULL, sone = NULL, szero = NULL)

Arguments

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

Value

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

Author(s)

Layla Parast

Examples

data(example.data)
delta.calculate(yone = example.data$y1, yzero = example.data$y0, sone = example.data$s1, 
szero = example.data$s0)

Estimated power to detect a valid surrogate

Description

Calculates the estimated power to detect a valid surrogate given a total sample size and specified alternative

Usage

est.power(n.total, rho = 0.8, u.y.alt, delta.alt, power.want.s = 0.7)

Arguments

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

Value

estimated power

Author(s)

Layla Parast

Examples

est.power(n.total = 50, rho = 0.8, u.y.alt=0.9, delta.alt = 0.1)

Example data

Description

Example data use to illustrate the functions

Usage

data("example.data")

Format

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

Examples

data(example.data)

Tests whether the surrogate is valid

Description

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

Usage

test.surrogate(full.data = NULL, yone = NULL, yzero = NULL, sone = NULL, 
szero = NULL, epsilon = NULL, power.want.s = 0.7, u.y.hyp = NULL)

Arguments

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

Value

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

Author(s)

Layla Parast

Examples

data(example.data)
test.surrogate(yone = example.data$y1, yzero = example.data$y0, sone = example.data$s1, 
szero = example.data$s0)