
Build AR(2) covariate list from a list of response matrices
Source:R/func_gen_data.R
gen_F_ls_AR2.RdConstructs the time-varying covariate list \(F_t\) for a second-order autoregressive model by column-binding the two most recent lags: \(F_t = [Y_{t-2}, Y_{t-1}]\). A lag that does not exist yet is replaced by a matrix of ones (a per-site intercept): \(F_1 = [1, 1]\) and \(F_2 = [1, Y_1]\). The design is causal and deterministic. (Versions up to 1.1.1 used \(Y_1\) plus random noise at \(t = 1\), and the future value \(Y_3\) at \(t = 2\).)