I don't think this one got any answers.
rannegbin(r, c, n, p) draws an r X c matrix from NegBin(n,p), with n>=1
an integer: the sum of n independent geometric random numbers. Here it
is 0.1, which corresponds to n=0.
The mean of weibull(a,b) is a^(-1/b)*gammafact(1 + 1/b), which is 0.8099
Also see the Ox book.
oxoxoxox 3rd OxMetrics user conference August 2005
oxoxoxox Cass Business School, London
oxoxoxox 17 August (afternoon) - 18 August (morning)
Dr Jurgen A Doornik
Nuffield College, Oxford OX1 1NF, UK
tel. UK: +44-1865-278610 fax +44-1865-278621
Vumani Dlamini wrote:
> Dear ox users,
> I am trying to sample from a negative binomial (using "rannegbin") and from
> a Weibull distribution but am getting running into problems. I use the code
> #include <oxstd.h>;
> #include <oxprob.h>;
> decl x;
> x=rannegbin(10,1,0.1,0.1/3.1);// size = 0.1 and mu=3
> x=ranweibull(10,1,5,10);//a is scale and b is shape parameter
> For the negative binomial the number of failures is zero for all ten
> observations, and for the Weibull the times are all less that 1 (whilst the
> expectation is 9.18).
> I noticed in passing that for the negative binomial is "size" is less
> than 1
> all the number of failures will be zero, which is not necessarily correct.
> Possibly, I am confused by the parametrization used in OX.
> Can you enlighten me?
> Play online games with your friends with MSN Messenger