matrix-constructors | R Documentation |
Correlation and covariance matrices are assumed to be symmetrics, semi-positive definite. In the case of correlation matrices, the diagonal elements should be 1 and the off-diagonal elements between -1 and 1 inclusive.
matrix_id(n, vars = 1, names = NULL, inverse_return = FALSE) matrix_diag(n, vars = 1, names = NULL, inverse_return = FALSE) matrix_cs(n, rho = 0, vars = 1, names = NULL, inverse_return = FALSE) matrix_ar1(n, rho = 0, vars = 1, names = NULL, inverse_return = FALSE) matrix_tp(n, rho = 0, vars = 1, names = NULL, inverse_return = FALSE) matrix_ad1(n, u, vars = 1, names = NULL, inverse_return = FALSE)
n |
The dimension of the matrix. |
vars |
A vector of diagonal variances or a single variance. |
names |
Optional character vector of the same size as |
inverse_return |
Whether to return the inverse or not. |
rho |
The |
matrix_id
: Identity matrix.
matrix_diag
: A synonym for matrix_id
.
matrix_cs
: Compound symmetric matrix.
matrix_ar1
: First order autoregressive order matrix.
matrix_tp
: Toeplitz.
matrix_ad1
: First order ante-dependence order matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.