splinefit: Automatic spline-based model selection

Description Usage Arguments Value

View source: R/splinefit.R

Description

Provides optimal number of internal knots and their locations in spline-based models.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
splinefit(
  x,
  y,
  nlimknot,
  lambda,
  delta,
  degree,
  bspline = TRUE,
  b.knots = NULL
)

Arguments

x

Vector of function arguments.

y

Vector of function values.

nlimknot

Maximum number of internal knots.

lambda

Tunning parameter of the penalized least squares estimation process.

delta

Minimal distance value between two consecutive knots.

degree

Degree of the spline basis.

bspline

External knots vector. Default is the (min(x),max(x)).

b.knots

Logical value. If TRUE, B-spline is fitted. Else, natural splines.

Value

A list with selected knots and fitted model.


Alexestat/splineSelection documentation built on Dec. 20, 2020, 5:16 a.m.