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.

l0ara

CRAN RStudio mirror downloads

Overview

l0ara fits sparse generalized linear models using an adaptive ridge approximation to an L0 penalty.

Installation

Install the package from CRAN with:

install.packages("l0ara")

Basic usage

Fit a sparse Gaussian model:

library(l0ara)

n <- 100
p <- 40
x <- matrix(rnorm(n * p), n, p)
beta <- c(1, 0, 2, 3, rep(0, p - 4))
y <- x %*% beta + rnorm(n)

fit <- l0ara(x, y, family = "gaussian", lam = log(n))
print(fit)
coef(fit)

Select the penalty by cross-validation:

lam <- c(0.1, 0.3, 0.5)
cv_fit <- cv.l0ara(x, y, family = "gaussian", lam = lam, measure = "mse")

print(cv_fit)
coef(cv_fit)
plot(cv_fit)

These 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.