jnplot.RdThis function re-estimates a GAMLj model adding a Johnson-Nayman plot, if not available already. If no option is passed, extracts the plots present in the `gamlj*Results` object. If JN 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.
jnplot(x, formula = NULL, ...)a gamlj results object of the class `gamlj`
a right hand side formula specifying the effect to plot, of the form `~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 plot_x, plot_z and plot_by
an object of class ggplot or a list of ggplot objects
data(qsport)
gmod <- GAMLj3::gamlj_lm(
formula = performance ~ hours,
data = qsport
)
plot(gmod, plot_x = "hours")
#> Warning: The `size` argument of `element_line()` is deprecated as of ggplot2 3.4.0.
#> ℹ Please use the `linewidth` argument instead.
#> ℹ The deprecated feature was likely used in the jmvcore package.
#> Please report the issue at <https://github.com/jamovi/jmvcore/issues>.
plot(gmod, formula = ~hours)
#> [[1]]
#>