View source: R/plot_smoothEffects.R
plot_1Dsmooth | R Documentation |
gam
modelsPlots 1D smooth effects for a GAM model fitted with gam
or bam
.
plot_1Dsmooth( model, plot_ci = TRUE, select, alpha = 0.05, ylim = NULL, method_expTransform = "simple", return_plotData = FALSE )
model |
GAM model fitted with |
plot_ci |
If |
select |
Index of smooth term to be plotted. |
alpha |
|
ylim |
Optional limits of the y-axis. |
method_expTransform |
One of |
return_plotData |
If TRUE, the dataset prepared for plotting is returned. Defaults to FALSE. |
If the model was estimated with a log or logit link, the function
automatically performs an exponential transformation of the effect,
see argument method_expTransform
.
ggplot object
Alexander Bauer alexander.bauer@stat.uni-muenchen.de
library(APCtools) library(mgcv) data(travel) model <- gam(mainTrip_distance ~ te(age, period) + residence_region + household_size + s(household_income), data = travel) plot_1Dsmooth(model, select = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.