Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

predict.bruto

Predict method for BRUTO Objects


Description

Predicted values based on ‘bruto’ additive spline models which are fit by adaptive backfitting.

Usage

## S3 method for class 'bruto'
predict(object, newdata, type=c("fitted", "terms"), ...)

Arguments

object

a fitted bruto object

newdata

values at which predictions are to be made.

type

if type is "fitted", the fitted values are returned. If type is "terms", a list of fitted terms is returned, each with an x and y component. These can be used to show the fitted functions.

...

further arguments to be passed to or from methods.

Value

Either a fit matrix or a list of fitted terms.

See Also

Examples

data(trees)
fit1 <- bruto(trees[,-3], trees[3])
fitted.terms <- predict(fit1, as.matrix(trees[,-3]), type = "terms")
par(mfrow=c(1,2), pty="s")
for(tt in fitted.terms) plot(tt, type="l")

mda

Mixture and Flexible Discriminant Analysis

v0.5-2
GPL-2
Authors
S original by Trevor Hastie & Robert Tibshirani. Original R port by Friedrich Leisch, Kurt Hornik and Brian D. Ripley. Balasubramanian Narasimhan has contributed to the upgrading of the code.
Initial release
2020-06-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.