Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.5%) to scientific vocabulary
Keywords
Repository
Constrained Iteratively Reweighted Least Squares
Basic Info
Statistics
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 1
Topics
Metadata Files
README.md
Constrained Iteratively Reweighted Least Squares
The package cirls provides routines to fit Generalized Linear Models (GLM) with coefficients subject to linear constraints, through a constrained iteratively reweighted least-squares algorithm.
Installation
The easiest way to install the cirls package is to install it from CRAN
```R
install.packages("cirls")
```
The development version can be installed from GitHub using the devtools package as
R
devtools::install_github("PierreMasselot/cirls")
Please check the file NEWS.md for changes in the development version compared to the CRAN one.
Usage
The central function of the package is cirls.fit meant to be passed through the method argument of the glm function. The user is also expected to pass a either constraint matrix or a list of constraint matrices through the Cmat argument, and optionally lower and upper bound vectors lb and ub.
The package also contains dedicated methods to extract the variance-covariance matrix of the coefficients vcov. cirls as well as confidence intervals confint.cirls.
The example below show how to use the package to perform nonnegative regression. See ?cirls.fit for more comprehensive examples.
```R
Simulate predictors and response with some negative coefficients
set.seed(111) n <- 100 p <- 10 betas <- rep_len(c(1, -1), p) x <- matrix(rnorm(n * p), nrow = n) y <- x %*% betas + rnorm(n)
Define constraint matrix
Cmat <- diag(p)
Fit GLM by CIRLS
res <- glm(y ~ x, method = cirls.fit, Cmat = list(x = Cmat)) coef(res)
Obtain vcov and confidence intervals
vcov(res) confint(res) ```
References
To come
Owner
- Name: Pierre Masselot
- Login: PierreMasselot
- Kind: user
- Location: London, United Kingdom
- Company: LSHTM
- Repositories: 1
- Profile: https://github.com/PierreMasselot
GitHub Events
Total
- Push event: 14
- Pull request event: 1
Last Year
- Push event: 14
- Pull request event: 1
Packages
- Total packages: 1
-
Total downloads:
- cran 178 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
cran.r-project.org: cirls
Constrained Iteratively Reweighted Least Squares
- Homepage: https://github.com/PierreMasselot/cirls
- Documentation: http://cran.r-project.org/web/packages/cirls/cirls.pdf
- License: GPL (≥ 3)
-
Latest release: 0.3.1
published almost 2 years ago
Rankings
Maintainers (1)
Dependencies
- TruncatedNormal * imports
- coneproj * imports
- osqp * imports
- quadprog * imports
- stats * imports
- testthat >= 3.0.0 suggests