Learn R Programming

spareg

spareg is an R package for building ensembles of predictive generalized linear models tailored for high-dimensional data. It leverages a powerful combination of variable screening and random projection techniques to efficiently tackle large-scale modeling problems.


Features

  • Efficient modeling with large predictor sets
  • Modular S3 architecture for screening and projection techniques
  • Competitive predictive performance with low computational cost
  • Extensible framework for custom screening and projection methods

Installation

You can install the development version of spareg from GitHub:

# install.packages("devtools")
devtools::install_github("lauravana/spareg")

The CRAN version can be installed with

install.packages("spareg")

Copy Link

Version

Install

install.packages('spareg')

Monthly Downloads

118

Version

1.1.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Laura Vana-Gür

Last Published

August 19th, 2025

Functions in spareg (1.1.1)

screen_glmnet

Screening Coefficient Based on glmnet Coefficients
print.spar.cv

Print Method for 'spar.cv' Object
rp_gaussian

Gaussian Random Projection Matrix
print.randomprojection

Print Method for a 'randomprojection' Object
screen_cor

Screening Coefficient Based on Correlation
rp_sparse

Sparse Random Projection Matrix
print.screencoef

Print Method for 'screencoef' Object
rp_cw

Sparse Embedding Matrix
print.spar

Summary of 'spar' Object
screen_marglik

Screening Coefficient Based on Marginal GLMs
summary.coefspar

Summary Method for 'coefspar' Object
spar.cv

Sparse Projected Averaged Regression with Cross-Validation
simulate_spareg_data

Simulate Sparse Regression Data
spar_glm

GLM Marginal 'sparmodel'
spar_glmnet

Penalized GLM Marginal 'sparmodel'
spar

Sparse Projected Averaged Regression
coef.spar

Coef Method for 'spar' Object
generate_gaussian

Gaussian Random Projection Matrix
constructor_screencoef

Constructor Function for Building 'screencoef' Objects
constructor_randomprojection

Constructor Function for Building 'randomprojection' Object
coef.spar.cv

Coef Method for 'spar.cv' Object
constructor_sparmodel

Constructor Function for Building 'sparmodel' Object
plot.spar

Plot Method for 'spar' Object
get_coef

Extractor for Model Coefficients from 'coefspar' Object
print.coefspar

Print Method for 'coefspar' Object
predict.spar

Predict Method for 'spar.cv' Object
get_model

Extractor of Specific Model from 'spar' and 'spar.cv' Object
predict.spar.cv

Predict Method for 'spar.cv' Object
plot.spar.cv

Plot Method for 'spar.cv' Object
get_measure

Extractor for (Cross-)Validation Measure from 'spar' or 'spar.cv' Object
get_intercept

Extractor for Model Intercept from 'coefspar' Object
generate_scrcoef_glmnet

Screening coefficient based on glmnet coefficients
generate_cw

Sparse Embedding Matrix
generate_scrcoef_cor

Generate screening coefficient based on correlation
generate_scrcoef_marglik

Generate screening coefficient based on marginal likelihood in univariate GLMs
generate_sparse

Sparse Random Projection Matrix