glmmcosinor
An R package for flexible cosinor modelling using the glmmTMB framework
Science Score: 39.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
Found 2 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (21.6%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
An R package for flexible cosinor modelling using the glmmTMB framework
Basic Info
- Host: GitHub
- Owner: ropensci
- License: gpl-3.0
- Language: R
- Default Branch: main
- Homepage: https://docs.ropensci.org/GLMMcosinor/
- Size: 252 MB
Statistics
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 4
- Releases: 2
Created over 3 years ago
· Last pushed 11 months ago
Metadata Files
Readme
Changelog
License
Codemeta
README.Rmd
---
output:
github_document
bibliography: vignettes/REFERENCES.bib
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
```{r srr, eval = FALSE, echo = FALSE}
#' @srrstats {G1.2} *Statistical Software should include a* Life Cycle Statement *describing current and anticipated future states of development.*
#' @srrstats {G1.1} *Statistical Software should document whether the algorithm(s) it implements are:* - *The first implementation of a novel algorithm*; or - *The first implementation within **R** of an algorithm which has previously been implemented in other languages or contexts*; or - *An improvement on other implementations of similar algorithms in **R***.
#' @srrstats {G5.0} *Where applicable or practicable, tests should use standard data sets with known properties (for example, the [NIST Standard Reference Datasets](https://www.itl.nist.gov/div898/strd/), or data sets provided by other widely-used R packages).*
#' @srrstats {G3.0} *Statistical software should never compare floating point numbers for equality. All numeric equality comparisons should either ensure that they are made between integers, or use appropriate tolerances for approximate equality.*
```
# GLMMcosinor
[](https://CRAN.R-project.org/package=GLMMcosinor)
[](https://github.com/ropensci/GLMMcosinor/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/ropensci/GLMMcosinor)
[](https://www.gnu.org/licenses/gpl-3.0)
[](https://www.repostatus.org/#active)
[](https://github.com/ropensci/software-review/issues/603)
The goal of `{GLMMcosinor}` is to fit a cosinor model to rhythmic data with all
the flexibility and functionality of a generalized linear (mixed-) model (GLM)
framework using `{glmmTMB}`.
The package is also accessible via a [web app](https://aushsi.shinyapps.io/GLMMcosinor-shinyapp)
developed using shiny.
For an introduction to the cosinor model, see the [getting started vignette](https://docs.ropensci.org/GLMMcosinor/articles/GLMMcosinor.html).
Existing statistical software for circadian data analyses (including `cosinor`
[@sachs2023cosinor] or `circacompare` [@parsons2020circacompare]) allows users
to fit regression models to rhythmic data, but many are limited due to their
inability to specify a link function, multiple components, or a hierarchical
structure. `GLMMcosinor` aims to be comprehensive and flexible and is an
improvement on other implementations of cosinor model fitting in R or Python.
See table below for features available within currently available methods.
`GLMMcosinor` makes use of the `glmmTMB` package framework for estimation of the
cosinor model. If the model has no random effects, `glmmTMB` uses
maximum likelihood estimation to estimate the linear coefficients of the model.
For models with random effects, a Laplace approximation is used to integrate
over the random effects. This approximation is handled by the
[`TMB`](https://cran.r-project.org/package=TMB)
package which uses automatic differentiation of the joint likelihood function to
efficiently compute parameter estimates. A detailed explanation of this process
is described [here](https://doi.org/10.18637/jss.v070.i05) [@Kristensen2016TMB].
```{r, include=FALSE}
source("vignettes/fixtures/methods-table.R")
# flextable::save_as_image(
# dat,
# file.path("man", "figures", "methods-table.png")
# )
```
## Installation
You can install GLMMcosinor from
[GitHub](https://github.com/) with:
``` r
# dev version
# install.packages("pak")
pak::pkg_install("ropensci/GLMMcosinor")
# or, equivalently
install.packages("GLMMcosinor", repos = "https://ropensci.r-universe.dev")
# latest release version
pak::pkg_install("ropensci/GLMMcosinor@*release")
```
## Example
This is a basic example which shows you how to solve a common problem:
```{r example}
library(GLMMcosinor)
```
```{r}
model <- cglmm(
vit_d ~ X + amp_acro(time, group = "X", period = 12),
data = vitamind
)
summary(model)
```
```{r, eval=FALSE}
autoplot(model, superimpose.data = TRUE)
polar_plot(model)
```
```{r, echo=FALSE}
p1 <- autoplot(model, superimpose.data = TRUE) +
ggplot2::theme(legend.position = "none")
p2 <- polar_plot(model)
cowplot::plot_grid(p1, p2, nrow = 1, rel_widths = c(0.4, 0.6))
```
## Citation
```{r}
citation("GLMMcosinor")
```
## References
Owner
- Name: rOpenSci
- Login: ropensci
- Kind: organization
- Email: info@ropensci.org
- Location: Berkeley, CA
- Website: https://ropensci.org/
- Twitter: rOpenSci
- Repositories: 307
- Profile: https://github.com/ropensci
CodeMeta (codemeta.json)
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"identifier": "GLMMcosinor",
"description": "Allows users to fit a cosinor model using the 'glmmTMB' framework. This extends on existing cosinor modeling packages, including 'cosinor' and 'circacompare', by including a wide range of available link functions and the capability to fit mixed models. The cosinor model is described by Cornelissen (2014) <doi:10.1186/1742-4682-11-16>.",
"name": "GLMMcosinor: Fit a Cosinor Model Using a Generalized Mixed Modeling Framework",
"relatedLink": "https://docs.ropensci.org/GLMMcosinor/",
"codeRepository": "https://github.com/ropensci/GLMMcosinor",
"issueTracker": "https://github.com/ropensci/GLMMcosinor/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.2.1.9000",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.4.1 (2024-06-14 ucrt)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"author": [
{
"@type": "Person",
"givenName": "Rex",
"familyName": "Parsons",
"email": "rex.parsons94@gmail.com",
"@id": "https://orcid.org/0000-0002-6053-8174"
},
{
"@type": "Person",
"givenName": "Oliver",
"familyName": "Jayasinghe"
},
{
"@type": "Person",
"givenName": "Nicole",
"familyName": "White",
"@id": "https://orcid.org/0000-0002-9292-0773"
},
{
"@type": "Person",
"givenName": "Oliver",
"familyName": "Rawashdeh",
"@id": "https://orcid.org/0000-0002-7147-4778"
}
],
"contributor": [
{
"@type": "Person",
"givenName": "Prasad",
"familyName": "Chunduri",
"@id": "https://orcid.org/0000-0001-7297-7580"
},
{
"@type": "Person",
"givenName": "Margaret",
"familyName": "Doyle"
}
],
"funder": [
{
"@type": "Person",
"givenName": "Oliver",
"familyName": "Rawashdeh",
"@id": "https://orcid.org/0000-0002-7147-4778"
},
{
"@type": "Person",
"givenName": "Prasad",
"familyName": "Chunduri",
"@id": "https://orcid.org/0000-0001-7297-7580"
}
],
"maintainer": [
{
"@type": "Person",
"givenName": "Rex",
"familyName": "Parsons",
"email": "rex.parsons94@gmail.com",
"@id": "https://orcid.org/0000-0002-6053-8174"
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "cosinor",
"name": "cosinor",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=cosinor"
},
{
"@type": "SoftwareApplication",
"identifier": "covr",
"name": "covr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=covr"
},
{
"@type": "SoftwareApplication",
"identifier": "DHARMa",
"name": "DHARMa",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=DHARMa"
},
{
"@type": "SoftwareApplication",
"identifier": "dplyr",
"name": "dplyr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=dplyr"
},
{
"@type": "SoftwareApplication",
"identifier": "DT",
"name": "DT",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=DT"
},
{
"@type": "SoftwareApplication",
"identifier": "flextable",
"name": "flextable",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=flextable"
},
{
"@type": "SoftwareApplication",
"identifier": "ftExtra",
"name": "ftExtra",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=ftExtra"
},
{
"@type": "SoftwareApplication",
"identifier": "knitr",
"name": "knitr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=knitr"
},
{
"@type": "SoftwareApplication",
"identifier": "rmarkdown",
"name": "rmarkdown",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rmarkdown"
},
{
"@type": "SoftwareApplication",
"identifier": "testthat",
"name": "testthat",
"version": ">= 3.0.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=testthat"
},
{
"@type": "SoftwareApplication",
"identifier": "vdiffr",
"name": "vdiffr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=vdiffr"
},
{
"@type": "SoftwareApplication",
"identifier": "withr",
"name": "withr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=withr"
}
],
"softwareRequirements": {
"1": {
"@type": "SoftwareApplication",
"identifier": "assertthat",
"name": "assertthat",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=assertthat"
},
"2": {
"@type": "SoftwareApplication",
"identifier": "cowplot",
"name": "cowplot",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=cowplot"
},
"3": {
"@type": "SoftwareApplication",
"identifier": "ggforce",
"name": "ggforce",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=ggforce"
},
"4": {
"@type": "SoftwareApplication",
"identifier": "ggplot2",
"name": "ggplot2",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=ggplot2"
},
"5": {
"@type": "SoftwareApplication",
"identifier": "glmmTMB",
"name": "glmmTMB",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=glmmTMB"
},
"6": {
"@type": "SoftwareApplication",
"identifier": "lme4",
"name": "lme4",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=lme4"
},
"7": {
"@type": "SoftwareApplication",
"identifier": "rlang",
"name": "rlang",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rlang"
},
"8": {
"@type": "SoftwareApplication",
"identifier": "scales",
"name": "scales",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=scales"
},
"9": {
"@type": "SoftwareApplication",
"identifier": "stats",
"name": "stats"
},
"10": {
"@type": "SoftwareApplication",
"identifier": "R",
"name": "R",
"version": ">= 4.1.0"
},
"SystemRequirements": null
},
"fileSize": "3792.792KB",
"releaseNotes": "https://github.com/ropensci/GLMMcosinor/blob/main/NEWS.md",
"readme": "https://github.com/ropensci/GLMMcosinor/blob/main/README.md",
"contIntegration": [
"https://github.com/ropensci/GLMMcosinor/actions/workflows/R-CMD-check.yaml",
"https://app.codecov.io/gh/ropensci/GLMMcosinor?branch=main"
],
"developmentStatus": "https://www.repostatus.org/#active",
"review": {
"@type": "Review",
"url": "https://github.com/ropensci/software-review/issues/603",
"provider": "https://ropensci.org"
}
}
GitHub Events
Total
- Create event: 4
- Release event: 1
- Issues event: 16
- Watch event: 1
- Delete event: 3
- Issue comment event: 15
- Push event: 25
- Pull request event: 12
Last Year
- Create event: 4
- Release event: 1
- Issues event: 16
- Watch event: 1
- Delete event: 3
- Issue comment event: 15
- Push event: 25
- Pull request event: 12
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 1
- Total pull requests: 0
- Average time to close issues: 1 day
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: 1 day
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- RWParsons (7)
- MilaSMayor (5)
- maelle (2)
- oliverjayasinghe (2)
Pull Request Authors
- RWParsons (11)
- maelle (2)
- oliverjayasinghe (2)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml
actions
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml
actions
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION
cran
- assertthat * imports
- cowplot * imports
- ggforce * imports
- ggplot2 * imports
- glmmTMB * imports
- lme4 * imports
- rlang * imports
- stats * imports
- DT * suggests
- covr * suggests
- dplyr * suggests
- flextable * suggests
- ftExtra * suggests
- knitr * suggests
- rmarkdown * suggests
- testthat >= 3.0.0 suggests
- vdiffr * suggests
- withr * suggests