equiknots: Determine the knot sequence.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/equiknots.R

Description

Determines g+2k+2 knots for the spline basis of degree k on the interval [a,b]. The g inner knots lie equidistant in [a,b]. If coinc=TRUE, the outer knots (k on each side of the interval) are placed coincident with a and b, otherwise the outer knots are also equidistant beyond [a,b].

Usage

1
equiknots(a, b, g, k, coinc)

Arguments

a

Left numeric boundary of the spline interval.

b

Right numeric boundary of the spline interval.

g

A non-negative integer giving the number of inner knots.

k

A non-negative integer specifying the degree of the spline basis.

coinc

Logical indicating, if the outer knots should be coincident with the boundary knots or not. If coinc=TRUE, there are k coincident outer knots at a as well as at b.

Value

A numeric vector of length g+2k+2 with knot locations.

Author(s)

Claudia Koellmann

See Also

unimat, unireg

Examples

1
2
equiknots(0,5,3,3,TRUE)
equiknots(0,5,3,3,FALSE)

Example output

 [1] 0.00 0.00 0.00 0.00 1.25 2.50 3.75 5.00 5.00 5.00 5.00
 [1] -3.75 -2.50 -1.25  0.00  1.25  2.50  3.75  5.00  6.25  7.50  8.75

uniReg documentation built on May 29, 2017, 8:30 p.m.