Binary files /tmp/tmphq_06v0x/UtnMe_QgKy/r-cran-biasedurn-1.07/build/partial.rdb and /tmp/tmphq_06v0x/y0TP0kpnDi/r-cran-biasedurn-2.0.8/build/partial.rdb differ Binary files /tmp/tmphq_06v0x/UtnMe_QgKy/r-cran-biasedurn-1.07/build/vignette.rds and /tmp/tmphq_06v0x/y0TP0kpnDi/r-cran-biasedurn-2.0.8/build/vignette.rds differ diff -Nru r-cran-biasedurn-1.07/debian/changelog r-cran-biasedurn-2.0.8/debian/changelog --- r-cran-biasedurn-1.07/debian/changelog 2020-09-02 12:30:44.000000000 +0000 +++ r-cran-biasedurn-2.0.8/debian/changelog 2022-10-28 09:31:30.000000000 +0000 @@ -1,3 +1,11 @@ +r-cran-biasedurn (2.0.8-1) unstable; urgency=medium + + * New upstream version + * Standards-Version: 4.6.1 (routine-update) + * Reorder sequence of d/control fields by cme (routine-update) + + -- Andreas Tille Fri, 28 Oct 2022 11:31:30 +0200 + r-cran-biasedurn (1.07-4) unstable; urgency=medium * Standards-Version: 4.5.0 (routine-update) diff -Nru r-cran-biasedurn-1.07/debian/control r-cran-biasedurn-2.0.8/debian/control --- r-cran-biasedurn-1.07/debian/control 2020-09-02 12:30:44.000000000 +0000 +++ r-cran-biasedurn-2.0.8/debian/control 2022-10-28 09:31:30.000000000 +0000 @@ -1,17 +1,17 @@ Source: r-cran-biasedurn -Maintainer: Debian R Packages Maintainers -Uploaders: Andreas Tille Section: gnu-r -Testsuite: autopkgtest-pkg-r Priority: optional -Build-Depends: debhelper-compat (= 13), - dh-r, - r-base-dev -Standards-Version: 4.5.0 +Maintainer: Debian R Packages Maintainers +Uploaders: Andreas Tille Vcs-Browser: https://salsa.debian.org/r-pkg-team/r-cran-biasedurn Vcs-Git: https://salsa.debian.org/r-pkg-team/r-cran-biasedurn.git Homepage: https://cran.r-project.org/package=BiasedUrn +Standards-Version: 4.6.1 Rules-Requires-Root: no +Build-Depends: debhelper-compat (= 13), + dh-r, + r-base-dev +Testsuite: autopkgtest-pkg-r Package: r-cran-biasedurn Architecture: any diff -Nru r-cran-biasedurn-1.07/DESCRIPTION r-cran-biasedurn-2.0.8/DESCRIPTION --- r-cran-biasedurn-1.07/DESCRIPTION 2015-12-28 08:01:09.000000000 +0000 +++ r-cran-biasedurn-2.0.8/DESCRIPTION 2022-10-22 12:57:59.000000000 +0000 @@ -1,19 +1,23 @@ Package: BiasedUrn Type: Package Title: Biased Urn Model Distributions -Version: 1.07 -Date: 2015-12-28 +Version: 2.0.8 +Date: 2022-10-21 Author: Agner Fog Maintainer: Agner Fog Description: Statistical models of biased sampling in the form of univariate and multivariate noncentral hypergeometric distributions, including Wallenius' noncentral hypergeometric distribution and - Fisher's noncentral hypergeometric distribution - (also called extended hypergeometric distribution). + Fisher's noncentral hypergeometric distribution. See vignette("UrnTheory") for explanation of these distributions. + Literature: + Fog, A. (2008a). Calculation Methods for Wallenius' Noncentral Hypergeometric Distribution, Communications in Statistics, Simulation and Computation, 37(2) . + Fog, A. (2008b). Sampling methods for Wallenius’ and Fisher’s noncentral hypergeometric distributions, Communications in Statistics—Simulation and Computation, 37(2) + . License: GPL-3 -URL: http://www.agner.org/random/ http://www.r-project.org -Packaged: 2015-12-28 07:10:49 UTC; A +Encoding: UTF-8 +URL: https://www.agner.org/random/ https://www.r-project.org/ NeedsCompilation: yes +Packaged: 2022-10-21 04:56:56 UTC; A Repository: CRAN -Date/Publication: 2015-12-28 09:01:09 +Date/Publication: 2022-10-22 12:57:59 UTC Binary files /tmp/tmphq_06v0x/UtnMe_QgKy/r-cran-biasedurn-1.07/inst/doc/UrnTheory.pdf and /tmp/tmphq_06v0x/y0TP0kpnDi/r-cran-biasedurn-2.0.8/inst/doc/UrnTheory.pdf differ diff -Nru r-cran-biasedurn-1.07/inst/doc/UrnTheory.Rtex r-cran-biasedurn-2.0.8/inst/doc/UrnTheory.Rtex --- r-cran-biasedurn-1.07/inst/doc/UrnTheory.Rtex 2015-12-28 07:10:49.000000000 +0000 +++ r-cran-biasedurn-2.0.8/inst/doc/UrnTheory.Rtex 2022-10-21 04:45:46.000000000 +0000 @@ -456,8 +456,7 @@ Several different calculation methods are used, depending on the parameters. -The calculation methods and sampling methods are documented at \\ -{\tt http://www.agner.org/random/theory/}. +The calculation methods and sampling methods are documented in Fog (2008a,b). \section{References} @@ -465,28 +464,29 @@ Noncentral Hypergeometric Distribution. {\it Communications in Statistics, Simulation and Computation}. Vol. 37, no. 2, pp 258-273. +{\tt https://doi.org/10.1080/03610910701790269} \vskip 3mm -% + \noindent Fog, A. (2008b). Sampling Methods for Wallenius' and Fisher's Noncentral Hypergeometric Distributions. {\it Communications in Statistics, Simulation and Computation}. Vol. 37, no. 2, pp 241-257. +{\tt https://doi.org/10.1080/03610910701790236} \vskip 3mm -% + \noindent Johnson, N. L., Kemp, A. W. Kotz, S. (2005). {\it Univariate Discrete Distributions}. Hoboken, New Jersey: Wiley and Sons. \vskip 3mm -% + \noindent McCullagh, P., Nelder, J. A. (1983). {\it Generalized Linear Models}. London: Chapman \& Hall. \vskip 3mm -% -\noindent {\tt http://www.agner.org/random/theory/}. +\noindent {\tt https://www.agner.org/random/theory/}. \end{document} diff -Nru r-cran-biasedurn-1.07/man/BiasedUrn-1-Package.Rd r-cran-biasedurn-2.0.8/man/BiasedUrn-1-Package.Rd --- r-cran-biasedurn-1.07/man/BiasedUrn-1-Package.Rd 2015-12-28 07:10:45.000000000 +0000 +++ r-cran-biasedurn-2.0.8/man/BiasedUrn-1-Package.Rd 2022-10-21 04:43:47.000000000 +0000 @@ -34,9 +34,9 @@ \tabular{ll}{ Package: \tab BiasedUrn\cr Type: \tab Package\cr -Version: \tab 1.06\cr -Date: \tab 2013-11-06\cr -License: \tab GPL\cr +Version: \tab 2.0.8\cr +Date: \tab 2022-10-21\cr +License: \tab GPL-3\cr } \bold{Univariate functions in this package} @@ -80,7 +80,11 @@ } \references{ -\url{http://www.agner.org/random/} +\url{https://www.agner.org/random/} + +Fog, A. 2008a. Calculation methods for Wallenius’ noncentral hypergeometric distribution. \emph{Communications in Statistics—Simulation and Computation} \bold{37}, 2 \doi{10.1080/03610910701790269} + +Fog, A. 2008b. Sampling methods for Wallenius’ and Fisher’s noncentral hypergeometric distributions. \emph{Communications in Statistics—Simulation and Computation} \bold{37}, 2 \doi{10.1080/03610910701790236} } \keyword{ package } @@ -89,12 +93,20 @@ \keyword{ multivariate } \seealso{ -\code{vignette("UrnTheory")} -\cr \code{\link{BiasedUrn-Univariate}}. \cr \code{\link{BiasedUrn-Multivariate}}. \cr +\code{vignette("UrnTheory")} +\cr +\code{demo(CompareHypergeo)} +\cr +\code{demo(ApproxHypergeo)} +\cr +\code{demo(OddsPrecision)} +\cr +\code{demo(SampleWallenius)} +\cr \code{\link{dhyper}} \cr \code{\link{fisher.test}} @@ -103,3 +115,4 @@ \examples{ dWNCHypergeo(12, 25, 32, 20, 2.5) } + diff -Nru r-cran-biasedurn-1.07/man/BiasedUrn-2-Univariate.Rd r-cran-biasedurn-2.0.8/man/BiasedUrn-2-Univariate.Rd --- r-cran-biasedurn-1.07/man/BiasedUrn-2-Univariate.Rd 2015-12-28 07:10:45.000000000 +0000 +++ r-cran-biasedurn-2.0.8/man/BiasedUrn-2-Univariate.Rd 2022-10-19 13:31:19.000000000 +0000 @@ -178,7 +178,11 @@ } \references{ -\url{http://www.agner.org/random/} +\url{https://www.agner.org/random/} + +Fog, A. 2008a. Calculation methods for Wallenius’ noncentral hypergeometric distribution. \emph{Communications in Statistics—Simulation and Computation} \bold{37}, 2 \doi{10.1080/03610910701790269} + +Fog, A. 2008b. Sampling methods for Wallenius’ and Fisher’s noncentral hypergeometric distributions. \emph{Communications in Statistics—Simulation and Computation} \bold{37}, 2 \doi{10.1080/03610910701790236} } \keyword{ distribution } diff -Nru r-cran-biasedurn-1.07/man/BiasedUrn-3-Multivariate.Rd r-cran-biasedurn-2.0.8/man/BiasedUrn-3-Multivariate.Rd --- r-cran-biasedurn-1.07/man/BiasedUrn-3-Multivariate.Rd 2015-12-28 07:10:45.000000000 +0000 +++ r-cran-biasedurn-2.0.8/man/BiasedUrn-3-Multivariate.Rd 2022-10-19 13:31:15.000000000 +0000 @@ -181,7 +181,11 @@ } \references{ -\url{http://www.agner.org/random/} +\url{https://www.agner.org/random/} + +Fog, A. 2008a. Calculation methods for Wallenius’ noncentral hypergeometric distribution. \emph{Communications in Statistics—Simulation and Computation} \bold{37}, 2 \doi{10.1080/03610910701790269} + +Fog, A. 2008b. Sampling methods for Wallenius’ and Fisher’s noncentral hypergeometric distributions. \emph{Communications in Statistics—Simulation and Computation} \bold{37}, 2 \doi{10.1080/03610910701790236} } \keyword{ distribution } diff -Nru r-cran-biasedurn-1.07/MD5 r-cran-biasedurn-2.0.8/MD5 --- r-cran-biasedurn-1.07/MD5 2015-12-28 08:01:09.000000000 +0000 +++ r-cran-biasedurn-2.0.8/MD5 2022-10-22 12:57:59.000000000 +0000 @@ -1,29 +1,30 @@ -85f839c1984347af7ac5e7627045d6fe *DESCRIPTION +1414745c4fdc3f525d8b5d02b250352a *DESCRIPTION 9fa4a3e4d963627db9d413967e9d9035 *NAMESPACE ec4aeb239b877144b70e3f3704367577 *R/urn1.R e8c596d16048677b6ffaa18704123b1b *R/urn2.R -4c54999418c75264f6cde4c74453107b *build/vignette.rds +afbe4209b3bb961ba3e41cbfe79ea507 *build/partial.rdb +b8c07b3f1d3153be11025545f70865d4 *build/vignette.rds e92f1eef3885a16d9434e377add583ff *demo/00Index c6b954448030b0e8c07a378b8ce58824 *demo/ApproxHypergeo.R 0923f2e69cc488f8184b4973dd7cdd82 *demo/CompareHypergeo.R adab2da4435745974b8b256e97a50f68 *demo/OddsPrecision.R ca257d52b737cf05ab2fc234337f4b43 *demo/SampleWallenius.R b3569fe26b9aa87e6704636440db6bc2 *demo/UrnTheory.R -ce2ab2b8db398976a55e06637399e0de *inst/doc/UrnTheory.Rtex -69913004cac8403c6cc2f6f6c5cccd89 *inst/doc/UrnTheory.pdf -a95229ba9b90590be861c30ff444a80d *man/BiasedUrn-1-Package.Rd -97403bdfab6aaf656a4679416e22a877 *man/BiasedUrn-2-Univariate.Rd -37777167d425c4814aa40743a600faa0 *man/BiasedUrn-3-Multivariate.Rd +b8984c72e3eec94bd04fc243e03b450a *inst/doc/UrnTheory.Rtex +33deaea60d29f8adc92ba95c1230ae38 *inst/doc/UrnTheory.pdf +4b8755622355216bbfe9321a13dbee5e *man/BiasedUrn-1-Package.Rd +fb67f0c0496f9958221a9be21808b3aa *man/BiasedUrn-2-Univariate.Rd +264645c32aa8fd9536065883ca093779 *man/BiasedUrn-3-Multivariate.Rd 42ccfaba5f55a5dc2977e86c8f517bd3 *src/Makevars 1c81532e7a97515f3d4cea2f1b7f4a40 *src/erfres.h b66f879a752c7f9b2c015d80de9c5423 *src/fnchyppr.cpp -d2819bb817f16c170d749808fc8ef0d9 *src/randomc.h +4d2d05113bf959418130fe7d08828360 *src/randomc.h 4bdf94a3ed6df4755cf8b1671f931329 *src/stoc1.cpp 8cd472f044c6c8f00d39d43769a9add2 *src/stoc3.cpp 07c99ea27028a3a74080d0ef829bd3e5 *src/stocR.cpp -b2fb76cd6f7ec73231499db763d364bf *src/stocR.h -196790e709f48dc5809fe12148d95be5 *src/stocc.h -645795fc46d1d9c51c8ad2c045544ed3 *src/urn1.cpp +56844f536b36d8fb56df904f578d3627 *src/stocR.h +fa3a94822dbb9be73ba719715170283b *src/stocc.h +aee4339ac582e27515ff4f3e5602ad17 *src/urn1.cpp 2408d260c33a7f94bafd55ea7c2bed27 *src/urn2.cpp -c7ad7f6edc61c320261fcac84d20cb45 *src/wnchyppr.cpp -ce2ab2b8db398976a55e06637399e0de *vignettes/UrnTheory.Rtex +8543e4c65aee2b41e47b15aa761a6e96 *src/wnchyppr.cpp +b8984c72e3eec94bd04fc243e03b450a *vignettes/UrnTheory.Rtex diff -Nru r-cran-biasedurn-1.07/src/randomc.h r-cran-biasedurn-2.0.8/src/randomc.h --- r-cran-biasedurn-1.07/src/randomc.h 2015-12-28 07:10:49.000000000 +0000 +++ r-cran-biasedurn-2.0.8/src/randomc.h 2022-10-18 05:45:07.000000000 +0000 @@ -1,7 +1,7 @@ /***************************** randomc.h ********************************** * Author: Agner Fog * Date created: 1997 -* Last modified: 2011-08-05 +* Last modified: 2022-10-18 * Project: randomc.h * Source URL: www.agner.org/random * @@ -80,8 +80,8 @@ * The file randomc.htm contains further documentation on these random number * generators. * -* © 1997 - 2011 Agner Fog. -* GNU General Public License www.gnu.org/copyleft/gpl.html +* (c) 1997 - 2022 Agner Fog. +* GNU General Public License v. 3. www.gnu.org/copyleft/gpl.html *******************************************************************************/ #ifndef RANDOMC_H diff -Nru r-cran-biasedurn-1.07/src/stocc.h r-cran-biasedurn-2.0.8/src/stocc.h --- r-cran-biasedurn-1.07/src/stocc.h 2015-12-28 07:10:49.000000000 +0000 +++ r-cran-biasedurn-2.0.8/src/stocc.h 2022-10-18 05:44:14.000000000 +0000 @@ -1,7 +1,7 @@ /***************************** stocc.h ********************************** * Author: Agner Fog * Date created: 2004-01-08 -* Last modified: 2011-08-05 +* Last modified: 2022-10-18 * Project: randomc.h * Source URL: www.agner.org/random * @@ -189,7 +189,7 @@ * noncentral hypergeometric distributions and theoretical explanations of * the methods for calculating and sampling from these. * -* © 2002-2011 Agner Fog. GNU General Public License www.gnu.org/copyleft/gpl.html +* (c) 2002-2022 Agner Fog. GNU General Public License v.3 www.gnu.org/copyleft/gpl.html *******************************************************************************/ #ifndef STOCC_H diff -Nru r-cran-biasedurn-1.07/src/stocR.h r-cran-biasedurn-2.0.8/src/stocR.h --- r-cran-biasedurn-1.07/src/stocR.h 2015-12-28 07:10:49.000000000 +0000 +++ r-cran-biasedurn-2.0.8/src/stocR.h 2022-10-18 05:47:16.000000000 +0000 @@ -1,4 +1,9 @@ -/**************************** STOCR.H ************************ 2006-10-21 AF * +/**************************** STOCR.H *************************************** +* Author: Agner Fog +* Date created: 2006-10-21 +* Last modified: 2022-10-18 +* Project: randomc.h +* Source URL: www.agner.org/random * * This file defines additions to the C++ library of non-uniform random number * generators for the R-language interface. @@ -51,7 +56,7 @@ * noncentral hypergeometric distributions and theoretical explanations of * the methods for calculating and sampling from these. * -* © 2006 Agner Fog. GNU General Public License www.gnu.org/copyleft/gpl.html +* (c) 2006-2022 Agner Fog. GNU General Public License v. 3. www.gnu.org/copyleft/gpl.html *******************************************************************************/ #ifndef STOC_R_H diff -Nru r-cran-biasedurn-1.07/src/urn1.cpp r-cran-biasedurn-2.0.8/src/urn1.cpp --- r-cran-biasedurn-1.07/src/urn1.cpp 2015-12-28 07:10:49.000000000 +0000 +++ r-cran-biasedurn-2.0.8/src/urn1.cpp 2022-10-18 09:04:37.000000000 +0000 @@ -1,15 +1,15 @@ /*************************** urn1.cpp ********************************** * Author: Agner Fog * Date created: 2006 -* Last modified: 2011-08-05 +* Last modified: 2022-10-18 * Project: BiasedUrn * Source URL: www.agner.org/random * * Description: * R interface to univariate noncentral hypergeometric distributions * -* Copyright 2006-2011 by Agner Fog. -* GNU General Public License http://www.gnu.org/licenses/gpl.html +* Copyright 2006-2022 by Agner Fog. +* GNU General Public License v. 3. http://www.gnu.org/licenses/gpl.html *****************************************************************************/ #include @@ -299,8 +299,10 @@ // Check for consistency if (xmean < x1 || xmean > x2) { - error("Inconsistency. mean = %i, lower limit = %i, upper limit = %i", - xmean, x1, x2); + //!! error("Inconsistency. mean = %i, lower limit = %i, upper limit = %i", xmean, x1, x2); + // Error message removed 2022-10-18 + if (xmean < x1) xmean = x1; + if (xmean > x2) xmean = x2; } // Make left tail of table cumulative: @@ -422,8 +424,11 @@ // Check for consistency if (xmean < x1 || xmean > x2) { - error("Inconsistency. mean = %i, lower limit = %i, upper limit = %i", - xmean, x1, x2); + // !! error("Inconsistency. mean = %i, lower limit = %i, upper limit = %i", xmean, x1, x2); + // Error message removed 2022-10-18 because two users have complained. + // Example: pWNCHypergeo(x = 643, m1 = 643, m2 = 17000, n = 17610, odds=1) + if (xmean < x1) xmean = x1; + if (xmean > x2) xmean = x2; } // Make left tail of table cumulative: diff -Nru r-cran-biasedurn-1.07/src/wnchyppr.cpp r-cran-biasedurn-2.0.8/src/wnchyppr.cpp --- r-cran-biasedurn-1.07/src/wnchyppr.cpp 2015-12-28 07:10:49.000000000 +0000 +++ r-cran-biasedurn-2.0.8/src/wnchyppr.cpp 2022-10-18 05:48:41.000000000 +0000 @@ -1,7 +1,7 @@ /*************************** wnchyppr.cpp ********************************** * Author: Agner Fog * Date created: 2002-10-20 -* Last modified: 2013-11-06 +* Last modified: 2022-10-18 * Project: stocc.zip * Source URL: www.agner.org/random * @@ -20,8 +20,8 @@ * The file ran-instructions.pdf contains further documentation and * instructions. * -* Copyright 2002-2013 by Agner Fog. -* GNU General Public License http://www.gnu.org/licenses/gpl.html +* Copyright 2002-2022 by Agner Fog. +* GNU General Public License v3. 3. http://www.gnu.org/licenses/gpl.html *****************************************************************************/ #include // memcpy function @@ -633,8 +633,8 @@ // This function is intended for use in rejection methods for sampling from // the Wallenius distribution. It is called from // StochasticLib3::WalleniusNCHypRatioOfUnifoms in the file stoc3.cpp - double f0; // Lambda*Phi(½) - double phideri0; // phi(½)/rd + double f0; // Lambda*Phi(0.5) + double phideri0; // phi(0.5)/rd double qi; // 2^(-r*omega[i]) double qi1; // 1-qi double omegai[2] = {omega,1.}; // weights for each color @@ -665,7 +665,7 @@ k *= w; // w * k rdm1 = rd - 1.; - // calculate phi(½)/rd + // calculate phi(0.5)/rd phideri0 = -LN2 * rdm1; for (i=0; i<2; i++) { romegi = r * omegai[i]; diff -Nru r-cran-biasedurn-1.07/vignettes/UrnTheory.Rtex r-cran-biasedurn-2.0.8/vignettes/UrnTheory.Rtex --- r-cran-biasedurn-1.07/vignettes/UrnTheory.Rtex 2015-12-28 07:10:45.000000000 +0000 +++ r-cran-biasedurn-2.0.8/vignettes/UrnTheory.Rtex 2022-10-21 04:45:46.000000000 +0000 @@ -456,8 +456,7 @@ Several different calculation methods are used, depending on the parameters. -The calculation methods and sampling methods are documented at \\ -{\tt http://www.agner.org/random/theory/}. +The calculation methods and sampling methods are documented in Fog (2008a,b). \section{References} @@ -465,28 +464,29 @@ Noncentral Hypergeometric Distribution. {\it Communications in Statistics, Simulation and Computation}. Vol. 37, no. 2, pp 258-273. +{\tt https://doi.org/10.1080/03610910701790269} \vskip 3mm -% + \noindent Fog, A. (2008b). Sampling Methods for Wallenius' and Fisher's Noncentral Hypergeometric Distributions. {\it Communications in Statistics, Simulation and Computation}. Vol. 37, no. 2, pp 241-257. +{\tt https://doi.org/10.1080/03610910701790236} \vskip 3mm -% + \noindent Johnson, N. L., Kemp, A. W. Kotz, S. (2005). {\it Univariate Discrete Distributions}. Hoboken, New Jersey: Wiley and Sons. \vskip 3mm -% + \noindent McCullagh, P., Nelder, J. A. (1983). {\it Generalized Linear Models}. London: Chapman \& Hall. \vskip 3mm -% -\noindent {\tt http://www.agner.org/random/theory/}. +\noindent {\tt https://www.agner.org/random/theory/}. \end{document}