ecode.com

function normalGammaThresholdPlotDemo()
%z=-10:.1:10;
z=-10:0.5:10;
x=-10.005:.05:10;
for k=1:length(z)
    %% laplace
    c=1;
    [temp outLap(k)]= min(.5*(z(k)-x).^2+c*abs(x));
    
     %% normal Jeffreys
    [temp outNJ(k)]=min(.5*(z(k)-x).^2+log(abs(x)));
    
    
    %% Hierarchical adaptive lasso
    bs = [0.01, 0.1,  1];
    a = 1;
    for i=1:length(bs)
        [temp outHAL{i}(k)] = ...
            min(.5*(z(k)-x).^2 + generalizedStudentNeglogpdf(x, a, bs(i)));
    end
    
    %% NG
 