knot_expand_list: Expand Matrix into Partition Lists Based on Knot Boundaries

View source: R/HelperFunctions.R

knot_expand_listR Documentation

Expand Matrix into Partition Lists Based on Knot Boundaries

Description

Takes an input N \times p matrix of polynomial expansions and outputs a list of length K+1, isolating the rows of the input corresponding to assigned partition.

Usage

knot_expand_list(partition_codes, partition_bounds, nr, mat, K)

Arguments

partition_codes

Numeric vector; values determining partition assignment for each row

partition_bounds

Numeric vector; ordered knot locations defining partition boundaries

nr

Integer; number of rows in input matrix

mat

Numeric matrix; data to be partitioned

K

Integer; number of interior knots (resulting in K+1 partitions)

Value

List of length K+1, each element containing the submatrix for that partition


lgspline documentation built on June 8, 2025, 10:45 a.m.