lqa (version 1.0-3)

get.Amat: Computation of the approximated penalty matrix.

Description

The function get.Amat computes and returns $$\mathbf{A}_\lambda = \sum_{j=1}^J \frac{p_{\lambda,j}'(|\mathbf{a}_j^\top \boldsymbol{\beta}|)}{\sqrt{(\mathbf{a}_j^\top \boldsymbol{\beta})^2 + c}}\mathbf{a}_j\mathbf{a}_j^\top,$$ where $c > 0$ is a small real number. However, this function is primarily intended for internal use. It acts as a link between penalty objects and methods which require the approximated penalty matrix $\mathbf{A}_\lambda$.

Usage

get.Amat (initial.beta = NULL, penalty = NULL, intercept = TRUE, 
     c1 = lqa.control()$c1, x = NULL, ...)

Arguments

initial.beta
the current beta vector.
penalty
member of the penalty class, the penalty to be used.
intercept
logical. If `TRUE' an intercept is included in the model.
c1
double: small positive real number used in the approximation of the linear combinations in the penalty.
x
optional argument containing the original regressor matrix. This will be used by some penalties, such as penalreg or ao.
...
further arguments.

Value

  • This function returns a $(p \times p)$-dimensional matrix or if an intercept is included a $((p+1) \times (p+1))$-dimensional matrix.

Details

See penalty or the accompanying `User's Guide' for further details on $\mathbf{A}_\lambda$.

See Also

penalty, lqa

Examples

Run this code
penalty <- lasso (lambda = 1.5)
   beta <- c (1, -2, 3, -4)
   get.Amat (initial.beta = beta, penalty = penalty, intercept = FALSE)

Run the code above in your browser using DataCamp Workspace