The function `TrialLevelIT`

estimates trial-level surrogacy based on the vectors of treatment effects on *S* (i.e., *α_{i}*), intercepts on *S* (i.e., *μ_{i}*) and *T* (i.e., *β_{i}*) in the different trials. See the **Details** section below.

1 2 | ```
TrialLevelIT(Alpha.Vector, Mu_S.Vector=NULL,
Beta.Vector, N.Trial, Model="Reduced", Alpha=.05)
``` |

`Alpha.Vector` |
The vector of treatment effects on |

`Mu_S.Vector` |
The vector of intercepts for |

`Beta.Vector` |
The vector of treatment effects on |

`N.Trial` |
The total number of available trials. |

`Model` |
The type of model that should be fitted, i.e., |

`Alpha` |
The |

When a full model is requested (by using the argument `Model=c("Full")`

in the function call), trial-level surrogacy is assessed by fitting the following univariate model:

*{β}_{i}=λ_{0}+λ_{1}{μ_{Si}}+λ_{2}{α}_{i}+ \varepsilon_{i}, (1)*

where *β_i* = the trial-specific treatment effects on *T*, *μ_{Si}* = the trial-specific intercepts for *S*, and *α_i* = the trial-specific treatment effects on *S*. The *-2* log likelihood value of model (1) (*L_1*) is subsequently compared to the *-2* log likelihood value of an intercept-only model (*{β}_{i}=λ_{3}*; *L_0*), and *R^2_{ht}* is computed based based on the Variance Reduction Factor (for details, see Alonso & Molenberghs, 2007):

*R^2_{ht}= 1 - exp ≤ft(-\frac{L_1-L_0}{N} \right),*

where *N* is the number of trials.

When a reduced model is requested (by using the argument `Model=c("Reduced")`

in the function call), the following model is fitted:

*{β}_{i}=λ_{0}+λ_{1}{α}_{i}+\varepsilon_{i}.*

The *-2* log likelihood value of this model (*L_1* for the reduced model) is subsequently compared to the *-2* log likelihood value of an intercept-only model (*{β}_{i}=λ_{3}*; *L_0*), and *R^2_{ht}* is computed based on the reduction in the likelihood (as described above).

An object of class `TrialLevelIT`

with components,

`Alpha.Vector` |
The vector of treatment effects on |

`Beta.Vector` |
The vector of treatment effects on |

`N.Trial` |
The total number of trials. |

`R2.ht` |
A |

Wim Van der Elst, Ariel Alonso, & Geert Molenberghs

Burzykowski, T., Molenberghs, G., & Buyse, M. (2005). *The evaluation of surrogate endpoints*. New York: Springer-Verlag.

Buyse, M., Molenberghs, G., Burzykowski, T., Renard, D., & Geys, H. (2000). The validation of surrogate endpoints in meta-analysis of randomized experiments. *Biostatistics, 1,* 49-67.

`UnimixedContCont`

, `UnifixedContCont`

, `BifixedContCont`

, `BimixedContCont`

, `plot.TrialLevelIT`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
# Generate vector treatment effects on S
set.seed(seed = 1)
Alpha.Vector <- seq(from = 5, to = 10, by=.1) + runif(min = -.5, max = .5, n = 51)
# Generate vector treatment effects on T
set.seed(seed=2)
Beta.Vector <- (Alpha.Vector * 3) + runif(min = -5, max = 5, n = 51)
# Apply the function to estimate R^2_{h.t}
Fit <- TrialLevelIT(Alpha.Vector=Alpha.Vector,
Beta.Vector=Beta.Vector, N.Trial=50, Model="Reduced")
summary(Fit)
plot(Fit)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.