Surrogate (version 1.7)

plot Causal-Inference BinBin: Plots the (Meta-Analytic) Individual Causal Association and related metrics when S and T are binary outcomes

Description

This function provides a plot that displays the frequencies, percentages, cumulative percentages or densities of the individual causal association (ICA; \(R^2_{H}\) or \(R_{H}\)), and/or the odds ratios for \(S\) and \(T\) (\(\theta_{S}\) and \(\theta_{T}\)).

Usage

# S3 method for ICA.BinBin
plot(x, R2_H=TRUE, R_H=FALSE, Theta_T=FALSE, 
Theta_S=FALSE, Type="Density", Labels=FALSE, Xlab.R2_H, 
Main.R2_H, Xlab.R_H, Main.R_H, Xlab.Theta_S, Main.Theta_S, Xlab.Theta_T, 
Main.Theta_T, Cex.Legend=1, Cex.Position="topright",  
col, Par=par(oma=c(0, 0, 0, 0), mar=c(5.1, 4.1, 4.1, 2.1)), ylim, …)

Arguments

x

An object of class ICA.BinBin. See ICA.BinBin.

R2_H

Logical. When R2_H=TRUE, a plot of the \(R^2_{H}\) is provided. Default TRUE.

R_H

Logical. When R_H=TRUE, a plot of the \(R_{H}\) is provided. Default FALSE.

Theta_T

Logical. When Theta_T=TRUE, a plot of the \(\theta_{T}\) is provided. Default FALSE.

Theta_S

Logical. When Theta_S=TRUE, a plot of the \(\theta_{S}\) is provided. Default FALSE.

Type

The type of plot that is produced. When Type="Freq" or Type="Percent", the Y-axis shows frequencies or percentages of \(R^2_{H}\), \(R_{H}\), \(\theta_{T}\), or \(\theta_{S}\). When Type="CumPerc", the Y-axis shows cumulative percentages. When Type="Density", the density is shown. When the fitted object of class ICA.BinBin was obtained using a general analysis (i.e., using the Monotonicity=c("General") argument in the function call), sperate plots are provided for the different monotonicity scenarios. Default "Density".

Labels

Logical. When Labels=TRUE, the percentage of \(R^2_{H}\), \(R_{H}\), \(\theta_{T}\), or \(\theta_{S}\) values that are equal to or larger than the midpoint value of each of the bins are displayed (on top of each bin). Default FALSE.

Xlab.R2_H

The legend of the X-axis of the \(R^2_{H}\) plot.

Main.R2_H

The title of the \(R^2_{H}\) plot.

Xlab.R_H

The legend of the X-axis of the \(R_{H}\) plot.

Main.R_H

The title of the \(R_{H}\) plot.

Xlab.Theta_S

The legend of the X-axis of the \(\theta_{S}\) plot.

Main.Theta_S

The title of the \(\theta_{S}\) plot.

Xlab.Theta_T

The legend of the X-axis of the \(\theta_{T}\) plot.

Main.Theta_T

The title of the \(\theta_{T}\) plot.

Cex.Legend

The size of the legend when Type="All.Densities" is used. Default Cex.Legend=1.

Cex.Position

The position of the legend, Cex.Position="topright" or Cex.Position="topleft". Default Cex.Position="topright".

col

The color of the bins. Default col <- c(8).

Par

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

ylim

The (min, max) values for the Y-axis

Extra graphical parameters to be passed to hist().

References

Alonso, A., Van der Elst, W., Molenberghs, G., Buyse, M., & Burzykowski, T. (submitted). A causal-inference approach for the validation of surrogate endpoints based on information theory and sensitivity analysis.

See Also

ICA.BinBin

Examples

Run this code
# NOT RUN {
# Compute R2_H given the marginals, 
# assuming monotonicity for S and T and grids
# pi_0111=seq(0, 1, by=.001) and 
# pi_1100=seq(0, 1, by=.001)
ICA <- ICA.BinBin.Grid.Sample(pi1_1_=0.261, pi1_0_=0.285, 
pi_1_1=0.637, pi_1_0=0.078, pi0_1_=0.134, pi_0_1=0.127,  
Monotonicity=c("General"), M=2500, Seed=1)
           
# Plot the results (density of R2_H):
plot(ICA, Type="Density", R2_H=TRUE, R_H=FALSE, 
Theta_T=FALSE, Theta_S=FALSE)
# }

Run the code above in your browser using DataLab