select_condreg {CondReg}R Documentation

Compute the best condition number regularized based based on cross-validation selected penalty parameter

Description

Compute the best condition number regularized based based on cross-validation selected penalty parameter

Usage

select_condreg(X, k, ...)

Arguments

X

n-by-p matrix of data

k

vector of penalties for cross-validation

...

parameters for select_kmax

Value

list of condition number regularized covariance matrix S and its inverse invS

Examples

## True covariance matrix
sigma <- diag(5)
sigma[3,2] <- sigma[2,3] <- 0.8

## Generate normal random samples
## Not run: 
library(MASS)
X <- mvrnorm(200,rep(0,5),sigma)

## Covariance estimation
gridpts <- kgrid(50,100)           ## generate grid of penalties to search over
crcov <- select_condreg(X,gridpts) ## automatically selects penalty parameter

## Inspect output
str(crcov)              ## returned object
sigma.hat <- crcov$S    ## estimate of sigma matrix
omega.hat <- crcov$invS ## estimate of inverse of sigma matrix

## End(Not run)

[Package CondReg version 0.20 Index]