plot_smooth | R Documentation |
Deprecated: use visreg::visreg()
. See visreg_delta()
for examples.
plot_smooth(
object,
select = 1,
n = 100,
level = 0.95,
ggplot = FALSE,
rug = TRUE,
return_data = FALSE
)
object |
An |
select |
The smoother term to plot. |
n |
The number of equally spaced points to evaluate the smoother along. |
level |
The confidence level. |
ggplot |
Logical: use the ggplot2 package? |
rug |
Logical: add rug lines along the lower axis? |
return_data |
Logical: return the predicted data instead of making a plot? |
Note:
Any numeric predictor is set to its mean
Any factor predictor is set to its first-level value
The time element (if present) is set to its minimum value
The x and y coordinates are set to their mean values
A plot of a smoother term.
d <- subset(pcod, year >= 2000 & density > 0)
pcod_spde <- make_mesh(d, c("X", "Y"), cutoff = 30)
m <- sdmTMB(
data = d,
formula = log(density) ~ s(depth_scaled) + s(year, k = 5),
mesh = pcod_spde
)
plot_smooth(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.