Learn R Programming

rags2ridges (version 2.2.6)

ridgePsign: Ridge estimation for high-dimensional precision matrices with known sign of off-diagonal precision elements.

Description

Function that calculates the ridge estimators for high-dimensional precision matrices with known sign of the off-diagonal precision elements.

Usage

ridgePsign(
  S,
  lambda,
  sign,
  target = default.target(S),
  type = "Alt",
  method = "nlm",
  verbose = TRUE,
  ...
)

Value

The function returns a regularized precision matrix with off-diagonal elements of specified signed or zero.

Arguments

S

Sample covariance matrix.

lambda

A numeric representing the value of the penalty parameter.

sign

A character indicating the required sign of the off-diagonal elements of ridge precision estimate. Must be either: "pos" (positive) and "neg" (negative).

target

A target matrix (in precision terms) for the ridge precision estimator.

type

A character indicating the type of ridge estimator to be used. Must be one of: "Alt", "ArchI", "ArchII".

method

A character : which optimization function should be used: "nlm" (default) or "optim" which refer to nlminb or constrOptim, respectively.

verbose

Logical indicator: should intermediate output be printed on the screen?

...

Additional arguments passed on to either nlminb or constrOptim.

Author

W.N. van Wieringen.

Details

Modified version of the ridgePchordal-function, now the ridge precision matrix estimate has off-diagonal elements equalling zero or of the specified sign. The estimate is found by solving a constrained estimation problem. This is done numerically and employs the nlminb and constrOptim procedure of R. These procedures are initiated by the ridge ML precision estimate and its off-diagonal elements with the excluded sign set to (effectively) zero.

See Also

ridgeP, ridgePchordal

Examples

Run this code

# obtain some data
p <- 8
n <- 100
set.seed(333)
Y <- matrix(rnorm(n*p), nrow = n, ncol = p)

# obtain regularized precision matrix with off-diagonal elements of specified signed
ridgePsign(covML(Y), lambda=0.1, sign="pos")

Run the code above in your browser using DataLab