Science Score: 36.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
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Last synced: 9 months ago
·
JSON representation
Repository
Generalised linear mixed model selection
Basic Info
- Host: GitHub
- Owner: ryan-thompson
- Language: R
- Default Branch: master
- Size: 5.39 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 1
Created about 1 year ago
· Last pushed 12 months ago
Metadata Files
Readme
Changelog
README.Rmd
---
output: github_document
---
```{r setup, include = F}
knitr::opts_chunk$set(echo = T)
```
# glmmsel
[](https://github.com/ryan-thompson/glmmsel/actions)
[](https://github.com/ryan-thompson/glmmsel/actions)
## Overview
An R package for generalised linear mixed model (GLMM) selection. `glmmsel` uses an $\ell_0$ regulariser to simultaneously select fixed and random effects. A hierarchical constraint is included that a random effect cannot be selected unless its corresponding fixed effect is also selected. Gaussian and binomial families are currently supported. See [this paper](https://arxiv.org/abs/2506.20425) for more information.
## Installation
To install the latest version from GitHub, run the following code:
``` {r, eval = F}
devtools::install_github('ryan-thompson/glmmsel')
```
## Usage
The `glmmsel()` function fits a sparse GLMM over a sequence of the regularisation parameter $\lambda$, with different values yielding different sparsity levels. The `cv.glmmsel()` function provides a convenient method for automatically cross-validating $\lambda$.
```{r, example}
library(glmmsel)
# Generate some clustered data
n <- 100 # Number of observations
m <- 4 # Number of clusters
p <- 5 # Number of predictors
s.fix <- 2 # Number of nonzero fixed effects
s.rand <- 1 # Number of nonzero random effects
x <- matrix(rnorm(n * p), n, p) # Predictor matrix
beta <- c(rep(1, s.fix), rep(0, p - s.fix)) # True fixed effects
u <- cbind(matrix(rnorm(m * s.rand), m, s.rand), matrix(0, m, p - s.rand)) # True random effects
cluster <- sample(1:m, n, replace = TRUE) # Cluster labels
xb <- rowSums(x * sweep(u, 2, beta, '+')[cluster, ]) # x %*% (beta + u) matrix
y <- rnorm(n, xb) # Response vector
# Fit the ℓ0 regularisation path
fit <- glmmsel(x, y, cluster)
coef(fit, lambda = 10)
# Cross-validate the ℓ0 regularisation path
fit <- cv.glmmsel(x, y, cluster)
coef(fit)
```
## Documentation
See the package [vignette](https://CRAN.R-project.org/package=glmmsel/vignettes/vignette.html) or [reference manual](https://CRAN.R-project.org/package=glmmsel/glmmsel.pdf).
Owner
- Name: Ryan Thompson
- Login: ryan-thompson
- Kind: user
- Location: Sydney, Australia
- Company: University of New South Wales
- Website: https://ryan-thompson.github.io/
- Repositories: 3
- Profile: https://github.com/ryan-thompson
GitHub Events
Total
- Release event: 1
- Push event: 13
- Create event: 5
Last Year
- Release event: 1
- Push event: 13
- Create event: 5
Packages
- Total packages: 1
-
Total downloads:
- cran 140 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: glmmsel
Generalised Linear Mixed Model Selection
- Homepage: https://github.com/ryan-thompson/glmmsel
- Documentation: http://cran.r-project.org/web/packages/glmmsel/glmmsel.pdf
- License: GPL-3
-
Latest release: 1.0.3
published 12 months ago
Rankings
Dependent packages count: 26.4%
Dependent repos count: 32.5%
Average: 48.5%
Downloads: 86.7%
Maintainers (1)
Last synced:
10 months ago
Dependencies
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
.github/workflows/test-coverage.yaml
actions
- actions/checkout v2 composite
- codecov/codecov-action v5 composite
- r-lib/actions/setup-r v2 composite
DESCRIPTION
cran
- R >= 4.1.0 depends
- Rcpp * imports
- ggplot2 * imports
- MASS * suggests
- knitr * suggests
- lme4 * suggests
- nlme * suggests
- rmarkdown * suggests
- testthat * suggests