covMatC {TestIndVars} | R Documentation |
Generate a covariance matrix with Circular (C) structure.
Description
This function generates generates an Circular (C) covariance structure
matrix of size p \times p
based on the specified sequence of
\{b_1, b_2, \ldots, b_{\lfloor p/2 \rfloor}\}
where
\lfloor \cdot \rfloor
represents the largest integer that is not
greater than the argument and b_j = b_{p -j}
that this sequence in this function is created by a controlling parameter \rho
as well as variance
(\sigma^2
).
Usage
covMatC(p, sigma2 = 1, rho = NULL)
Arguments
p |
An integer specifying the number of dimensions of the covariance matrix. |
sigma2 |
A numeric value specifying the variance parameter (default = 1). |
rho |
Parameter controlling the circular pattern. If not provided, a random value between 0 and 1 will be generated. The Circular structure is defined as follows:
where |
Value
A p \times p
numeric matrix representing the Circular (C) covariance structure.
Examples
# generate a covariance matrix for \eqn{p = 5}, \eqn{\sigma^2 = 1}, and \eqn{\rho = 0.9}.
covMatC(p = 5, rho = 0.9)
# generate a covariance matrix for \eqn{p = 5}, \eqn{\sigma^2 = 5}, and \eqn{\rho = 0.9}.
covMatC(p = 5, sigma2 = 5, rho = 0.9)
# generate covariance matrix for \eqn{p = 5}, and no value is considered for \eqn{\rho}
covMatC(p = 5)