Panel HAC robust covariance matrix
Assumes we have a panel of time series with consecutive, equal spaced time periods. Data is assumed to be in long format with time series of each individual stacked into one array. Panel can be unbalanced.
Parameters:  results : result instance
nlags : int or None
groupidx : list of tuple
weights_func : callable
use_correction : ‘cluster’ or ‘hac’ or False


Returns:  cov : ndarray, (k_vars, k_vars)

Notes
For nlags=0, this is just White covariance, cov_white. If kernel is uniform, weights_uniform, with nlags equal to the number of observations per unit in a balance panel, then cov_cluster and cov_hac_panel are identical.
Tested against STATA newey command with same defaults.
Options might change when other kernels besides Bartlett and uniform are available.