Description Usage Arguments Details Value Author(s) References See Also Examples
Function that estimates a groupregularized elastic net model.
1 2 3 4 5  gren(x, y, m=rep(1, nrow(x)), unpenalized=NULL, partitions=NULL, alpha=0.5,
lambda=NULL, intercept=TRUE, monotone=NULL, psel=TRUE, compare=TRUE,
posterior=FALSE, nfolds=nrow(x), foldid=NULL, trace=TRUE,
init=list(lambdag=NULL, mu=NULL, sigma=NULL, chi=NULL, ci=NULL),
control=list(epsilon=0.001, maxit=500, maxit.opt=1000, maxit.vb=100))

x 
feature data as either 
y 
response as either a 
m 

unpenalized 
Optional 
partitions 

alpha 
proportion of L1 penalty as a 
lambda 
global penalty parameter. The default 
intercept 

monotone 

psel 
either a 
compare 

posterior 
if 
nfolds 

foldid 
optional 
trace 
if 
init 
optional 
control 
a 
This is the main function of the package that estimates a groupregularized elastic net regression. The elastic net penalty's proportion of L1norm penalisation is determined by alpha
. alpha
close to 0 implies more ridgelike penalty, while alpha
close to 1 implies lassolike penalty. The algorithm is a twostep procedure: first, a global lambda penalty is estimates by crossvalidation. Next, the groupwise lambda multipliers are estimates by an EM algorithm. The EM algorithm consists of: i) an expectation step in which the expected marginal likelihood of the penalty multipliers is iteratively approximated by a variational Bayes EM algorithm and ii) a maximisation step in which the approximate expected marginal likelihood is maximised with respect to the penalty multipliers. After convergence of the algorithm an (optional) frequentist elastic net model is fit using the estimated penalty multipliers by setting psel=TRUE
or by setting psel
to a numeric
vector.
The user may speed up the procedure by specifying initial values for the EM algorithm in init
. init
is a list
that contains:
lambdag
initial values for λ_g in a list
of length length(partitions)
.
mu
initial values for the μ_j in a numeric
vector of length ncol(x) + ncol(unpenalized) + intercept
.
chi
initial values for the χ_j in a numeric
vector of length ncol(x)
.
ci
initial values for the c_i in a numeric
vector of length nrow(x)
.
sigma
The initial values for the Σ_{ij} in a matrix
of numeric
s with ncol(x)
rows and columns.
control
is a list
with parameters to control the estimation procedure. It consists of the following components:
epsilon
numeric
with the relative convergence tolerance. Default is epsilon=0.001
.
maxit
numeric
with whole number that gives the maximum number of iterations to update the lambdag
. Default is maxit=500
.
maxit.opt
numeric
with whole number that gives the maximum number of iterations to numerically maximise the lambdag
. Maximisation occurs at every iteration. Default is maxit.opt=1000
.
maxit.vb
numeric
with whole number that gives the maximum number of iterations to update the variational parameters mu
, sigma
, chi
, and ci
. One full update sequence per iteration. Default is maxit=100
.
Function returns an S3 list
object of class gren
containing output with the following components:

The function call that produced the output. 

proportion of L1 penalty as a 

global penalty parameter as 







frequentist elastic net model as output of 






Magnus M. Münch <m.munch@vumc.nl>
Münch, M.M., Peeters, C.F.W., van der Vaart, A.W., and van de Wiel, M.A. (2018). Adaptive groupregularized logistic elastic net regression. arXiv:1805.00389v1 [stat.ME].
predict.gren
, coef.gren
, cv.gren
1 2 3 4 5 6 7 8 9 10 11 12  ## Create data
p < 1000
n < 100
set.seed(2018)
x < matrix(rnorm(n*p), ncol=p, nrow=n)
beta < c(rnorm(p/2, 0, 0.1), rnorm(p/2, 0, 1))
m < rep(1, n)
y < rbinom(n, m, as.numeric(1/(1 + exp(x %*% as.matrix(beta)))))
partitions < list(groups=rep(c(1, 2), each=p/2))
## estimate model
fit.gren < gren(x, y, m, partitions=partitions)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.