function makeEpsSet4(filename)

load(filename);
close all

% ----------------------------------------------------------------------
% Effective sample sizes and degree of interaction
figure(1)
set(gcf,'paperunits','centimeters','papersize',[21 13],'paperposition',[0 0 21 13]);

hoffset = .07;
hoffset2 = .03;
voffset = .1;
voffset2 = .05;
fw = .28;
fh = .25;

lagInds = [2 7 8];
lagLabels = {'One step predictor','Filter','$i-1$','$i-2$','$i-3$','$i-4$','Lag 5 smoother','$i-6$'};
lagLabels = lagLabels(end:-1:1);
methodLabels = {'ARPF','Simple','Greedy','Random'};
methodLineStyles = {'-','--','--',':'};
methodMarkers = {'.','^','x','o'};
nMethod = length(methodLabels);
fncLabels = {'$\phi(x) = x$','$\phi(x) = x^4$','$\phi(x) = 1_{x>0}(x)$'};
fncYRanges = {[0 .006],[0 .06],[0, .005]};
fncYTicks = {[0 .003 .006],[0 .03 .06],[0 .0025 .005]};

H = zeros(3,3);
for m = 1:3
    for n = 1:3
        H(m,n) = axes('position',[hoffset+((n)-1)*(fw+hoffset2) voffset+((3-m+1)-1)*(fh+voffset2) fw fh]);        
        set(gca,'box','off','ylim',fncYRanges{m},'fontsize',9,'ytick',fncYTicks{m});
        
        if any([1 2 3]==n) && m == 1
            title(lagLabels{lagInds(n)});
        end
        if n > 1
            set(gca,'yticklabel',{});
        else
            yh = ylabel(fncLabels{m},'interpreter','latex');
            set(yh,'position',get(yh,'position').*[0 1 1] + [-.16 0 0]);
        end
        if m < 3
            set(gca,'xticklabel',{});
        else
            xlabel('$\tau$','interpreter','latex');
        end
        
        for meth = 1:nMethod
            ydata = permute(results(meth,m,lagInds(n),:,:),[4 5 1 2 3]);             %#ok<*NODEF>
            lh = line(essThresholds, sum(reshape(ydata,nTH,NMC,1),2)/(NMC*(nStep-burnIn+1)));
            set(lh,'linestyle',methodLineStyles{meth},'marker',methodMarkers{meth},'markersize',3);
            set(lh,'markerfacecolor','none','markeredgecolor','k');
            set(lh,'color','k');
        end
        
    end
end

print -depsc -loose figure4
