sdmTMB
sdmTMB copied to clipboard
:earth_americas: An R package for spatial and spatiotemporal GLMMs with TMB
Specifically thinking about spatial and spatial residuals and updating plots in `vista`. Will work on this soon. Could be standalone or folded into other vignettes
Moving discussion here to its own thread. - `ggeffects::ggeffect()` (marginal effects based on the fixed effect covariance matrix, doesn't work for splines or breakpoints) was already working in the 'dev'...
Will have to be outside the usual testthat folder (for now in a folder in `inst`?) or skipped in all but local runs, which might be ideal assuming it doesn't...
In cases where newdata is the same for all time slices and is large, it would save memory and speed (faster MakeADFun call) if newdata didn't have to be expanded...
even when type = "link"
Base it off of @ericward-noaa 's example: https://pbs-assess.github.io/sdmTMB-teaching/noaa-psaw-2022/06-presence-only.html#1 https://github.com/pbs-assess/sdmTMB-teaching/blob/main/noaa-psaw-2022/06-presence-only.Rmd
Inspiration in VAST: https://github.com/James-Thorson-NOAA/VAST/blob/7a9a3f7b84227fb41ab027ea3312df13c2035ff6/R/project_model.R Can probably build this off `sdmTMB_simulate()`. Requires extending the parameter object and re-running MakeADFun, then simulate. Faster than if done during fitting with `extra_time`.
Probably needs a prediction helper function to pass the posterior samples through the `obj$report()` function as is done in the predict function for the joint precision matrix simulation. Should also...