q1LowRank: Qualitative Correlation or Covariance Kernel with one Input...

Description Usage Arguments Details Value References See Also Examples

View source: R/q1LowRank.R

Description

Qualitative correlation or covariance kernel with one input and low-rank correlation.

Usage

1
2
q1LowRank(factor, rank = 2L, input = "x",
          cov = c("corr", "homo", "hete"), intAsChar = TRUE)

Arguments

factor

A factor with the wanted levels for the covariance kernel object.

rank

The wanted rank, which must be >= 2 and < m where m is the number of levels.

input

Name of (qualitative) input for the kernel.

cov

Character telling what variance structure will be chosen: correlation with no variance parameter, homoscedastic with one variance parameter or heteroscedastic with m variance parameters.

intAsChar

Logical. If TRUE (default), an integer-valued input will be coerced into a character. Otherwise, it will be coerced into a factor.

Details

The correlation structure involves (r - 1)(m - r /2) parameters. The parameterization of Rapisarda et al is used: the correlation parameters are angles Theta[i, j] corresponding to 1 < i <= r and 1 < j < i or to r < i <= m and 1 <)= j < r. The correlation matrix C for the levels, with size m, factors as C = L %*% t(L) where L is a lower-triangular matrix with dimension c(m, r) with all its rows having unit Euclidean norm. Note that the diagonal elements of L can be negative and correspondingly the angles Theta[i, 1] are taken in the interval [0, 2*pi] for 1 < i <= r. The matrix L is not unique. As explained in Grubišić and Pietersz, the parameterization is surjective: any correlation with rank <= r is obtained by choosing a suitable vector of parameters, but this vector is not unique.

Correlation kernels are needed in tensor products because the tensor product of two covariance kernels each with unknown variance would not be identifiable.

Value

An object with class "covQual" with d = 1 qualitative input.

References

Francesco Rapisarda, Damanio Brigo, Fabio Mercurio (2007). "Parameterizing Correlations a Geometric Interpretation". IMA Journal of Management Mathematics, 18(1): 55-73.

Igor Grubišić, Raoul Pietersz (2007). "Efficient Rank Reduction of Correlation Matrices". Linear Algebra and its Applications, 422: 629-653.

See Also

The q1Symm function to create a kernel object for the full-rank case and corLevLowRank for the correlation function.

Examples

1
2
3
4
5
6
myFact <- factor(letters[1:8])
myCov <- q1LowRank(factor = myFact, rank = 3)
## corrplot
plot(myCov)
## find the rank using a pivoted Cholesky
chol(covMat(myCov), pivot = TRUE)

kergp documentation built on March 18, 2021, 5:06 p.m.