Commit 1740863b authored by Armin Rauschenberger's avatar Armin Rauschenberger

automation

parent 05b38bf4
......@@ -6,7 +6,7 @@ Depends: R (>= 3.0.0)
Imports: glmnet, palasso, cornet
Suggests: knitr, testthat, MASS
Enhances: spls, SiER, MRCE
Authors@R: person("Armin","Rauschenberger",email="a.rauschenberger@vumc.nl",role=c("aut","cre"))
Authors@R: person("Armin","Rauschenberger",email="armin.rauschenberger@uni.lu",role=c("aut","cre"))
VignetteBuilder: knitr
License: GPL-3
LazyData: true
......
#.loss <- get(".loss",envir=asNamespace("palasso"))
#.folds <- get(".folds",envir=asNamespace("palasso"))
#.check <- get(".check",envir=asNamespace("cornet"))
# import unexported functions:
# FUNCTION <- get("FUNCTION",envir=asNamespace("PACKAGE"))
#--- Main function -------------------------------------------------------------
#' @export
#' @aliases joinet-package
#' @title
#' Multivariate Elastic Net Regression
#'
......
#' @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
......@@ -17,7 +17,7 @@ navbar:
- text: "functions"
href: reference/index.html
- text: "vignette"
href: articles/vignette.html
href: articles/joinet.html
- text: "article"
href: articles/article.html
- text: "news"
......@@ -29,12 +29,11 @@ navbar:
href: https://cran.r-project.org/package=joinet
reference:
- title: "User functions"
- title: "Functions"
contents:
- joinet
- predict.joinet
- coef.joinet
- weights.joinet
- title: "Internal functions"
contents:
- cv.joinet
- joinet-package
# Notes
- Early update because of manuscript submission (examples, vignettes).
- The maintainer email will change to armin.rauschenberger@uni.lu.
\ No newline at end of file
Please accept ::: calls to "palasso" and "cornet",
as maintainer email changes for all packages.
\ No newline at end of file
......@@ -40,7 +40,7 @@
<a href="../reference/index.html">functions</a>
</li>
<li>
<a href="../articles/vignette.html">vignette</a>
<a href="../articles/joinet.html">vignette</a>
</li>
<li>
<a href="../articles/article.html">article</a>
......
......@@ -70,7 +70,7 @@
<a href="../reference/index.html">functions</a>
</li>
<li>
<a href="../articles/vignette.html">vignette</a>
<a href="../articles/joinet.html">vignette</a>
</li>
<li>
<a href="../articles/article.html">article</a>
......@@ -114,7 +114,7 @@
<ul>
<li><a href="article.html">Multivariate Elastic Net Regression</a></li>
<li><a href="vignette.html">Multivariate Elastic Net Regression</a></li>
<li><a href="joinet.html">Multivariate Elastic Net Regression</a></li>
</ul>
</div>
</div>
......
......@@ -40,7 +40,7 @@
<a href="../reference/index.html">functions</a>
</li>
<li>
<a href="../articles/vignette.html">vignette</a>
<a href="../articles/joinet.html">vignette</a>
</li>
<li>
<a href="../articles/article.html">article</a>
......@@ -77,8 +77,8 @@
<h1>Multivariate Elastic Net Regression</h1>
<small class="dont-index">Source: <a href="https://github.com/rauschenberger/joinet/blob/master/vignettes/vignette.Rmd"><code>vignettes/vignette.Rmd</code></a></small>
<div class="hidden name"><code>vignette.Rmd</code></div>
<small class="dont-index">Source: <a href="https://github.com/rauschenberger/joinet/blob/master/vignettes/joinet.Rmd"><code>vignettes/joinet.Rmd</code></a></small>
<div class="hidden name"><code>joinet.Rmd</code></div>
</div>
......
......@@ -70,7 +70,7 @@
<a href="reference/index.html">functions</a>
</li>
<li>
<a href="articles/vignette.html">vignette</a>
<a href="articles/joinet.html">vignette</a>
</li>
<li>
<a href="articles/article.html">article</a>
......
......@@ -40,7 +40,7 @@
<a href="reference/index.html">functions</a>
</li>
<li>
<a href="articles/vignette.html">vignette</a>
<a href="articles/joinet.html">vignette</a>
</li>
<li>
<a href="articles/article.html">article</a>
......
......@@ -70,7 +70,7 @@
<a href="../reference/index.html">functions</a>
</li>
<li>
<a href="../articles/vignette.html">vignette</a>
<a href="../articles/joinet.html">vignette</a>
</li>
<li>
<a href="../articles/article.html">article</a>
......
......@@ -3,5 +3,5 @@ pkgdown: 1.3.0
pkgdown_sha: ~
articles:
article: article.html
vignette: vignette.html
joinet: joinet.html
......@@ -75,7 +75,7 @@ the coefficients from the base learners.)" />
<a href="../reference/index.html">functions</a>
</li>
<li>
<a href="../articles/vignette.html">vignette</a>
<a href="../articles/joinet.html">vignette</a>
</li>
<li>
<a href="../articles/article.html">article</a>
......
......@@ -73,7 +73,7 @@
<a href="../reference/index.html">functions</a>
</li>
<li>
<a href="../articles/vignette.html">vignette</a>
<a href="../articles/joinet.html">vignette</a>
</li>
<li>
<a href="../articles/article.html">article</a>
......
......@@ -70,7 +70,7 @@
<a href="../reference/index.html">functions</a>
</li>
<li>
<a href="../articles/vignette.html">vignette</a>
<a href="../articles/joinet.html">vignette</a>
</li>
<li>
<a href="../articles/article.html">article</a>
......@@ -119,7 +119,7 @@
<tbody>
<tr>
<th colspan="2">
<h2 id="section-user-functions" class="hasAnchor"><a href="#section-user-functions" class="anchor"></a>User functions</h2>
<h2 id="section-functions" class="hasAnchor"><a href="#section-functions" class="anchor"></a>Functions</h2>
<p class="section-desc"></p>
</th>
</tr>
......@@ -147,20 +147,18 @@
<p><code><a href="weights.joinet.html">weights(<i>&lt;joinet&gt;</i>)</a></code> </p>
</td>
<td><p>Extract Weights</p></td>
</tr>
</tbody><tbody>
<tr>
<th colspan="2">
<h2 id="section-internal-functions" class="hasAnchor"><a href="#section-internal-functions" class="anchor"></a>Internal functions</h2>
<p class="section-desc"></p>
</th>
</tr>
<tr>
</tr><tr>
<td>
<p><code><a href="cv.joinet.html">cv.joinet()</a></code> </p>
</td>
<td><p>Model comparison</p></td>
</tr><tr>
<td>
<p><code><a href="joinet-package.html">joinet-package</a></code> </p>
</td>
<td><p>Multivariate Elastic Net Regression</p></td>
</tr>
</tbody>
</table>
......@@ -169,8 +167,7 @@
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#section-user-functions">User functions</a></li>
<li><a href="#section-internal-functions">Internal functions</a></li>
<li><a href="#section-functions">Functions</a></li>
</ul>
</div>
</div>
......
This diff is collapsed.
......@@ -73,7 +73,7 @@
<a href="../reference/index.html">functions</a>
</li>
<li>
<a href="../articles/vignette.html">vignette</a>
<a href="../articles/joinet.html">vignette</a>
</li>
<li>
<a href="../articles/article.html">article</a>
......
This diff is collapsed.
......@@ -74,7 +74,7 @@ i.e. the weights for the base learners." />
<a href="../reference/index.html">functions</a>
</li>
<li>
<a href="../articles/vignette.html">vignette</a>
<a href="../articles/joinet.html">vignette</a>
</li>
<li>
<a href="../articles/article.html">article</a>
......@@ -152,11 +152,11 @@ in the row on the outcomes in the column.</p>
<span class='no'>X</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/matrix'>matrix</a></span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/stats/topics/Normal'>rnorm</a></span>(<span class='no'>n</span>*<span class='no'>p</span>),<span class='kw'>nrow</span><span class='kw'>=</span><span class='no'>n</span>,<span class='kw'>ncol</span><span class='kw'>=</span><span class='no'>p</span>)
<span class='no'>Y</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/lapply'>replicate</a></span>(<span class='kw'>n</span><span class='kw'>=</span><span class='no'>q</span>,<span class='kw'>expr</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/stats/topics/Normal'>rnorm</a></span>(<span class='kw'>n</span><span class='kw'>=</span><span class='no'>n</span>,<span class='kw'>mean</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/colSums'>rowSums</a></span>(<span class='no'>X</span>[,<span class='fl'>1</span>:<span class='fl'>5</span>])))
<span class='no'>object</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='joinet.html'>joinet</a></span>(<span class='kw'>Y</span><span class='kw'>=</span><span class='no'>Y</span>,<span class='kw'>X</span><span class='kw'>=</span><span class='no'>X</span>)
<span class='fu'><a href='https://www.rdocumentation.org/packages/stats/topics/weights'>weights</a></span>(<span class='no'>object</span>)</div><div class='output co'>#&gt; y1 y2 y3
#&gt; (Intercept) 0.4123532 0.2048455 0.3295532
#&gt; V1 0.3347547 0.7144811 0.4977934
#&gt; V2 0.4795655 0.1919470 0.3724097
#&gt; V3 0.6110722 0.4751144 0.4351376</div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/stats/topics/weights'>weights</a></span>(<span class='no'>object</span>)</div><div class='output co'>#&gt; y1 y2 y3
#&gt; (Intercept) 0.1407709 -0.2016272 0.3005088
#&gt; V1 0.5225819 0.5461316 0.3397260
#&gt; V2 0.3307281 0.2754751 0.4911718
#&gt; V3 0.3925573 0.2745159 0.3276262</div><div class='input'>
</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pkgname.R
\docType{package}
\name{joinet-package}
\alias{joinet-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.
}
\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
}
\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}
}
\keyword{documentation}
......@@ -2,7 +2,6 @@
% Please edit documentation in R/functions.R
\name{joinet}
\alias{joinet}
\alias{joinet-package}
\title{Multivariate Elastic Net Regression}
\usage{
joinet(Y, X, family = "gaussian", nfolds = 10, foldid = NULL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment