lqa. See the documentation for lqa for the details on how such model fitting takes place.penalty (x, ...)penalty (which has a concise print method). This is a list with elementsgetpenmat or first.derivative (and if necessary a.coefs) must be given.fused.lassopenalty is a generic function with methods for objects of the lqa class. 
  The most crucial issue of penalty objects
  is to compute
   $$\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. This approximated penalty matrix will be used in the fitting procedures lqa.update2, GBlockBoost
or ForwardBoost.
  
  
  There are five basic methods for penalty objects: penalty, lambda, getpenmat, first.derivative, a.coefs.
    The methods penalty and lambda are mandatory. They
    are necessary to identify the penalty family and, respectively, the tuning parameter vector in the other functions of
    the lqa-package. But they just appear as list elements in the structure() environment. The function
    getpenmat()
    and the functions first.derivative() and a.coefs() are mutually exclusive. Whether we need the first one or the last two depends on
    the nature of the penalty. Hence we have to distinguish two
    cases 
    getpenmat() is more efficient (in a numerical sense) if
        ridge, lasso, scad and penalreg.penalty <- lasso (lambda = 1.5)
   penalty
   beta <- c (1, -2, 3, -4)
   penalty$first.deriv (beta)Run the code above in your browser using DataLab