cornet.Rd 1.77 KB
Newer Older
Armin Rauschenberger's avatar
Armin Rauschenberger committed
1
% Generated by roxygen2: do not edit by hand
Armin Rauschenberger's avatar
Armin Rauschenberger committed
2
3
4
% Please edit documentation in R/functions.R
\name{cornet}
\alias{cornet}
Armin Rauschenberger's avatar
Armin Rauschenberger committed
5
\title{Logistic regression with a continuous response}
Armin Rauschenberger's avatar
Armin Rauschenberger committed
6
\usage{
Armin Rauschenberger's avatar
Armin Rauschenberger committed
7
cornet(y, cutoff, X, alpha = 1, npi = 101, pi = NULL, nsigma = 99,
Armin Rauschenberger's avatar
Armin Rauschenberger committed
8
9
  sigma = NULL, nfolds = 10, foldid = NULL,
  type.measure = "deviance", ...)
Armin Rauschenberger's avatar
Armin Rauschenberger committed
10
11
12
13
14
}
\arguments{
\item{y}{continuous response\strong{:}
vector of length \eqn{n}}

Armin Rauschenberger's avatar
Armin Rauschenberger committed
15
16
\item{cutoff}{cutoff point for dichotomising response into classes\strong{:}
value between \code{min(y)} and \code{max(y)}}
Armin Rauschenberger's avatar
Armin Rauschenberger committed
17
18

\item{X}{covariates\strong{:}
Armin Rauschenberger's avatar
Armin Rauschenberger committed
19
numeric matrix with \eqn{n} rows (samples)
Armin Rauschenberger's avatar
Armin Rauschenberger committed
20
and \eqn{p} columns (variables)}
Armin Rauschenberger's avatar
Armin Rauschenberger committed
21

Armin Rauschenberger's avatar
Armin Rauschenberger committed
22
23
24
\item{alpha}{elastic net mixing parameter\strong{:}
numeric between \eqn{0} (ridge) and \eqn{1} (lasso)}

Armin Rauschenberger's avatar
Armin Rauschenberger committed
25
26
27
28
29
30
\item{npi}{number of \code{pi} values}

\item{pi}{pi sequence\strong{:}
vector of values in the unit interval;
or \code{NULL} (default sequence)}

Armin Rauschenberger's avatar
Armin Rauschenberger committed
31
32
33
34
35
\item{nsigma}{number of \code{sigma} values}

\item{sigma}{sigma sequence\strong{:}
vector of increasing positive values;
or \code{NULL} (default sequence)}
Armin Rauschenberger's avatar
Armin Rauschenberger committed
36
37
38

\item{nfolds}{number of folds}

Armin Rauschenberger's avatar
Armin Rauschenberger committed
39
40
41
\item{foldid}{fold identifiers\strong{:}
vector with entries between \eqn{1} and \code{nfolds};
or \code{NULL} (balance)}
Armin Rauschenberger's avatar
Armin Rauschenberger committed
42

Armin Rauschenberger's avatar
Armin Rauschenberger committed
43
44
45
\item{type.measure}{loss function for binary classification
(linear regression uses the deviance)}

Armin Rauschenberger's avatar
Armin Rauschenberger committed
46
\item{...}{further arguments passed to \code{\link[glmnet]{glmnet}}}
Armin Rauschenberger's avatar
Armin Rauschenberger committed
47
48
}
\description{
Armin Rauschenberger's avatar
Armin Rauschenberger committed
49
Implements logistic regression with a continuous response.
Armin Rauschenberger's avatar
Armin Rauschenberger committed
50
51
}
\details{
Armin Rauschenberger's avatar
Armin Rauschenberger committed
52
53
54
55
- INCLUDE note on deviance (not comparable between lin and log models)
- alpha: elastic net parameter\strong{:}
numeric between \eqn{0} (ridge) and \eqn{1} (lasso)
- do not use "family"
Armin Rauschenberger's avatar
Armin Rauschenberger committed
56
57
}
\examples{
Armin Rauschenberger's avatar
Armin Rauschenberger committed
58
59
60
n <- 100; p <- 200
y <- rnorm(n)
X <- matrix(rnorm(n*p),nrow=n,ncol=p)
Armin Rauschenberger's avatar
Armin Rauschenberger committed
61
net <- cornet(y=y,cutoff=0,X=X)
Armin Rauschenberger's avatar
Armin Rauschenberger committed
62
### Add ... to all glmnet::glmnet calls !!! ###
Armin Rauschenberger's avatar
Armin Rauschenberger committed
63
}