Possible issue with visreg and extra_time #330
-
Currently using sdmTMB_0.4.2.9003. Reproducible example: _ pcod$fyear <- as.factor(pcod$year) Error in data.frame(xy[[j]]$x$D, visregRes = xy[[j]]$y$r, visregPos = xy[[j]]$y$pos) : |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I'm thinking this is connected to the "fake" rows added with extra_time. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
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.
Created on 2024-03-27 with reprex v2.1.0