splinetree: Fit a (g)lmertree using spline-based partitioning.

View source: R/splinetree.R

splinetreeR Documentation

Fit a (g)lmertree using spline-based partitioning.

Description

splinetree is a wrapper for functions (g)lmertree to simplify fitting, visualizing and predicting spline-based trees.

Usage

splinetree(formula, data, family = "gaussian", ...)

Arguments

formula

A four-part function See Examples below, and lmertree or glmertree.

data

a data.frame containing the variable referred to in spline.

family

family specification for glmertree. See glm documentation for families.

...

additional arguments to be passed to function lmertree (default, i.e., family = "gaussian") or glmertree (family other than gaussian).

Value

A object of class"splinetree" and "lmertree" or "glmertree".

See Also

plot.splinetree predict.splinetree lmertree glmertree

Examples

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

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