Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coef() to work with delta models #351

Closed
ericward-noaa opened this issue Jun 14, 2024 · 1 comment
Closed

Fix coef() to work with delta models #351

ericward-noaa opened this issue Jun 14, 2024 · 1 comment

Comments

@ericward-noaa
Copy link
Collaborator

I think the solution here is just modifying coef()to take model as an argument

library(dplyr)
library(tidyr)
library(sdmTMB)

set.seed(1)

# Build a mesh to implement the SPDE approach:
mesh <- make_mesh(pcod_2011, c("X", "Y"), cutoff = 20)

# Quick mesh plot:
plot(mesh)

# Fit a Tweedie spatial random field GLMM with a smoother for depth:
fit <- sdmTMB(
  density ~ s(depth),
  data = pcod_2011, mesh = mesh,
  family = delta_gamma()
)

coef(fit)
#> (Intercept) 
#>  -0.7903428

Created on 2024-06-14 with reprex v2.1.0

@seananderson
Copy link
Member

This is done now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants