Implements multivariate elastic net regression.

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

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 (2019) "joinet: predicting correlated outcomes jointly to improve clinical prognosis" Manuscript in preparation.

See also

cv.joinet, vignette

Examples

n <- 50; p <- 100; q <- 3 X <- matrix(rnorm(n*p),nrow=n,ncol=p) Y <- replicate(n=q,expr=rnorm(n=n,mean=rowSums(X[,1:5]))) object <- joinet(Y=Y,X=X)
# NOT RUN { browseVignettes("joinet") # further examples # }