plot SPF BinBin | R Documentation |
Plots the surrogate predictive function (SPF), i.e., r(i,j)=P(\Delta T=i|\Delta S=j)
, in the setting where both S
and T
are binary endpoints. For example, r(-1,1)
quantifies the probability that the treatment has a negative effect on the true endpoint (\Delta T=-1
) given that it has a positive effect on the surrogate (\Delta S=1
).
## S3 method for class 'SPF.BinBin'
plot(x, Type="All.Histograms", Specific.Pi="r_0_0", Col="grey",
Box.Plot.Outliers=FALSE, Legend.Pos="topleft", Legend.Cex=1, ...)
x |
A fitted object of class |
Type |
The type of plot that is requested. Possible choices are: |
Specific.Pi |
When |
Col |
The color of the bins or lines when histograms or density plots are requested. Default |
Box.Plot.Outliers |
Logical. Should outliers be depicted in the box plots?. Default |
Legend.Pos |
Position of the legend when a |
Legend.Cex |
Size of the legend when a |
... |
Arguments to be passed to the plot, histogram, ... functions. |
Wim Van der Elst, Ariel Alonso, & Geert Molenberghs
Alonso, A., Van der Elst, W., & Molenberghs, G. (2015). Assessing a surrogate effect predictive value in a causal inference framework.
SPF.BinBin
## Not run:
# Generate plausible values for Pi
ICA <- ICA.BinBin.Grid.Sample(pi1_1_=0.341, pi0_1_=0.119,
pi1_0_=0.254, pi_1_1=0.686, pi_1_0=0.088, pi_0_1=0.078, Seed=1,
Monotonicity=c("General"), M=2500)
# Compute the surrogate predictive function (SPF)
SPF <- SPF.BinBin(ICA)
# Explore the results
summary(SPF)
# Examples of plots
plot(SPF, Type="All.Histograms")
plot(SPF, Type="All.Densities")
plot(SPF, Type="Histogram", Specific.Pi="r_0_0")
plot(SPF, Type="Box.Plot", Legend.Pos="topleft", Legend.Cex=.7)
plot(SPF, Type="Lines.Mean")
plot(SPF, Type="Lines.Median")
plot(SPF, Type="3D.Mean")
plot(SPF, Type="3D.Median")
plot(SPF, Type="3D.Spinning.Mean")
plot(SPF, Type="3D.Spinning.Median")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.