Are we sure that the invcdf function works correctly for the case of
discrete distributions?
The inverse CDF method of generating a random variable using a
Uniform[0,1] is valid also for discrete rv's (by using the generalized
inverse), so I tried
<hansl>
series U = randgen(U,0,1) # generate Uniform(0,1)
series Xd = invcdf(P, 2, U) # generate Poisson with mean 2
</hansl>
but the Xd series did not have integer values, so it cannot be a Poisson rv.
--
Alecos Papadopoulos PhD
Athens University of Economics and Business
web:
alecospapadopoulos.wordpress.com/