cov_autocorrelation {sparsediscrim} | R Documentation |
Generates a
autocorrelated covariance matrix
Description
This function generates a autocorrelated covariance matrix
with autocorrelation parameter
rho
. The variance sigma2
is
constant for each feature and defaulted to 1.
Usage
cov_autocorrelation(p, rho, sigma2 = 1)
Arguments
p |
the size of the covariance matrix |
rho |
the autocorrelation parameter. Must be less than 1 in absolute value. |
sigma2 |
the variance of each feature |
Details
The autocorrelated covariance matrix is defined as:
The th entry of the autocorrelated covariance matrix is defined as:
.
The value of rho
must be such that to ensure that
the covariance matrix is positive definite.
Value
autocorrelated covariance matrix
[Package sparsediscrim version 0.3.0 Index]