% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glmnetFlex.R
\name{pen_function}
\alias{pen_function}
\title{Elastic net penalty value}
\usage{
pen_function(coefficients, alpha = 1, vp = 1)
}
\arguments{
\item{coefficients}{The model's coefficients (excluding intercept).}

\item{alpha}{The elasticnet mixing parameter, with \eqn{0 \le \alpha \le 1}.}

\item{vp}{Penalty factors for each of the coefficients.}
}
\description{
Returns the elastic net penalty value without the \code{lambda} factor.
}
\details{
The penalty is defined as
\deqn{(1-\alpha)/2 \sum vp_j \beta_j^2 + \alpha \sum vp_j |\beta|.}
Note the omission of the multiplicative \code{lambda} factor.
}
