plot FixedDiscrDiscrIT | R Documentation |
Produces plots that provide a graphical representation of trial level surrogacy R^2_{ht}
based on the Information-Theoretic approach of Alonso & Molenberghs (2007).
## S3 method for class 'FixedDiscrDiscrIT'
plot(x, Weighted=TRUE, Xlab.Trial, Ylab.Trial, Main.Trial,
Par=par(oma=c(0, 0, 0, 0), mar=c(5.1, 4.1, 4.1, 2.1)), ...)
x |
An object of class |
Weighted |
Logical. This argument only has effect when the user requests a trial-level surrogacy plot (i.e., when |
Xlab.Trial |
The legend of the X-axis of the plot that depicts trial-level surrogacy. Default "Treatment effect on the surrogate endpoint ( |
Ylab.Trial |
The legend of the Y-axis of the plot that depicts trial-level surrogacy. Default "Treatment effect on the true endpoint ( |
Main.Trial |
The title of the plot that depicts trial-level surrogacy. Default "Trial-level surrogacy". |
Par |
Graphical parameters for the plot. Default |
... |
Extra graphical parameters to be passed to |
Hannah M. Ensor & Christopher J. Weir
Alonso, A, & Molenberghs, G. (2007). Surrogate marker evaluation from an information theory perspective. Biometrics, 63, 180-186.
FixedDiscrDiscrIT
## Not run: # Time consuming (>5sec) code part
# Simulate the data:
Sim.Data.MTS(N.Total=2000, N.Trial=100, R.Trial.Target=.8, R.Indiv.Target=.8,
Seed=123, Model="Full")
# create a binary true and ordinal surrogate outcome
Data.Observed.MTS$True<-findInterval(Data.Observed.MTS$True,
c(quantile(Data.Observed.MTS$True,0.5)))
Data.Observed.MTS$Surr<-findInterval(Data.Observed.MTS$Surr,
c(quantile(Data.Observed.MTS$Surr,0.333),quantile(Data.Observed.MTS$Surr,0.666)))
# Assess surrogacy based on a full fixed-effect model
# in the information-theoretic framework for a binary surrogate and ordinal true outcome:
SurEval <- FixedDiscrDiscrIT(Dataset=Data.Observed.MTS, Surr=Surr, True=True, Treat=Treat,
Trial.ID=Trial.ID, Setting="ordbin")
## Request trial-level surrogacy plot. In the trial-level plot,
## make the size of the circles proportional to the number of patients in a trial:
plot(SurEval, Weighted=FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.