se: Standard error of the fit

seR Documentation

Standard error of the fit

Description

Computes standard errors of the fit for newdata from the fitted model, after applying the model's stored preprocessing.

Usage

se(x, newdata, ...)

Arguments

x

Supervised object.

newdata

tabular data: Features to compute standard errors for.

...

Additional arguments passed to methods.

Details

Available for GLM and GAM, which report the standard error of the linear predictor, for BART, which reports the posterior standard deviation of the mean function, and for LINADForest, which reports the infinitesimal jackknife estimate. A multiclass GAM and every other algorithm return NULL.

Value

Numeric vector of standard errors, one per case, or NULL when the algorithm reports none.

Author(s)

EDG

Examples

x <- data.frame(age = rnorm(100), bmi = rnorm(100))
x[["y"]] <- x[["age"]] * 2 + rnorm(100, sd = 0.3)
mod <- train(x, hyperparameters = setup_GLM(), verbosity = 0L)
se(mod, features(x)[1:5, ])

rtemis documentation built on Oct. 20, 2026, 1:06 a.m.