# SplitReg

This package provides functions for computing the split regularized regression estimators defined in Christidis, Lakshmanan, Smucler and Zamar (2019).

### Installation

You can install the stable version on R CRAN.

``install.packages("SplitReg", dependencies = TRUE)``

You can install the development version from GitHub

``````library(devtools)
devtools::install_github("AnthonyChristidis/SplitReg")``````

### Usage

``````# A small example
library(MASS)
library(SplitReg)
set.seed(1)
beta <- c(rep(5, 5), rep(0, 45))
Sigma <- matrix(0.5, 50, 50)
diag(Sigma) <- 1
x <- mvrnorm(50, mu = rep(0, 50), Sigma = Sigma)
y <- x %*% beta + rnorm(50)
fit <- cv.SplitReg(x, y, num_models=10) # Use 10 models
coefs <- predict(fit, type="coefficients")``````
{"ft_lang_label":"__label__en","ft_lang_prob":0.5489201,"math_prob":0.92084724,"size":639,"snap":"2020-24-2020-29","text_gpt3_token_len":195,"char_repetition_ratio":0.07874016,"word_repetition_ratio":0.0,"special_character_ratio":0.32394367,"punctuation_ratio":0.16129032,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9981727,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-07-13T04:46:49Z\",\"WARC-Record-ID\":\"<urn:uuid:f0632ba3-8bee-4801-a6ef-03a2182bff10>\",\"Content-Length\":\"8213\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e7a77211-f366-4f44-bcb5-326cf416f9e3>\",\"WARC-Concurrent-To\":\"<urn:uuid:12eeeb8a-7d04-4654-a4dc-ad838d4b6c7a>\",\"WARC-IP-Address\":\"104.27.152.18\",\"WARC-Target-URI\":\"https://cran.opencpu.org/web/packages/SplitReg/readme/README.html\",\"WARC-Payload-Digest\":\"sha1:46I6XZECNUWWYR52YAZYA2WCS5NKAGFM\",\"WARC-Block-Digest\":\"sha1:F5RPJZNL3Q4C77JMD4IFAIIUB4NHSOPV\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-29/CC-MAIN-2020-29_segments_1593657142589.93_warc_CC-MAIN-20200713033803-20200713063803-00429.warc.gz\"}"}