Skip to content

sdmTMB and ggeffects #203

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

You must be logged in to vote

ggeffects::ggeffect() works with sdmTMB but currently only for non-smoother terms. There's a vignette here. I have ggeffects::ggpredict() working locally, but it will require me submitting a pull request to the ggeffects package first before it will work for others.

In the meantime, you can:

  • Use ggeffects::ggeffect() for non-smoother terms. See the vignette.
  • Use the visreg package for smoother or non-smoother terms. See the vignette.
  • Predict across a sequence of your predictor variable while holding the other variables at some constant value (which is what visreg or ggpredict are doing for you). As an example, look for "Visualizing a marginal effect" in the examples within predict.sdmTMB().

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by seananderson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant