This package provides functions for computing the split regularized regression estimators defined in Christidis, Lakshmanan, Smucler and Zamar (2019).
You can install the stable version on R CRAN.
install.packages("SplitReg", dependencies = TRUE)
You can install the development version from GitHub
library(devtools)
::install_github("AnthonyChristidis/SplitReg") devtools
# A small example
library(MASS)
library(SplitReg)
set.seed(1)
<- c(rep(5, 5), rep(0, 45))
beta <- matrix(0.5, 50, 50)
Sigma diag(Sigma) <- 1
<- mvrnorm(50, mu = rep(0, 50), Sigma = Sigma)
x <- x %*% beta + rnorm(50)
y <- cv.SplitReg(x, y, num_models=10) # Use 10 models
fit <- predict(fit, type="coefficients") coefs
This package is free and open source software, licensed under GPL (>= 2).