<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Calculates robust residual treatment effect accounting for...</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body>

<table width="100%" summary="page for delta.s.surv.estimate"><tr><td>delta.s.surv.estimate</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>

Calculates robust residual treatment effect accounting for surrogate marker information measured at a specified time and primary outcome information up to that specified time
</h2>

<h3>Description</h3>


<p>This function calculates the robust estimate of the residual treatment effect accounting for surrogate marker information measured at <i>t_0</i> and primary outcome information up to <i>t_0</i> i.e. the hypothetical treatment effect if both the surrogate marker distribution at <i>t_0</i> and survival up to <i>t_0</i> in the treatment group look like the surrogate marker distribution and survival up to <i>t_0</i> in the control group. Ideally this function is only used as a helper function and is not directly called. 
</p>


<h3>Usage</h3>

<pre>
delta.s.surv.estimate(xone, xzero, deltaone, deltazero, sone, szero, t, 
weight.perturb = NULL, landmark, extrapolate = FALSE, transform = FALSE,
approx = T, warn.te = FALSE, warn.support = FALSE)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>xone</code></td>
<td>


<p>numeric vector, the observed event times in the treatment group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.
</p>
</td></tr>
<tr valign="top"><td><code>xzero</code></td>
<td>


<p>numeric vector, the observed event times in the control group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time.
</p>
</td></tr>
<tr valign="top"><td><code>deltaone</code></td>
<td>


<p>numeric vector, the event indicators for the treatment group, D = I(T&lt;C) where T is the time of the primary outcome and C is the censoring time.
</p>
</td></tr>
<tr valign="top"><td><code>deltazero</code></td>
<td>


<p>numeric vector, the event indicators for the control group, D = I(T&lt;C) where T is the time of the primary outcome and C is the censoring time.
</p>
</td></tr>
<tr valign="top"><td><code>sone</code></td>
<td>


<p>numeric vector; surrogate marker measurement at <i>t_0</i> for treated observations, assumed to be continuous. If <i>X_{1i}&lt;t_0</i>, then the surrogate marker measurement should be NA. 
</p>
</td></tr>
<tr valign="top"><td><code>szero</code></td>
<td>


<p>numeric vector; surrogate marker measurement at <i>t_0</i> for control observations, assumed to be continuous. If <i>X_{1i}&lt;t_0</i>, then the surrogate marker measurement should be NA.
</p>
</td></tr>
<tr valign="top"><td><code>t</code></td>
<td>


<p>the time of interest.
</p>
</td></tr>
<tr valign="top"><td><code>weight.perturb</code></td>
<td>


<p>weights used for perturbation resampling.
</p>
</td></tr>
<tr valign="top"><td><code>landmark</code></td>
<td>


<p>the landmark time <i>t_0</i> or time of surrogate marker measurement.
</p>
</td></tr>
<tr valign="top"><td><code>extrapolate</code></td>
<td>


<p>TRUE or FALSE; indicates whether the user wants to use extrapolation.
</p>
</td></tr>
<tr valign="top"><td><code>transform</code></td>
<td>


<p>TRUE or FALSE; indicates whether the user wants to use a transformation for the surrogate marker. 
</p>
</td></tr>
<tr valign="top"><td><code>approx</code></td>
<td>

<p>TRUE or FALSE indicating whether an approximation should be used when calculating the probability of censoring; most relevant in settings where the survival time of interest for the primary outcome is greater than the last observed event but before the last censored case, default is TRUE.
</p>
</td></tr>
<tr valign="top"><td><code>warn.te</code></td>
<td>


<p>value passed from R.s.estimate function to control warnings; user does not need to specify.
</p>
</td></tr>
<tr valign="top"><td><code>warn.support</code></td>
<td>


<p>value passed from R.s.estimate function to control warnings; user does not need to specify.
</p>
</td></tr>
</table>


<h3>Details</h3>


<p>Details are included in the documentation for R.s.surv.estimate.
</p>


<h3>Value</h3>






<p><i>\hat{&Delta;}_S(t,t_0)</i>, the robust residual treatment effect estimate accounting for surrogate marker information measured at <i>t_0</i> and primary outcome information up to <i>t_0</i>.
</p>


<h3>Note</h3>

<p>If the treatment effect is not significant, the user will receive the following message: &quot;Warning: it looks like the treatment effect is not significant; may be difficult to interpret the residual treatment effect in this setting&quot;. If the observed support of the surrogate marker for the control group is outside the observed support of the surrogate marker for the treatment group, the user will receive the following message: &quot;Warning: observed supports do not appear equal, may need to consider a transformation or extrapolation&quot;.</p>


<h3>Author(s)</h3>


<p>Layla Parast
</p>


<h3>References</h3>


<p>Parast, L., Cai, T., &amp; Tian, L. (2017). Evaluating surrogate marker information using censored data. Statistics in Medicine, 36(11), 1767-1782.
</p>


<h3>Examples</h3>

<pre>
data(d_example_surv)
names(d_example_surv)





</pre>


</body></html>
