piecewise_constant: Piecewise constant fit.

piecewise_constantR Documentation

Piecewise constant fit.

Description

vtreat custom coder based on RcppDynProg::solve_for_partition().

Usage

piecewise_constant(varName, x, y, w = NULL)

Arguments

varName

character, name of variable to work on.

x

numeric, input values.

y

numeric, values to estimate.

w

numeric, weights.

Examples


piecewise_constant("x", 1:8, c(-1, -1, -1, -1, 1, 1, 1, 1))


RcppDynProg documentation built on Aug. 20, 2023, 9:07 a.m.