Skip to content

Possible issue with visreg and extra_time #330

Answered by seananderson
Nathan-Hebert asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry for another extra-time bug. This time, however, I think I've already fixed it as part of a recent overhaul. Can you try updating sdmTMB and seeing if this works for you? I'm using version 0.4.3.9008.

library(sdmTMB)
  pcod$fyear <- as.factor(pcod$year)
  mesh <- make_mesh(pcod, c("X", "Y"), cutoff = 20)
  fit <- sdmTMB(
    density ~ fyear, 
    time = "year", 
    spatiotemporal = "iid",
    data = pcod,
    mesh = mesh,
    family = tweedie(), 
    extra_time = 2012
  )
  visreg::visreg(fit, "fyear")

Created on 2024-03-27 with reprex v2.1.0

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Nathan-Hebert
Comment options

Answer selected by Nathan-Hebert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants