The HAC option in the MODEL statement selects the type of heteroscedasticity and autocorrelationconsistent covariance matrix. As with the HCCME option, an estimator of the middle expression in sandwich form is needed. With the HAC option, it is estimated as

, where is the realvalued kernel function^{[2]}, is the bandwidth parameter, and is the adjustment factor of small sample degrees of freedom (that is, if the ADJUSTDF option is not specified and otherwise , where is the number of parameters including dummy variables). The types of kernel functions are listed in Table 20.1.
Table 20.1: Kernel Functions
Kernel Name 
Equation 

Bartlett 

Parzen 

Quadratic spectral 

Truncated 

TukeyHanning 

When the BANDWIDTH=ANDREWS option is specified, the bandwidth parameter is estimated as shown in Table 20.2.
Table 20.2: Bandwidth Parameter Estimation
Kernel Name 
Bandwidth Parameter 

Bartlett 

Parzen 

Quadratic spectral 

Truncated 

TukeyHanning 

Let denote each series in , and let denote the corresponding estimates of the autoregressive and innovation variance parameters of the AR(1) model on , , where the AR(1) model is parameterized as with . The and are estimated with the following formulas:

When you specify BANDWIDTH=NEWEYWEST94, according to Newey and West(1994) the bandwidth parameter is estimated as shown in Table 20.3.
Table 20.3: Bandwidth Parameter Estimation
Kernel Name 
Bandwidth Parameter 

Bartlett 

Parzen 

Quadratic spectral 

Truncated 

TukeyHanning 

The and are estimated with the following formulas:

where is the lag selection parameter and is determined by kernels, as listed in Table 20.4.
Table 20.4: Lag Selection Parameter Estimation
Kernel Name 
Lag Selection Parameter 

Bartlett 

Parzen 

Quadratic Spectral 

Truncated 

TukeyHanning 

The in Table 20.4 is specified by the C= option; by default, C=12.
The is estimated with the equation

where is the same as in the Andrews method and is 1 if the NOINT option in the MODEL statement is specified, and 2 otherwise.
When you specify BANDWIDTH=SAMPLESIZE, the bandwidth parameter is estimated with the equation

where is the sample size, is the largest integer less than or equal to , and , , and are values specified by BANDWIDTH=SAMPLESIZE(GAMMA=, RATE=, CONSTANT=) options, respectively.
If the PREWHITENING option is specified in the MODEL statement, is prewhitened by the VAR(1) model,

Then is calculated by
