Learn R Programming

jointMeanCov (version 0.1.0)

GeminiB: Estimate Row-Row Covariance Structure Using Gemini

Description

GeminiB estimates the row-row covariance, inverse covariance, correlation, and inverse correlation matrices using Gemini. For identifiability, the covariance factors A and B are scaled so that A has trace m, where m is the number of columns of X, A is the column-column covariance matrix, and B is the row-row covariance matrix.

Usage

GeminiB(X, rowpen, penalize.diagonal = FALSE)

Arguments

X

Data matrix, of dimensions n by m.

rowpen

Glasso penalty parameter.

penalize.diagonal

Logical value indicating whether to penalize the off-diagonal entries of the correlation matrix. Default is FALSE.

Value

corr.B.hat

estimated correlation matrix.

corr.B.hat.inv

estimated inverse correlation matrix.

B.hat

estimated covariance matrix.

B.hat.inv

estimated inverse covariance matrix.

Examples

Run this code
# NOT RUN {
n1 <- 5
n2 <- 5
n <- n1 + n2
m <- 20
X <- matrix(rnorm(n * m), nrow=n, ncol=m)
rowpen <- sqrt(log(m) / n)
out <- GeminiB(X, rowpen, penalize.diagonal=FALSE)
# Display the estimated correlation matrix rounded to two
# decimal places.
print(round(out$corr.B.hat, 2))
# }

Run the code above in your browser using DataLab