Simulation Plot with ggplot: The true beta, relevant component and eigen structure

ggsimrelplot(
  obj,
  ncomp = min(obj$p, obj$n, 20),
  which = 1L:3L,
  layout = NULL,
  print.cov = FALSE,
  use_population = TRUE
)

Arguments

obj

A simrel object

ncomp

Number of components to plot

which

A character indicating which plot you want as output, it can take TrueBeta, RelComp and EstRelComp

layout

A layout matrix of how to layout multiple plots

print.cov

Output estimated covariance structure

use_population

Logical, TRUE if population values should be used and FALSE if sample values should be used

Value

A list of plots

Examples

sim.obj <- simrel(n = 100, p = 16, q = c(3, 4, 5), relpos = list(c(1, 2), c(3, 4), c(5, 7)), m = 5, ypos = list(c(1, 4), 2, c(3, 5)), type = "multivariate", R2 = c(0.8, 0.7, 0.9), gamma = 0.8) ggsimrelplot(sim.obj, layout = matrix(c(2, 1, 3, 1), 2))
ggsimrelplot(sim.obj, which = c(1, 2), use_population = TRUE)
ggsimrelplot(sim.obj, which = c(1, 2), use_population = FALSE)
ggsimrelplot(sim.obj, which = c(1, 3), layout = matrix(c(1, 2), 1))