lasso.net.grid {LassoNet} | R Documentation |
Estimates coefficients and connection signs over the grid of values of penalty parameters \lambda
1 and \lambda
2.
Description
Fits network regressions over the grid of values of penalty parameters \lambda
1 and \lambda
2, stores connection signs, number of iterations until convergence and convergence outcome.
Usage
lasso.net.grid(x,y ,beta.0,lambda1,lambda2,M1,m.iter,n.iter,iscpp=TRUE,tol,alt.num)
Arguments
x |
|
y |
response vector or size |
beta.0 |
initial value for |
lambda1 |
lasso penalty coefficient |
lambda2 |
network penalty coefficient |
M1 |
penalty matrix |
m.iter |
maximum number of iterations for sign matrix updating; default - 100 |
n.iter |
maximum number of iterations for |
iscpp |
binary choice for using cpp function in coordinate updates; 1 - use C++ (default), 0 - use R |
tol |
convergence in |
alt.num |
alt.num remaining iterataions are stored; default - 12 |
Details
Fits network regression for the grid values of \lambda
1 and \lambda
2 using warm starts.
Value
beta |
matrix of |
mse |
mean squared error value |
M |
array of connection signs. |
iterations |
matrix with stored number of steps for sign matrix to converge |
update.steps |
matrix with stored number of steps for |
convergence.in.M |
matrix with stored values for convergence in sign matrix |
convergence.in.grid |
matrix with stored values for convergence in |
xi.conv |
array with stored connection signs changes in each iteration |
beta.alt |
array of coefficient vectors in case connection signs alternate |
Author(s)
Maintainer: Jonas Striaukas <jonas.striaukas@gmail.com>
References
Weber, M., Striaukas, J., Schumacher, M., Binder, H. "Network-Constrained Covariate Coefficient and Connection Sign Estimation" (2018) <doi:10.2139/ssrn.3211163>
Examples
p=200
n=100
beta.0=array(1,c(p,1))
x=matrix(rnorm(n*p),n,p)
y=rnorm(n,mean=0,sd=1)
lambda1=c(0,1)
lambda2=c(0,1)
M1=diag(p)
lasso.net.grid(x, y, beta.0, lambda1, lambda2, M1)