<< nwest Single equation regressions ols >>

Grocer >> Single equation regressions > nwest1

nwest1

Estimation with Newey-West correction on standard errors

CALLING SEQUENCE

[rnwest1]=nwest1(namey,varargin)

PARAMETERS

Input

* y = a (nobsx1) vector of an endogenous variable

* x = a (nobs x k) matrix of exogenous variables

* win = a scalar, the length of the Barlett window (optional; default: floor(5*size(y,1)^0.25))

 

Output

* rnwest1 = a results tlist with

  - rnwest1('meth') = 'Newey-West''s'

  - rnwest1('y') = y data vector

  - rnwest1('x') = x data matrix

  - rnwest1('nobs') = # observations

  - rnwest1('nvar') = # variables

  - rnwest1('beta') = bhat

  - rnwest1('yhat') = yhat

  - rnwest1('resid') = residuals

  - rnwest1('vcovar') = estimated variance-covariance matrix of beta

  - rnwest1('sige') = estimated variance of the residuals

  - rnwest1('sigu') = sum of squared residuals

  - rnwest1('ser') = standard error of the regression

  - rnwest1('tstat') = t-stats

  - rnwest1('pvalue') = pvalue of the betas

  - rnwest1('dw') = Durbin-Watson Statistic

  - rnwest1('condindex') = multicolinearity cond index

  - rnwest1('prescte') = boolean indicating the presence or absence of a constant in the regression

  - rnwest1('rsqr') = rsquared

  - rnwest1('rbar') = rbar-squared

  - rnwest1('f') = F-stat for the nullity of coefficients other than the constant

  - rnwest1('pvaluef') = its significance level

DESCRIPTION

Computes Newey-West's adjusted heteroscedastic and autocorrelation consistent (HAC) Least-squares Regression. Is a little bit more quick than nwest but works only with matrices.

EXAMPLE

load(GROCERDIR+'/data/bdhenderic.dat');
bounds('1964q3','1989q2');
rols=ols('del(lm1-lp)','del(lp)','del(lagts(1,lm1-lp-ly))','rnet', 'lagts(1,lm1-lp-ly)', 'const');
//performs ols for Hendry and Ericsson (1991) equation 6
r = nwest1(rols('y',rols('x'),8)
 
// Applies the Newet-west correction to Hendry and Ericsson regression with a Barlett Window with a length of 8.

AUTHOR

Emmanuel Michaux 2004

Report an issue
<< nwest Single equation regressions ols >>