| Title: | Efficient Testing Using Surrogate Information |
|---|---|
| Description: | Provides functions for treatment effect estimation, hypothesis testing, and future study design for settings where the surrogate is used in place of the primary outcome for individuals for whom the surrogate is valid, and the primary outcome is purposefully measured in the remaining patients. More details are available in: Knowlton, R., Parast, L. (2024) ``Efficient Testing Using Surrogate Information," Biometrical Journal, 67(6): e70086, <doi:10.1002/bimj.70086>. A tutorial for this package can be found at <https://www.laylaparast.com/etsi>. |
| Authors: | Rebecca Knowlton [aut], Layla Parast [aut, cre] |
| Maintainer: | Layla Parast <[email protected]> |
| License: | GPL |
| Version: | 1.0 |
| Built: | 2026-06-05 08:17:38 UTC |
| Source: | https://github.com/cran/etsi |
Function to help design a future Study B given data from Study A. Depending on the inputs, either calculates the estimated power in Study B, or calculates the required sample size in each treatment groupto achieve a desired level of power in Study B.
etsi.design(Study.A, n.b0 = NULL, n.b1 = NULL, psi = NULL, w.range = NULL, kappa = NULL, desired.power = NULL, iterations = 100)etsi.design(Study.A, n.b0 = NULL, n.b1 = NULL, psi = NULL, w.range = NULL, kappa = NULL, desired.power = NULL, iterations = 100)
Study.A |
Study.A, a dataframe representing Study A containing the required columns A (treatment assignment), Y (primary outcome), S (surrogate outcome), and W (baseline covariate of interest). Optionally contains a column delta, which is an indicator for strong surrogacy. |
n.b0 |
n.b0, sample size in Study B control group |
n.b1 |
n.b1, sample size in Study B treatment group |
psi |
psi, the overall treatment effect you want to detect in Study B |
w.range |
w.range, a vector containing the lower and upper limits of the covariate W you plan to have in Study B |
kappa |
kappa, the threshold to determine strong surrogacy when the delta columns is not provided in Study.A. Surrogacy is considered sufficiently strong when the estimated PTE with respect to W is greater than kappa. |
desired.power |
The desired power in Study B, when you want to calculate required sample size |
iterations |
The number of iterations used for generalized cross-validation. |
A list is returned:
power |
The estimated power in Study B; only given if desired.power = NULL. |
sample.size |
The required sample size in each treatment group in Study B; only given if desired.power is not NULL. |
Rebecca Knowlton
Knowlton, R., Parast, L. (2025) "Efficient Testing Using Surrogate Information." Biometrical Journal, 67(6): e70086.
data(exampledataA) data(exampledataB) names(exampledataA) names(exampledataB) etsi.design(Study.A = exampledataA, n.b0 = 400, n.b1 = 500, iterations = 10)data(exampledataA) data(exampledataB) names(exampledataA) names(exampledataB) etsi.design(Study.A = exampledataA, n.b0 = 400, n.b1 = 500, iterations = 10)
Estimates the pooled treatment effect quantity in Study B, using the surrogate information learned from Study A. Provides the corresponding estimated standard error and p-value for testing the null hypothesis of a treatment effect equal to 0.
etsi.main(Study.A, Study.B, kappa = NULL)etsi.main(Study.A, Study.B, kappa = NULL)
Study.A |
Study.A, a dataframe representing Study A containing the required columns A (treatment assignment), Y (primary outcome), S (surrogate outcome), and W (baseline covariate of interest). Optionally contains a column delta, which is an indicator for strong surrogacy. |
Study.B |
Study.B, a dataframe representing Study B containing the required columns A (treatment assignment), Y (primary outcome), S (surrogate outcome), and W (baseline covariate of interest). Optionally contains a column delta, which is an indicator for strong surrogacy. |
kappa |
kappa, the threshold to determine strong surrogacy when the delta columns are not provided in Study.A and Study.B. Surrogacy is considered sufficiently strong when the estimated PTE with respect to W is greater than kappa. |
A list is returned:
delta.P |
The pooled treatment effect quantity for Study B |
se.delta.P |
Standard error of delta.P |
p.value |
p-value for testing the null hypothesis that delta.P = 0 |
Rebecca Knowlton
Knowlton, R., Parast, L. (2025) "Efficient Testing Using Surrogate Information." Biometrical Journal, 67(6): e70086.
data(exampledataA) data(exampledataB) names(exampledataA) names(exampledataB) etsi.main(Study.A = exampledataA, Study.B = exampledataB)data(exampledataA) data(exampledataB) names(exampledataA) names(exampledataB) etsi.main(Study.A = exampledataA, Study.B = exampledataB)
Example Data (Study A)
data("exampledataA")data("exampledataA")
A data frame with 1000 observations from a treatment group and 1100 observations from a control group:
Athe treatment assignment, where 1 indicates treatment and 0 indicates control
Wthe baseline covariate of interest
Sthe surrogate outcome
Ythe primary outcome
deltathe indicator for strong surrogacy, where 1 indicates strong and 0 indicates weak
data(exampledataA) names(exampledataA)data(exampledataA) names(exampledataA)
Example Data (Study B)
data("exampledataB")data("exampledataB")
A data frame with 500 observations from a treatment group and 400 observations from a control group:
Athe treatment assignment, where 1 indicates treatment and 0 indicates control
Wthe baseline covariate of interest
Sthe surrogate outcome
Ythe primary outcome
deltathe indicator for strong surrogacy, where 1 indicates strong and 0 indicates weak
data(exampledataB) names(exampledataB)data(exampledataB) names(exampledataB)