The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

https://doi.org/10.32614/CRAN.package.c060
The goal of the c060 package is to provide additional
functions to perform stability selection, model validation and parameter
tuning for glmnet models.
You can install the released version of c060 from CRAN with:
install.packages("c060")And the development version from GitHub with:
install.packages("devtools")
devtools::install_github("fbertran/c060")set.seed(1234)
x=matrix(rnorm(100*1000,0,1),100,1000)
y <- x[1:100,1:1000] %*% c(rep(2,5),rep(-2,5),rep(.1,990))
res <- stabpath(y,x,weakness=1,mc.cores=2)
#> Error in `stabpath()`:
#> ! could not find function "stabpath"
stabsel(res,error=0.05,type="pfer")
#> Error in `stabsel()`:
#> ! could not find function "stabsel"set.seed(1234)
x <- matrix(rnorm(100*1000,0,1),100,1000)
y <- x[1:100,1:1000] %*% c(rep(2,5),rep(-2,5),rep(.1,990))
res <- stabpath(y,x,weakness=1,mc.cores=2)
#> Error in `stabpath()`:
#> ! could not find function "stabpath"
plot(res)
#> Error:
#> ! object 'res' not foundy=sample(1:2,100,replace=TRUE)
res <- stabpath(y,x,weakness=1,mc.cores=2,family="binomial")
#> Error in `stabpath()`:
#> ! could not find function "stabpath"
plot(res)
#> Error:
#> ! object 'res' not foundy=sample(1:4,100,replace=TRUE)
res <- stabpath(y,x,weakness=1,mc.cores=2,family="multinomial")
#> Error in `stabpath()`:
#> ! could not find function "stabpath"
plot(res)
#> Error:
#> ! object 'res' not foundN=100; p=1000
nzc=5
x=matrix(rnorm(N*p),N,p)
beta=rnorm(nzc)
f = x[,seq(nzc)] %*% beta
mu=exp(f)
y=rpois(N,mu)
res <- stabpath(y,x,weakness=1,mc.cores=2,family="poisson")
#> Error in `stabpath()`:
#> ! could not find function "stabpath"
plot(res)
#> Error:
#> ! object 'res' not foundlibrary(survival)
set.seed(10101)
N=100;p=1000
nzc=p/3
x=matrix(rnorm(N*p),N,p)
beta=rnorm(nzc)
fx=x[,seq(nzc)] %*% beta/3
hx=exp(fx)
ty=rexp(N,hx)
tcens=rbinom(n=N,prob=.3,size=1)
y=cbind(time=ty,status=1-tcens)
res <- stabpath(y,x,weakness=1,mc.cores=2,family="cox")
#> Error in `stabpath()`:
#> ! could not find function "stabpath"
plot(res)
#> Error:
#> ! object 'res' not foundset.seed(10101)
library(glmnet)
library(survival)
library(peperr)N=1000;p=30
nzc=p/3
x=matrix(rnorm(N*p),N,p)
beta=rnorm(nzc)
fx=x[,seq(nzc)] %*% beta/3
hx=exp(fx)
ty=rexp(N,hx)
tcens=rbinom(n=N,prob=.3,size=1)# censoring indicator
y=Surv(ty,1-tcens)set.seed(1010)
n=1000;p=100
nzc=trunc(p/10)
x=matrix(rnorm(n*p),n,p)
beta=rnorm(nzc)
fx= x[,seq(nzc)] %*% beta
eps=rnorm(n)*5
y=drop(fx+eps)
px=exp(fx)
px=px/(1+px)
ly=rbinom(n=length(px),prob=px,size=1)
set.seed(1011)y.classes<-ifelse(y>= median(y),1, 0)
set.seed(1234)
nfolds = 10
foldid <- balancedFolds(class.column.factor=y.classes, cross.outer=nfolds)
#> Error in `balancedFolds()`:
#> ! could not find function "balancedFolds"
bounds <- t(data.frame(alpha=c(0, 1)))
colnames(bounds)<-c("lower","upper")
fit <- EPSGO(Q.func="tune.glmnet.interval",
bounds=bounds,
parms.coding="none",
seed = 1234,
show="final",
fminlower = -100,
x = x, y = y.classes, family = "binomial",
foldid = foldid,
my.mfrow = c(4, 4),
type.min = "lambda.1se",
type.measure = "mse",
verbose = FALSE)
#> Error in `EPSGO()`:
#> ! could not find function "EPSGO"
summary(fit)
#> Error in `h()`:
#> ! error in evaluating the argument 'object' in selecting a method for function 'summary': object 'fit' not foundy.classes<-ifelse(y <= quantile(y,0.25),1, ifelse(y >= quantile(y,0.75),3, 2))
set.seed(1234)
nfolds = 10
foldid <- balancedFolds(class.column.factor=y.classes, cross.outer=nfolds)
#> Error in `balancedFolds()`:
#> ! could not find function "balancedFolds"
bounds <- t(data.frame(alpha=c(0, 1)))
colnames(bounds)<-c("lower","upper")
fit <- EPSGO(Q.func="tune.glmnet.interval",
bounds=bounds,
parms.coding="none",
seed = 1234,
show="none",
fminlower = -100,
x = x, y = y.classes, family = "multinomial",
foldid = foldid,
type.min = "lambda.1se",
type.measure = "mse",
verbose = FALSE)
#> Error in `EPSGO()`:
#> ! could not find function "EPSGO"
summary(fit)
#> Error in `h()`:
#> ! error in evaluating the argument 'object' in selecting a method for function 'summary': object 'fit' not foundset.seed(1234)
x=matrix(rnorm(100*1000,0,1),100,1000)
y <- x[1:100,1:1000]%*%c(rep(2,5),rep(-2,5),rep(.1,990))
foldid <- rep(1:10,each=10)
fit <- EPSGO(Q.func="tune.glmnet.interval",
bounds=bounds,
parms.coding="none",
seed = 1234,
show="none",
fminlower = -100,
x = x, y = y, family = "gaussian",
foldid = foldid,
type.min = "lambda.1se",
type.measure = "mse",
verbose = FALSE)
#> Error in `EPSGO()`:
#> ! could not find function "EPSGO"
summary(fit)
#> Error in `h()`:
#> ! error in evaluating the argument 'object' in selecting a method for function 'summary': object 'fit' not foundThese binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.