Learn R Programming

metagam (version 0.2.0)

plot_dominance: Dominance plot

Description

Plots the (relative) contribution of the individual GAMs to each data point on a given axis. It shows whether and how parts of the axis are dominated by certain individual GAMs.

Usage

plot_dominance(x, axis = NULL, term = NULL, relative = TRUE, width = NULL)

Arguments

x

Object returned by metagam.

axis

Character specifying which variable to plot. Defaults to NULL; if x was fitted with a single term, the explanatory variable corresponding to this term is selected.

term

Character specifying which smooth term to plot. Default to NULL; if x was fitted with a single term, this one is taken.

relative

Logical specifying whether to have relative or absolute scales. Defaults to TRUE.

width

Width of bars. Default to NULL, which means it is automatically determined based on the minimum grid spacing in x.

Value

A ggplot object.

Examples

Run this code
# NOT RUN {
# See the vignette, either at https://lifebrain.github.io/metagam/articles/articles/dominance.html
# or by typing the following in the console:
# vignette("Dominance")


# }

Run the code above in your browser using DataLab