Regression Equations, Generalized Least Squares, Correlation Matrices, Python, Statsmodels.
e_t a column vector of size [1 x M]. e’_t is a row vector of size [1 x M] (Image by Author) The matrix multiplication of e_t and e’_t yields a square matrix of size [M x M]. The formula for S is as follows: Calculation of S as the matrix product of transpose of the residuals Dataframe with itself