def weights_bartlett(nlags):
    #with lag zero, nlags is the highest lag included
    return 1 - np.arange(nlags+1)/(nlags+1.)

#------- examples, cases: hardcoded for d is time and two categorical groups
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/sandbox/panel/sandwich_covariance_generic.py/weights_bartlett/original