sdmTMB

:earth_americas: An R package for spatial and spatiotemporal GLMMs with TMB

https://github.com/pbs-assess/sdmTMB

Science Score: 49.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 8 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    4 of 23 committers (17.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.2%) to scientific vocabulary

Keywords

ecology glmm r spatial-analysis species-distribution-modelling tmb

Keywords from Contributors

fisheries fisheries-stock-assessment stock-synthesis english lesson transformation
Last synced: 6 months ago · JSON representation

Repository

:earth_americas: An R package for spatial and spatiotemporal GLMMs with TMB

Basic Info
Statistics
  • Stars: 224
  • Watchers: 14
  • Forks: 28
  • Open Issues: 39
  • Releases: 10
Topics
ecology glmm r spatial-analysis species-distribution-modelling tmb
Created over 7 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog

README.Rmd

---
output: 
  github_document:
    toc: true
    toc_depth: 3
    df_print: "tibble"
    includes:
      in_header: header.md
---

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

sdmTMB can be installed from CRAN:

```{r, eval=FALSE}
install.packages("sdmTMB", dependencies = TRUE)
```

Assuming you have a [C++ compiler](https://support.posit.co/hc/en-us/articles/200486498-Package-Development-Prerequisites) installed, the development version is recommended and can be installed:

```{r, eval=FALSE}
# install.packages("pak")
pak::pak("pbs-assess/sdmTMB", dependencies = TRUE)
```

There are some extra utilities in the [sdmTMBextra](https://github.com/pbs-assess/sdmTMBextra) package.

For large models, it is recommended to use an optimized BLAS library, which will result in major speed improvements for TMB (and other) models in R (e.g., often 8-fold speed increases for sdmTMB models).
Suggested installation instructions for [Mac users](https://www.mail-archive.com/r-sig-mac@r-project.org/msg06199.html) (other than R 4.5.0) or [with OpenBLAS on a Mac](https://gist.github.com/seananderson/3c6cbf640ba566ce936c79442b9a6068), [Linux users](https://prdm0.github.io/ropenblas/), [Windows users](https://github.com/david-cortes/R-openblas-in-windows), and [Windows users without admin privileges](https://gist.github.com/seananderson/08a51e296a854f227a908ddd365fb9c1).
To check that you've successfully linked the optimized BLAS, start a new session and run:

```r
m <- 1e4; n <- 1e3; k <- 3e2
X <- matrix(rnorm(m*k), nrow=m); Y <- matrix(rnorm(n*k), ncol=n)
system.time(X %*% Y)
```

The result ('elapsed') should take a fraction of a second (e.g., 0.03 s), not > 1 second.

## Overview

Analyzing geostatistical data (coordinate-referenced observations from some underlying spatial process) is becoming increasingly common in many fields.
sdmTMB implements geostatistical spatial and spatiotemporal GLMMs using [TMB](https://cran.r-project.org/package=TMB) for model fitting and [fmesher](https://CRAN.R-project.org/package=fmesher) to set up SPDE (stochastic partial differential equation) matrices.
One common application is for species distribution models (SDMs), hence the package name.
The goal of sdmTMB is to provide a fast, flexible, and user-friendly interface---similar to the popular R package glmmTMB---but with a focus on spatial and spatiotemporal models with an SPDE approach.
We extend common generalized linear mixed models (GLMMs) to include the following optional features:

* spatial random fields
* spatiotemporal random fields that may be independent by year or modelled with random walks or autoregressive processes
* smooth terms for covariates, using the familiar `s()` notation from mgcv
* breakpoint (hockey-stick) or logistic covariates
* time-varying covariates (coefficients modelled as random walks)
* spatially varying coefficient models (SVCs)
* interpolation or forecasting over missing or future time slices
* a wide range of families: all standard R families plus `tweedie()`, `nbinom1()`, `nbinom2()`, `lognormal()`, `student()`, `gengamma()`, plus some truncated and censored families
* delta/hurdle models including `delta_gamma()`, `delta_lognormal()`, and `delta_truncated_nbinom2()`

Estimation is via maximum marginal likelihood with the objective function calculated in [TMB](https://cran.r-project.org/package=TMB) and minimized in R via `stats::nlminb()` with the random effects integrated over via the Laplace approximation.
The sdmTMB package also allows for models to be passed to Stan via [tmbstan](https://cran.r-project.org/package=tmbstan), allowing for Bayesian model estimation.

See [`?sdmTMB`](https://pbs-assess.github.io/sdmTMB/reference/sdmTMB.html) and [`?predict.sdmTMB`](https://pbs-assess.github.io/sdmTMB/reference/predict.sdmTMB.html) for the most complete examples. Also see the vignettes ('Articles') on the [documentation site](https://pbs-assess.github.io/sdmTMB/index.html) and the [preprint](https://doi.org/10.1101/2022.03.24.485545) listed below.

## Getting help

For questions about how to use sdmTMB or interpret the models, please post on the [discussion board](https://github.com/pbs-assess/sdmTMB/discussions). If you [email](https://github.com/pbs-assess/sdmTMB/blob/main/DESCRIPTION) a question, we are likely to respond on the [discussion board](https://github.com/pbs-assess/sdmTMB/discussions) with an anonymized version of your question (and without data) if we think it could be helpful to others. Please let us know if you don't want us to do that.

For bugs or feature requests, please post in the [issue tracker](https://github.com/pbs-assess/sdmTMB/issues).

There is [material](https://github.com/pbs-assess/sdmTMB-teaching) from past workshops on sdmTMB and [recordings](https://www.youtube.com/channel/UCYoFG51RjJVx7m9mZGaj-Ng/videos) from some of those workshops.

## Citation

To cite sdmTMB in publications, please use:

```r
citation("sdmTMB")
```

Anderson, S.C., E.J. Ward, P.A. English, L.A.K. Barnett., J.T. Thorson. 2025.
sdmTMB: an R package for fast, flexible, and user-friendly generalized linear
mixed effects models with spatial and spatiotemporal random fields.
In press at Journal of Statistical Software. 
bioRxiv preprint: .

A list of known publications that use sdmTMB can be found [here](https://github.com/pbs-assess/sdmTMB/tree/main/scratch/citations). Please use the above citation so we can track publications.


## Basic use

An sdmTMB model requires a data frame that contains a response column, columns for any predictors, and columns for spatial coordinates.
It usually makes sense to convert the spatial coordinates to an equidistant projection such as UTMs such that distance remains constant throughout the study region [e.g., using `sf::st_transform()`].
Here, we illustrate a spatial model fit to Pacific cod (*Gadus macrocephalus*) trawl survey data from Queen Charlotte Sound, BC, Canada.
Our model contains a main effect of depth as a penalized smoother, a spatial random field, and Tweedie observation error.
Our data frame `pcod` (built into the package) has a column `year` for the year of the survey, `density` for density of Pacific cod in a given survey tow, `present` for whether `density > 0`, `depth` for depth in meters of that tow, and spatial coordinates `X` and `Y`, which are UTM coordinates in kilometres.

```{r, echo=TRUE, eval=FALSE, cache=FALSE}
library(dplyr)
library(ggplot2)
library(sdmTMB)
head(pcod)
```

```{r, echo=FALSE, eval=TRUE, message=FALSE, warning=FALSE, cache=FALSE}
library(dplyr)
library(ggplot2)
library(sdmTMB)
theme_set(theme_light())
dplyr::select(pcod, year, density, present, depth, X, Y) %>% 
  head(n = 3)
```

We start by creating a mesh object that contains matrices to apply the SPDE approach.

```{r}
mesh <- make_mesh(pcod, xy_cols = c("X", "Y"), cutoff = 10)
```

Here, `cutoff` defines the minimum allowed distance between points in the units of `X` and `Y` (km). Alternatively, we could have created a mesh via the fmesher or INLA packages and supplied it to `make_mesh()`. 
We can inspect our mesh object with the associated plotting method `plot(mesh)`.

Fit a spatial model with a smoother for depth:

```{r, warning=FALSE, message=FALSE}
fit <- sdmTMB(
  density ~ s(depth),
  data = pcod,
  mesh = mesh,
  family = tweedie(link = "log"),
  spatial = "on"
)
```

Print the model fit:

```{r}
fit
```

The output indicates our model was fit by maximum (marginal) likelihood (`ML`). We also see the formula, mesh, fitted data, and family. Next we see any estimated main effects including the linear component of the smoother (`sdepth`), the standard deviation on the smoother weights (`sds(depth)`), the Tweedie dispersion and power parameters, the Matérn range distance (distance at which points are effectively independent), the marginal spatial field standard deviation, and the negative log likelihood at convergence.

We can extract parameters as a data frame:

```{r}
tidy(fit, conf.int = TRUE)
tidy(fit, effects = "ran_pars", conf.int = TRUE)
```

Run some basic sanity checks on our model:

```{r}
sanity(fit)
```

Use the [ggeffects](https://github.com/strengejacke/ggeffects) package to plot the smoother effect:

```{r plot-ggpredict-link, warning=FALSE, message=FALSE}
ggeffects::ggpredict(fit, "depth [50:400, by=2]") |> plot()
```

If the depth effect was parametric and not a penalized smoother, we could have alternatively used `ggeffects::ggeffect()` for a fast marginal effect plot.

Next, we can predict on new data.
We will use a data frame `qcs_grid` from the package, which contains all the locations (and covariates) at which we wish to predict.
Here, these `newdata` are a grid, or raster, covering our survey.

```{r}
p <- predict(fit, newdata = qcs_grid)
```

```{r, eval=FALSE, echo=TRUE}
head(p)
```

```{r, eval=TRUE, echo=FALSE}
select(p, X, Y, depth, est, est_non_rf, est_rf, omega_s) %>% 
  head(n = 3)
```

```{r plot-predictions}
ggplot(p, aes(X, Y, fill = exp(est))) + geom_raster() +
  scale_fill_viridis_c(trans = "sqrt")
```

We could switch to a presence-absence model by changing the response column and family:

```{r, eval=TRUE}
fit <- sdmTMB(
  present ~ s(depth),
  data = pcod, 
  mesh = mesh,
  family = binomial(link = "logit")
)
```

Or a hurdle/delta model by changing the family:

```{r, eval=TRUE}
fit <- sdmTMB(
  density ~ s(depth),
  data = pcod,
  mesh = mesh,
  family = delta_gamma(link1 = "logit", link2 = "log"),
)
```

We could instead fit a spatiotemporal model by specifying the `time` column and a spatiotemporal structure:

```{r, eval=TRUE, echo=TRUE, warning=FALSE, message=FALSE}
fit_spatiotemporal <- sdmTMB(
  density ~ s(depth, k = 5), 
  data = pcod, 
  mesh = mesh,
  time = "year",
  family = tweedie(link = "log"), 
  spatial = "off", 
  spatiotemporal = "ar1"
)
```

If we wanted to create an area-weighted standardized population index, we could predict on a grid covering the entire survey (`qcs_grid`) with grid cell area 4 (2 x 2 km) and pass the predictions to `get_index()`:

```{r plot-index, warning=FALSE, message=FALSE}
grid_yrs <- replicate_df(qcs_grid, "year", unique(pcod$year))
p_st <- predict(fit_spatiotemporal, newdata = grid_yrs, 
  return_tmb_object = TRUE)
index <- get_index(p_st, area = rep(4, nrow(grid_yrs)))
ggplot(index, aes(year, est)) +
  geom_ribbon(aes(ymin = lwr, ymax = upr), fill = "grey90") +
  geom_line(lwd = 1, colour = "grey30") +
  labs(x = "Year", y = "Biomass (kg)")
```

Or the center of gravity:

```{r plot-cog, message=FALSE, warning=FALSE}
cog <- get_cog(p_st, format = "wide")
ggplot(cog, aes(est_x, est_y, colour = year)) +
  geom_pointrange(aes(xmin = lwr_x, xmax = upr_x)) +
  geom_pointrange(aes(ymin = lwr_y, ymax = upr_y)) +
  scale_colour_viridis_c()
```

For more on these basic features, see the vignettes [Intro to modelling with sdmTMB](https://pbs-assess.github.io/sdmTMB/articles/basic-intro.html) and [Index standardization with sdmTMB](https://pbs-assess.github.io/sdmTMB/articles/index-standardization.html). 

## Advanced functionality

### Time-varying coefficients

Time-varying intercept:

```{r, eval=FALSE}
fit <- sdmTMB(
  density ~ 0 + s(depth, k = 5), 
  time_varying = ~ 1, 
  data = pcod, mesh = mesh,
  time = "year",  
  family = tweedie(link = "log"),
  silent = FALSE # see progress
)
```

Time-varying (random walk) effect of depth:

```{r, eval=FALSE}
fit <- sdmTMB(
  density ~ 1, 
  time_varying = ~ 0 + depth_scaled + depth_scaled2,
  data = pcod, mesh = mesh,
  time = "year",
  family = tweedie(link = "log"),
  spatial = "off",
  spatiotemporal = "ar1",
  silent = FALSE
)
```

See the vignette [Intro to modelling with sdmTMB](https://pbs-assess.github.io/sdmTMB/articles/basic-intro.html) for more details.

### Spatially varying coefficients (SVC)

Spatially varying effect of time:

```{r, eval=TRUE, warning=FALSE}
pcod$year_scaled <- as.numeric(scale(pcod$year))
fit <- sdmTMB(
  density ~ s(depth, k = 5) + year_scaled,
  spatial_varying = ~ year_scaled, 
  data = pcod, mesh = mesh, 
  time = "year",
  family = tweedie(link = "log"),
  spatiotemporal = "off"
)
```

See `zeta_s` in the output, which represents the coefficient varying in space. You'll want to ensure you set up your model such that it ballpark has a mean of 0 (e.g., by including it in `formula` too).

```{r plot-zeta}
grid_yrs <- replicate_df(qcs_grid, "year", unique(pcod$year))
grid_yrs$year_scaled <- (grid_yrs$year - mean(pcod$year)) / sd(pcod$year)
p <- predict(fit, newdata = grid_yrs) %>% 
  subset(year == 2011) # any year
ggplot(p, aes(X, Y, fill = zeta_s_year_scaled)) + geom_raster() +
  scale_fill_gradient2()
```

See the vignette on [Fitting spatial trend models with sdmTMB](https://pbs-assess.github.io/sdmTMB/articles/spatial-trend-models.html) for more details.

### Random intercepts

We can use the same syntax (`1 | group`) as lme4 or glmmTMB to fit random intercepts:

```{r, eval=FALSE, echo=TRUE, warning=FALSE, message=FALSE}
pcod$year_factor <- as.factor(pcod$year)
fit <- sdmTMB(
  density ~ s(depth, k = 5) + (1 | year_factor),
  data = pcod, mesh = mesh,
  time = "year",
  family = tweedie(link = "log")
)
```

### Breakpoint and threshold effects

```{r, eval=FALSE}
fit <- sdmTMB(
  present ~ 1 + breakpt(depth_scaled), 
  data = pcod, mesh = mesh,
  family = binomial(link = "logit")
)
```

```{r, eval=FALSE}
fit <- sdmTMB(
  present ~ 1 + logistic(depth_scaled), 
  data = pcod, mesh = mesh,
  family = binomial(link = "logit")
)
```

See the vignette on [Threshold modeling with sdmTMB](https://pbs-assess.github.io/sdmTMB/articles/threshold-models.html) for more details.

### Simulating data

#### Simulating data from scratch

```{r}
predictor_dat <- expand.grid(
  X = seq(0, 1, length.out = 100), Y = seq(0, 1, length.out = 100)
)
mesh <- make_mesh(predictor_dat, xy_cols = c("X", "Y"), cutoff = 0.05)
sim_dat <- sdmTMB_simulate(
  formula = ~ 1,
  data = predictor_dat,
  mesh = mesh,
  family = poisson(link = "log"),
  range = 0.3,
  sigma_O = 0.4,
  seed = 1,
  B = 1 # B0 = intercept
)
head(sim_dat)

# sample 200 points for fitting:
set.seed(1)
sim_dat_obs <- sim_dat[sample(seq_len(nrow(sim_dat)), 200), ]
```

```{r plot-sim-dat}
ggplot(sim_dat, aes(X, Y)) +
  geom_raster(aes(fill = exp(eta))) + # mean without observation error
  geom_point(aes(size = observed), data = sim_dat_obs, pch = 21) +
  scale_fill_viridis_c() +
  scale_size_area() +
  coord_cartesian(expand = FALSE)
```

Fit to the simulated data:

```{r}
mesh <- make_mesh(sim_dat_obs, xy_cols = c("X", "Y"), cutoff = 0.05)
fit <- sdmTMB(
  observed ~ 1,
  data = sim_dat_obs,
  mesh = mesh,
  family = poisson()
)
```

See [`?sdmTMB_simulate`](https://pbs-assess.github.io/sdmTMB/reference/sdmTMB_simulate.html) for more details.

#### Simulating from an existing fit

```{r sim, include=FALSE, eval=FALSE}
s <- simulate(fit, nsim = 500)
dim(s)
s[1:3,1:4]
```

``` r
s <- simulate(fit, nsim = 500)
dim(s)
#> [1] 969 500
s[1:3,1:4]
#>      [,1]     [,2]     [,3]     [,4]
#> [1,]    0 59.40310 83.20888  0.00000
#> [2,]    0 34.56408  0.00000 19.99839
#> [3,]    0  0.00000  0.00000  0.00000
```

See the vignette on [Residual checking with sdmTMB](https://pbs-assess.github.io/sdmTMB/articles/residual-checking.html),  [`?simulate.sdmTMB`](https://pbs-assess.github.io/sdmTMB/reference/simulate.sdmTMB.html), and [`?dharma_residuals`](https://pbs-assess.github.io/sdmTMB/reference/dharma_residuals.html) for more details.

### Sampling from the joint precision matrix

We can take samples from the implied parameter distribution assuming an MVN covariance matrix on the internal parameterization:

```{r plot-mvn}
samps <- gather_sims(fit, nsim = 1000)
ggplot(samps, aes(.value)) + geom_histogram() +
  facet_wrap(~.variable, scales = "free_x")
```

See [`?gather_sims`](https://pbs-assess.github.io/sdmTMB/reference/gather_sims.html) and [`?get_index_sims`](https://pbs-assess.github.io/sdmTMB/reference/get_index_sims.html) for more details.

### Calculating uncertainty on spatial predictions

The fastest way to get point-wise prediction uncertainty is to use the MVN samples:

```{r plot-pred-mvn}
p <- predict(fit, newdata = predictor_dat, nsim = 500)
predictor_dat$se <- apply(p, 1, sd)
ggplot(predictor_dat, aes(X, Y, fill = se)) +
  geom_raster() +
  scale_fill_viridis_c(option = "A") +
  coord_cartesian(expand = FALSE)
```

### Cross validation

sdmTMB has built-in functionality for cross-validation. If we were to set a `future::plan()`, the folds would be fit in parallel:

```{r cv, warning=FALSE}
mesh <- make_mesh(pcod, c("X", "Y"), cutoff = 10)
## Set parallel processing if desired:
# library(future)
# plan(multisession)
m_cv <- sdmTMB_cv(
  density ~ s(depth, k = 5),
  data = pcod, mesh = mesh,
  family = tweedie(link = "log"), k_folds = 2
)
# Sum of log likelihoods of left-out data:
m_cv$sum_loglik
```

See [`?sdmTMB_cv`](https://pbs-assess.github.io/sdmTMB/reference/sdmTMB_cv.html) for more details.

### Priors

Priors/penalties can be placed on most parameters. For example, here we place a PC (penalized complexity) prior on the Matérn random field parameters, a standard normal prior on the effect of depth, a Normal(0, 10^2) prior on the intercept, and a half-normal prior on the Tweedie dispersion parameter (`phi`):

```{r priors}
mesh <- make_mesh(pcod, c("X", "Y"), cutoff = 10)
fit <- sdmTMB(
  density ~ depth_scaled,
  data = pcod, mesh = mesh,
  family = tweedie(),
  priors = sdmTMBpriors(
    matern_s = pc_matern(range_gt = 10, sigma_lt = 5),
    b = normal(c(0, 0), c(1, 10)),
    phi = halfnormal(0, 15)
  )
)
```

We can visualize the PC Matérn prior:

```{r plot-pc-matern}
plot_pc_matern(range_gt = 10, sigma_lt = 5)
```

See [`?sdmTMBpriors`](https://pbs-assess.github.io/sdmTMB/reference/priors.html) for more details.

### Bayesian MCMC sampling with Stan

The fitted model can be passed to the tmbstan package to sample from the posterior with Stan. See the [Bayesian vignette](https://pbs-assess.github.io/sdmTMB/articles/bayesian.html).

### Turning off random fields

We can turn off the random fields for model comparison:

```{r no-rf, warning=FALSE, message=FALSE}
fit_sdmTMB <- sdmTMB(
  present ~ poly(depth_scaled, 2),
  data = pcod, mesh = mesh,
  spatial = "off",
  family = binomial()
)
fit_glm <- glm(
  present ~ poly(depth_scaled, 2),
  data = pcod,
  family = binomial()
)

tidy(fit_sdmTMB)
broom::tidy(fit_glm)
```

### Using a custom fmesher mesh

Defining a mesh directly with INLA:

```{r inla-mesh, warning=FALSE, fig.asp = 1, dpi = 40, out.width = "30%"}
bnd <- INLA::inla.nonconvex.hull(cbind(pcod$X, pcod$Y), convex = -0.1)
mesh_inla <- INLA::inla.mesh.2d(
  boundary = bnd,
  max.edge = c(25, 50)
)
mesh <- make_mesh(pcod, c("X", "Y"), mesh = mesh_inla)
plot(mesh)
```

```{r inla-mesh2, eval=FALSE}
fit <- sdmTMB(
  density ~ s(depth, k = 5),
  data = pcod, mesh = mesh,
  family = tweedie(link = "log")
)
```

### Barrier meshes

A barrier mesh limits correlation across barriers (e.g., land or water). See `add_barrier_mesh()` in [sdmTMBextra](https://github.com/pbs-assess/sdmTMBextra).

## Related software

sdmTMB is heavily inspired by the [VAST](https://github.com/James-Thorson-NOAA/VAST) and the [glmmTMB](https://github.com/glmmTMB/glmmTMB) R packages.

The newer [tinyVAST](https://github.com/vast-lib/tinyVAST) R package can fit many of the models that VAST and sdmTMB can with an interface similar to sdmTMB. Generally, we recommend tinyVAST for multivariate applications or for (dynamic) structural equation modelling with optional spatial and/or spatiotemporal components.

[INLA](https://www.r-inla.org/) and [inlabru](https://sites.google.com/inlabru.org/inlabru) can fit many of the same models as sdmTMB (and more) in an approximate Bayesian inference framework.

[mgcv](https://cran.r-project.org/package=mgcv) can fit similar SPDE-based Gaussian Markov random field models with code included in [Miller et al. (2019)](https://doi.org/10.1007/s13253-019-00377-z), but this will be slower for large spatial datasets.

A table in the [sdmTMB preprint](https://doi.org/10.1101/2022.03.24.485545) describes functionality and timing comparisons between sdmTMB, VAST, INLA/inlabru, and mgcv and the discussion makes suggestions about when you might choose one package over another.

Owner

  • Name: pbs-assess
  • Login: pbs-assess
  • Kind: organization

GitHub Events

Total
  • Create event: 24
  • Release event: 2
  • Issues event: 71
  • Watch event: 26
  • Delete event: 33
  • Issue comment event: 126
  • Push event: 250
  • Pull request review comment event: 9
  • Gollum event: 11
  • Pull request event: 29
  • Pull request review event: 7
  • Fork event: 4
Last Year
  • Create event: 24
  • Release event: 2
  • Issues event: 71
  • Watch event: 26
  • Delete event: 33
  • Issue comment event: 126
  • Push event: 250
  • Pull request review comment event: 9
  • Gollum event: 11
  • Pull request event: 29
  • Pull request review event: 7
  • Fork event: 4

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 2,590
  • Total Committers: 23
  • Avg Commits per committer: 112.609
  • Development Distribution Score (DDS): 0.17
Past Year
  • Commits: 306
  • Committers: 8
  • Avg Commits per committer: 38.25
  • Development Distribution Score (DDS): 0.219
Top Committers
Name Email Commits
Sean Anderson s****n@s****a 2,150
ericward-noaa e****d@n****v 196
ecophilina p****s@l****a 113
jindivero 8****o@u****m 40
Eric Ward 5****a@u****m 19
Sean Anderson s****n@u****m 18
Jillian Dunic 16
J Dunic j****c@g****m 11
Eric Ward e****d@u****m 6
Lewis-Barnett-NOAA 1****A@u****m 4
Jim Thorson J****n@g****m 3
Sebastian Pardo s****o@g****m 2
olivroy o****1@h****m 2
Ben Bolker b****r@g****m 1
Chris Grandin c****n@s****a 1
Elise Keppel e****l@d****a 1
Joseph Barss j****s@g****m 1
Lewis Barnett l****t@u****u 1
Lewis Barnett l****t@n****v 1
Watson J****n@d****a 1
francisvolh 4****h@u****m 1
joenomiddlename w****8@g****m 1
kellijohnson-NOAA k****n@n****v 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 192
  • Total pull requests: 73
  • Average time to close issues: 5 months
  • Average time to close pull requests: about 2 months
  • Total issue authors: 40
  • Total pull request authors: 12
  • Average comments per issue: 2.13
  • Average comments per pull request: 0.96
  • Merged pull requests: 55
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 38
  • Pull requests: 30
  • Average time to close issues: 13 days
  • Average time to close pull requests: 7 days
  • Issue authors: 16
  • Pull request authors: 5
  • Average comments per issue: 1.47
  • Average comments per pull request: 0.57
  • Merged pull requests: 23
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • seananderson (96)
  • ericward-noaa (22)
  • ecophilina (9)
  • maxlindmark (8)
  • Lewis-Barnett-NOAA (5)
  • sebpardo (4)
  • James-Thorson-NOAA (4)
  • fhui28 (3)
  • kellijohnson-NOAA (3)
  • seanhardison1 (3)
  • MikkoVihtakari (2)
  • gfmg (2)
  • matteba (2)
  • jindivero (2)
  • tom-peatman (2)
Pull Request Authors
  • ericward-noaa (44)
  • jdunic (5)
  • Lewis-Barnett-NOAA (4)
  • James-Thorson-NOAA (4)
  • seananderson (3)
  • sebpardo (3)
  • Joseph-Barss (2)
  • kellijohnson-NOAA (2)
  • bbolker (2)
  • olivroy (2)
  • francisvolh (1)
  • jindivero (1)
Top Labels
Issue Labels
enhancement (28) good first issue (6) bug (5) jss (4) help wanted (3)
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads:
    • cran 4,395 last-month
  • Total dependent packages: 1
    (may contain duplicates)
  • Total dependent repositories: 2
    (may contain duplicates)
  • Total versions: 31
  • Total maintainers: 1
proxy.golang.org: github.com/pbs-assess/sdmTMB
  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
proxy.golang.org: github.com/pbs-assess/sdmtmb
  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
cran.r-project.org: sdmTMB

Spatial and Spatiotemporal SPDE-Based GLMMs with 'TMB'

  • Versions: 11
  • Dependent Packages: 1
  • Dependent Repositories: 2
  • Downloads: 4,395 Last month
Rankings
Stargazers count: 3.1%
Forks count: 5.6%
Average: 14.7%
Downloads: 17.4%
Dependent repos count: 19.6%
Dependent packages count: 28.0%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/R-CMD-check-valgrind2.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
.github/workflows/R-CMD-check.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r 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
DESCRIPTION cran
  • R >= 3.5.0 depends
  • Matrix * imports
  • TMB >= 1.8.0 imports
  • assertthat * imports
  • cli * imports
  • clisymbols * imports
  • fishMod * imports
  • generics * imports
  • glmmTMB * imports
  • graphics * imports
  • lifecycle * imports
  • methods * imports
  • mgcv * imports
  • mvtnorm * imports
  • nlme * imports
  • rlang * imports
  • stats * imports
  • INLA * suggests
  • dplyr * suggests
  • effects >= 4.0 suggests
  • emmeans >= 1.4 suggests
  • estimability * suggests
  • future * suggests
  • future.apply * suggests
  • ggeffects * suggests
  • ggforce * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • lme4 * suggests
  • rgdal * suggests
  • rmarkdown * suggests
  • sf * suggests
  • splancs * suggests
  • testthat * suggests
  • tibble * suggests
  • visreg * suggests
.github/workflows/R-CMD-check-HTML5.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/rhub-manual.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
.github/workflows/rhub.yaml actions
  • actions/checkout v3 composite
  • r-hub/rhub2/actions/rhub-check v1 composite
  • r-hub/rhub2/actions/rhub-setup v1 composite
  • r-hub/rhub2/actions/rhub-setup-r v1 composite