generalized least squares matlab code
= response_vector; % Response vector ``` Step 2: Specify or Estimate \(\boldsymbol{\Omega}\) If the covariance structure is known (e.g., autocorrelation or heteroscedasticity pattern), define \(\boldsymbol{\Omega}\). If unknown, estimate it using residuals