Description Usage Arguments Details Value
View source: R/data-intraclass.r
This function generates a p \times p intraclass covariance matrix with
correlation rho
. The variance sigma2
is constant for each
feature and defaulted to 1.
1 | cov_intraclass(p, rho, sigma2 = 1)
|
p |
the size of the covariance matrix |
rho |
the value of the off-diagonal elements |
sigma2 |
the variance of each feature |
The intraclass covariance matrix is defined as:
σ^2 * (ρ * J_p + (1 - ρ) * I_p),
where J_p is the p \times p matrix of ones and I_p is the p \times p identity matrix.
By default, with sigma2 = 1
, the diagonal elements of the intraclass
covariance matrix are all 1, while the off-diagonal elements of the matrix
are all rho
.
The value of rho
must be between 1 / (1 - p) and 1,
exclusively, to ensure that the covariance matrix is positive definite.
intraclass covariance matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.