R/ggsimrelplot.R
ggsimrelplot.RdSimulation 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 )
| obj | A simrel object |
|---|---|
| ncomp | Number of components to plot |
| which | A character indicating which plot you want as output, it can take |
| 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 |
A list of plots
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))