Implements multivariate elastic net regression.

joinet(
Y,
X,
family = "gaussian",
nfolds = 10,
foldid = NULL,
type.measure = "deviance",
alpha.base = 1,
alpha.meta = 1,
...
)

## Arguments

Y |
outputs**:**
numeric matrix with \(n\) rows (samples)
and \(q\) columns (variables),
with positive correlation (see details) |

X |
inputs**:**
numeric matrix with \(n\) rows (samples)
and \(p\) columns (variables) |

family |
distribution**:**
vector of length \(1\) or \(q\) with entries
`"gaussian"` , `"binomial"` or `"poisson"` |

nfolds |
number of folds |

foldid |
fold identifiers**:**
vector of length \(n\) with entries between \(1\) and `nfolds` ;
or `NULL` (balance) |

type.measure |
loss function**:**
vector of length \(1\) or \(q\) with entries
`"deviance"` , `"class"` , `"mse"` or `"mae"`
(see `cv.glmnet` ) |

alpha.base |
elastic net mixing parameter for base learners**:**
numeric between \(0\) (ridge) and \(1\) (lasso) |

alpha.meta |
elastic net mixing parameter for meta learner**:**
numeric between \(0\) (ridge) and \(1\) (lasso) |

... |
further arguments passed to `glmnet` |

## Value

This function returns an object of class `joinet`

.
Available methods include
`predict`

,
`coef`

,
and `weights`

.
The slots `base`

and `meta`

each contain
\(q\) `cv.glmnet`

-like objects.

## Details

**correlation:**
The \(q\) outcomes should be positively correlated.
Avoid negative correlations by changing the sign of the variable.

**elastic net:**
`alpha.base`

controls input-output effects,
`alpha.meta`

controls output-output effects;
lasso renders sparse models (`alpha`

\(=1\)),
ridge renders dense models (`alpha`

\(=0\))

## References

Armin Rauschenberger, Enrico Glaab (2020)
"Predicting correlated outcomes from molecular data"
*Manuscript in preparation*.

## See also

## Examples