plot.gamlj | R Documentation |
This function re-estimates a GAMLj model adding a new plot. If no option is passed, extracts the plots present in the 'gamlj*Results' object. If one plot is present, it is returned as a ggplot2 object, if more than one is present, a list of plots is returned. FALSE is returned if no plot is present or defined.
## S3 method for class 'gamlj'
plot(x, formula = NULL, ...)
x |
a gamlj results object of the class 'gamlj' |
formula |
a right hand side formula specifying the effect to plot, of the form '~x', '~x*z' or '~x*z*w'. It has prevalence on other options defining a plot. |
... |
all options accepted by a gamlj model function.
Relevant for new plots are |
an object of class ggplot or a list of ggplot objects
Marcello Gallucci
data(qsport)
gmod<-GAMLj3::gamlj_lm(
formula = performance ~ hours,
data = qsport)
plot(gmod,plot_x = 'hours')
plot(gmod,formula=~hours)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.