I'm trying to create a reduced model to predict many dependent variables (DV) (~450) that are highly correlated.
My independent variables (IV) are also numerous (~2000) and highly correlated.
If I use the lasso to select a reduced model for each output individually, I am not guaranteed to get the same subset of independent variables as I loop over each dependent variable.
Is there a multivariate linear regression that uses the lasso in R?
This is not group lasso. group lasso groups the IV. I want multivariate linear regression (meaning the DV is a matrix, not a vector of scalars), that also implements lasso. (Note: as NRH points out, this is not true. Group lasso is a general term that includes strategies that group the IV, but also include strategies that group other parameters such as the DV)
I found this paper that gets into something called Sparse Overlapping Sets Lasso
Here is some code that does multivariate linear regression
> dim(target)
[1] 6060 441
> dim(dictionary)
[1] 6060 2030
> fit = lm(target~dictionary)
Here is some code that does lasso on a single DV
> fit = glmnet(dictionary, target[,1])
And this is what I would like to do:
> fit = glmnet(dictionary, target)
Error in weighted.mean.default(y, weights) :
'x' and 'w' must have the same length
Selecting features that fit ALL the targets at once
glmnet
and it has a thorough vignette. $\endgroup$