pkgname.R 1.76 KB
Newer Older
Armin Rauschenberger's avatar
Armin Rauschenberger committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63

#' @name joinet-package
#' @keywords documentation
#' @docType package
#' 
#' @title
#' Multivariate Elastic Net Regression
#' 
#' @description
#' The R package \code{joinet} implements multivariate
#' ridge and lasso regression using stacked generalisation.
#' This multivariate regression typically outperforms
#' univariate regression at predicting correlated outcomes.
#' It provides predictive and interpretable models
#' in high-dimensional settings.
#' 
#' @details
#' Use function \code{\link{joinet}} for model fitting.
#' Type \code{library(joinet)} and then \code{?joinet} or
#' \code{help("joinet)"} to open its help file.
#' 
#' See the vignette for further examples.
#' Type \code{vignette("joinet")} or \code{browseVignettes("joinet")}
#' to open the vignette.
#' 
#' @references
#' Armin Rauschenberger and Enrico Glaab (2019).
#' "joinet: predicting correlated outcomes jointly to improve clinical prognosis".
#' \emph{Manuscript in preparation}.
#' 
#' \email{armin.rauschenberger@uni.lu}
#'
#' @examples
#' #--- data simulation ---
#' 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])))
#' # n samples, p inputs, q outputs
#' 
#' #--- model fitting ---
#' object <- joinet(Y=Y,X=X)
#' # slot "base": univariate
#' # slot "meta": multivariate
#' 
#' #--- make predictions ---
#' y_hat <- predict(object,newx=X)
#' # n x q matrix "base": univariate
#' # n x q matrix "meta": multivariate 
#' 
#' #--- extract coefficients ---
#' coef <- coef(object)
#' # effects of inputs on outputs
#' # q vector "alpha": intercepts
#' # p x q matrix "beta": slopes
#' 
#' #--- model comparison ---
#' loss <- cv.joinet(Y=Y,X=X)
#' # cross-validated loss
#' # row "base": univariate
#' # row "meta": multivariate
#' 
NULL