nwest1 — Estimation with Newey-West correction on standard errors
[rnwest1]=nwest1(namey,varargin)
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))
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
1) r = nwest1(y,x,8) 2) rnwest=nwest1(grocer_y,grocer_x,grocer_win) Example 1 applies the Newet-west correction to the regression of y on x with a Barlett Window with a length of 8. Example 2, taken from nwest1_d, applies the Newet-west correction to the Hendry and Ericsson (1991) preferred specification from which the variable 'del(lagts(1,lm1-lp-ly))' has been withdrawn.