plot_gam_predict {grafify} | R Documentation |
Plot prediction of gam
model
Description
Plot prediction of gam
model
Usage
plot_gam_predict(
Model,
xcol,
ycol,
ByFactor,
symsize = 1,
s_alpha = 0.1,
smooth_alpha = 0.7,
linethick,
fontsize = 20,
...
)
Arguments
Model |
a generalised additive model ( |
xcol |
the smooth in the |
ycol |
the dependent variable in |
ByFactor |
the |
symsize |
size of symbols (default = 1) |
s_alpha |
opacity of symbols (default = 0.1) |
smooth_alpha |
opacity of the predicted CI interval (default = 0.7) |
linethick |
thickness of symbol lines (default = fontsize/22) |
fontsize |
base font size for graph |
... |
additional arguments to pass to |
Value
This function returns a ggplot2
object of class "gg" and "ggplot".
Examples
#fit zooplankton data
z1 <- ga_model(data = data_zooplankton,
Y_value = "log(density_adj)",
Fixed_Factor = "taxon",
Smooth_Factor = "day")
#plot fitted data
plot_gam_predict(Model = z1,
xcol = day,
ycol = `log(density_adj)`,
ByFactor = taxon)
[Package grafify version 4.0.1 Index]