Description Usage Arguments Value References See Also Examples
Regresses each column of x
against all others in turn, using the
squareroot Lasso, and outputs residuals from the regressions. Thus it
outputs a form of sparse projection of each column on all others.
Alternatively, given two matrices x_null
and x_alt
, it
regresses each column of x_null
on x_alt
in a similar fashion.
1  sparse_proj(x, x_null, x_alt, mc.cores = 1L, rescale = FALSE, ...)

x 
Matrix with each row an observation vector. Need not be supplied if

x_null 
Matrix whose columns are to be regressed on to 
x_alt 
Matrix which the columns of 
mc.cores 
The number of cores to use. Will always be 1 in Windows. 
rescale 
Should the columns of the output be rescaled to have l_2norm
the squareroot of the number of observations? Default is 
... 
Additional arguments to be passed to 
A matrix where each column gives the residuals.
A. Belloni, V. Chernozhukov, and L. Wang. (2011) Squareroot lasso: pivotal recovery of sparse signals via conic programming. Biometrika, 98(4):791806. http://biomet.oxfordjournals.org/content/98/4/791.refs T. Sun and C.H. Zhang. (2012) Scaled sparse linear regression. Biometrika, 99(4):879898. http://biomet.oxfordjournals.org/content/early/2012/09/24/biomet.ass043.short T. Sun and C.H. Zhang. (2013) Sparse matrix inversion with scaled lasso. The Journal of Machine Learning Research, 14(1):33853418. www.jmlr.org/papers/volume14/sun13a/sun13a.pdf
sqrt_lasso
and RPtest_single
.
1 2  x < matrix(rnorm(50*100), 50, 100)
out < sparse_proj(x)

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