plot.splinetree: Plotting function for visualization of spline-based...

View source: R/splinetree.R

plot.splinetreeR Documentation

Plotting function for visualization of spline-based (g)lmertrees.

Description

plot.splinetree takes a fitted (g)lmertree with splines and plots it. It is a wrapper for plot.glmertree and plot.lmertree, with critical adjustments for better visualization of spline models in the terminal nodes.

Usage

## S3 method for class 'splinetree'
plot(x, which = "all", fitted = "marginal", ...)

Arguments

x

fitted object of class (g)lmertree containing splines specified by setup.spline in the terminal node model.

which

character, "both", "tree" or "ranef". Other options are available, see plot.glmertree and plot.lmertree, but might be less helpful for spline models.

fitted

character, "marginal" (default), "combined" or "none". Specifies whether and how fitted values should be computed and visualized. See plot.lmertree or plot.glmertree for further detail.

...

additional arguments to be passed to plot.lmertree or plot.glmertree.

See Also

setup.spline predict.splinetree plot.lmertree plot.glmertree

Examples

st <- splinetree(Pn ~ ns(PAR, df = 5) | Specimen | Species, data = eco, 
               cluster = Specimen)
plot(st)

marjoleinF/gamtree documentation built on July 3, 2024, 9:18 a.m.