R/nmfkc.R
nmfkc.ar.Rdnmfkc.ar generates the observation matrix and covariate matrix
corresponding to a specified autoregressive lag order.
If the input Y is a ts object, its time properties are preserved
in the "tsp_info" attribute, adjusted for the lag.
Additionally, the column names of Y and A are set to the corresponding time points.
nmfkc.ar(Y, degree = 1, intercept = TRUE)An observation matrix (P x N) or a ts object.
If Y is a ts object (typically N x P), it is automatically transposed to match the (P x N) format.
The lag order of the autoregressive model. The default is 1.
Logical. If TRUE (default), an intercept term is added to the covariate matrix.
A list containing:
Observation matrix (P x N_A) used for NMF. Includes adjusted "tsp_info" attribute and time-based column names.
Covariate matrix (R x N_A) constructed according to the specified lag order. Includes adjusted "tsp_info" attribute and time-based column names.
Index matrix used to generate A.
Maximum lag order.