Description Usage Arguments Details Value Examples
Computes the treatment efficacy (TE) and other functions of the risk in each treatment arm over the range of surrogate values observed in the data. TE(s) is defined as 1 - risk(s, z = 1)/risk(s, z = 0), where z is the treatment indicator. If any other variables are present in the risk model, then the risk is computed at their median value.
1 2 3 |
psdesign |
A psdesign object. It must contain a risk model, an integration model, and estimated parameters. Bootstrapped parameters are optional |
contrast |
The contrast function, or the name of the contrast function. See details. |
t |
For time to event outcomes, a fixed time |
sig.level |
Significance level for bootstrap confidence intervals |
CI.type |
Character string, "pointwise" for pointwise confidence intervals, and "band" for simultaneous confidence band. |
n.samps |
The number of samples to take over the range of S.1 at which the contrast is calculated |
bootstraps |
If true, and bootstrapped estimates are present, will calculate bootstrap standard errors and confidence bands. |
newdata |
Vector of S values. If present, will calculate the contrast function at values of newdata instead of the observed S.1 |
The contrast function is a function that takes 2 inputs, the risk_0
and risk_1, and returns some one dimensional function of those two inputs.
It must be vectorized. Some built-in functions are "TE"
for treatment
efficacy = 1 - risk_1(s)/risk_0(s), "RR"
for relative risk =
risk_1(s)/risk_0(s), "logRR"
for log of the relative risk, and
"RD"
for the risk difference = risk_1(s) - risk_0(s).
A data frame containing columns for the S values, the computed contrast function at S, R0, and R1 at those S values, and optionally standard errors and confidence intervals computed using bootstrapped estimates.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.