[R] sampling from Laplace-Normal

Armin Meier axionator at gmail.com
Sat Nov 1 13:19:53 CET 2008


Hi,
I have to draw samples from an asymmetric-Laplace-Normal distribution:
f(u|y, x, beta, phi, sigma, tau) \propto exp( - sum( ( abs(lo) +
(2*tau-1)*lo )/(2*sigma) ) - 0.5/phi*u^2), where lo = (y - x*beta) and
y=(y_1, ..., y_n), x=(x_1, ..., x_n)
-- sorry for this huge formula --
A WinBUGS Gibbs sampler and the HI package arms sampler were used with
the same initial data for all parameters. I compared the mean from
both the Gibbs sample and the arms sample for several y and x.
Surprisingly, both means always differed by the same constant.
Shouldn't the sample means be equal? What could be the reason for the
constant difference? (burnin and sample size variation didn't change
this)

Thanks in advance
Armin



More information about the R-help mailing list