mspline_constant_coefs: Determine M-spline basis coefficients which give a constant...

View source: R/mspline_init.R

mspline_constant_coefsR Documentation

Determine M-spline basis coefficients which give a constant function.

Description

This works by obtaining the coefficients of the corresponding B-spline basis, which are equal if the B-spline is a constant function.

Usage

mspline_constant_coefs(mspline, logit = FALSE)

Arguments

mspline

A list with components knots (vector of knots), degree (polynomial degree) and bsmooth (logical for smoothness constraint at boundary), defining an M-spline configuration.

logit

If TRUE then the multinomial logit transform of the coefficients is returned. This is a vector of length one less than the number of coefficients, with the rth element defined by log(coefs[r+1] / coefs[1]).

Value

A numeric vector of the coefficients.

References

Ramsay, J. O. (1988). Monotone regression splines in action. Statistical Science, 3(4): 425-441.


survextrap documentation built on June 10, 2025, 5:11 p.m.