Random Number Generator from Custom Distribution

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Random Number Generator from Custom Distribution

sperry
This post has NOT been accepted by the mailing list yet.
I am a recent convert to R and am currently trying to generate random numbers from the custom distribution

p(r)=(exp(-k-r*l-m*abs(r))*(1+k+r*l+m*abs(r)))/(k+r*l+m*abs(r))^2


which I derived from a theoretical entropy problem. The goal is to generate numbers from this theoretical distribution to be able to run the Kolmogorov-Smirnov test against my empirical data. Any tips on how to get started?

Thanks