local_poly_helper: Constructing and evaluating the local O-spline basis (design...

View source: R/functions.R

local_poly_helperR Documentation

Constructing and evaluating the local O-spline basis (design matrix)

Description

Constructing and evaluating the local O-spline basis (design matrix)

Usage

local_poly_helper(knots, refined_x, p = 2)

Arguments

knots

A vector of knots used to construct the O-spline basis, first knot should be viewed as "0", the reference starting location. These k knots will define (k-1) basis function in total.

refined_x

A vector of locations to evaluate the O-spline basis

p

An integer value indicates the order of smoothness

Value

A matrix with i,j component being the value of jth basis function value at ith element of refined_x, the ncol should equal to number of knots minus 1, and nrow should equal to the number of elements in refined_x.

Examples

local_poly(knots = c(0, 0.2, 0.4, 0.6, 0.8), refined_x = seq(0, 0.8, by = 0.1), p = 2)

AgueroZZ/OSplines documentation built on Sept. 17, 2023, 9:24 a.m.