predict.splinetree: Predict method for spline-based (g)lmertrees.

View source: R/splinetree.R

predict.splinetreeR Documentation

Predict method for spline-based (g)lmertrees.

Description

predict.splinetree computes predictions for a fitted (g)lmertree that is based on splines.

Usage

## S3 method for class 'splinetree'
predict(object, newdata, ...)

Arguments

object

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

newdata

data.frame with observations for which predictions should be computed.

...

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

See Also

setup.spline predict.splinetree lmertree glmertree

Examples

st <- splinetree(Pn ~  ns(PAR, df = 5) | Specimen | Species, data = eco, 
               cluster = Specimen)
predict(st, newdata = eco[1L:5L, ])

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