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 based on the specified sequence of
where
represents the largest integer that is not
greater than the argument and
that this sequence in this function is created by a controlling parameter
as well as variance
(
).
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 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)