The function computing the covariance matrices of the tensor regression parameters.
VAR_ALS(DATA, n_R, B1, B2, beta, family)A list.
V_B: A numerical matrix. Covariance matrix of the vectorized tensors' parameters.
V_b: A numerical matrix. Covariance matrix of the covariates' parameters.
A list. The input data. DATA$y is the dependent variable.
DATA$X is the 3-D tensor independent variables.
DATA$W is other independent variables.
A numerical constant. A predefined value determines the rank of the approximate matrix
A numerical matrix. Parameter matrix B1 of the tensor regression.
A numerical matrix. Parameter matrix B2 of the tensor regression.
A numerical vector. Parameter vector of the covariates, W.
Family of generalized linear model. Provide three options for model.(see more details in Details)