plot.ICA.ContCont.Mult: Plots the Individual Causal Association in the setting where...

plot ICA.ContCont.MultSR Documentation

Plots the Individual Causal Association in the setting where there are multiple continuous S and a continuous T

Description

This function provides a plot that displays the frequencies, percentages, or cumulative percentages of the multivariate individual causal association (R^2_{H}). These figures are useful to examine the sensitivity of the obtained results with respect to the assumptions regarding the correlations between the counterfactuals.

Usage

  ## S3 method for class 'ICA.ContCont.MultS'
plot(x, R2_H=FALSE, Corr.R2_H=TRUE, 
   Type="Percent", Labels=FALSE,  
   Par=par(oma=c(0, 0, 0, 0), mar=c(5.1, 4.1, 4.1, 2.1)), col, 
   Prediction.Error.Reduction=FALSE, ...)

Arguments

x

An object of class ICA.ContCont.MultS. See ICA.ContCont.MultS or ICA.ContCont.MultS_alt.

R2_H

Should a plot of the R^2_{H} be provided? Default FALSE.

Corr.R2_H

Should a plot of the corrected R^2_{H} be provided? Default TRUE.

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}. When Type=CumPerc, the Y-axis shows cumulative percentages of R^2_{H}. Default "Percent".

Labels

Logical. When Labels=TRUE, the percentage of R^2_{H} 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.

Par

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

col

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

Prediction.Error.Reduction

Should a plot be shown that shows the prediction error (reisdual error) in predicting DeltaT using an intercept only model, and that shows the prediction error (reisdual error) in predicting DeltaT using Delta S_1, Delta S_2, ...? Default Prediction.Error.Reduction=FALSE.

...

Extra graphical parameters to be passed to hist().

Author(s)

Wim Van der Elst, Ariel Alonso, & Geert Molenberghs

References

Van der Elst, W., Alonso, A. A., & Molenberghs, G. (2017). Univariate versus multivariate surrogate endpoints.

See Also

ICA.ContCont, ICA.ContCont.MultS, ICA.ContCont.MultS_alt, MICA.ContCont, plot MinSurrContCont

Examples

## Not run:  #time-consuming code parts
# Specify matrix Sigma (var-cavar matrix T_0, T_1, S1_0, S1_1, ...)
# here for 1 true endpoint and 3 surrogates

s<-matrix(rep(NA, times=64),8)
s[1,1] <- 450; s[2,2] <- 413.5; s[3,3] <- 174.2; s[4,4] <- 157.5; 
s[5,5] <- 244.0; s[6,6] <- 229.99; s[7,7] <- 294.2; s[8,8] <- 302.5
s[3,1] <- 160.8; s[5,1] <- 208.5; s[7,1] <- 268.4 
s[4,2] <- 124.6; s[6,2] <- 212.3; s[8,2] <- 287.1
s[5,3] <- 160.3; s[7,3] <- 142.8 
s[6,4] <- 134.3; s[8,4] <- 130.4 
s[7,5] <- 209.3; 
s[8,6] <- 214.7 
s[upper.tri(s)] = t(s)[upper.tri(s)]

# Marix looks like:
#            T_0    T_1  S1_0  S1_1  S2_0   S2_1  S2_0  S2_1
#            [,1]  [,2]  [,3]  [,4]  [,5]   [,6]  [,7]  [,8]
# T_0  [1,] 450.0    NA 160.8    NA 208.5     NA 268.4    NA
# T_1  [2,]    NA 413.5    NA 124.6    NA 212.30    NA 287.1
# S1_0 [3,] 160.8    NA 174.2    NA 160.3     NA 142.8    NA
# S1_1 [4,]    NA 124.6    NA 157.5    NA 134.30    NA 130.4
# S2_0 [5,] 208.5    NA 160.3    NA 244.0     NA 209.3    NA
# S2_1 [6,]    NA 212.3    NA 134.3    NA 229.99    NA 214.7
# S3_0 [7,] 268.4    NA 142.8    NA 209.3     NA 294.2    NA
# S3_1 [8,]    NA 287.1    NA 130.4    NA 214.70    NA 302.5

# Conduct analysis
ICA <- ICA.ContCont.MultS(M=100, N=200, Show.Progress = TRUE,
  Sigma=s, G = seq(from=-1, to=1, by = .00001), Seed=c(123), 
  Model = "Delta_T ~ Delta_S1 + Delta_S2 + Delta_S3")

# Explore results
summary(ICA)
plot(ICA)

## End(Not run)

Surrogate documentation built on Sept. 25, 2023, 5:07 p.m.