50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


Surrogate (version 1.1)

plot.Fano.BinBin: Plots the distribution of RHL2 either as a density or as function of π10 in the setting where both S and T are binary endpoints

Description

The function plot.Fano.BinBin plots the distribution of RHL2 which is fully identifiable for given values of π10. See Details below.

Usage

# S3 method for Fano.BinBin
plot(x,Type="Density",Xlab.R2_HL,main.R2_HL,
ylab="density",Par=par(mfrow=c(1,1),oma=c(0,0,0,0),mar=c(5.1,4.1,4.1,2.1)),
Cex.Legend=1,Cex.Position="top", lwd=3,linety=c(5,6,7),color=c(8,9,3),...)

Arguments

x

An object of class Fano.BinBin. See Fano.BinBin.

Type

The type of plot that is produced. When Type="Freq", a histogram of RHL2 is produced. When Type="Density", the density of RHL2 is produced. When Type="Scatter", a scatter plot of RHL2 is produced as a function of π10. Default Type="Scatter".

Xlab.R2_HL

The label of the X-axis when density plots or histograms are produced.

main.R2_HL

Title of the density plot or histogram.

ylab

The label of the Y-axis when density plots or histograms are produced. Default ylab="density".

Par

Graphical parameters for the plot. Default par(mfrow=c(1,1),oma=c(0,0,0,0),mar=c(5.1,4.1,4.1,2.1)).

Cex.Legend

The size of the legend. Default Cex.Legend=1.

Cex.Position

The position of the legend. Default Cex.Position="top".

lwd

The line width for the density plot . Default lwd=3.

linety

The line types corresponding to each level of fano_delta . Default linety=c(5,6,7).

color

The color corresponding to each level of fano_delta . Default color=c(8,9,3).

...

Other arguments to be passed.

Value

An object of class Fano.BinBin with components,

R2_HL

The sampled values for RHL2.

H_Delta_T

The sampled values for HΔT.

minpi10

The minimum value for π10.

maxpi10

The maximum value for π10.

samplepi10

The sampled value for π10.

delta

The specified vector of upper bounds for the prediction errors.

uncertainty

Indexes the sampling of pi1_.

pi_00

The sampled values for π00.

pi_11

The sampled values for π11.

pi_01

The sampled values for π01.

pi_10

The sampled values for π10.

Details

Values for π10 have to be uniformly sampled from the interval [0,min(π1,π0)]. Any sampled value for π10 will fully determine the bivariate distribution of potential outcomes for the true endpoint.

The vector \boldπkm fully determines RHL2.

References

Alonso, A., Van der Elst, W., & Molenberghs, G. (2014). Validation of surrogate endpoints: the binary-binary setting from a causal inference perspective.

See Also

Fano.BinBin

Examples

Run this code
# NOT RUN {
# Conduct the analysis assuming no montonicity
# for the true endpoint, using a range of
# upper bounds for prediction errors 
FANO<-Fano.BinBin(pi1_ = 0.5951 ,  pi_1 = 0.7745, 
fano_delta=c(0.05, 0.1, 0.2), M=1000)

plot(FANO, Type="Scatter",color=c(3,4,5),Cex.Position="bottom")
# }

Run the code above in your browser using DataLab