function pars = get_pars(chain,sk)

[pars.a_la pars.b_la]=gampar(chain.la);
[pars.a_df pars.b_df]=gampar(chain.df);
if sk==1
    [pars.a_ga pars.b_ga]=gampar(chain.ga);
end
[pars.a_ht pars.b_ht]=gampar(chain.ht);
[pars.a_aal pars.b_aal]=gampar(chain.aal);
[pars.a_bal pars.b_bal]=gampar(chain.bal);
pars.mmu =mean(chain.hmu); pars.vmu =2*diag(var(chain.hmu));
pars.mhmu = mean(chain.hmu); pars.vhmu=2*diag(var(chain.hmu));
[pars.a_al pars.b_al]=alphapar(chain.al);
pars.mbe=mean(chain.be); pars.vbe=2*diag(var(chain.be));
pars.mhb=mean(chain.hb); pars.vhb=2*var(chain.hb);