Prepare data for Plotting Covariance Matrix
cov_plot_data(sobj, type = "relpos", ordering = TRUE, facetting = TRUE)
sobj | A simrel object |
---|---|
type | Type of covariance matrix - can take two values |
ordering | TRUE for ordering the covariance for block diagonal display |
facetting | TRUE for facetting the predictor and response space. FALSE will give a single facet plot |
A data frame with covariances and related values based on type
argument that is ready to plot
sobj <- simrel(n = 100, p = 10, q = c(4, 5), relpos = list(c(1, 2, 3), c(4, 6, 7)), m = 3, R2 = c(0.8, 0.7), ypos = list(c(1, 3), 2), gamma = 0.7, type = "multivariate") head(cov_plot_data(sobj))#> v1 v2 col cov facet1 facet2 #> 1 W1 W1 W1 1.0000000 W W #> 2 W1 W2 <NA> 0.0000000 W W #> 3 W1 W3 <NA> 0.0000000 W W #> 4 W1 Z1 W1 0.5488763 W Z #> 5 W1 Z10 <NA> 0.0000000 W Z #> 6 W1 Z2 W1 0.4795793 W Z