View source: R/HelperFunctions.R
knot_expand_list | R Documentation |
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.
knot_expand_list(partition_codes, partition_bounds, nr, mat, K)
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 |
List of length K+1
, each element containing the submatrix for that partition
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.