Learn R Programming

CondReg (version 0.20)

condreg: Compute the condition number with given penalty parameter

Description

Compute the condition number with given penalty parameter

Usage

condreg(data_in, kmax)

Arguments

data_in
input data
kmax
scalar regularization parameter

Value

list of condition number regularized covariance matrix s and its inverse invS.

Examples

Run this code
## 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
# crcov <- condreg(X,3)
# 
# ## 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)

Run the code above in your browser using DataLab