Learn R Programming

SDModels (version 1.0.10)

predict_individual_fj: Predictions of individual component functions for SDAM

Description

Predicts the contribution of an individual component j using a fitted SDAM.

Usage

predict_individual_fj(object, j, x = NULL)

Value

A vector of predictions for fj evaluated at Xjnew.

Arguments

object

Fitted object of class SDAM.

j

Which component to evaluate.

x

New numeric data to predict for.

Author

Cyrill Scheidegger

See Also

SDAM

Examples

Run this code
set.seed(1)
X <- matrix(rnorm(10 * 5), ncol = 5)
Y <- sin(X[, 1]) -  X[, 2] + rnorm(10)
model <- SDAM(x = X, y = Y, Q_type = "trim", trim_quantile = 0.5, nfold = 2, n_K = 1)
predict_individual_fj(model, j = 1, seq(-2, 2, length.out = 100))

Run the code above in your browser using DataLab