6.6.5.1.6. statsmodels.sandbox.panel.sandwich_covariance_generic.kernel

statsmodels.sandbox.panel.sandwich_covariance_generic.kernel(d1, d2, r=None, weights=None)[source]

general product kernel

hardcoded split for the example:
cat1 is continuous (time), other categories are discrete

weights is e.g. Bartlett for cat1 r is (0,1) indicator vector for boolean weights 1{d1_i == d2_i}

returns boolean if no continuous weights are used