Page 1 of 1

Correction for Standard Error

Posted: Thu Jul 28, 2011 6:49 am
by mwu888
If I want to use a custom formulation for correcting standard error in using OLS regression, is this something I can accomplish in Eviews?

The formulation I have is in Matlab.

%compute standard errors
for indx = 1:N;
err=errv(:,indx);
inner = (x.*(err*ones(1,K)))'*(x.*(err*ones(1,K)))/T;

for jindx = (1:lags);
inneradd = (x(1:T-jindx,:).*(err(1:T-jindx)*ones(1,K)))'...
*(x(1+jindx:T,:).*(err(1+jindx:T)*ones(1,K)))/T;
inner = inner + (1-weight*jindx/(lags+1))*(inneradd + inneradd');
end;

Re: Correction for Standard Error

Posted: Thu Jul 28, 2011 7:43 am
by EViews Gareth
I'm not a Matlab expert, but it looks to me like it is just matrix algebra, which is something you should be able to compute using EViews' matrix language.

Re: Correction for Standard Error

Posted: Thu Jul 28, 2011 7:48 am
by startz
Alternatively, in EViews 7 you can send data and code to Matlab and use what you've already written.