metagam

R package for meta-analysis of generalized additive models.

https://github.com/lifebrain/metagam

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
  • Committers with academic emails
    3 of 4 committers (75.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (19.4%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

R package for meta-analysis of generalized additive models.

Basic Info
Statistics
  • Stars: 11
  • Watchers: 2
  • Forks: 4
  • Open Issues: 1
  • Releases: 6
Created over 6 years ago · Last pushed 12 months ago
Metadata Files
Readme Changelog Code of conduct

README.Rmd

---
output: github_document
bibliography: ./inst/REFERENCES.bib
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  out.width = "100%"
)
devtools::load_all(".")
```

# metagam 


[![CRAN status](https://www.r-pkg.org/badges/version/metagam)](https://CRAN.R-project.org/package=metagam)
[![R-CMD-check](https://github.com/Lifebrain/metagam/workflows/R-CMD-check/badge.svg)](https://github.com/Lifebrain/metagam/actions)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![Codecov test coverage](https://codecov.io/gh/Lifebrain/metagam/branch/master/graph/badge.svg)](https://app.codecov.io/gh/Lifebrain/metagam?branch=master)
[![R-CMD-check](https://github.com/Lifebrain/metagam/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Lifebrain/metagam/actions/workflows/R-CMD-check.yaml)



## Overview

metagam is an R-package for meta-analysis of generalized additive models (GAMs). Its main application is cases in which raw data are located in multiple locations, and cannot be shared due to ethical or regulatory restrictions. metagam provides functions for removing all individual participant data from from GAMs fitted separately at each location, such that the resulting object can be shared to a central location. Next, metagam provides functions for meta-analysing these fitted GAMs using pointwise meta-analysis, as well as plotting and summary methods for analyzing the meta-analytic fits. The methods implemented are described in @Sorensen2021, extending upon previous works by @Schwarz2000 and @Crippa2018.

Currently, GAMs objects created with the following functions are supported:

- From package [mgcv](https://cran.r-project.org/package=mgcv): `bam()`, `gam()` and `gamm()`.
- From package [gamm4](https://cran.r-project.org/package=gamm4): `gamm4()`.

This package is under development, so changes to the interface can be expected. Suggestions for improvements and bug reports are warmly welcome, either by filing an [Issue](https://github.com/lifebrain/metagam/issues) or opening a [Pull Request](https://github.com/lifebrain/metagam/pulls).

## Installation

Install the current release of metagam from [CRAN](https://cran.r-project.org/) with:

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

Install the current development version of `metagam` from [GitHub](https://github.com/) with:

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

## Application Example

```{r}
library("metagam")
library("mgcv")
```

Simulate three datasets and fit a GAM to each of them. Then use `strip_rawdata()` from metagam to remove individual participant data.

```{r}
## Set seed for reproducible random numbers
set.seed(8562957)
## Simulate using mgcv::gamSim
datasets <- lapply(1:3, function(x) gamSim(verbose = FALSE))
## Fit a model to each dataset
models <- lapply(datasets, function(dat){
  ## Full gam with mgcv
  full_model <- gam(y ~ s(x2, bs = "cr"), data = dat)
  ## Strip rawdata
  strip_rawdata(full_model)
})
```

`models` now is a list containing three GAMs without individual participant data. We can then meta-analyze them using `metagam()`.

```{r}
meta_analysis <- metagam(models)
summary(meta_analysis)
```



For further documentation and vignettes, please visit the [package website](https://lifebrain.github.io/metagam/).


## Code of Conduct

Please note that the metagam project is released with a [Contributor Code of Conduct](https://www.contributor-covenant.org/version/1/0/0/code-of-conduct.html). By contributing to this project, you agree to abide by its terms.

## References

Owner

  • Name: Lifebrain Consortium
  • Login: Lifebrain
  • Kind: organization
  • Location: EU

Identify lifespan impact of environmental, social, occupational, and lifestyle factors on brain development, cognitive function and mental health

GitHub Events

Total
  • Create event: 2
  • Release event: 1
  • Issues event: 3
  • Watch event: 1
  • Delete event: 1
  • Push event: 2
  • Fork event: 1
Last Year
  • Create event: 2
  • Release event: 1
  • Issues event: 3
  • Watch event: 1
  • Delete event: 1
  • Push event: 2
  • Fork event: 1

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 208
  • Total Committers: 4
  • Avg Commits per committer: 52.0
  • Development Distribution Score (DDS): 0.202
Past Year
  • Commits: 3
  • Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Øystein Sørensen o****s@m****o 166
Øystein Sørensen o****n@h****m 18
Athanasia Monika Mowinckel a****l@p****o 14
Brandmaier b****r@m****e 10
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 10
  • Total pull requests: 56
  • Average time to close issues: about 1 year
  • Average time to close pull requests: 1 day
  • Total issue authors: 4
  • Total pull request authors: 3
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.14
  • Merged pull requests: 52
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: about 20 hours
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • osorensen (7)
  • teunbrand (1)
  • HenrikBengtsson (1)
  • brandmaier (1)
Pull Request Authors
  • osorensen (53)
  • brandmaier (4)
  • drmowinckels (2)
Top Labels
Issue Labels
enhancement (3)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 443 last-month
  • Total docker downloads: 41,971
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 8
  • Total maintainers: 1
cran.r-project.org: metagam

Meta-Analysis of Generalized Additive Models

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 443 Last month
  • Docker Downloads: 41,971
Rankings
Forks count: 14.9%
Stargazers count: 18.7%
Average: 28.9%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Downloads: 45.7%
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • ggplot2 * imports
  • metafor * imports
  • mgcv * imports
  • rlang * imports
  • covr * suggests
  • devtools * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • roxygen2 * suggests
  • testthat >= 2.1.0 suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v4 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.5.0 composite
  • actions/checkout v4 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/pr-commands.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/pr-fetch v1 composite
  • r-lib/actions/pr-push v1 composite
  • r-lib/actions/setup-r v1 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v4 composite
  • actions/upload-artifact v4 composite
  • codecov/codecov-action v4 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite