knot_expand_list {lgspline} | R 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 |
Value
List of length K+1
, each element containing the submatrix for that partition
[Package lgspline version 0.2.0 Index]