condreg: Compute the condition number with given penalty parameter

Description Usage Arguments Value Examples

View source: R/condreg.R

Description

Compute the condition number with given penalty parameter

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## 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)

Example output

List of 2
 $ S   : num [1:5, 1:5] 1.007 0.0405 0.03 -0.0649 -0.1995 ...
 $ invS: num [1:5, 1:5] 1.0391 -0.0304 -0.0278 0.0439 0.2077 ...

CondReg documentation built on May 2, 2019, 4:52 a.m.

Related to condreg in CondReg...