Skip to content

Commit

Permalink
Bump version on merge of gengamma
Browse files Browse the repository at this point in the history
  • Loading branch information
seananderson committed Mar 19, 2024
1 parent c3c7a15 commit 7f6ad12
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: sdmTMB
Title: Spatial and Spatiotemporal SPDE-Based GLMMs with 'TMB'
Version: 0.4.2.9002
Version: 0.4.2.9003
Authors@R: c(
person(c("Sean", "C."), "Anderson", , "[email protected]",
role = c("aut", "cre"),
Expand Down
5 changes: 3 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# sdmTMB (development version)

* Add the generalized gamma distribution (thanks to J. Thorson).
See `gengamma()`. #286
* Add the generalized gamma distribution (thanks to J.T. Thorson with additional
work by J.C. Dunic.) See `gengamma()`. This distribution is still in a testing
phase and is not recommended for applied use yet. #286

* Fix bug in `get_cog(..., format = "wide")` where the time column was
hardcoded to `"year"` by accident.
Expand Down
11 changes: 8 additions & 3 deletions tests/testthat/test-3-families.R
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ test_that("Binomial simulation/residuals works with weights argument or cbind()"
})

test_that("Generalized gamma works", {
skip_on_cran()
skip_on_ci()
d <- subset(pcod_2011, density > 0)
fit1 <- sdmTMB(
density ~ 1 + depth_scaled,
Expand Down Expand Up @@ -477,6 +479,9 @@ test_that("Generalized gamma works", {


test_that("Generalized gamma matches Gamma when Q = sigma", {
skip_on_cran()
skip_on_ci()

# Generate values drawn from generaliased gamma distribution given the mean of those values
rgengamma <- function(n, mean, sigma, Q) {
# Get mu from mean
Expand Down Expand Up @@ -523,14 +528,14 @@ test_that("Generalized gamma matches Gamma when Q = sigma", {
fit1 <- sdmTMB(
y ~ x,
data = d,
spatial = "off",
spatial = "off",
family = gengamma(link = "log")
)

fit2 <- sdmTMB(
y ~ x,
data = d,
spatial = "off",
spatial = "off",
family = Gamma(link = "log")
)

Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-delta.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ test_that("Anisotropy with delta model", {

test_that("Delta-Gengamma family fits", {
skip_on_cran()
skip_on_ci()

fit_dgg <- sdmTMB(density ~ 1,
data = pcod, mesh = pcod_spde,
Expand Down Expand Up @@ -237,4 +238,4 @@ test_that("delta_gengamma() Poisson-link family fits", {
fit_pgg$sd_report
s <- as.list(fit_pgg$sd_report, "Std. Error")
expect_true(sum(is.na(s$b_j)) == 0L)
})
})

0 comments on commit 7f6ad12

Please sign in to comment.