Commit 3bde6039 authored by Armin Rauschenberger's avatar Armin Rauschenberger
Browse files

automation

parent 77649e2b
^Readme\.Rmd$
^\.travis\.yml$
^_pkgdown\.yml$
^docs$
^cran-comments\.md$
^appveyor\.yml$
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
fit <- bilasso(y=y,cutoff=0,X=X)
plot(x=fit$base,y=fit$base.cvm)
set.seed(0)
list <- list()
pi <- rep(NA,times=100)
for(i in seq_len(20)){
cat(i," ")
n <- 100
p <- 200
beta <- stats::rnorm(n=p)
cond <- stats::rbinom(n=p,size=1,prob=0.2)
beta[cond==0] <- 0
X <- matrix(stats::rnorm(n=n*p),nrow=n,ncol=p)
mean <- X %*% beta
y <- stats::rnorm(n=n,mean=mean,sd=1)
#z <- 1*(y > 0)
#y <- rnorm(n) # testing ... REMOVE THIS
#y <- sample(y) # testing ...
#z <- sample(z) # testing ...
#fit <- bilasso(y=y,cutoff=0,X=X)
#plot(x=fit$base,y=fit$base.cvm)
#pi[i] <- fit$pi.min
#plot(x=test$pi,y=test$cvm)
#test$pi.min
X <- scale(X)
list[[i]] <- colasso::bilasso_compare(y=y,cutoff=0,X=X)
}
loss <- list()
name <- names(list[[1]])
for(i in seq_along(name)){
loss[[name[i]]] <- t(sapply(X=list,FUN=function(x) x[[name[i]]]))
}
t(sapply(loss,colMeans))
mean(loss$mse[,"gaussian"]>loss$mse[,"extra"])
mean(loss$mse[,"gaussian"]>loss$mse[,"extra"])
mean(loss$mae[,"gaussian"]>loss$mae[,"extra"])
mean(loss$mse[,"gaussian"]>=loss$mse[,"extra"])
mean(loss$mae[,"gaussian"]>=loss$mae[,"extra"])
mean(loss$deviance[,"gaussian"]>=loss$deviance[,"extra"])
mean(loss$mse[,"gaussian"]>=loss$mse[,"extra"])
mean(loss$mae[,"gaussian"]>=loss$mae[,"extra"])
rm(list=ls())
name <- "colasso"
#load("D:/colasso/package/toydata.RData")
pkg <- "C:/Users/armin.rauschenberger/Desktop/colasso/colasso"
setwd(dir=pkg)
devtools::as.package(x=pkg,create=FALSE)
devtools::load_all(path=pkg)
#usethis::use_data(toydata,overwrite=TRUE)
devtools::document(pkg=pkg)
unlink(file.path(pkg,"vignettes","figure"),recursive=TRUE)
all <- dir(file.path(pkg,"vignettes"))
#delete <- "..."
#sapply(delete,function(x) file.remove(file.path(pkg,"vignettes",x)))
setwd(dir=pkg)
unlink(file.path(pkg,"docs"),recursive=TRUE)
pkgdown::build_site(pkg=pkg)
file.remove(file.path(pkg,".Rbuildignore"))
usethis::use_build_ignore(files=c("Readme.Rmd",".travis.yml","_pkgdown.yml","docs","cran-comments.md","appveyor.yml"))
devtools::check(pkg=pkg,quiet=FALSE,manual=TRUE)
devtools::build(pkg=pkg)
devtools::build(pkg=pkg,binary=TRUE) # only for zip file
archive <- paste0("C:/Users/armin.rauschenberger/Desktop/colasso/colasso_",version,".tar.gz")
utils::install.packages(archive,repos=NULL)
?utils::install.packages
utils::install.packages(archive,repos=NULL,type="source")
archive
archive <- paste0("C:/Users/armin.rauschenberger/Desktop/colasso/colasso_",version,".tar.gz")
utils::install.packages(archive,repos=NULL,type="source")
file.exists(archive)
archive <- paste0("C:/Users/armin.rauschenberger/Desktop/colasso/colasso_",version,".tar.gz")
archive
devtools::build(pkg=pkg,binary=TRUE) # only for zip file
version <- substring(text=readLines(file.path(pkg,"DESCRIPTION"))[[2]],first=10)
version
archive <- paste0("C:/Users/armin.rauschenberger/Desktop/colasso/colasso_",version,".tar.gz")
file.exists(archive)
utils::install.packages(archive,repos=NULL)
# Generated by roxygen2: do not edit by hand
export()
export(.check)
export(bilasso)
export(bilasso_compare)
export(colasso)
export(colasso_compare)
export(colasso_moderate)
......
This diff is collapsed.
This diff is collapsed.
if(FALSE){
#' @export
#' @title
#' Logistic regression with a continuous response
#'
#' @description
#' Implements penalised logistic regression
#' with both a binary and a continuous response.
#'
#' @details
#' Finds a compromise between binomial (\eqn{pi=0})
#' and linear (\eqn{pi=1}) regression.
#'
#' @param y
#' continuous response\strong{:}
#' vector of length \eqn{n}
#'
#' @param cutoff
#' value between \code{min(y)} and \code{max(y)}
#'
#' @param X
#' covariates\strong{:}
#' matrix with \eqn{n} rows (samples)
#' and \eqn{p} columns (variables)
#'
#' @param alpha
#' elastic net parameter\strong{:}
#' numeric between \eqn{0} (ridge)
#' and \eqn{1} (lasso)
#'
#' @param nfolds
#' number of folds
#'
#' @param type.measure
#' loss function for logistic regression
#' (linear regression uses the deviance)
#'
#' @param sigma
#' sigma sequence\strong{:}
#'
#' @param nsigma
#' number of \code{sigma} values
#'
#' @examples
#' n <- 100; p <- 200
#' y <- rnorm(n)