Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mcanouil/clere

Simultaneous Variables Clustering and Regression
https://github.com/mcanouil/clere

r r-package r-stats regression-models variables-clustering

Last synced: about 1 month ago
JSON representation

Simultaneous Variables Clustering and Regression

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# clere: Simultaneous Variables Clustering and Regression

[![GitHub tag](https://img.shields.io/github/tag/mcanouil/clere.svg?label=latest tag&include_prereleases)](https://github.com/mcanouil/clere)
[![Codecov test
coverage](https://codecov.io/gh/mcanouil/clere/branch/main/graph/badge.svg)](https://codecov.io/gh/mcanouil/clere?branch=main)
[![R-CMD-check](https://github.com/mcanouil/clere/workflows/R-CMD-check/badge.svg)](https://github.com/mcanouil/clere/actions)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version-ago/clere)](https://cran.r-project.org/package=clere)
[![cran checks_worst](https://cranchecks.info/badges/worst/clere)](https://cran.r-project.org/web/checks/check_results_clere.html)
[![CRAN_Download_total](https://cranlogs.r-pkg.org/badges/clere)](https://cran.r-project.org/package=clere)

Implements an empirical Bayes approach for simultaneous variable clustering and regression.
This version also (re)implements in C++ an R script proposed by Howard Bondell that fits the Pairwise Absolute Clustering and Sparsity (PACS) methodology (see Sharma et al (2013) doi: [10.1080/15533174.2012.707849](https://doi.org/10.1080/15533174.2012.707849)).

## Installation

You can install the released version of clere from [CRAN](https://CRAN.R-project.org) with:

```{r, eval = FALSE}
install.packages("clere")
```

And the development version from [GitHub](https://github.com/) with:

```{r, eval = FALSE}
# install.packages("remotes")
remotes::install_github("mcanouil/clere")
```

## Citing clere

```{r, echo = FALSE, results = "asis"}
print(citation("clere"), "html")
```

```{r, echo = FALSE, comment = ""}
print(citation("clere"), "bibtex")
```

## Example

```{r example}
library(clere)

x <- matrix(rnorm(50 * 100), nrow = 50, ncol = 100)
y <- rnorm(50)

model <- fitClere(y = y, x = x, g = 2, plotit = FALSE)
model

plot(model)

clus <- clusters(model, threshold = NULL)
clus

predict(model, newx = x + 1)

summary(model)
```

## Getting help

If you encounter a clear bug, please file a minimal reproducible example on [github](https://github.com/mcanouil/clere/issues).
For questions and other discussion, please contact the package maintainer.

---

Please note that this project is released with a [Contributor Code of Conduct](https://github.com/mcanouil/clere/blob/main/.github/CODE_OF_CONDUCT.md).
By participating in this project you agree to abide by its terms.