Re: [R] Dicrete Laplace distribution

2010-03-11 Thread Moshe Olshansky
niform in (0,1)) and k <- which(P1 >= x)[1] has the desired distribution. Regards, Moshe. --- On Fri, 12/3/10, Raquel Nicolette wrote: > From: Raquel Nicolette > Subject: [R] Dicrete Laplace distribution > To: r-help@r-project.org > Received: Friday, 12 March, 2010

[R] Dicrete Laplace distribution

2010-03-11 Thread Raquel Nicolette
Hello, Could anybody tell me how to generate discrete Laplacian distribution? I need to sample uma discretised Laplacian density like this: J( g -> g´) ~ exp (-lambda | g´ - g |) g in {0,…, gmax} Thanks