plot PredTrialTContCont | R Documentation |
The key motivation to evaluate a surrogate endpoint is to be able to predict the treatment effect on the true endpoint T
based on the treatment effect on S
in a new trial i=0
. The function Pred.TrialT.ContCont
allows for making such predictions. The present plot function shows the results graphically.
## S3 method for class 'PredTrialTContCont'
plot(x, Size.New.Trial=5, CI.Segment=1, ...)
x |
A fitted object of class |
Size.New.Trial |
The expected treatment effect on |
CI.Segment |
The confidence interval around the expected treatment effect on |
... |
Extra graphical parameters to be passed to |
Wim Van der Elst, Ariel Alonso, & Geert Molenberghs
Pred.TrialT.ContCont
## Not run: # time consuming code part
# Generate dataset
Sim.Data.MTS(N.Total=2000, N.Trial=15, R.Trial.Target=.95,
R.Indiv.Target=.8, D.aa=10, D.bb=50,
Fixed.Effects=c(1, 2, 30, 90), Seed=1)
# Evaluate surrogacy using a reduced bivariate mixed-effects model
BimixedFit <- BimixedContCont(Dataset = Data.Observed.MTS,
Surr = Surr, True = True, Treat = Treat, Trial.ID = Trial.ID,
Pat.ID = Pat.ID, Model="Reduced")
# Suppose that in a new trial, it was estimated alpha_0 = 30
# predict beta_0 in this trial
Pred_Beta <- Pred.TrialT.ContCont(Object = BimixedFit,
alpha_0 = 30)
# Examine the results
summary(Pred_Beta)
# Plot the results
plot(Pred_Beta)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.