beta2cov | R Documentation |
Compute a covariance matrix, S
, from a lower triangular matrix containing regression coefficients (direct effects), B
and the variances of the variables V
.
beta2cov(B, V = NULL)
B |
A lower triangular matrix containing regression coefficients (direct effects). |
V |
A vector containing the variance of the covariance matrix. If |
A covariance matrix.
beta <- matrix(c( 0, 0, 0,
.4, 0, 0,
.2, .5, 0),
ncol = 3, nrow = 3, byrow = TRUE)
beta2cov(beta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.