This is the mail archive of the gsl-discuss@sourceware.org mailing list for the GSL project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, I have written a piece of code to implement the multinomial CDF. GSL currently provides random variates from a multinomial and the multinomial PDF. The CDF is implemented as the approximation from, "A Representation for Multinomial Cumulative Distribution Functions", Bruce Levin, The Annals of Statistics, v.9, n.5, pp.1123-1126, 1981 The approximation is meant to be pretty good. Because the multinomial is a vector random variate the "P" version of the CDF is implemented. The P version corresponds to P(X1<=n1,X2<=n2,...,XK<=nK) In keeping with the pdf function already in GSL no checking of the consistency/validity of the inputs is done. Code attached along with a small test function. Glenn Stone CSIRO Mathematical and Information Sciences North Ryde +61 2 9325 3259
Attachment:
test.c
Description: test.c
Attachment:
multinomial.c
Description: multinomial.c
Attachment:
multinomial.h
Description: multinomial.h
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |