build_B_spline_basis: Construct B-spline basis

View source: R/pclm_fit.R

build_B_spline_basisR Documentation

Construct B-spline basis

Description

This is an internal function which constructs B-spline basis to be used in pclm estimation

Usage

build_B_spline_basis(X, Y, kr, deg, diff, type)

Arguments

X

vector with ages

Y

vector with years

kr

Knot ratio. Number of internal intervals used for defining 1 knot in B-spline basis construction. See MortSmooth_bbase. Default 2 in control.pclm and 7 in control.pclm2D. In the two-dimensional model kr applies to both axes, so it must not exceed the length of the shorter one: a panel of fewer than kr years has no internal knot and is rejected.

deg

Degree of the splines needed to create equally-spaced B-splines basis over an abscissa of data. Default: 3, a cubic spline. Must be an integer of at least 2.

diff

An integer indicating the order of differences of the components of PCLM coefficients. Default value: 2.

type

Type of PCLM model. Options: "1D", "2D" for univariate and two-dimensional model respectively.

See Also

MortSmooth_bbase


ungroup documentation built on Oct. 3, 2026, 5:06 p.m.