# Seemingly Unrelated Regressions (SUR) with equivalent of the White or Newey-West covariance matrix?

5 views (last 30 days)
Ilona Mostipan on 5 Jun 2016
Edited: Ilona Mostipan on 12 Jun 2016
From http://www.mathworks.com/examples/econometrics/mw/econ-ex83533901-implement-seemingly-unrelated-regression-analyses: "SUR accommodates intra-period innovation heteroscedasticity and correlation, but inter-period innovation independence and homoscedasticity".
I would like to estimate an SUR system which is also robust to heteroscedasticity and serial correlation within each panel, i.e. inter-period. How can I incorporate the White or better yet Newey-West covariance matrix for SUR in Matlab?
So far I have followed http://www.mathworks.com/examples/econometrics/mw/econ-ex83533901-implement-seemingly-unrelated-regression-analyses#9 and have a working multivariate time series model where all predictors are used for each response series.
Setting:
%n is the Number of response series
%k is the Number of exogenous series
%T = time series dimension
%Y is a Txn matrix
%X is a Txk matrix
n=3
T=100
k=4
X = randn(100,k)
Y = randn(100,n)
%sample code for SUR in MATLAB based on the link above:
ExpandX = kron(X,eye(n));
nk = size(ExpandX,2); % Number of regression variables
CellX = mat2cell(ExpandX,n*ones(T,1));
Mdl1 = vgxset('n',n,'nX',nk,'Constant',true);
[Mdl1_Est,Mdl1_SE,~,Mdl1_W] = vgxvarx(Mdl1,Y,CellX);
vgxdisp(Mdl1_Est,Mdl1_SE)
Thanks in advance for any help with getting White or HAC-style standard errors in SUR.

Hang Qian on 10 Jun 2016
Hi Ilona,
Suppose that we have a SUR with n equations and T periods.
First, estimate a SUR system using the function VGXVARX(...), which returns both estimated coefficients and the n-by-n intra-period covariance matrix S. It should be a consistent estimator even if the inter-period correlations are not addressed in this step.
Second, transform the data: multiply both y and X by chol(inv(S)). The transformed data do not have intra-period correlations any more.
Third, pool the transformed y and X as if they were stacked as a single-equation with n*T observations, and call the function hac(...), which returns White and Newey-West standard errors. It helps to fight inter-period heteroscedasticity and serial correlation.
Regards,
Hang Qian
Ilona Mostipan on 12 Jun 2016
Thank you Hang Qian.
As you suggested, in the first step, I used the n by n innovations covariance matrix as the S.
After the second step, I obtained transformed data: y as T by n matrix, X as a n*T by n*K matrix, where K is the number of exogenous explanatory variables in my SUR. I notice that the transformed X has a lower triangular sub structure, whereas the original X was diagonal in sub structure.
This is where I get stuck implementing the third step of pooling the transformed data to call hac(...). How can I stack the data as a single-equation given my dimensions for y and X?