GA_diagplot: Diagnostic plot for comparison of two correlation matrices.

View source: R/GA_diagplot.R

GA_diagplotR Documentation

Diagnostic plot for comparison of two correlation matrices.

Description

A diagnostic plot that compares the entries of two correlation matrices using a color scale.

Usage

GA_diagplot(
  R,
  Rt,
  eps = 0.05,
  col.method = "trafficlight",
  color = c(0, 8),
  top = ""
)

Arguments

R

Specified correlation matrix.

Rt

Correlation matrix of the data generated by the genetic algorithm.

eps

Permitted difference between the entries of two matrices. Must only be specified if col.method="trafficlight".

col.method

Method to use for color scaling the difference between the matrices. If method="trafficlight" only two colors are used, indicating whether the entries deviated at least by a difference of eps. If method="updown" a discrete gray scale is used.

color

Value of two color that are used if method="trafficlight"

top

Specifies the main title of the plot

Details

A diagnostic plot that compares the entries of two correlation matrices using a color scale.

Author(s)

Jochen Kruppa, Klaus Jung

References

Kruppa, J., Lepenies, B., & Jung, K. (2018). A genetic algorithm for simulating correlated binary data from biomedical research. Computers in biology and medicine, 92, 1-8. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.compbiomed.2017.10.023")}

Examples

R1 = diag(10)
X0 <- start_matrix(p=c(0.4, 0.2, 0.5, 0.15, 0.4, 0.35, 0.2, 0.25, 0.3, 0.4), k = 5000)
Xt <- iter_matrix(X0, R = diag(10), T = 10000, e.min = 0.00001)
GA_diagplot(R1, Rt = Xt$Rt, col.method = "trafficlight")
GA_diagplot(R1, Rt = Xt$Rt, col.method = "updown")

RepeatedHighDim documentation built on July 9, 2023, 6:33 p.m.