truncate_vars: Truncating predictors to be in the in-sample range

View source: R/predict.R

truncate_varsR Documentation

Truncating predictors to be in the in-sample range

Description

Truncates predictors to be in the in-sample range to avoid spline extrapolation.

Usage

truncate_vars(range.object, data, cols.trunc)

Arguments

range.object

A matrix containing range of each predictor variable. Should be a matrix with two rows for min and max, and the columns should correspond to variables.

data

Out-of-sample data set of which variables should be truncated.

cols.trunc

Column names of the variables to be truncated.


smimodel documentation built on April 8, 2026, 5:06 p.m.