iknots: Estimate internal knot positions equalizing jumps in n-th...

iknotsR Documentation

Estimate internal knot positions equalizing jumps in n-th derivative

Description

Normalized total variation of n-th finite differences is calculated for each column in y then averaged. These averaged values are fitted by a linear spline to find knot positions that equalize the jumps of n-th derivative.
NB. This function is used internally in (fit)smbsp() and a priori has no interest to be called directly by user.

Usage

iknots(x, y, nki = 1L, n = 3L, lenfit = 12L)

Arguments

x

Numeric vector

y

Numeric vector or matrix

nki

Integer scalar, number of internal knots to estimate (1 by default)

n

Integer scalar, polynomial order of B-spline (3 by default)

lenfit

Integer scalar, length of knots for linear spline to fit the total variation)

Value

Numeric vector, estimated knot positions


MathsCell/bspline documentation built on Feb. 18, 2025, 12:40 p.m.