knotfixfit: Knots locations selection

Description Usage Arguments Value

View source: R/knotfixfit.R

Description

Provides internal knots locations in spline-based models for a fixed number of knots.

Usage

1
2
3
4
5
6
7
8
9
knotfixfit(
  x,
  y,
  nknots,
  delta,
  degree,
  b.knots = c(min(x), max(x)),
  bspline = TRUE
)

Arguments

x

Vector of function arguments.

y

Vector of function values.

nknots

Number of internal knots.

delta

Minimal distance value between two consecutive knots.

degree

Degree of the spline basis.

b.knots

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

bspline

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

Value

A list with selected internal knots, mean square error and fitted model.


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