build_design(Y, X = NULL, lag = 1, showWarnings = TRUE)
Arguments
Y
Response 3-mode array.
X
Optional 4-mode array of covariates, defaults to no covariates.
lag
Optional numeric specifying autoregressive lag in model, defaults to 1.
showWarnings
Optional logical whether matrix memory size should be evaluated and warning provided (see details), defaults to TRUE.
Value
A sparse design matrix
Details
This function takes an \(S \times L \times T\) array \(Y\) that is a representation of a longitudinal bipartite relational data set.
Optional input is an \(S \times L \times T \times p\) array \(X\) of covariates that influence the evolution of the data set in equation over time.
The function returns an \((SL(T - lag)) \times (S^2 + L^2 + p)\) design matrix, of sparse class, upon which Y[,,lag:T] may be regressed.
If showWarnings = TRUE, and if the estimated size of the design matrix is greater than 1GB, a warning is thrown.