BSplineBasis: Finds the Transformation Matrix for the B-spline Basis

Description Usage Arguments Value Examples

View source: R/basis.R

Description

Uses the package fda to find a transformation matrix where each column is a basis function from the B-spline basis, evaluated at specified points along the rows of the matrix.

Usage

1
BSplineBasis(tlist, N, train = NULL)

Arguments

tlist

an array of the specific points where the basis functions are evaluated at.

N

number of basis functions in the matrix.

train

indices corresponding to which rows of the matrix to keep. Default is to keep all rows.

Value

A P x N discrete Fourier transformation matrix where P is equal to the length of train and N is the number of basis. If train is NULL then P equals the length of tlist.

Examples

1
2
3
4
5
6
7
8
# Points to evaluate the basis functions at
points <- c(0,1,2,3,4)
# Find first 8 B-spline basis functions evaluted at "points"
b <- BSplineBasis(points, 8)

# Find first 8 B-spline basis functions evaluated at "points" but only keep
# last two rows
b <- BSplineBasis(points, 8, train = c(4,5))

bcs documentation built on May 29, 2017, 11:58 a.m.