Commit bcfdcc05 by Armin Rauschenberger

### automation

parent 958b5725
 ... @@ -277,11 +277,11 @@ cornet <- function(y,cutoff,X,alpha=1,npi=101,pi=NULL,nsigma=99,sigma=NULL,nfold ... @@ -277,11 +277,11 @@ cornet <- function(y,cutoff,X,alpha=1,npi=101,pi=NULL,nsigma=99,sigma=NULL,nfold #' and corresponding loss. #' and corresponding loss. #' #' #' @examples #' @examples #' \donttest{n <- 100; p <- 200 #' n <- 100; p <- 200 #' y <- rnorm(n) #' y <- rnorm(n) #' X <- matrix(rnorm(n*p),nrow=n,ncol=p) #' X <- matrix(rnorm(n*p),nrow=n,ncol=p) #' net <- cornet(y=y,cutoff=0,X=X) #' net <- cornet(y=y,cutoff=0,X=X) #' print(net)} #' print(net) #' #' print.cornet <- function(x,...){ print.cornet <- function(x,...){ cat("cornet object:\n") cat("cornet object:\n") ... @@ -313,15 +313,15 @@ print.cornet <- function(x,...){ ... @@ -313,15 +313,15 @@ print.cornet <- function(x,...){ #' @return #' @return #' This function returns a matrix with \eqn{n} rows and two columns, #' This function returns a matrix with \eqn{n} rows and two columns, #' where \eqn{n} is the sample size. It includes the estimated coefficients #' where \eqn{n} is the sample size. It includes the estimated coefficients #' from linear regression (1st column, \code{"beta"}) #' from linear regression (1st column: \code{"beta"}) #' and logistic regression (2nd column, \code{"gamma"}). #' and logistic regression (2nd column: \code{"gamma"}). #' #' #' @examples #' @examples #' \donttest{n <- 100; p <- 200 #' n <- 100; p <- 200 #' y <- rnorm(n) #' y <- rnorm(n) #' X <- matrix(rnorm(n*p),nrow=n,ncol=p) #' X <- matrix(rnorm(n*p),nrow=n,ncol=p) #' net <- cornet(y=y,cutoff=0,X=X) #' net <- cornet(y=y,cutoff=0,X=X) #' coef(net)} #' coef(net) #' #' coef.cornet <- function(object,...){ coef.cornet <- function(object,...){ ... @@ -362,11 +362,11 @@ coef.cornet <- function(object,...){ ... @@ -362,11 +362,11 @@ coef.cornet <- function(object,...){ #' White always represents high. #' White always represents high. #' #' #' @examples #' @examples #' \donttest{n <- 100; p <- 200 #' n <- 100; p <- 200 #' y <- rnorm(n) #' y <- rnorm(n) #' X <- matrix(rnorm(n*p),nrow=n,ncol=p) #' X <- matrix(rnorm(n*p),nrow=n,ncol=p) #' net <- cornet(y=y,cutoff=0,X=X) #' net <- cornet(y=y,cutoff=0,X=X) #' plot(net)} #' plot(net) #' #' plot.cornet <- function(x,...){ plot.cornet <- function(x,...){ ... @@ -446,11 +446,11 @@ plot.cornet <- function(x,...){ ... @@ -446,11 +446,11 @@ plot.cornet <- function(x,...){ #' further arguments (not applicable) #' further arguments (not applicable) #' #' #' @examples #' @examples #' \donttest{n <- 100; p <- 200 #' n <- 100; p <- 200 #' y <- rnorm(n) #' y <- rnorm(n) #' X <- matrix(rnorm(n*p),nrow=n,ncol=p) #' X <- matrix(rnorm(n*p),nrow=n,ncol=p) #' net <- cornet(y=y,cutoff=0,X=X) #' net <- cornet(y=y,cutoff=0,X=X) #' predict(net,newx=X)} #' predict(net,newx=X) #' #' predict.cornet <- function(object,newx,type="probability",...){ predict.cornet <- function(object,newx,type="probability",...){ ... @@ -651,6 +651,11 @@ predict.cornet <- function(object,newx,type="probability",...){ ... @@ -651,6 +651,11 @@ predict.cornet <- function(object,newx,type="probability",...){ #' @inheritParams cornet #' @inheritParams cornet #' #' #' @examples #' @examples #' \dontshow{n <- 100; p <- 20 #' y <- rnorm(n) #' X <- matrix(rnorm(n*p),nrow=n,ncol=p) #' loss <- cornet:::.compare(y=y,cutoff=0,X=X,nfolds=2) #' loss} #' \donttest{n <- 100; p <- 200 #' \donttest{n <- 100; p <- 200 #' y <- rnorm(n) #' y <- rnorm(n) #' X <- matrix(rnorm(n*p),nrow=n,ncol=p) #' X <- matrix(rnorm(n*p),nrow=n,ncol=p) ... @@ -727,10 +732,10 @@ predict.cornet <- function(object,newx,type="probability",...){ ... @@ -727,10 +732,10 @@ predict.cornet <- function(object,newx,type="probability",...){ #' @inheritParams cornet #' @inheritParams cornet #' #' #' @examples #' @examples #' \donttest{n <- 100; p <- 200 #' n <- 100; p <- 200 #' y <- rnorm(n) #' y <- rnorm(n) #' X <- matrix(rnorm(n*p),nrow=n,ncol=p) #' X <- matrix(rnorm(n*p),nrow=n,ncol=p) #' cornet:::.test(y=y,cutoff=0,X=X)} #' cornet:::.test(y=y,cutoff=0,X=X) #' #' .test <- function(y,cutoff,X,alpha=1,type.measure="deviance"){ .test <- function(y,cutoff,X,alpha=1,type.measure="deviance"){ ... @@ -795,6 +800,7 @@ predict.cornet <- function(object,newx,type="probability",...){ ... @@ -795,6 +800,7 @@ predict.cornet <- function(object,newx,type="probability",...){ return(invisible(list(y=y,X=X))) return(invisible(list(y=y,X=X))) } } #--- Legacy -------------------------------------------------------------------- #--- Legacy -------------------------------------------------------------------- # # Import this function from the palasso package. # # Import this function from the palasso package. ... ...
 Thanks for your suggestions! Thanks! # Changes # Changes - More details in description field. - examples without \donttest{}, or with \donttest{} and \dontshow{} - Reference in description field. - Executable examples in all help files. # Notes # Notes ... ...
 Lasso and ridge regression for dichotomised outcomes • cornet Lasso and ridge regression for dichotomised outcomes • cornet ... @@ -22,15 +22,14 @@ ... @@ -22,15 +22,14 @@
... ...
 ... @@ -9,17 +9,17 @@ ... @@ -9,17 +9,17 @@ Articles • cornet Articles • cornet ... @@ -35,8 +35,7 @@ ... @@ -35,8 +35,7 @@
 Combined Regression • cornet Combined Regression • cornet ... @@ -22,15 +22,14 @@ ... @@ -22,15 +22,14 @@
... @@ -114,8 +113,9 @@ ... @@ -114,8 +113,9 @@

Site built with pkgdown 1.3.0.

Site built with pkgdown.

... ...
 ... @@ -9,17 +9,17 @@ ... @@ -9,17 +9,17 @@ Authors • cornet Authors • cornet ... @@ -35,8 +35,7 @@ ... @@ -35,8 +35,7 @@
 Elastic Net with Dichotomised Outcomes • cornet Elastic Net with Dichotomised Outcomes • cornet ... @@ -22,15 +22,14 @@ ... @@ -22,15 +22,14 @@