0s autopkgtest [17:48:32]: starting date and time: 2024-03-16 17:48:32+0000 0s autopkgtest [17:48:32]: git checkout: b506e79c ssh-setup/nova: fix ARCH having two lines of data 0s autopkgtest [17:48:32]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.o7h5k3ga/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:r-base,src:curl,src:glib2.0,src:libpng1.6,src:libpsl,src:libtirpc,src:libxt,src:openssl,src:orthanc-python,src:readline,src:wp2latex --apt-upgrade r-cran-actuar --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=r-base/4.3.3-2build1 curl/8.5.0-2ubuntu7 glib2.0/2.79.3-3ubuntu5 libpng1.6/1.6.43-3 libpsl/0.21.2-1.1 libtirpc/1.3.4+ds-1.1 libxt/1:1.2.1-1.2 openssl/3.0.13-0ubuntu1 orthanc-python/4.1+ds-2build3 readline/8.2-3.1 wp2latex/4.4~ds-1build1' -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@bos03-arm64-9.secgroup --name adt-noble-arm64-r-cran-actuar-20240316-174832-juju-7f2275-prod-proposed-migration-environment-2 --image adt/ubuntu-noble-arm64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-proposed-migration -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 97s autopkgtest [17:50:09]: testbed dpkg architecture: arm64 97s autopkgtest [17:50:09]: testbed apt version: 2.7.12 97s autopkgtest [17:50:09]: @@@@@@@@@@@@@@@@@@@@ test bed setup 97s Get:1 http://ftpmaster.internal/ubuntu noble-proposed InRelease [117 kB] 97s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/restricted Sources [6540 B] 98s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/universe Sources [3670 kB] 98s Get:4 http://ftpmaster.internal/ubuntu noble-proposed/main Sources [473 kB] 98s Get:5 http://ftpmaster.internal/ubuntu noble-proposed/multiverse Sources [51.4 kB] 98s Get:6 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 Packages [646 kB] 98s Get:7 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 c-n-f Metadata [3144 B] 98s Get:8 http://ftpmaster.internal/ubuntu noble-proposed/restricted arm64 Packages [33.6 kB] 98s Get:9 http://ftpmaster.internal/ubuntu noble-proposed/restricted arm64 c-n-f Metadata [116 B] 98s Get:10 http://ftpmaster.internal/ubuntu noble-proposed/universe arm64 Packages [3995 kB] 98s Get:11 http://ftpmaster.internal/ubuntu noble-proposed/universe arm64 c-n-f Metadata [8528 B] 98s Get:12 http://ftpmaster.internal/ubuntu noble-proposed/multiverse arm64 Packages [55.6 kB] 98s Get:13 http://ftpmaster.internal/ubuntu noble-proposed/multiverse arm64 c-n-f Metadata [116 B] 100s Fetched 9060 kB in 2s (5263 kB/s) 100s Reading package lists... 103s Reading package lists... 103s Building dependency tree... 103s Reading state information... 104s Calculating upgrade... 104s The following packages will be REMOVED: 104s libglib2.0-0 libssl3 104s The following NEW packages will be installed: 104s libglib2.0-0t64 libssl3t64 xdg-user-dirs 104s The following packages have been kept back: 104s curl 104s The following packages will be upgraded: 104s gir1.2-glib-2.0 libglib2.0-data libtirpc-common openssl readline-common 104s ubuntu-minimal ubuntu-standard 104s 7 upgraded, 3 newly installed, 2 to remove and 1 not upgraded. 104s Need to get 4613 kB of archives. 104s After this operation, 211 kB of additional disk space will be used. 104s Get:1 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 gir1.2-glib-2.0 arm64 2.79.3-3ubuntu5 [182 kB] 105s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libglib2.0-0t64 arm64 2.79.3-3ubuntu5 [1527 kB] 105s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 openssl arm64 3.0.13-0ubuntu1 [983 kB] 105s Get:4 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libssl3t64 arm64 3.0.13-0ubuntu1 [1770 kB] 105s Get:5 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libglib2.0-data all 2.79.3-3ubuntu5 [46.6 kB] 105s Get:6 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libtirpc-common all 1.3.4+ds-1.1 [8018 B] 105s Get:7 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 readline-common all 8.2-3.1 [56.4 kB] 105s Get:8 http://ftpmaster.internal/ubuntu noble/main arm64 ubuntu-minimal arm64 1.536 [10.7 kB] 105s Get:9 http://ftpmaster.internal/ubuntu noble/main arm64 xdg-user-dirs arm64 0.18-1 [18.1 kB] 105s Get:10 http://ftpmaster.internal/ubuntu noble/main arm64 ubuntu-standard arm64 1.536 [10.7 kB] 105s Fetched 4613 kB in 1s (6362 kB/s) 106s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74758 files and directories currently installed.) 106s Preparing to unpack .../gir1.2-glib-2.0_2.79.3-3ubuntu5_arm64.deb ... 106s Unpacking gir1.2-glib-2.0:arm64 (2.79.3-3ubuntu5) over (2.79.2-1~ubuntu1) ... 106s dpkg: libglib2.0-0:arm64: dependency problems, but removing anyway as you requested: 106s udisks2 depends on libglib2.0-0 (>= 2.77.0). 106s shared-mime-info depends on libglib2.0-0 (>= 2.75.3). 106s python3-gi depends on libglib2.0-0 (>= 2.77.0). 106s python3-dbus depends on libglib2.0-0 (>= 2.16.0). 106s netplan.io depends on libglib2.0-0 (>= 2.70.0). 106s netplan-generator depends on libglib2.0-0 (>= 2.70.0). 106s libxmlb2:arm64 depends on libglib2.0-0 (>= 2.54.0). 106s libvolume-key1:arm64 depends on libglib2.0-0 (>= 2.18.0). 106s libudisks2-0:arm64 depends on libglib2.0-0 (>= 2.75.3). 106s libqrtr-glib0:arm64 depends on libglib2.0-0 (>= 2.56). 106s libqmi-proxy depends on libglib2.0-0 (>= 2.30.0). 106s libqmi-glib5:arm64 depends on libglib2.0-0 (>= 2.54.0). 106s libpolkit-gobject-1-0:arm64 depends on libglib2.0-0 (>= 2.38.0). 106s libpolkit-agent-1-0:arm64 depends on libglib2.0-0 (>= 2.38.0). 106s libnetplan0:arm64 depends on libglib2.0-0 (>= 2.75.3). 106s libmm-glib0:arm64 depends on libglib2.0-0 (>= 2.62.0). 106s libmbim-proxy depends on libglib2.0-0 (>= 2.56). 106s libmbim-glib4:arm64 depends on libglib2.0-0 (>= 2.56). 106s libjson-glib-1.0-0:arm64 depends on libglib2.0-0 (>= 2.75.3). 106s libjcat1:arm64 depends on libglib2.0-0 (>= 2.75.3). 106s libgusb2:arm64 depends on libglib2.0-0 (>= 2.75.3). 106s libgudev-1.0-0:arm64 depends on libglib2.0-0 (>= 2.38.0). 106s libgirepository-1.0-1:arm64 depends on libglib2.0-0 (>= 2.79.0). 106s libfwupd2:arm64 depends on libglib2.0-0 (>= 2.79.0). 106s libblockdev3:arm64 depends on libglib2.0-0 (>= 2.42.2). 106s libblockdev-utils3:arm64 depends on libglib2.0-0 (>= 2.75.3). 106s libblockdev-swap3:arm64 depends on libglib2.0-0 (>= 2.42.2). 106s libblockdev-part3:arm64 depends on libglib2.0-0 (>= 2.42.2). 106s libblockdev-nvme3:arm64 depends on libglib2.0-0 (>= 2.42.2). 106s libblockdev-mdraid3:arm64 depends on libglib2.0-0 (>= 2.42.2). 106s libblockdev-loop3:arm64 depends on libglib2.0-0 (>= 2.42.2). 106s libblockdev-fs3:arm64 depends on libglib2.0-0 (>= 2.42.2). 106s libblockdev-crypto3:arm64 depends on libglib2.0-0 (>= 2.42.2). 106s fwupd depends on libglib2.0-0 (>= 2.79.0). 106s bolt depends on libglib2.0-0 (>= 2.56.0). 106s 106s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74758 files and directories currently installed.) 106s Removing libglib2.0-0:arm64 (2.79.2-1~ubuntu1) ... 106s Selecting previously unselected package libglib2.0-0t64:arm64. 106s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74733 files and directories currently installed.) 106s Preparing to unpack .../libglib2.0-0t64_2.79.3-3ubuntu5_arm64.deb ... 106s libglib2.0-0t64.preinst: Removing /var/lib/dpkg/info/libglib2.0-0:arm64.postrm to avoid loss of /usr/share/glib-2.0/schemas/gschemas.compiled... 106s removed '/var/lib/dpkg/info/libglib2.0-0:arm64.postrm' 106s Unpacking libglib2.0-0t64:arm64 (2.79.3-3ubuntu5) ... 106s Preparing to unpack .../openssl_3.0.13-0ubuntu1_arm64.deb ... 106s Unpacking openssl (3.0.13-0ubuntu1) over (3.0.10-1ubuntu4) ... 106s dpkg: libssl3:arm64: dependency problems, but removing anyway as you requested: 106s wget depends on libssl3 (>= 3.0.0). 106s u-boot-tools depends on libssl3 (>= 3.0.0). 106s tnftp depends on libssl3 (>= 3.0.0). 106s tcpdump depends on libssl3 (>= 3.0.0). 106s systemd-resolved depends on libssl3 (>= 3.0.0). 106s systemd depends on libssl3 (>= 3.0.0). 106s sudo depends on libssl3 (>= 3.0.0). 106s sbsigntool depends on libssl3 (>= 3.0.0). 106s rsync depends on libssl3 (>= 3.0.0). 106s python3-cryptography depends on libssl3 (>= 3.0.0). 106s openssh-server depends on libssl3 (>= 3.0.10). 106s openssh-client depends on libssl3 (>= 3.0.10). 106s mtd-utils depends on libssl3 (>= 3.0.0). 106s mokutil depends on libssl3 (>= 3.0.0). 106s linux-headers-6.8.0-11-generic depends on libssl3 (>= 3.0.0). 106s libsystemd-shared:arm64 depends on libssl3 (>= 3.0.0). 106s libssh-4:arm64 depends on libssl3 (>= 3.0.0). 106s libsasl2-modules:arm64 depends on libssl3 (>= 3.0.0). 106s libsasl2-2:arm64 depends on libssl3 (>= 3.0.0). 106s libpython3.12-minimal:arm64 depends on libssl3 (>= 3.0.0). 106s libnvme1 depends on libssl3 (>= 3.0.0). 106s libkrb5-3:arm64 depends on libssl3 (>= 3.0.0). 106s libkmod2:arm64 depends on libssl3 (>= 3.0.0). 106s libfido2-1:arm64 depends on libssl3 (>= 3.0.0). 106s libcurl4:arm64 depends on libssl3 (>= 3.0.0). 106s libcryptsetup12:arm64 depends on libssl3 (>= 3.0.0). 106s kmod depends on libssl3 (>= 3.0.0). 106s dhcpcd-base depends on libssl3 (>= 3.0.0). 106s bind9-libs:arm64 depends on libssl3 (>= 3.0.0). 106s 106s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74758 files and directories currently installed.) 106s Removing libssl3:arm64 (3.0.10-1ubuntu4) ... 106s Selecting previously unselected package libssl3t64:arm64. 106s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74747 files and directories currently installed.) 107s Preparing to unpack .../0-libssl3t64_3.0.13-0ubuntu1_arm64.deb ... 107s Unpacking libssl3t64:arm64 (3.0.13-0ubuntu1) ... 107s Preparing to unpack .../1-libglib2.0-data_2.79.3-3ubuntu5_all.deb ... 107s Unpacking libglib2.0-data (2.79.3-3ubuntu5) over (2.79.2-1~ubuntu1) ... 107s Preparing to unpack .../2-libtirpc-common_1.3.4+ds-1.1_all.deb ... 107s Unpacking libtirpc-common (1.3.4+ds-1.1) over (1.3.4+ds-1build1) ... 107s Preparing to unpack .../3-readline-common_8.2-3.1_all.deb ... 107s Unpacking readline-common (8.2-3.1) over (8.2-3) ... 107s Preparing to unpack .../4-ubuntu-minimal_1.536_arm64.deb ... 107s Unpacking ubuntu-minimal (1.536) over (1.535) ... 107s Selecting previously unselected package xdg-user-dirs. 107s Preparing to unpack .../5-xdg-user-dirs_0.18-1_arm64.deb ... 107s Unpacking xdg-user-dirs (0.18-1) ... 107s Preparing to unpack .../6-ubuntu-standard_1.536_arm64.deb ... 107s Unpacking ubuntu-standard (1.536) over (1.535) ... 107s Setting up ubuntu-minimal (1.536) ... 107s Setting up xdg-user-dirs (0.18-1) ... 107s Setting up libssl3t64:arm64 (3.0.13-0ubuntu1) ... 107s Setting up libtirpc-common (1.3.4+ds-1.1) ... 107s Setting up ubuntu-standard (1.536) ... 107s Setting up libglib2.0-0t64:arm64 (2.79.3-3ubuntu5) ... 107s No schema files found: doing nothing. 107s Setting up libglib2.0-data (2.79.3-3ubuntu5) ... 107s Setting up gir1.2-glib-2.0:arm64 (2.79.3-3ubuntu5) ... 107s Setting up openssl (3.0.13-0ubuntu1) ... 107s Setting up readline-common (8.2-3.1) ... 107s Processing triggers for man-db (2.12.0-3) ... 108s Processing triggers for install-info (7.1-3) ... 108s Processing triggers for libc-bin (2.39-0ubuntu2) ... 108s Reading package lists... 109s Building dependency tree... 109s Reading state information... 109s 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 110s Hit:1 http://ftpmaster.internal/ubuntu noble InRelease 110s Hit:2 http://ftpmaster.internal/ubuntu noble-updates InRelease 110s Hit:3 http://ftpmaster.internal/ubuntu noble-security InRelease 110s Hit:4 http://ftpmaster.internal/ubuntu noble-proposed InRelease 111s Reading package lists... 112s Reading package lists... 112s Building dependency tree... 112s Reading state information... 112s Calculating upgrade... 113s The following packages have been kept back: 113s curl 113s 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 113s Reading package lists... 113s Building dependency tree... 113s Reading state information... 114s 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 117s autopkgtest [17:50:29]: testbed running kernel: Linux 6.8.0-11-generic #11-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 14 02:53:31 UTC 2024 117s autopkgtest [17:50:29]: @@@@@@@@@@@@@@@@@@@@ apt-source r-cran-actuar 120s Get:1 http://ftpmaster.internal/ubuntu noble/universe r-cran-actuar 3.3-4-1 (dsc) [2135 B] 120s Get:2 http://ftpmaster.internal/ubuntu noble/universe r-cran-actuar 3.3-4-1 (tar) [982 kB] 120s Get:3 http://ftpmaster.internal/ubuntu noble/universe r-cran-actuar 3.3-4-1 (diff) [3364 B] 120s gpgv: Signature made Mon Nov 13 10:22:02 2023 UTC 120s gpgv: using RSA key F1F007320A035541F0A663CA578A0494D1C646D1 120s gpgv: issuer "tille@debian.org" 120s gpgv: Can't check signature: No public key 120s dpkg-source: warning: cannot verify inline signature for ./r-cran-actuar_3.3-4-1.dsc: no acceptable signature found 120s autopkgtest [17:50:32]: testing package r-cran-actuar version 3.3-4-1 121s autopkgtest [17:50:33]: build not needed 123s autopkgtest [17:50:35]: test run-unit-test: preparing testbed 125s Reading package lists... 125s Building dependency tree... 125s Reading state information... 125s Starting pkgProblemResolver with broken count: 0 125s Starting 2 pkgProblemResolver with broken count: 0 125s Done 126s The following additional packages will be installed: 126s curl fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-mono 126s libblas3 libcairo2 libcurl4t64 libdatrie1 libdeflate0 libfontconfig1 126s libgfortran5 libgomp1 libgraphite2-3 libharfbuzz0b libice6 libjbig0 126s libjpeg-turbo8 libjpeg8 liblapack3 liblerc4 libpango-1.0-0 126s libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils libpaper1 libpixman-1-0 126s libpng16-16t64 libpsl5t64 libreadline8t64 libsharpyuv0 libsm6 libtcl8.6 126s libthai-data libthai0 libtiff6 libtirpc3t64 libtk8.6 libwebp7 libxcb-render0 126s libxcb-shm0 libxft2 libxrender1 libxss1 libxt6t64 r-base-core r-cran-actuar 126s r-cran-expint r-cran-mass unzip x11-common xdg-utils zip 126s Suggested packages: 126s tcl8.6 tk8.6 elpa-ess r-doc-info | r-doc-pdf r-mathlib r-base-html 126s Recommended packages: 126s r-recommended r-base-dev r-doc-html libfile-mimeinfo-perl libnet-dbus-perl 126s libx11-protocol-perl x11-utils x11-xserver-utils 126s The following packages will be REMOVED: 126s libcurl4 libpng16-16 libpsl5 libreadline8 libtirpc3 126s The following NEW packages will be installed: 126s autopkgtest-satdep fontconfig fontconfig-config fonts-dejavu-core 126s fonts-dejavu-mono libblas3 libcairo2 libcurl4t64 libdatrie1 libdeflate0 126s libfontconfig1 libgfortran5 libgomp1 libgraphite2-3 libharfbuzz0b libice6 126s libjbig0 libjpeg-turbo8 libjpeg8 liblapack3 liblerc4 libpango-1.0-0 126s libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils libpaper1 libpixman-1-0 126s libpng16-16t64 libpsl5t64 libreadline8t64 libsharpyuv0 libsm6 libtcl8.6 126s libthai-data libthai0 libtiff6 libtirpc3t64 libtk8.6 libwebp7 libxcb-render0 126s libxcb-shm0 libxft2 libxrender1 libxss1 libxt6t64 r-base-core r-cran-actuar 126s r-cran-expint r-cran-mass unzip x11-common xdg-utils zip 126s The following packages will be upgraded: 126s curl 126s 1 upgraded, 53 newly installed, 5 to remove and 0 not upgraded. 126s Need to get 40.4 MB/40.4 MB of archives. 126s After this operation, 79.4 MB of additional disk space will be used. 126s Get:1 /tmp/autopkgtest.L9T0fu/1-autopkgtest-satdep.deb autopkgtest-satdep arm64 0 [712 B] 127s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libpsl5t64 arm64 0.21.2-1.1 [57.4 kB] 127s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 curl arm64 8.5.0-2ubuntu7 [222 kB] 127s Get:4 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libcurl4t64 arm64 8.5.0-2ubuntu7 [332 kB] 127s Get:5 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libpng16-16t64 arm64 1.6.43-3 [185 kB] 127s Get:6 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libreadline8t64 arm64 8.2-3.1 [153 kB] 127s Get:7 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libtirpc3t64 arm64 1.3.4+ds-1.1 [83.5 kB] 127s Get:8 http://ftpmaster.internal/ubuntu noble/main arm64 fonts-dejavu-mono all 2.37-8 [502 kB] 127s Get:9 http://ftpmaster.internal/ubuntu noble/main arm64 fonts-dejavu-core all 2.37-8 [835 kB] 127s Get:10 http://ftpmaster.internal/ubuntu noble/main arm64 fontconfig-config arm64 2.15.0-1ubuntu1 [37.0 kB] 127s Get:11 http://ftpmaster.internal/ubuntu noble/main arm64 libfontconfig1 arm64 2.15.0-1ubuntu1 [142 kB] 127s Get:12 http://ftpmaster.internal/ubuntu noble/main arm64 fontconfig arm64 2.15.0-1ubuntu1 [190 kB] 127s Get:13 http://ftpmaster.internal/ubuntu noble/main arm64 libblas3 arm64 3.12.0-3 [143 kB] 127s Get:14 http://ftpmaster.internal/ubuntu noble/main arm64 libpixman-1-0 arm64 0.42.2-1 [193 kB] 127s Get:15 http://ftpmaster.internal/ubuntu noble/main arm64 libxcb-render0 arm64 1.15-1 [16.1 kB] 127s Get:16 http://ftpmaster.internal/ubuntu noble/main arm64 libxcb-shm0 arm64 1.15-1 [5780 B] 127s Get:17 http://ftpmaster.internal/ubuntu noble/main arm64 libxrender1 arm64 1:0.9.10-1.1 [19.1 kB] 127s Get:18 http://ftpmaster.internal/ubuntu noble/main arm64 libcairo2 arm64 1.18.0-1 [550 kB] 127s Get:19 http://ftpmaster.internal/ubuntu noble/main arm64 libdatrie1 arm64 0.2.13-3 [21.7 kB] 127s Get:20 http://ftpmaster.internal/ubuntu noble/main arm64 libdeflate0 arm64 1.19-1 [43.4 kB] 127s Get:21 http://ftpmaster.internal/ubuntu noble/main arm64 libgfortran5 arm64 14-20240303-1ubuntu1 [444 kB] 127s Get:22 http://ftpmaster.internal/ubuntu noble/main arm64 libgomp1 arm64 14-20240303-1ubuntu1 [144 kB] 127s Get:23 http://ftpmaster.internal/ubuntu noble/main arm64 libgraphite2-3 arm64 1.3.14-2 [81.5 kB] 127s Get:24 http://ftpmaster.internal/ubuntu noble/main arm64 libharfbuzz0b arm64 8.3.0-2 [463 kB] 127s Get:25 http://ftpmaster.internal/ubuntu noble/main arm64 x11-common all 1:7.7+23ubuntu2 [23.4 kB] 127s Get:26 http://ftpmaster.internal/ubuntu noble/main arm64 libice6 arm64 2:1.0.10-1build2 [41.7 kB] 127s Get:27 http://ftpmaster.internal/ubuntu noble/main arm64 libjpeg-turbo8 arm64 2.1.5-2ubuntu1 [160 kB] 127s Get:28 http://ftpmaster.internal/ubuntu noble/main arm64 libjpeg8 arm64 8c-2ubuntu11 [2148 B] 127s Get:29 http://ftpmaster.internal/ubuntu noble/main arm64 liblapack3 arm64 3.12.0-3 [2241 kB] 127s Get:30 http://ftpmaster.internal/ubuntu noble/main arm64 liblerc4 arm64 4.0.0+ds-4ubuntu1 [153 kB] 127s Get:31 http://ftpmaster.internal/ubuntu noble/main arm64 libthai-data all 0.1.29-2 [158 kB] 127s Get:32 http://ftpmaster.internal/ubuntu noble/main arm64 libthai0 arm64 0.1.29-2 [18.1 kB] 127s Get:33 http://ftpmaster.internal/ubuntu noble/main arm64 libpango-1.0-0 arm64 1.51.0+ds-4 [226 kB] 127s Get:34 http://ftpmaster.internal/ubuntu noble/main arm64 libpangoft2-1.0-0 arm64 1.51.0+ds-4 [41.2 kB] 127s Get:35 http://ftpmaster.internal/ubuntu noble/main arm64 libpangocairo-1.0-0 arm64 1.51.0+ds-4 [27.6 kB] 127s Get:36 http://ftpmaster.internal/ubuntu noble/main arm64 libpaper1 arm64 1.1.29 [13.1 kB] 127s Get:37 http://ftpmaster.internal/ubuntu noble/main arm64 libpaper-utils arm64 1.1.29 [8480 B] 127s Get:38 http://ftpmaster.internal/ubuntu noble/main arm64 libsharpyuv0 arm64 1.3.2-0.4 [14.4 kB] 127s Get:39 http://ftpmaster.internal/ubuntu noble/main arm64 libsm6 arm64 2:1.2.3-1build2 [16.1 kB] 127s Get:40 http://ftpmaster.internal/ubuntu noble/main arm64 libtcl8.6 arm64 8.6.13+dfsg-2 [980 kB] 127s Get:41 http://ftpmaster.internal/ubuntu noble/main arm64 libjbig0 arm64 2.1-6.1ubuntu1 [28.9 kB] 128s Get:42 http://ftpmaster.internal/ubuntu noble/main arm64 libwebp7 arm64 1.3.2-0.4 [191 kB] 128s Get:43 http://ftpmaster.internal/ubuntu noble/main arm64 libtiff6 arm64 4.5.1+git230720-3ubuntu1 [226 kB] 128s Get:44 http://ftpmaster.internal/ubuntu noble/main arm64 libxft2 arm64 2.3.6-1 [43.3 kB] 128s Get:45 http://ftpmaster.internal/ubuntu noble/main arm64 libxss1 arm64 1:1.2.3-1build2 [8252 B] 128s Get:46 http://ftpmaster.internal/ubuntu noble/main arm64 libtk8.6 arm64 8.6.13-2 [760 kB] 128s Get:47 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libxt6t64 arm64 1:1.2.1-1.2 [168 kB] 128s Get:48 http://ftpmaster.internal/ubuntu noble/main arm64 zip arm64 3.0-13 [172 kB] 128s Get:49 http://ftpmaster.internal/ubuntu noble/main arm64 unzip arm64 6.0-28ubuntu3 [171 kB] 128s Get:50 http://ftpmaster.internal/ubuntu noble/main arm64 xdg-utils all 1.1.3-4.1ubuntu3 [62.0 kB] 128s Get:51 http://ftpmaster.internal/ubuntu noble-proposed/universe arm64 r-base-core arm64 4.3.3-2build1 [26.8 MB] 128s Get:52 http://ftpmaster.internal/ubuntu noble/universe arm64 r-cran-expint arm64 0.1-8-1 [209 kB] 128s Get:53 http://ftpmaster.internal/ubuntu noble/universe arm64 r-cran-actuar arm64 3.3-4-1 [1397 kB] 128s Get:54 http://ftpmaster.internal/ubuntu noble/universe arm64 r-cran-mass arm64 7.3-60.0.1-1 [1119 kB] 129s Preconfiguring packages ... 129s Fetched 40.4 MB in 2s (20.6 MB/s) 129s dpkg: libpsl5:arm64: dependency problems, but removing anyway as you requested: 129s wget depends on libpsl5 (>= 0.16.0). 129s libcurl4:arm64 depends on libpsl5 (>= 0.16.0). 129s libcurl3-gnutls:arm64 depends on libpsl5 (>= 0.16.0). 129s 129s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74774 files and directories currently installed.) 129s Removing libpsl5:arm64 (0.21.2-1build1) ... 129s Selecting previously unselected package libpsl5t64:arm64. 129s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74769 files and directories currently installed.) 129s Preparing to unpack .../libpsl5t64_0.21.2-1.1_arm64.deb ... 129s Unpacking libpsl5t64:arm64 (0.21.2-1.1) ... 129s Preparing to unpack .../curl_8.5.0-2ubuntu7_arm64.deb ... 129s Unpacking curl (8.5.0-2ubuntu7) over (8.5.0-2ubuntu2) ... 129s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74775 files and directories currently installed.) 129s Removing libcurl4:arm64 (8.5.0-2ubuntu2) ... 129s Selecting previously unselected package libcurl4t64:arm64. 130s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74770 files and directories currently installed.) 130s Preparing to unpack .../libcurl4t64_8.5.0-2ubuntu7_arm64.deb ... 130s Unpacking libcurl4t64:arm64 (8.5.0-2ubuntu7) ... 130s dpkg: libpng16-16:arm64: dependency problems, but removing anyway as you requested: 130s libplymouth5:arm64 depends on libpng16-16 (>= 1.6.2). 130s libfreetype6:arm64 depends on libpng16-16 (>= 1.6.2-1). 130s 130s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74776 files and directories currently installed.) 130s Removing libpng16-16:arm64 (1.6.43-1) ... 130s Selecting previously unselected package libpng16-16t64:arm64. 130s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74766 files and directories currently installed.) 130s Preparing to unpack .../libpng16-16t64_1.6.43-3_arm64.deb ... 130s Unpacking libpng16-16t64:arm64 (1.6.43-3) ... 130s dpkg: libreadline8:arm64: dependency problems, but removing anyway as you requested: 130s parted depends on libreadline8 (>= 6.0). 130s libpython3.12-stdlib:arm64 depends on libreadline8 (>= 7.0~beta). 130s gpgsm depends on libreadline8 (>= 6.0). 130s gpgconf depends on libreadline8 (>= 6.0). 130s gpg depends on libreadline8 (>= 6.0). 130s gawk depends on libreadline8 (>= 6.0). 130s fdisk depends on libreadline8 (>= 6.0). 130s 130s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74777 files and directories currently installed.) 130s Removing libreadline8:arm64 (8.2-3) ... 130s Selecting previously unselected package libreadline8t64:arm64. 130s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74765 files and directories currently installed.) 130s Preparing to unpack .../libreadline8t64_8.2-3.1_arm64.deb ... 130s Adding 'diversion of /lib/aarch64-linux-gnu/libhistory.so.8 to /lib/aarch64-linux-gnu/libhistory.so.8.usr-is-merged by libreadline8t64' 130s Adding 'diversion of /lib/aarch64-linux-gnu/libhistory.so.8.2 to /lib/aarch64-linux-gnu/libhistory.so.8.2.usr-is-merged by libreadline8t64' 130s Adding 'diversion of /lib/aarch64-linux-gnu/libreadline.so.8 to /lib/aarch64-linux-gnu/libreadline.so.8.usr-is-merged by libreadline8t64' 130s Adding 'diversion of /lib/aarch64-linux-gnu/libreadline.so.8.2 to /lib/aarch64-linux-gnu/libreadline.so.8.2.usr-is-merged by libreadline8t64' 130s Unpacking libreadline8t64:arm64 (8.2-3.1) ... 130s dpkg: libtirpc3:arm64: dependency problems, but removing anyway as you requested: 130s lsof depends on libtirpc3 (>= 1.0.2). 130s libpython3.12-stdlib:arm64 depends on libtirpc3 (>= 1.0.2). 130s libnss-nisplus:arm64 depends on libtirpc3 (>= 1.0.2). 130s libnsl2:arm64 depends on libtirpc3 (>= 1.0.2). 130s iproute2 depends on libtirpc3 (>= 1.0.2). 130s 130s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74785 files and directories currently installed.) 130s Removing libtirpc3:arm64 (1.3.4+ds-1build1) ... 130s Selecting previously unselected package libtirpc3t64:arm64. 130s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74779 files and directories currently installed.) 130s Preparing to unpack .../00-libtirpc3t64_1.3.4+ds-1.1_arm64.deb ... 130s Adding 'diversion of /lib/aarch64-linux-gnu/libtirpc.so.3 to /lib/aarch64-linux-gnu/libtirpc.so.3.usr-is-merged by libtirpc3t64' 130s Adding 'diversion of /lib/aarch64-linux-gnu/libtirpc.so.3.0.0 to /lib/aarch64-linux-gnu/libtirpc.so.3.0.0.usr-is-merged by libtirpc3t64' 130s Unpacking libtirpc3t64:arm64 (1.3.4+ds-1.1) ... 130s Selecting previously unselected package fonts-dejavu-mono. 130s Preparing to unpack .../01-fonts-dejavu-mono_2.37-8_all.deb ... 130s Unpacking fonts-dejavu-mono (2.37-8) ... 130s Selecting previously unselected package fonts-dejavu-core. 130s Preparing to unpack .../02-fonts-dejavu-core_2.37-8_all.deb ... 130s Unpacking fonts-dejavu-core (2.37-8) ... 130s Selecting previously unselected package fontconfig-config. 130s Preparing to unpack .../03-fontconfig-config_2.15.0-1ubuntu1_arm64.deb ... 131s Unpacking fontconfig-config (2.15.0-1ubuntu1) ... 131s Selecting previously unselected package libfontconfig1:arm64. 131s Preparing to unpack .../04-libfontconfig1_2.15.0-1ubuntu1_arm64.deb ... 131s Unpacking libfontconfig1:arm64 (2.15.0-1ubuntu1) ... 131s Selecting previously unselected package fontconfig. 131s Preparing to unpack .../05-fontconfig_2.15.0-1ubuntu1_arm64.deb ... 131s Unpacking fontconfig (2.15.0-1ubuntu1) ... 131s Selecting previously unselected package libblas3:arm64. 131s Preparing to unpack .../06-libblas3_3.12.0-3_arm64.deb ... 131s Unpacking libblas3:arm64 (3.12.0-3) ... 131s Selecting previously unselected package libpixman-1-0:arm64. 131s Preparing to unpack .../07-libpixman-1-0_0.42.2-1_arm64.deb ... 131s Unpacking libpixman-1-0:arm64 (0.42.2-1) ... 131s Selecting previously unselected package libxcb-render0:arm64. 131s Preparing to unpack .../08-libxcb-render0_1.15-1_arm64.deb ... 131s Unpacking libxcb-render0:arm64 (1.15-1) ... 131s Selecting previously unselected package libxcb-shm0:arm64. 131s Preparing to unpack .../09-libxcb-shm0_1.15-1_arm64.deb ... 131s Unpacking libxcb-shm0:arm64 (1.15-1) ... 131s Selecting previously unselected package libxrender1:arm64. 131s Preparing to unpack .../10-libxrender1_1%3a0.9.10-1.1_arm64.deb ... 131s Unpacking libxrender1:arm64 (1:0.9.10-1.1) ... 131s Selecting previously unselected package libcairo2:arm64. 131s Preparing to unpack .../11-libcairo2_1.18.0-1_arm64.deb ... 131s Unpacking libcairo2:arm64 (1.18.0-1) ... 131s Selecting previously unselected package libdatrie1:arm64. 131s Preparing to unpack .../12-libdatrie1_0.2.13-3_arm64.deb ... 131s Unpacking libdatrie1:arm64 (0.2.13-3) ... 131s Selecting previously unselected package libdeflate0:arm64. 131s Preparing to unpack .../13-libdeflate0_1.19-1_arm64.deb ... 131s Unpacking libdeflate0:arm64 (1.19-1) ... 131s Selecting previously unselected package libgfortran5:arm64. 131s Preparing to unpack .../14-libgfortran5_14-20240303-1ubuntu1_arm64.deb ... 131s Unpacking libgfortran5:arm64 (14-20240303-1ubuntu1) ... 131s Selecting previously unselected package libgomp1:arm64. 131s Preparing to unpack .../15-libgomp1_14-20240303-1ubuntu1_arm64.deb ... 131s Unpacking libgomp1:arm64 (14-20240303-1ubuntu1) ... 131s Selecting previously unselected package libgraphite2-3:arm64. 131s Preparing to unpack .../16-libgraphite2-3_1.3.14-2_arm64.deb ... 131s Unpacking libgraphite2-3:arm64 (1.3.14-2) ... 131s Selecting previously unselected package libharfbuzz0b:arm64. 131s Preparing to unpack .../17-libharfbuzz0b_8.3.0-2_arm64.deb ... 131s Unpacking libharfbuzz0b:arm64 (8.3.0-2) ... 131s Selecting previously unselected package x11-common. 131s Preparing to unpack .../18-x11-common_1%3a7.7+23ubuntu2_all.deb ... 131s Unpacking x11-common (1:7.7+23ubuntu2) ... 131s Selecting previously unselected package libice6:arm64. 131s Preparing to unpack .../19-libice6_2%3a1.0.10-1build2_arm64.deb ... 131s Unpacking libice6:arm64 (2:1.0.10-1build2) ... 131s Selecting previously unselected package libjpeg-turbo8:arm64. 131s Preparing to unpack .../20-libjpeg-turbo8_2.1.5-2ubuntu1_arm64.deb ... 131s Unpacking libjpeg-turbo8:arm64 (2.1.5-2ubuntu1) ... 131s Selecting previously unselected package libjpeg8:arm64. 131s Preparing to unpack .../21-libjpeg8_8c-2ubuntu11_arm64.deb ... 131s Unpacking libjpeg8:arm64 (8c-2ubuntu11) ... 131s Selecting previously unselected package liblapack3:arm64. 131s Preparing to unpack .../22-liblapack3_3.12.0-3_arm64.deb ... 131s Unpacking liblapack3:arm64 (3.12.0-3) ... 131s Selecting previously unselected package liblerc4:arm64. 131s Preparing to unpack .../23-liblerc4_4.0.0+ds-4ubuntu1_arm64.deb ... 131s Unpacking liblerc4:arm64 (4.0.0+ds-4ubuntu1) ... 131s Selecting previously unselected package libthai-data. 131s Preparing to unpack .../24-libthai-data_0.1.29-2_all.deb ... 131s Unpacking libthai-data (0.1.29-2) ... 131s Selecting previously unselected package libthai0:arm64. 131s Preparing to unpack .../25-libthai0_0.1.29-2_arm64.deb ... 131s Unpacking libthai0:arm64 (0.1.29-2) ... 131s Selecting previously unselected package libpango-1.0-0:arm64. 131s Preparing to unpack .../26-libpango-1.0-0_1.51.0+ds-4_arm64.deb ... 131s Unpacking libpango-1.0-0:arm64 (1.51.0+ds-4) ... 131s Selecting previously unselected package libpangoft2-1.0-0:arm64. 131s Preparing to unpack .../27-libpangoft2-1.0-0_1.51.0+ds-4_arm64.deb ... 131s Unpacking libpangoft2-1.0-0:arm64 (1.51.0+ds-4) ... 131s Selecting previously unselected package libpangocairo-1.0-0:arm64. 131s Preparing to unpack .../28-libpangocairo-1.0-0_1.51.0+ds-4_arm64.deb ... 131s Unpacking libpangocairo-1.0-0:arm64 (1.51.0+ds-4) ... 131s Selecting previously unselected package libpaper1:arm64. 132s Preparing to unpack .../29-libpaper1_1.1.29_arm64.deb ... 132s Unpacking libpaper1:arm64 (1.1.29) ... 132s Selecting previously unselected package libpaper-utils. 132s Preparing to unpack .../30-libpaper-utils_1.1.29_arm64.deb ... 132s Unpacking libpaper-utils (1.1.29) ... 132s Selecting previously unselected package libsharpyuv0:arm64. 132s Preparing to unpack .../31-libsharpyuv0_1.3.2-0.4_arm64.deb ... 132s Unpacking libsharpyuv0:arm64 (1.3.2-0.4) ... 132s Selecting previously unselected package libsm6:arm64. 132s Preparing to unpack .../32-libsm6_2%3a1.2.3-1build2_arm64.deb ... 132s Unpacking libsm6:arm64 (2:1.2.3-1build2) ... 132s Selecting previously unselected package libtcl8.6:arm64. 132s Preparing to unpack .../33-libtcl8.6_8.6.13+dfsg-2_arm64.deb ... 132s Unpacking libtcl8.6:arm64 (8.6.13+dfsg-2) ... 132s Selecting previously unselected package libjbig0:arm64. 132s Preparing to unpack .../34-libjbig0_2.1-6.1ubuntu1_arm64.deb ... 132s Unpacking libjbig0:arm64 (2.1-6.1ubuntu1) ... 132s Selecting previously unselected package libwebp7:arm64. 132s Preparing to unpack .../35-libwebp7_1.3.2-0.4_arm64.deb ... 132s Unpacking libwebp7:arm64 (1.3.2-0.4) ... 132s Selecting previously unselected package libtiff6:arm64. 132s Preparing to unpack .../36-libtiff6_4.5.1+git230720-3ubuntu1_arm64.deb ... 132s Unpacking libtiff6:arm64 (4.5.1+git230720-3ubuntu1) ... 132s Selecting previously unselected package libxft2:arm64. 132s Preparing to unpack .../37-libxft2_2.3.6-1_arm64.deb ... 132s Unpacking libxft2:arm64 (2.3.6-1) ... 132s Selecting previously unselected package libxss1:arm64. 132s Preparing to unpack .../38-libxss1_1%3a1.2.3-1build2_arm64.deb ... 132s Unpacking libxss1:arm64 (1:1.2.3-1build2) ... 132s Selecting previously unselected package libtk8.6:arm64. 132s Preparing to unpack .../39-libtk8.6_8.6.13-2_arm64.deb ... 132s Unpacking libtk8.6:arm64 (8.6.13-2) ... 132s Selecting previously unselected package libxt6t64:arm64. 132s Preparing to unpack .../40-libxt6t64_1%3a1.2.1-1.2_arm64.deb ... 132s Unpacking libxt6t64:arm64 (1:1.2.1-1.2) ... 132s Selecting previously unselected package zip. 132s Preparing to unpack .../41-zip_3.0-13_arm64.deb ... 132s Unpacking zip (3.0-13) ... 132s Selecting previously unselected package unzip. 132s Preparing to unpack .../42-unzip_6.0-28ubuntu3_arm64.deb ... 132s Unpacking unzip (6.0-28ubuntu3) ... 132s Selecting previously unselected package xdg-utils. 132s Preparing to unpack .../43-xdg-utils_1.1.3-4.1ubuntu3_all.deb ... 132s Unpacking xdg-utils (1.1.3-4.1ubuntu3) ... 132s Selecting previously unselected package r-base-core. 132s Preparing to unpack .../44-r-base-core_4.3.3-2build1_arm64.deb ... 132s Unpacking r-base-core (4.3.3-2build1) ... 133s Selecting previously unselected package r-cran-expint. 133s Preparing to unpack .../45-r-cran-expint_0.1-8-1_arm64.deb ... 133s Unpacking r-cran-expint (0.1-8-1) ... 133s Selecting previously unselected package r-cran-actuar. 133s Preparing to unpack .../46-r-cran-actuar_3.3-4-1_arm64.deb ... 133s Unpacking r-cran-actuar (3.3-4-1) ... 133s Selecting previously unselected package r-cran-mass. 133s Preparing to unpack .../47-r-cran-mass_7.3-60.0.1-1_arm64.deb ... 133s Unpacking r-cran-mass (7.3-60.0.1-1) ... 133s Selecting previously unselected package autopkgtest-satdep. 133s Preparing to unpack .../48-1-autopkgtest-satdep.deb ... 133s Unpacking autopkgtest-satdep (0) ... 133s Setting up libgraphite2-3:arm64 (1.3.14-2) ... 133s Setting up libpixman-1-0:arm64 (0.42.2-1) ... 133s Setting up libsharpyuv0:arm64 (1.3.2-0.4) ... 133s Setting up libpaper1:arm64 (1.1.29) ... 133s 133s Creating config file /etc/papersize with new version 133s Setting up liblerc4:arm64 (4.0.0+ds-4ubuntu1) ... 133s Setting up libxrender1:arm64 (1:0.9.10-1.1) ... 133s Setting up libdatrie1:arm64 (0.2.13-3) ... 133s Setting up libtirpc3t64:arm64 (1.3.4+ds-1.1) ... 133s Setting up libxcb-render0:arm64 (1.15-1) ... 133s Setting up unzip (6.0-28ubuntu3) ... 133s Setting up x11-common (1:7.7+23ubuntu2) ... 134s Setting up libpsl5t64:arm64 (0.21.2-1.1) ... 134s Setting up libdeflate0:arm64 (1.19-1) ... 134s Setting up libxcb-shm0:arm64 (1.15-1) ... 134s Setting up libpaper-utils (1.1.29) ... 134s Setting up libgomp1:arm64 (14-20240303-1ubuntu1) ... 134s Setting up libjbig0:arm64 (2.1-6.1ubuntu1) ... 134s Setting up zip (3.0-13) ... 134s Setting up libblas3:arm64 (3.12.0-3) ... 134s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/aarch64-linux-gnu/libblas.so.3 (libblas.so.3-aarch64-linux-gnu) in auto mode 134s Setting up fonts-dejavu-mono (2.37-8) ... 134s Setting up libpng16-16t64:arm64 (1.6.43-3) ... 134s Setting up libtcl8.6:arm64 (8.6.13+dfsg-2) ... 134s Setting up fonts-dejavu-core (2.37-8) ... 134s Setting up libjpeg-turbo8:arm64 (2.1.5-2ubuntu1) ... 134s Setting up libgfortran5:arm64 (14-20240303-1ubuntu1) ... 134s Setting up libwebp7:arm64 (1.3.2-0.4) ... 134s Setting up libreadline8t64:arm64 (8.2-3.1) ... 134s Setting up libharfbuzz0b:arm64 (8.3.0-2) ... 134s Setting up libthai-data (0.1.29-2) ... 134s Setting up libxss1:arm64 (1:1.2.3-1build2) ... 134s Setting up xdg-utils (1.1.3-4.1ubuntu3) ... 134s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 134s Setting up libjpeg8:arm64 (8c-2ubuntu11) ... 134s Setting up libice6:arm64 (2:1.0.10-1build2) ... 134s Setting up liblapack3:arm64 (3.12.0-3) ... 134s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/aarch64-linux-gnu/liblapack.so.3 (liblapack.so.3-aarch64-linux-gnu) in auto mode 134s Setting up libcurl4t64:arm64 (8.5.0-2ubuntu7) ... 134s Setting up fontconfig-config (2.15.0-1ubuntu1) ... 134s Setting up libthai0:arm64 (0.1.29-2) ... 134s Setting up libtiff6:arm64 (4.5.1+git230720-3ubuntu1) ... 134s Setting up curl (8.5.0-2ubuntu7) ... 134s Setting up libfontconfig1:arm64 (2.15.0-1ubuntu1) ... 134s Setting up libsm6:arm64 (2:1.2.3-1build2) ... 134s Setting up fontconfig (2.15.0-1ubuntu1) ... 136s Regenerating fonts cache... done. 136s Setting up libxft2:arm64 (2.3.6-1) ... 136s Setting up libtk8.6:arm64 (8.6.13-2) ... 136s Setting up libpango-1.0-0:arm64 (1.51.0+ds-4) ... 136s Setting up libcairo2:arm64 (1.18.0-1) ... 136s Setting up libxt6t64:arm64 (1:1.2.1-1.2) ... 136s Setting up libpangoft2-1.0-0:arm64 (1.51.0+ds-4) ... 136s Setting up libpangocairo-1.0-0:arm64 (1.51.0+ds-4) ... 136s Setting up r-base-core (4.3.3-2build1) ... 136s 136s Creating config file /etc/R/Renviron with new version 136s Setting up r-cran-mass (7.3-60.0.1-1) ... 136s Setting up r-cran-expint (0.1-8-1) ... 136s Setting up r-cran-actuar (3.3-4-1) ... 136s Setting up autopkgtest-satdep (0) ... 136s Processing triggers for man-db (2.12.0-3) ... 137s Processing triggers for install-info (7.1-3) ... 137s Processing triggers for libc-bin (2.39-0ubuntu2) ... 143s (Reading database ... 76995 files and directories currently installed.) 143s Removing autopkgtest-satdep (0) ... 144s autopkgtest [17:50:56]: test run-unit-test: [----------------------- 144s BEGIN TEST betaint-tests.R 144s 144s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 144s Copyright (C) 2024 The R Foundation for Statistical Computing 144s Platform: aarch64-unknown-linux-gnu (64-bit) 144s 144s R is free software and comes with ABSOLUTELY NO WARRANTY. 144s You are welcome to redistribute it under certain conditions. 144s Type 'license()' or 'licence()' for distribution details. 144s 144s R is a collaborative project with many contributors. 144s Type 'contributors()' for more information and 144s 'citation()' on how to cite R or R packages in publications. 144s 144s Type 'demo()' for some demos, 'help()' for on-line help, or 144s 'help.start()' for an HTML browser interface to help. 144s Type 'q()' to quit R. 144s 144s > ### actuar: Actuarial Functions and Heavy Tailed Distributions 144s > ### 144s > ### Tests for the "beta integral" 144s > ### 144s > ### B(a, b; x) = Gamma(a + b) int_0^x t^(a-1) (1 - t)^(b-1) dt 144s > ### 144s > ### Inspired by (and some parts taken from) `tests/d-p-q-r-tests.R` in 144s > ### R sources. 144s > ### 144s > ### AUTHOR: Vincent Goulet with 144s > ### indirect help from the R Core Team 144s > 144s > ## Load the package 144s > library(actuar) 144s 144s Attaching package: ‘actuar’ 144s 144s The following objects are masked from ‘package:stats’: 144s 144s sd, var 144s 144s The following object is masked from ‘package:grDevices’: 144s 144s cm 144s 144s > 144s > ## Define a "local" version of the otherwise non-exported function 144s > ## 'betaint'. 144s > betaint <- actuar:::betaint 144s > 144s > ## Special values and utilities. Taken from `tests/d-p-q-r-tests.R`. 144s > xMax <- 1 - .Machine$double.eps 144s > xMin <- .Machine$double.xmin 144s > All.eq <- function(x, y) 144s + { 144s + all.equal.numeric(x, y, tolerance = 64 * .Machine$double.eps, 144s + scale = max(0, mean(abs(x), na.rm = TRUE))) 144s + } 144s > 144s > if(!interactive()) 144s + set.seed(123) 144s > 144s > ## Limiting cases 144s > stopifnot(exprs = { 144s + !is.finite(betaint(0.3, Inf, 2)) 144s + !is.finite(betaint(0.3, Inf, -2.2)) 144s + is.nan (betaint(0.3, 0, 2)) 144s + !is.finite(betaint(0.3, 2, Inf)) 144s + is.nan (betaint(0.3, 2, -2.2)) # a <= 1 + floor(-b) 144s + is.nan (betaint(0.3, 2, 0)) 144s + }) 144s > 144s > ## Tests for cases with b > 0 144s > x <- c(xMin, runif(10), xMax) 144s > b <- 2 144s > for (a in rlnorm(5, 2)) 144s + stopifnot(exprs = { 144s + All.eq(betaint(x, a, b), 144s + gamma(a) * gamma(b) * pbeta(x, a, b)) 144s + }) 144s > 144s > ## Tests for cases with b < 0 144s > b <- -2.2 144s > r <- floor(-b) # r = 2 144s > for (a in 1 + r + rlnorm(5, 2)) 144s + { 144s + s <- (x^(a-1) * (1-x)^b)/b + 144s + ((a-1) * x^(a-2) * (1-x)^(b+1))/(b * (b+1)) + 144s + ((a-1) * (a-2) * x^(a-3) * (1-x)^(b+2))/(b * (b+1) * (b+2)) 144s + stopifnot(exprs = { 144s + all.equal(betaint(x, a, b), 144s + -gamma(a+b) * s + 144s + (a-1)*(a-2)*(a-3) * gamma(a-r-1)/(b*(b+1)*(b+2)) * 144s + gamma(b+r+1)*pbeta(x, a-r-1, b+r+1)) 144s + }) 144s + } 144s Warning messages: 144s 1: In betaint(0.3, 0, 2) : NaNs produced 144s 2: In betaint(0.3, 2, -2.2) : NaNs produced 144s 3: In betaint(0.3, 2, 0) : NaNs produced 144s > 144s BEGIN TEST dpqr-tests.R 145s 145s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 145s Copyright (C) 2024 The R Foundation for Statistical Computing 145s Platform: aarch64-unknown-linux-gnu (64-bit) 145s 145s R is free software and comes with ABSOLUTELY NO WARRANTY. 145s You are welcome to redistribute it under certain conditions. 145s Type 'license()' or 'licence()' for distribution details. 145s 145s R is a collaborative project with many contributors. 145s Type 'contributors()' for more information and 145s 'citation()' on how to cite R or R packages in publications. 145s 145s Type 'demo()' for some demos, 'help()' for on-line help, or 145s 'help.start()' for an HTML browser interface to help. 145s Type 'q()' to quit R. 145s 145s > ### actuar: Actuarial Functions and Heavy Tailed Distributions 145s > ### 145s > ### Tests of functions for continuous and discrete probability 145s > ### distributions. 145s > ### 145s > ### Despite the name of the file, the tests are for [dpqrm,lev] 145s > ### functions (for continuous distributions): 145s > ### 145s > ### d: density or probability mass 145s > ### p: cumulative distribution 145s > ### q: quantile 145s > ### r: random number generation 145s > ### m: moment 145s > ### lev: limited moment 145s > ### 145s > ### Distributions are classified and sorted as in appendix A and 145s > ### appendix B of the 'distributions' package vignette. 145s > ### 145s > ### Inspired by (and some parts taken from) `tests/d-p-q-r-tests.R` in 145s > ### R sources. 145s > ### 145s > ### AUTHOR: Vincent Goulet with 145s > ### indirect help from the R Core Team 145s > 145s > ## Load the package 145s > library(actuar) 145s 145s Attaching package: ‘actuar’ 145s 145s The following objects are masked from ‘package:stats’: 145s 145s sd, var 145s 145s The following object is masked from ‘package:grDevices’: 145s 145s cm 145s 145s > library(expint) # for gammainc 145s > 145s > ## Define a "local" version of the otherwise non-exported function 145s > ## 'betaint'. 145s > betaint <- actuar:::betaint 145s > 145s > ## No warnings, unless explicitly asserted via tools::assertWarning. 145s > options(warn = 2) 145s > assertWarning <- tools::assertWarning 145s > 145s > ## Special values and utilities. Taken from `tests/d-p-q-r-tests.R`. 145s > Meps <- .Machine$double.eps 145s > xMax <- .Machine$double.xmax 145s > xMin <- .Machine$double.xmin 145s > All.eq <- function(x, y) 145s + { 145s + all.equal.numeric(x, y, tolerance = 64 * .Machine$double.eps, 145s + scale = max(0, mean(abs(x), na.rm = TRUE))) 145s + } 145s > 145s > if(!interactive()) 145s + set.seed(123) 145s > 145s > ### 145s > ### CONTINUOUS DISTRIBUTIONS 145s > ### 145s > 145s > ## 145s > ## FELLER-PARETO AND PARETO II, III, IV DISTRIBUTIONS 145s > ## 145s > 145s > ## When reasonable, we also test consistency with the special cases 145s > ## min = 0: 145s > ## 145s > ## Feller-Pareto -> Transformated beta 145s > ## Pareto IV -> Burr 145s > ## Pareto III -> Loglogistic 145s > ## Pareto II -> Pareto 145s > 145s > ## Density: first check that functions return 0 when scale = Inf, and 145s > ## when x = scale = Inf. 145s > stopifnot(exprs = { 145s + dfpareto(c(42, Inf), min = 1, shape1 = 2, shape2 = 3, shape3 = 4, scale = Inf) == c(0, 0) 145s + dpareto4(c(42, Inf), min = 1, shape1 = 2, shape2 = 3, scale = Inf) == c(0, 0) 145s + dpareto3(c(42, Inf), min = 1, shape = 3, scale = Inf) == c(0, 0) 145s + dpareto2(c(42, Inf), min = 1, shape = 2, scale = Inf) == c(0, 0) 145s + }) 145s > 145s > ## Next test density functions for an array of standard values. 145s > nshpar <- 3 # (maximum) number of shape parameters 145s > min <- round(rnorm(30, 2), 2) 145s > shpar <- replicate(30, rlnorm(nshpar, 2), simplify = FALSE) 145s > scpar <- rlnorm(30, 2) # scale parameters 145s > for (i in seq_along(min)) 145s + { 145s + m <- min[i] 145s + a <- shpar[[c(i, 1)]]; g <- shpar[[c(i, 2)]]; t <- shpar[[c(i, 3)]] 145s + Be <- beta(a, t) 145s + for (s in scpar) 145s + { 145s + x <- rfpareto(100, min = m, shape1 = a, shape2 = g, shape3 = t, scale = s) 145s + y <- (x - m)/s 145s + u <- 1/(1 + y^(-g)) 145s + stopifnot(exprs = { 145s + all.equal(d1 <- dfpareto(x, min = m, 145s + shape1 = a, shape2 = g, shape3 = t, 145s + scale = s), 145s + d2 <- dfpareto(y, min = 0, 145s + shape1 = a, shape2 = g, shape3 = t, 145s + scale = 1)/s, 145s + tolerance = 1e-10) 145s + all.equal(d2, 145s + dtrbeta(y, 145s + shape1 = a, shape2 = g, shape3 = t, 145s + scale = 1)/s, 145s + tolerance = 1e-10) 145s + all.equal(d1, 145s + g * y^(g*t - 1)/(s * Be * (1 + y^g)^(a + t)), 145s + tolerance = 1e-10) 145s + all.equal(d1, 145s + g * u^t * (1 - u)^a/((x - m) * Be), 145s + tolerance = 1e-10) 145s + }) 145s + x <- rpareto4(100, min = m, shape1 = a, shape2 = g, scale = s) 145s + y <- (x - m)/s 145s + u <- 1/(1 + y^g) 145s + stopifnot(exprs = { 145s + all.equal(d1 <- dpareto4(x, min = m, 145s + shape1 = a, shape2 = g, 145s + scale = s), 145s + d2 <- dpareto4(y, min = 0, 145s + shape1 = a, shape2 = g, 145s + scale = 1)/s, 145s + tolerance = 1e-10) 145s + all.equal(d2, 145s + dburr(y, 145s + shape1 = a, shape2 = g, 145s + scale = 1)/s, 145s + tolerance = 1e-10) 145s + all.equal(d1, 145s + a * g * y^(g - 1)/(s * (1 + y^g)^(a + 1)), 145s + tolerance = 1e-10) 145s + all.equal(d1, 145s + a * g * u^a * (1 - u)/(x - m), 145s + tolerance = 1e-10) 145s + }) 145s + x <- rpareto3(100, min = m, shape = g, scale = s) 145s + y <- (x - m)/s 145s + u <- 1/(1 + y^(-g)) 145s + stopifnot(exprs = { 145s + all.equal(d1 <- dpareto3(x, min = m, 145s + shape = g, 145s + scale = s), 145s + d2 <- dpareto3(y, min = 0, 145s + shape = g, 145s + scale = 1)/s, 145s + tolerance = 1e-10) 145s + all.equal(d2, 145s + dllogis(y, 145s + shape = g, 145s + scale = 1)/s, 145s + tolerance = 1e-10) 145s + all.equal(d1, 145s + g * y^(g - 1)/(s * (1 + y^g)^2), 145s + tolerance = 1e-10) 145s + all.equal(d1, 145s + g * u * (1 - u)/(x - m), 145s + tolerance = 1e-10) 145s + }) 145s + x <- rpareto2(100, min = m, shape = a, scale = s) 145s + y <- (x - m)/s 145s + u <- 1/(1 + y) 145s + stopifnot(exprs = { 145s + all.equal(d1 <- dpareto2(x, min = m, 145s + shape = a, 145s + scale = s), 145s + d2 <- dpareto2(y, min = 0, 145s + shape = a, 145s + scale = 1)/s, 145s + tolerance = 1e-10) 145s + all.equal(d2, 145s + dpareto(y, 145s + shape = a, 145s + scale = 1)/s, 145s + tolerance = 1e-10) 145s + all.equal(d1, 145s + a/(s * (1 + y)^(a + 1)), 145s + tolerance = 1e-10) 145s + all.equal(d1, 145s + a * u^a * (1 - u)/(x - m), 145s + tolerance = 1e-10) 145s + }) 145s + } 145s + } 146s > 146s > ## Tests on the cumulative distribution function. 146s > ## 146s > ## Note: when shape1 = shape3 = 1, the underlying beta distribution is 146s > ## a uniform. Therefore, pfpareto(x, min, 1, shape2, 1, scale) should 146s > ## return the value of u = v/(1 + v), v = ((x - min)/scale)^shape2. 146s > ## 146s > ## x = 2/Meps = 2^53 (with min = 0, shape2 = scale = 1) is the value 146s > ## where the cdf would jump to 1 if we weren't using the trick to 146s > ## compute the cdf with pbeta(1 - u, ..., lower = FALSE). 146s > scLrg <- 1e300 * c(0.5, 1, 2) 146s > m <- rnorm(1) 146s > stopifnot(exprs = { 146s + pfpareto(Inf, min = 10, 1, 2, 3, scale = xMax) == 1 146s + pfpareto(2^53, min = 0, 1, 1, 1, scale = 1) != 1 146s + pfpareto(2^53 + xMax, min = xMax, 1, 1, 1, scale = 1) != 1 146s + all.equal(pfpareto(xMin + m, min = m, 1, 1, 1, scale = 1), xMin) 146s + all.equal(y <- pfpareto(1e300 + m, min = m, 146s + shape1 = 3, shape2 = rep(c(1, 2), each = length(scLrg)), 146s + shape3 = 1, 146s + scale = scLrg, log = TRUE), 146s + ptrbeta(1e300, 146s + shape1 = 3, shape2 = rep(c(1, 2), each = length(scLrg)), 146s + shape3 = 1, 146s + scale = scLrg, log = TRUE)) 146s + all.equal(y, 146s + c(pbeta(c(2/3, 1/2), 1, 3, lower.tail = TRUE, log = TRUE), 146s + pbeta(2/3, 3, 1, lower.tail = FALSE, log = TRUE), 146s + pbeta(c(4/5, 1/2), 1, 3, lower.tail = TRUE, log = TRUE), 146s + pbeta(4/5, 3, 1, lower.tail = FALSE, log = TRUE))) 146s + }) 146s > stopifnot(exprs = { 146s + ppareto4(Inf, min = 10, 1, 3, scale = xMax) == 1 146s + ppareto4(2^53, min = 0, 1, 1, scale = 1) != 1 146s + ppareto4(2^53 + xMax, min = xMax, 1, 1, scale = 1) != 1 146s + all.equal(ppareto4(xMin + m, min = m, 1, 1, scale = 1), xMin) 146s + all.equal(y <- ppareto4(1e300 + m, min = m, 146s + shape1 = 3, shape2 = rep(c(1, 2), each = length(scLrg)), 146s + scale = scLrg, log = TRUE), 146s + pburr(1e300, 146s + shape1 = 3, shape2 = rep(c(1, 2), each = length(scLrg)), 146s + scale = scLrg, log = TRUE)) 146s + all.equal(y, 146s + c(log(1 - c(1/3, 1/2, 2/3)^3), 146s + log(1 - c(1/5, 1/2, 4/5)^3))) 146s + }) 146s > stopifnot(exprs = { 146s + ppareto3(Inf, min = 10, 3, scale = xMax) == 1 146s + ppareto3(2^53, min = 0, 1, scale = 1) != 1 146s + ppareto3(2^53 + xMax, min = xMax, 1, scale = 1) != 1 146s + all.equal(ppareto3(xMin + m, min = m, 1, scale = 1), xMin) 146s + all.equal(y <- ppareto3(1e300 + m, min = m, 146s + shape = rep(c(1, 2), each = length(scLrg)), 146s + scale = scLrg, log = TRUE), 146s + pllogis (1e300, 146s + shape = rep(c(1, 2), each = length(scLrg)), 146s + scale = scLrg, log = TRUE)) 146s + all.equal(y, 146s + c(log(c(2/3, 1/2, 1/3)), 146s + log(c(4/5, 1/2, 1/5)))) 146s + }) 146s > stopifnot(exprs = { 146s + ppareto2(Inf, min = 10, 3, scale = xMax) == 1 146s + ppareto2(2^53, min = 0, 1, scale = 1) != 1 146s + ppareto2(2^53 + xMax, min = xMax, 1, scale = 1) != 1 146s + all.equal(ppareto2(xMin + m, min = m, 1, scale = 1), xMin) 146s + all.equal(y <- ppareto2(1e300 + m, min = m, 146s + shape = 3, 146s + scale = scLrg, log = TRUE), 146s + ppareto (1e300, 146s + shape = 3, 146s + scale = scLrg, log = TRUE)) 146s + all.equal(y, 146s + c(log(1 - c(1/3, 1/2, 2/3)^3))) 146s + }) 146s > 146s > ## Also check that distribution functions return 0 when scale = Inf. 146s > stopifnot(exprs = { 146s + pfpareto(x, min = m, shape1 = a, shape2 = g, shape3 = t, scale = Inf) == 0 146s + ppareto4(x, min = m, shape1 = a, shape2 = g, scale = Inf) == 0 146s + ppareto3(x, min = m, shape = g, scale = Inf) == 0 146s + ppareto2(x, min = m, shape = a, scale = Inf) == 0 146s + }) 146s > 146s > ## Tests for first three (positive) moments 146s > ## 146s > ## Simulation of new parameters ensuring that the first three moments 146s > ## exist. 146s > set.seed(123) # reset the seed 146s > nshpar <- 3 # (maximum) number of shape parameters 146s > min <- round(rnorm(30, 2), 2) 146s > shpar <- replicate(30, c(3, 3, 0) + rlnorm(nshpar, 2), simplify = FALSE) 146s > scpar <- rlnorm(30, 2) # scale parameters 146s > for (i in seq_along(min)) 146s + { 146s + m <- min[i] 146s + a <- shpar[[c(i, 1)]]; g <- shpar[[c(i, 2)]]; t <- shpar[[c(i, 3)]] 146s + Be <- beta(a, t) 146s + Ga <- gamma(a) 146s + for (s in scpar) 146s + { 146s + stopifnot(exprs = { 146s + All.eq(mfpareto(1, min = m, 146s + shape1 = a, shape2 = g, shape3 = t, 146s + scale = s), 146s + m * (Be + (s/m) * beta(t + 1/g, a - 1/g))/Be) 146s + All.eq(mfpareto(2, min = m, 146s + shape1 = a, shape2 = g, shape3 = t, 146s + scale = s), 146s + m^2 * (Be + 2 * (s/m) * beta(t + 1/g, a - 1/g) 146s + + (s/m)^2 * beta(t + 2/g, a - 2/g))/Be) 146s + All.eq(mfpareto(3, min = m, 146s + shape1 = a, shape2 = g, shape3 = t, 146s + scale = s), 146s + m^3 * (Be + 3 * (s/m) * beta(t + 1/g, a - 1/g) 146s + + 3 * (s/m)^2 * beta(t + 2/g, a - 2/g) 146s + + (s/m)^3 * beta(t + 3/g, a - 3/g))/Be) 146s + }) 146s + stopifnot(exprs = { 146s + All.eq(mpareto4(1, min = m, 146s + shape1 = a, shape2 = g, 146s + scale = s), 146s + m * (Ga + (s/m) * gamma(1 + 1/g) * gamma(a - 1/g))/Ga) 146s + All.eq(mpareto4(2, min = m, 146s + shape1 = a, shape2 = g, 146s + scale = s), 146s + m^2 * (Ga + 2 * (s/m) * gamma(1 + 1/g) * gamma(a - 1/g) 146s + + (s/m)^2 * gamma(1 + 2/g) * gamma(a - 2/g))/Ga) 146s + All.eq(mpareto4(3, min = m, 146s + shape1 = a, shape2 = g, 146s + scale = s), 146s + m^3 * (Ga + 3 * (s/m) * gamma(1 + 1/g) * gamma(a - 1/g) 146s + + 3 * (s/m)^2 * gamma(1 + 2/g) * gamma(a - 2/g) 146s + + (s/m)^3 * gamma(1 + 3/g) * gamma(a - 3/g))/Ga) 146s + }) 146s + stopifnot(exprs = { 146s + All.eq(mpareto3(1, min = m, 146s + shape = g, 146s + scale = s), 146s + m * (1 + (s/m) * gamma(1 + 1/g) * gamma(1 - 1/g))) 146s + All.eq(mpareto3(2, min = m, 146s + shape = g, 146s + scale = s), 146s + m^2 * (1 + 2 * (s/m) * gamma(1 + 1/g) * gamma(1 - 1/g) 146s + + (s/m)^2 * gamma(1 + 2/g) * gamma(1 - 2/g))) 146s + All.eq(mpareto3(3, min = m, 146s + shape = g, 146s + scale = s), 146s + m^3 * (1 + 3 * (s/m) * gamma(1 + 1/g) * gamma(1 - 1/g) 146s + + 3 * (s/m)^2 * gamma(1 + 2/g) * gamma(1 - 2/g) 146s + + (s/m)^3 * gamma(1 + 3/g) * gamma(1 - 3/g))) 146s + }) 146s + stopifnot(exprs = { 146s + All.eq(mpareto2(1, min = m, 146s + shape = a, 146s + scale = s), 146s + m * (Ga + (s/m) * gamma(1 + 1) * gamma(a - 1))/Ga) 146s + All.eq(mpareto2(2, min = m, 146s + shape = a, 146s + scale = s), 146s + m^2 * (Ga + 2 * (s/m) * gamma(1 + 1) * gamma(a - 1) 146s + + (s/m)^2 * gamma(1 + 2) * gamma(a - 2))/Ga) 146s + All.eq(mpareto2(3, min = m, 146s + shape = a, 146s + scale = s), 146s + m^3 * (Ga + 3 * (s/m) * gamma(1 + 1) * gamma(a - 1) 146s + + 3 * (s/m)^2 * gamma(1 + 2) * gamma(a - 2) 146s + + (s/m)^3 * gamma(1 + 3) * gamma(a - 3))/Ga) 146s + }) 146s + } 146s + } 146s > 146s > ## Tests for first three limited moments 146s > ## 146s > ## Limits are taken from quantiles of each distribution. 146s > q <- c(0.25, 0.50, 0.75, 0.9, 0.95) 146s > for (i in seq_along(min)) 146s + { 146s + m <- min[i] 146s + a <- shpar[[c(i, 1)]]; g <- shpar[[c(i, 2)]]; t <- shpar[[c(i, 3)]] 146s + Ga <- gamma(a) 146s + Gt <- gamma(t) 146s + for (s in scpar) 146s + { 146s + limit <- qfpareto(q, min = m, 146s + shape1 = a, shape2 = g, shape3 = t, 146s + scale = s) 146s + y <- (limit - m)/s 146s + u <- 1/(1 + y^(-g)) 146s + stopifnot(exprs = { 146s + All.eq(levfpareto(limit, order = 1, min = m, 146s + shape1 = a, shape2 = g, shape3 = t, 146s + scale = s), 146s + m * (betaint(u, t, a) + (s/m) * betaint(u, t + 1/g, a - 1/g))/(Ga * Gt) + 146s + limit * pbeta(u, t, a, lower = FALSE)) 146s + All.eq(levfpareto(limit, order = 2, min = m, 146s + shape1 = a, shape2 = g, shape3 = t, 146s + scale = s), 146s + m^2 * (betaint(u, t, a) + 2 * (s/m) * betaint(u, t + 1/g, a - 1/g) 146s + + (s/m)^2 * betaint(u, t + 2/g, a - 2/g))/(Ga * Gt) + 146s + limit^2 * pbeta(u, t, a, lower = FALSE)) 146s + All.eq(levfpareto(limit, order = 3, min = m, 146s + shape1 = a, shape2 = g, shape3 = t, 146s + scale = s), 146s + m^3 * (betaint(u, t, a) + 3 * (s/m) * betaint(u, t + 1/g, a - 1/g) 146s + + 3 * (s/m)^2 * betaint(u, t + 2/g, a - 2/g) 146s + + (s/m)^3 * betaint(u, t + 3/g, a - 3/g))/(Ga * Gt) + 146s + limit^3 * pbeta(u, t, a, lower = FALSE)) 146s + }) 146s + limit <- qpareto4(q, min = m, 146s + shape1 = a, shape2 = g, 146s + scale = s) 146s + y <- (limit - m)/s 146s + u <- 1/(1 + y^g) 146s + u1m <- 1/(1 + y^(-g)) 146s + stopifnot(exprs = { 146s + All.eq(levpareto4(limit, order = 1, min = m, 146s + shape1 = a, shape2 = g, 146s + scale = s), 146s + m * (betaint(u1m, 1, a) + (s/m) * betaint(u1m, 1 + 1/g, a - 1/g))/Ga + 146s + limit * u^a) 146s + All.eq(levpareto4(limit, order = 2, min = m, 146s + shape1 = a, shape2 = g, 146s + scale = s), 146s + m^2 * (betaint(u1m, 1, a) + 2 * (s/m) * betaint(u1m, 1 + 1/g, a - 1/g) 146s + + (s/m)^2 * betaint(u1m, 1 + 2/g, a - 2/g))/Ga + 146s + limit^2 * u^a) 146s + All.eq(levpareto4(limit, order = 3, min = m, 146s + shape1 = a, shape2 = g, 146s + scale = s), 146s + m^3 * (betaint(u1m, 1, a) + 3 * (s/m) * betaint(u1m, 1 + 1/g, a - 1/g) 146s + + 3 * (s/m)^2 * betaint(u1m, 1 + 2/g, a - 2/g) 146s + + (s/m)^3 * betaint(u1m, 1 + 3/g, a - 3/g))/Ga + 146s + limit^3 * u^a) 146s + }) 146s + limit <- qpareto3(q, min = m, 146s + shape = g, 146s + scale = s) 146s + y <- (limit - m)/s 146s + u <- 1/(1 + y^(-g)) 146s + u1m <- 1/(1 + y^g) 146s + stopifnot(exprs = { 146s + All.eq(levpareto3(limit, order = 1, min = m, 146s + shape = g, 146s + scale = s), 146s + m * (u + (s/m) * betaint(u, 1 + 1/g, 1 - 1/g)) + 146s + limit * u1m) 146s + All.eq(levpareto3(limit, order = 2, min = m, 146s + shape = g, 146s + scale = s), 146s + m^2 * (u + 2 * (s/m) * betaint(u, 1 + 1/g, 1 - 1/g) 146s + + (s/m)^2 * betaint(u, 1 + 2/g, 1 - 2/g)) + 146s + limit^2 * u1m) 146s + All.eq(levpareto3(limit, order = 3, min = m, 146s + shape = g, 146s + scale = s), 146s + m^3 * (u + 3 * (s/m) * betaint(u, 1 + 1/g, 1 - 1/g) 146s + + 3 * (s/m)^2 * betaint(u, 1 + 2/g, 1 - 2/g) 146s + + (s/m)^3 * betaint(u, 1 + 3/g, 1 - 3/g)) + 146s + limit^3 * u1m) 146s + }) 146s + limit <- qpareto2(q, min = m, 146s + shape = a, 146s + scale = s) 146s + y <- (limit - m)/s 146s + u <- 1/(1 + y) 146s + u1m <- 1/(1 + y^(-1)) 146s + stopifnot(exprs = { 146s + All.eq(levpareto2(limit, order = 1, min = m, 146s + shape = a, 146s + scale = s), 146s + m * (betaint(u1m, 1, a) + (s/m) * betaint(u1m, 1 + 1, a - 1))/Ga + 146s + limit * u^a) 146s + All.eq(levpareto2(limit, order = 2, min = m, 146s + shape = a, 146s + scale = s), 146s + m^2 * (betaint(u1m, 1, a) + 2 * (s/m) * betaint(u1m, 1 + 1, a - 1) 146s + + (s/m)^2 * betaint(u1m, 1 + 2, a - 2))/Ga + 146s + limit^2 * u^a) 146s + All.eq(levpareto2(limit, order = 3, min = m, 146s + shape = a, 146s + scale = s), 146s + m^3 * (betaint(u1m, 1, a) + 3 * (s/m) * betaint(u1m, 1 + 1, a - 1) 146s + + 3 * (s/m)^2 * betaint(u1m, 1 + 2, a - 2) 146s + + (s/m)^3 * betaint(u1m, 1 + 3, a - 3))/Ga + 146s + limit^3 * u^a) 146s + }) 146s + } 146s + } 147s > 147s > ## 147s > ## TRANSFORMED BETA FAMILY 147s > ## 147s > 147s > ## Density: first check that functions return 0 when scale = Inf, and 147s > ## when x = scale = Inf. 147s > stopifnot(exprs = { 147s + dtrbeta (c(42, Inf), shape1 = 2, shape2 = 3, shape3 = 4, scale = Inf) == c(0, 0) 147s + dburr (c(42, Inf), shape1 = 2, shape2 = 3, scale = Inf) == c(0, 0) 147s + dllogis (c(42, Inf), shape = 3, scale = Inf) == c(0, 0) 147s + dparalogis (c(42, Inf), shape = 2, scale = Inf) == c(0, 0) 147s + dgenpareto (c(42, Inf), shape1 = 2, shape2 = 4, scale = Inf) == c(0, 0) 147s + dpareto (c(42, Inf), shape = 2, scale = Inf) == c(0, 0) 147s + dinvburr (c(42, Inf), shape1 = 4, shape2 = 3, scale = Inf) == c(0, 0) 147s + dinvpareto (c(42, Inf), shape = 4, scale = Inf) == c(0, 0) 147s + dinvparalogis(c(42, Inf), shape = 4, scale = Inf) == c(0, 0) 147s + }) 147s > 147s > ## Next test density functions for an array of standard values. 147s > set.seed(123) # reset the seed 147s > nshpar <- 3 # (maximum) number of shape parameters 147s > shpar <- replicate(30, rlnorm(nshpar, 2), simplify = FALSE) 147s > scpar <- rlnorm(30, 2) # scale parameters 147s > for (i in seq_along(shpar)) 147s + { 147s + a <- shpar[[c(i, 1)]]; g <- shpar[[c(i, 2)]]; t <- shpar[[c(i, 3)]] 147s + Be <- beta(a, t) 147s + for (s in scpar) 147s + { 147s + x <- rtrbeta(100, shape1 = a, shape2 = g, shape3 = t, scale = s) 147s + y <- x/s 147s + u <- 1/(1 + y^(-g)) 147s + stopifnot(exprs = { 147s + all.equal(d1 <- dtrbeta(x, shape1 = a, shape2 = g, shape3 = t, 147s + scale = s), 147s + d2 <- dtrbeta(y, shape1 = a, shape2 = g, shape3 = t, 147s + scale = 1)/s, 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + g * y^(g*t - 1)/(s * Be * (1 + y^g)^(a + t)), 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + g * u^t * (1 - u)^a/(x * Be), 147s + tolerance = 1e-10) 147s + }) 147s + x <- rburr(100, shape1 = a, shape2 = g, scale = s) 147s + y <- x/s 147s + u <- 1/(1 + y^g) 147s + stopifnot(exprs = { 147s + all.equal(d1 <- dburr(x, shape1 = a, shape2 = g, 147s + scale = s), 147s + d2 <- dburr(y, shape1 = a, shape2 = g, 147s + scale = 1)/s, 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + a * g * y^(g - 1)/(s * (1 + y^g)^(a + 1)), 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + a * g * u^a * (1 - u)/x, 147s + tolerance = 1e-10) 147s + }) 147s + x <- rllogis(100, shape = g, scale = s) 147s + y <- x/s 147s + u <- 1/(1 + y^(-g)) 147s + stopifnot(exprs = { 147s + all.equal(d1 <- dllogis(x, shape = g, 147s + scale = s), 147s + d2 <- dllogis(y, shape = g, 147s + scale = 1)/s, 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + g * y^(g - 1)/(s * (1 + y^g)^2), 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + g * u * (1 - u)/x, 147s + tolerance = 1e-10) 147s + }) 147s + x <- rparalogis(100, shape = a, scale = s) 147s + y <- x/s 147s + u <- 1/(1 + y^a) 147s + stopifnot(exprs = { 147s + all.equal(d1 <- dparalogis(x, shape = a, 147s + scale = s), 147s + d2 <- dparalogis(y, shape = a, 147s + scale = 1)/s, 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + a^2 * y^(a - 1)/(s * (1 + y^a)^(a + 1)), 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + a^2 * u^a * (1 - u)/x, 147s + tolerance = 1e-10) 147s + }) 147s + x <- rgenpareto(100, shape1 = a, shape2 = t, scale = s) 147s + y <- x/s 147s + u <- 1/(1 + y^(-1)) 147s + stopifnot(exprs = { 147s + all.equal(d1 <- dgenpareto(x, shape1 = a, shape2 = t, 147s + scale = s), 147s + d2 <- dgenpareto(y, shape1 = a, shape2 = t, 147s + scale = 1)/s, 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + y^(t - 1)/(s * Be * (1 + y)^(a + t)), 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + u^t * (1 - u)^a/(x * Be), 147s + tolerance = 1e-10) 147s + }) 147s + x <- rpareto(100, shape = a, scale = s) 147s + y <- x/s 147s + u <- 1/(1 + y) 147s + stopifnot(exprs = { 147s + all.equal(d1 <- dpareto(x, shape = a, 147s + scale = s), 147s + d2 <- dpareto(y, shape = a, 147s + scale = 1)/s, 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + a/(s * (1 + y)^(a + 1)), 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + a * u^a * (1 - u)/x, 147s + tolerance = 1e-10) 147s + }) 147s + x <- rpareto1(100, min = s, shape = a) 147s + stopifnot(exprs = { 147s + all.equal(d1 <- dpareto1(x, min = s, shape = a), 147s + a * s^a/(x^(a + 1)), 147s + tolerance = 1e-10) 147s + }) 147s + x <- rinvburr(100, shape1 = t, shape2 = g, scale = s) 147s + y <- x/s 147s + u <- 1/(1 + y^(-g)) 147s + stopifnot(exprs = { 147s + all.equal(d1 <- dinvburr(x, shape1 = t, shape2 = g, 147s + scale = s), 147s + d2 <- dinvburr(y, shape1 = t, shape2 = g, 147s + scale = 1)/s, 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + t * g * y^(g*t - 1)/(s * (1 + y^g)^(t + 1)), 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + t * g * u^t * (1 - u)/x, 147s + tolerance = 1e-10) 147s + }) 147s + x <- rinvpareto(100, shape = t, scale = s) 147s + y <- x/s 147s + u <- 1/(1 + y^(-1)) 147s + stopifnot(exprs = { 147s + all.equal(d1 <- dinvpareto(x, shape = t, 147s + scale = s), 147s + d2 <- dinvpareto(y, shape = t, 147s + scale = 1)/s, 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + t * y^(t - 1)/(s * (1 + y)^(t + 1)), 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + t * u^t * (1 - u)/x, 147s + tolerance = 1e-10) 147s + }) 147s + x <- rinvparalogis(100, shape = t, scale = s) 147s + y <- x/s 147s + u <- 1/(1 + y^(-t)) 147s + stopifnot(exprs = { 147s + all.equal(d1 <- dinvparalogis(x, shape = t, 147s + scale = s), 147s + d2 <- dinvparalogis(y, shape = t, 147s + scale = 1)/s, 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + t^2 * y^(t^2 - 1)/(s * (1 + y^t)^(t + 1)), 147s + tolerance = 1e-10) 147s + all.equal(d1, 147s + t^2 * u^t * (1 - u)/x, 147s + tolerance = 1e-10) 147s + }) 147s + } 147s + } 149s > 149s > ## Tests on the cumulative distribution function. 149s > ## 149s > ## Note: when shape1 = shape3 = 1, the underlying beta distribution is 149s > ## a uniform. Therefore, ptrbeta(x, 1, shape2, 1, scale) should return 149s > ## the value of u = v/(1 + v), v = (x/scale)^shape2. 149s > ## 149s > ## x = 2/Meps = 2^53 (with, shape2 = scale = 1) is the value where the 149s > ## cdf would jump to 1 if we weren't using the trick to compute the 149s > ## cdf with pbeta(1 - u, ..., lower = FALSE). 149s > scLrg <- 1e300 * c(0.5, 1, 2) 149s > stopifnot(exprs = { 149s + ptrbeta(Inf, 1, 2, 3, scale = xMax) == 1 149s + ptrbeta(2^53, 1, 1, 1, scale = 1) != 1 149s + all.equal(ptrbeta(xMin, 1, 1, 1, scale = 1), xMin) 149s + all.equal(ptrbeta(1e300, 149s + shape1 = 3, shape2 = rep(c(1, 2), each = length(scLrg)), 149s + shape3 = 1, 149s + scale = scLrg, log = TRUE), 149s + c(pbeta(c(2/3, 1/2), 1, 3, lower.tail = TRUE, log = TRUE), 149s + pbeta(2/3, 3, 1, lower.tail = FALSE, log = TRUE), 149s + pbeta(c(4/5, 1/2), 1, 3, lower.tail = TRUE, log = TRUE), 149s + pbeta(4/5, 3, 1, lower.tail = FALSE, log = TRUE))) 149s + }) 149s > stopifnot(exprs = { 149s + pburr(Inf, 1, 3, scale = xMax) == 1 149s + pburr(2^53, 1, 1, scale = 1) != 1 149s + all.equal(pburr(xMin, 1, 1, scale = 1), xMin) 149s + all.equal(pburr(1e300, 149s + shape1 = 3, shape2 = rep(c(1, 2), each = length(scLrg)), 149s + scale = scLrg, log = TRUE), 149s + c(log(1 - c(1/3, 1/2, 2/3)^3), 149s + log(1 - c(1/5, 1/2, 4/5)^3))) 149s + }) 149s > stopifnot(exprs = { 149s + pllogis(Inf, 3, scale = xMax) == 1 149s + pllogis(2^53, 1, scale = 1) != 1 149s + all.equal(pllogis(xMin, 1, scale = 1), xMin) 149s + all.equal(pllogis(1e300, 149s + shape = rep(c(1, 2), each = length(scLrg)), 149s + scale = scLrg, log = TRUE), 149s + c(log(c(2/3, 1/2, 1/3)), 149s + log(c(4/5, 1/2, 1/5)))) 149s + }) 149s > stopifnot(exprs = { 149s + pparalogis(Inf, 3, scale = xMax) == 1 149s + pparalogis(2^53, 1, scale = 1) != 1 149s + all.equal(pparalogis(xMin, 1, scale = 1), xMin) 149s + all.equal(pparalogis(1e300, 149s + shape = rep(c(2, 3), each = length(scLrg)), 149s + scale = scLrg, log = TRUE), 149s + c(log(1 - c(1/5, 1/2, 4/5)^2), 149s + log(1 - c(1/9, 1/2, 8/9)^3))) 149s + }) 149s > stopifnot(exprs = { 149s + pgenpareto(Inf, 1, 3, scale = xMax) == 1 149s + pgenpareto(2^53, 1, 1, scale = 1) != 1 149s + all.equal(pgenpareto(xMin, 1, 1, scale = 1), xMin) 149s + all.equal(pgenpareto(1e300, 149s + shape1 = 3, shape2 = 1, 149s + scale = scLrg, log = TRUE), 149s + c(pbeta(c(2/3, 1/2), 1, 3, lower.tail = TRUE, log = TRUE), 149s + pbeta(2/3, 3, 1, lower.tail = FALSE, log = TRUE))) 149s + }) 149s > stopifnot(exprs = { 149s + ppareto(Inf, 3, scale = xMax) == 1 149s + ppareto(2^53, 1, scale = 1) != 1 149s + all.equal(ppareto(xMin, 1, scale = 1), xMin) 149s + all.equal(ppareto(1e300, 149s + shape = 3, 149s + scale = scLrg, log = TRUE), 149s + c(log(1 - c(1/3, 1/2, 2/3)^3))) 149s + }) 149s > stopifnot(exprs = { 149s + ppareto1(Inf, 3, min = xMax) == 1 149s + ppareto1(2^53, 1, min = 1) != 1 149s + all.equal(ppareto1(xMin, 1, min = 1), xMin) 149s + all.equal(ppareto1(1e300, 149s + shape = 3, 149s + min = 1e300 * c(0.001, 0.1, 0.5), log = TRUE), 149s + c(log(1 - c(0.001, 0.1, 0.5)^3))) 149s + }) 149s > stopifnot(exprs = { 149s + pinvburr(Inf, 1, 3, scale = xMax) == 1 149s + pinvburr(2^53, 1, 1, scale = 1) != 1 149s + all.equal(pinvburr(xMin, 1, 1, scale = 1), xMin) 149s + all.equal(pinvburr(1e300, 149s + shape1 = 3, shape2 = rep(c(1, 2), each = length(scLrg)), 149s + scale = scLrg, log = TRUE), 149s + c(log(c(2/3, 1/2, 1/3)^3), 149s + log(c(4/5, 1/2, 1/5)^3))) 149s + }) 149s > stopifnot(exprs = { 149s + pinvpareto(Inf, 3, scale = xMax) == 1 149s + pinvpareto(2^53, 1, scale = 1) != 1 149s + all.equal(pinvpareto(xMin, 1, scale = 1), xMin) 149s + all.equal(pinvpareto(1e300, 149s + shape = 3, 149s + scale = scLrg, log = TRUE), 149s + c(log(c(2/3, 1/2, 1/3)^3))) 149s + }) 149s > stopifnot(exprs = { 149s + pinvparalogis(Inf, 3, scale = xMax) == 1 149s + pinvparalogis(2^53, 1, scale = 1) != 1 149s + all.equal(pinvparalogis(xMin, 1, scale = 1), xMin) 149s + all.equal(pinvparalogis(1e300, 149s + shape = rep(c(2, 3), each = length(scLrg)), 149s + scale = scLrg, log = TRUE), 149s + c(log(c(4/5, 1/2, 1/5)^2), 149s + log(c(8/9, 1/2, 1/9)^3))) 149s + }) 149s > 149s > ## Also check that distribution functions return 0 when scale = Inf. 149s > stopifnot(exprs = { 149s + ptrbeta (x, shape1 = a, shape2 = g, shape3 = t, scale = Inf) == 0 149s + pburr (x, shape1 = a, shape2 = g, scale = Inf) == 0 149s + pllogis (x, shape = g, scale = Inf) == 0 149s + pparalogis (x, shape = a, scale = Inf) == 0 149s + pgenpareto (x, shape1 = a, shape2 = t, scale = Inf) == 0 149s + ppareto (x, shape = a, scale = Inf) == 0 149s + pinvburr (x, shape1 = t, shape2 = g, scale = Inf) == 0 149s + pinvpareto (x, shape = t, scale = Inf) == 0 149s + pinvparalogis(x, shape = t, scale = Inf) == 0 149s + }) 149s > 149s > ## Tests for first three positive moments and first two negative 149s > ## moments. 149s > ## 149s > ## Simulation of new parameters ensuring that said moments exist. 149s > set.seed(123) # reset the seed 149s > nshpar <- 3 # (maximum) number of shape parameters 149s > shpar <- replicate(30, c(3, 3, 3) + rlnorm(nshpar, 2), simplify = FALSE) 149s > scpar <- rlnorm(30, 2) # scale parameters 149s > k <- c(-2, -1, 1, 2, 3) # orders 149s > for (i in seq_along(shpar)) 149s + { 149s + a <- shpar[[c(i, 1)]]; g <- shpar[[c(i, 2)]]; t <- shpar[[c(i, 3)]] 149s + Be <- beta(a, t) 149s + Ga <- gamma(a) 149s + for (s in scpar) 149s + { 149s + stopifnot(exprs = { 149s + All.eq(mtrbeta(k, shape1 = a, shape2 = g, shape3 = t, scale = s), 149s + s^k * beta(t + k/g, a - k/g)/Be) 149s + All.eq(mburr(k, shape1 = a, shape2 = g, scale = s), 149s + s^k * gamma(1 + k/g) * gamma(a - k/g)/Ga) 149s + All.eq(mllogis(k, shape = g, scale = s), 149s + s^k * gamma(1 + k/g) * gamma(1 - k/g)) 149s + All.eq(mparalogis(k, shape = a, scale = s), 149s + s^k * gamma(1 + k/a) * gamma(a - k/a)/Ga) 149s + All.eq(mgenpareto(k, shape1 = a, shape2 = t, scale = s), 149s + s^k * beta(t + k, a - k)/Be) 149s + All.eq(mpareto(k[k > -1], shape = a, scale = s), 149s + s^k[k > -1] * gamma(1 + k[k > -1]) * gamma(a - k[k > -1])/Ga) 149s + All.eq(mpareto1(k, shape = a, min = s), 149s + s^k * a/(a - k)) 149s + All.eq(minvburr(k, shape1 = a, shape2 = g, scale = s), 149s + s^k * gamma(a + k/g) * gamma(1 - k/g)/Ga) 149s + All.eq(minvpareto(k[k < 1], shape = a, scale = s), 149s + s^k[k < 1] * gamma(a + k[k < 1]) * gamma(1 - k[k < 1])/Ga) 149s + All.eq(minvparalogis(k, shape = a, scale = s), 149s + s^k * gamma(a + k/a) * gamma(1 - k/a)/Ga) 149s + }) 149s + } 149s + } 150s > 150s > ## Tests for first three positive limited moments and first two 150s > ## negative limited moments. 150s > ## 150s > ## Limits are taken from quantiles of each distribution. 150s > order <- c(-2, -1, 1, 2, 3) # orders 150s > q <- c(0.25, 0.50, 0.75, 0.9, 0.95) # quantiles 150s > for (i in seq_along(shpar)) 150s + { 150s + a <- shpar[[c(i, 1)]]; g <- shpar[[c(i, 2)]]; t <- shpar[[c(i, 3)]] 150s + Ga <- gamma(a) 150s + Gt <- gamma(t) 150s + for (s in scpar) 150s + { 150s + limit <- qtrbeta(q, shape1 = a, shape2 = g, shape3 = t, scale = s) 150s + y <- limit/s 150s + u <- 1/(1 + y^(-g)) 150s + for (k in order) 150s + stopifnot(exprs = { 150s + All.eq(levtrbeta(limit, order = k, shape1 = a, shape2 = g, shape3 = t, scale = s), 150s + s^k * betaint(u, t + k/g, a - k/g)/(Ga * Gt) + 150s + limit^k * pbeta(u, t, a, lower = FALSE)) 150s + }) 150s + limit <- qburr(q, shape1 = a, shape2 = g, scale = s) 150s + y <- limit/s 150s + u <- 1/(1 + y^g) 150s + for (k in order) 150s + stopifnot(exprs = { 150s + All.eq(levburr(limit, order = k, shape1 = a, shape2 = g, scale = s), 150s + s^k * betaint(1 - u, 1 + k/g, a - k/g)/Ga + 150s + limit^k * u^a) 150s + }) 150s + limit <- qllogis(q, shape = g, scale = s) 150s + y <- limit/s 150s + u <- 1/(1 + y^(-g)) 150s + for (k in order) 150s + stopifnot(exprs = { 150s + All.eq(levllogis(limit, order = k, shape = g, scale = s), 150s + s^k * betaint(u, 1 + k/g, 1 - k/g) + 150s + limit^k * (1 - u)) 150s + }) 150s + limit <- qparalogis(q, shape = a, scale = s) 150s + y <- limit/s 150s + u <- 1/(1 + y^a) 150s + for (k in order) 150s + stopifnot(exprs = { 150s + All.eq(levparalogis(limit, order = k, shape = a, scale = s), 150s + s^k * betaint(1 - u, 1 + k/a, a - k/a)/Ga + 150s + limit^k * u^a) 150s + }) 150s + limit <- qgenpareto(q, shape1 = a, shape2 = t, scale = s) 150s + y <- limit/s 150s + u <- 1/(1 + y^(-1)) 150s + for (k in order) 150s + stopifnot(exprs = { 150s + All.eq(levgenpareto(limit, order = k, shape1 = a, shape2 = t, scale = s), 150s + s^k * betaint(u, t + k, a - k)/(Ga * Gt) + 150s + limit^k * pbeta(u, t, a, lower = FALSE)) 150s + }) 150s + limit <- qpareto(q, shape = a, scale = s) 150s + y <- limit/s 150s + u <- 1/(1 + y) 150s + for (k in order[order > -1]) 150s + stopifnot(exprs = { 150s + All.eq(levpareto(limit, order = k, shape = a, scale = s), 150s + s^k * betaint(1 - u, 1 + k, a - k)/Ga + 150s + limit^k * u^a) 150s + }) 150s + limit <- qpareto1(q, shape = a, min = s) 150s + for (k in order) 150s + stopifnot(exprs = { 150s + All.eq(levpareto1(limit, order = k, shape = a, min = s), 150s + s^k * a/(a - k) - k * s^a/((a - k) * limit^(a - k))) 150s + }) 150s + limit <- qinvburr(q, shape1 = a, shape2 = g, scale = s) 150s + y <- limit/s 150s + u <- 1/(1 + y^(-g)) 150s + for (k in order) 150s + stopifnot(exprs = { 150s + All.eq(levinvburr(limit, order = k, shape1 = a, shape2 = g, scale = s), 150s + s^k * betaint(u, a + k/g, 1 - k/g)/Ga + 150s + limit^k * (1 - u^a)) 150s + }) 150s + limit <- qinvpareto(q, shape = a, scale = s) 150s + y <- limit/s 150s + u <- 1/(1 + y^(-1)) 150s + for (k in order[order < 1]) 150s + stopifnot(exprs = { 150s + All.eq(levinvpareto(limit, order = k, shape = a, scale = s), 150s + s^k * a * 150s + sapply(u, 150s + function(upper) 150s + integrate(function(x) x^(a+k-1) * (1-x)^(-k), 150s + lower = 0, upper = upper)$value) + 150s + limit^k * (1 - u^a)) 150s + }) 150s + limit <- qinvparalogis(q, shape = a, scale = s) 150s + y <- limit/s 150s + u <- 1/(1 + y^(-a)) 150s + for (k in order) 150s + stopifnot(exprs = { 150s + All.eq(levinvparalogis(limit, order = k, shape = a, scale = s), 150s + s^k * betaint(u, a + k/a, 1 - k/a)/Ga + 150s + limit^k * (1 - u^a)) 150s + }) 150s + } 150s + } 153s > 153s > ## 153s > ## TRANSFORMED GAMMA AND INVERSE TRANSFORMED GAMMA FAMILIES 153s > ## 153s > 153s > ## Density: first check that functions return 0 when scale = Inf, and 153s > ## when x = scale = Inf (transformed gamma), or when scale = 0 and 153s > ## when x = scale = 0 (inverse distributions). 153s > stopifnot(exprs = { 153s + dtrgamma (c(42, Inf), shape1 = 2, shape2 = 3, scale = Inf) == c(0, 0) 153s + dinvtrgamma(c(42, 0), shape1 = 2, shape2 = 3, scale = 0) == c(0, 0) 153s + dinvgamma (c(42, 0), shape = 2, scale = 0) == c(0, 0) 153s + dinvweibull(c(42, 0), shape = 3, scale = 0) == c(0, 0) 153s + dinvexp (c(42, 0), scale = 0) == c(0, 0) 153s + }) 153s > 153s > ## Tests on the density 153s > set.seed(123) # reset the seed 153s > nshpar <- 2 # (maximum) number of shape parameters 153s > shpar <- replicate(30, rgamma(nshpar, 5), simplify = FALSE) 153s > scpar <- rlnorm(30, 2) # scale parameters 153s > for (i in seq_along(shpar)) 153s + { 153s + a <- shpar[[c(i, 1)]]; t <- shpar[[c(i, 2)]] 153s + Ga <- gamma(a) 153s + for (s in scpar) 153s + { 153s + x <- rtrgamma(100, shape1 = a, shape2 = t, scale = s) 153s + y <- x/s 153s + u <- y^t 153s + stopifnot(exprs = { 153s + all.equal(d1 <- dtrgamma(x, shape1 = a, shape2 = t, 153s + scale = s), 153s + d2 <- dtrgamma(y, shape1 = a, shape2 = t, 153s + scale = 1)/s, 153s + tolerance = 1e-10) 153s + all.equal(d2, 153s + t/(Ga * s^(a * t)) * x^(a * t - 1) * exp(-u), 153s + tolerance = 1e-10) 153s + all.equal(d1, 153s + t/(Ga * x) * u^a * exp(-u), 153s + tolerance = 1e-10) 153s + }) 153s + x <- rinvtrgamma(100, shape1 = a, shape2 = t, scale = s) 153s + y <- x/s 153s + u <- y^(-t) 153s + stopifnot(exprs = { 153s + all.equal(d1 <- dinvtrgamma(x, shape1 = a, shape2 = t, 153s + scale = s), 153s + d2 <- dinvtrgamma(y, shape1 = a, shape2 = t, 153s + scale = 1)/s, 153s + tolerance = 1e-10) 153s + all.equal(d2, 153s + t * s^(a * t)/(Ga * x^(a * t + 1)) * exp(-u), 153s + tolerance = 1e-10) 153s + all.equal(d1, 153s + t/(Ga * x) * u^a * exp(-u), 153s + tolerance = 1e-10) 153s + }) 153s + x <- rinvgamma(100, shape = a, scale = s) 153s + y <- x/s 153s + u <- y^(-1) 153s + stopifnot(exprs = { 153s + all.equal(d1 <- dinvgamma(x, shape = a, scale = s), 153s + d2 <- dinvgamma(y, shape = a, scale = 1)/s, 153s + tolerance = 1e-10) 153s + all.equal(d2, 153s + s^a/(Ga * x^(a + 1)) * exp(-u), 153s + tolerance = 1e-10) 153s + all.equal(d1, 153s + 1/(Ga * x) * u^a * exp(-u), 153s + tolerance = 1e-10) 153s + }) 153s + x <- rinvweibull(100, shape = t, scale = s) 153s + y <- x/s 153s + u <- y^(-t) 153s + stopifnot(exprs = { 153s + all.equal(d1 <- dinvweibull(x, shape = t, scale = s), 153s + d2 <- dinvweibull(y, shape = t, scale = 1)/s, 153s + tolerance = 1e-10) 153s + all.equal(d2, 153s + t * s^t/x^(t + 1) * exp(-u), 153s + tolerance = 1e-10) 153s + all.equal(d1, 153s + t/x * u * exp(-u), 153s + tolerance = 1e-10) 153s + }) 153s + x <- rinvexp(100, scale = s) 153s + y <- x/s 153s + u <- y^(-1) 153s + stopifnot(exprs = { 153s + all.equal(d1 <- dinvexp(x, scale = s), 153s + d2 <- dinvexp(y, scale = 1)/s, 153s + tolerance = 1e-10) 153s + all.equal(d2, 153s + s/x^2 * exp(-u), 153s + tolerance = 1e-10) 153s + all.equal(d1, 153s + 1/x * u * exp(-u), 153s + tolerance = 1e-10) 153s + }) 153s + } 153s + } 154s > 154s > ## Tests on the cumulative distribution function. 154s > scLrg <- c(2, 100, 1e300 * c(0.1, 1, 10, 100), 1e307, xMax, Inf) 154s > stopifnot(exprs = { 154s + ptrgamma(Inf, 2, 3, scale = xMax) == 1 154s + ptrgamma(xMax, 2, 3, scale = xMax) == pgamma(1, 2, 1) 154s + ptrgamma(xMin, 2, 1, scale = 1) == pgamma(xMin, 2, 1) 154s + all.equal(ptrgamma(1e300, shape1 = 2, shape2 = 1, scale = scLrg, log = TRUE), 154s + pgamma(c(5e299, 1e+298, 10, 1, 0.1, 0.01, 1e-7, 1e+300/xMax, 0), 154s + 2, 1, log = TRUE)) 154s + }) 154s > scLrg <- c(2, 100, 1e300 * c(0.1, 1, 10, 100), 1e307, xMax, 0) 154s > stopifnot(exprs = { 154s + pinvtrgamma(Inf, 2, 3, scale = xMax) == 1 154s + pinvtrgamma(xMax, 2, 3, scale = xMax) == pgamma(1, 2, 1, lower = FALSE) 154s + pinvtrgamma(xMin, 2, 1, scale = 1) == pgamma(1/xMin, 2, 1, lower = FALSE) 154s + all.equal(pinvtrgamma(1e300, shape1 = 2, shape2 = 1, scale = scLrg, log = TRUE), 154s + pgamma(c(2e-300, 1e-298, 0.1, 1, 10, 100, 1e+7, xMax/1e+300, 0), 154s + 2, 1, lower = FALSE, log = TRUE)) 154s + }) 154s > stopifnot(exprs = { 154s + pinvgamma(Inf, 2, scale = xMax) == 1 154s + pinvgamma(xMax, 2, scale = xMax) == pgamma(1, 2, 1, lower = FALSE) 154s + pinvgamma(xMin, 2, scale = 1) == pgamma(1/xMin, 2, 1, lower = FALSE) 154s + all.equal(pinvgamma(1e300, shape = 2, scale = scLrg, log = TRUE), 154s + pgamma(c(2e-300, 1e-298, 0.1, 1, 10, 100, 1e+7, xMax/1e+300, 0), 154s + 2, 1, lower = FALSE, log = TRUE)) 154s + }) 154s > stopifnot(exprs = { 154s + pinvweibull(Inf, 3, scale = xMax) == 1 154s + pinvweibull(xMax, 3, scale = xMax) == exp(-1) 154s + pinvweibull(xMin, 1, scale = 1) == exp(-1/xMin) 154s + all.equal(pinvweibull(1e300, shape = 1, scale = scLrg, log = TRUE), 154s + -c(2e-300, 1e-298, 0.1, 1, 10, 100, 1e+7, xMax/1e+300, 0)) 154s + }) 154s > stopifnot(exprs = { 154s + pinvexp(Inf, 3, scale = xMax) == 1 154s + pinvexp(xMax, 3, scale = xMax) == exp(-1) 154s + pinvexp(xMin, 1, scale = 1) == exp(-1/xMin) 154s + all.equal(pinvexp(1e300, scale = scLrg, log = TRUE), 154s + -c(2e-300, 1e-298, 0.1, 1, 10, 100, 1e+7, xMax/1e+300, 0)) 154s + }) 154s > 154s > ## Tests for first three positive moments and first two negative 154s > ## moments. (Including for the Gamma, Weibull and Exponential 154s > ## distributions of base R.) 154s > ## 154s > ## Simulation of new parameters ensuring that said moments exist. 154s > set.seed(123) # reset the seed 154s > nshpar <- 2 # (maximum) number of shape parameters 154s > shpar <- replicate(30, c(3, 3) + rlnorm(nshpar, 2), simplify = FALSE) 154s > scpar <- rlnorm(30, 2) # scale parameters 154s > k <- c(-2, -1, 1, 2, 3) # orders 154s > for (i in seq_along(shpar)) 154s + { 154s + a <- shpar[[c(i, 1)]]; t <- shpar[[c(i, 2)]] 154s + Ga <- gamma(a) 154s + for (s in scpar) 154s + { 154s + stopifnot(exprs = { 154s + All.eq(mtrgamma(k, shape1 = a, shape2 = t, scale = s), 154s + s^k * gamma(a + k/t)/Ga) 154s + All.eq(mgamma(k, shape = a, scale = s), 154s + s^k * gamma(a + k)/Ga) 154s + All.eq(mweibull(k, shape = t, scale = s), 154s + s^k * gamma(1 + k/t)) 154s + All.eq(mexp(k[k > -1], rate = 1/s), 154s + s^k[k > -1] * gamma(1 + k[k > -1])) 154s + All.eq(minvtrgamma(k, shape1 = a, shape2 = t, scale = s), 154s + s^k * gamma(a - k/t)/Ga) 154s + All.eq(minvgamma(k, shape = a, scale = s), 154s + s^k * gamma(a - k)/Ga) 154s + All.eq(minvweibull(k, shape = t, scale = s), 154s + s^k * gamma(1 - k/t)) 154s + All.eq(minvexp(k[k < 1], scale = s), 154s + s^k[k < 1] * gamma(1 - k[k < 1])) 154s + }) 154s + } 154s + } 154s > 154s > ## Tests for first three positive limited moments and first two 154s > ## negative limited moments. (Including for the Gamma, Weibull and 154s > ## Exponential distributions of base R.) 154s > ## 154s > ## Limits are taken from quantiles of each distribution. 154s > order <- c(-2, -1, 1, 2, 3) # orders 154s > q <- c(0.25, 0.50, 0.75, 0.9, 0.95) # quantiles 154s > for (i in seq_along(shpar)) 154s + { 154s + a <- shpar[[c(i, 1)]]; t <- shpar[[c(i, 2)]] 154s + Ga <- gamma(a) 154s + for (s in scpar) 154s + { 154s + limit <- qtrgamma(q, shape1 = a, shape2 = t, scale = s) 154s + y <- limit/s 154s + u <- y^t 154s + for (k in order) 154s + stopifnot(exprs = { 154s + All.eq(levtrgamma(limit, order = k, shape1 = a, shape2 = t, scale = s), 154s + s^k * gamma(a + k/t)/Ga * pgamma(u, a + k/t, scale = 1) + 154s + limit^k * pgamma(u, a, scale = 1, lower = FALSE)) 154s + }) 154s + limit <- qgamma(q, shape = a, scale = s) 154s + y <- limit/s 154s + for (k in order) 154s + stopifnot(exprs = { 154s + All.eq(levgamma(limit, order = k, shape = a, scale = s), 154s + s^k * gamma(a + k)/Ga * pgamma(y, a + k, scale = 1) + 154s + limit^k * pgamma(y, a, scale = 1, lower = FALSE)) 154s + }) 154s + limit <- qweibull(q, shape = t, scale = s) 154s + y <- limit/s 154s + u <- y^t 154s + for (k in order) 154s + stopifnot(exprs = { 154s + All.eq(levweibull(limit, order = k, shape = t, scale = s), 154s + s^k * gamma(1 + k/t) * pgamma(u, 1 + k/t, scale = 1) + 154s + limit^k * pgamma(u, 1, scale = 1, lower = FALSE)) 154s + }) 154s + limit <- qexp(q, rate = 1/s) 154s + y <- limit/s 154s + for (k in order[order > -1]) 154s + stopifnot(exprs = { 154s + All.eq(levexp(limit, order = k, rate = 1/s), 154s + s^k * gamma(1 + k) * pgamma(y, 1 + k, scale = 1) + 154s + limit^k * pgamma(y, 1, scale = 1, lower = FALSE)) 154s + }) 154s + limit <- qinvtrgamma(q, shape1 = a, shape2 = t, scale = s) 154s + y <- limit/s 154s + u <- y^(-t) 154s + for (k in order) 154s + stopifnot(exprs = { 154s + All.eq(levinvtrgamma(limit, order = k, shape1 = a, shape2 = t, scale = s), 154s + s^k * (gammainc(a - k/t, u)/Ga) + 154s + limit^k * pgamma(u, a, scale = 1)) 154s + }) 154s + limit <- qinvgamma(q, shape = a, scale = s) 154s + y <- limit/s 154s + u <- y^(-1) 154s + for (k in order) 154s + stopifnot(exprs = { 154s + All.eq(levinvgamma(limit, order = k, shape = a, scale = s), 154s + s^k * (gammainc(a - k, u)/Ga) + 154s + limit^k * pgamma(u, a, scale = 1)) 154s + }) 154s + limit <- qinvweibull(q, shape = t, scale = s) 154s + y <- limit/s 154s + u <- y^(-t) 154s + for (k in order) 154s + stopifnot(exprs = { 154s + All.eq(levinvweibull(limit, order = k, shape = t, scale = s), 154s + s^k * gammainc(1 - k/t, u) + 154s + limit^k * (-expm1(-u))) 154s + }) 154s + limit <- qinvexp(q, scale = s) 154s + y <- limit/s 154s + u <- y^(-1) 154s + for (k in order) 154s + stopifnot(exprs = { 154s + All.eq(levinvexp(limit, order = k, scale = s), 154s + s^k * gammainc(1 - k, u) + 154s + limit^k * (-expm1(-u))) 154s + }) 154s + } 154s + } 156s > 156s > ## 156s > ## OTHER DISTRIBUTIONS 156s > ## 156s > 156s > ## Distributions in this category are quite different, so let's treat 156s > ## them separately. 156s > 156s > ## LOGGAMMA 156s > 156s > ## Tests on the density. 156s > stopifnot(exprs = { 156s + dlgamma(c(42, Inf), shapelog = 2, ratelog = 0) == c(0, 0) 156s + }) 156s > assertWarning(stopifnot(exprs = { 156s + is.nan(dlgamma(c(0, 42, Inf), shapelog = 2, ratelog = Inf)) 156s + })) 156s > x <- rlgamma(100, shapelog = 2, ratelog = 1) 156s > for(a in round(rlnorm(30), 2)) 156s + { 156s + Ga <- gamma(a) 156s + for(r in round(rlnorm(30), 2)) 156s + stopifnot(exprs = { 156s + All.eq(dlgamma(x, shapelog = a, ratelog = r), 156s + r^a * (log(x))^(a - 1)/(Ga * x^(r + 1))) 156s + }) 156s + } 157s > 157s > ## Tests on the cumulative distribution function. 157s > assertWarning(stopifnot(exprs = { 157s + is.nan(plgamma(Inf, 1, ratelog = Inf)) 157s + is.nan(plgamma(Inf, Inf, ratelog = Inf)) 157s + })) 157s > scLrg <- log(c(2, 100, 1e300 * c(0.1, 1, 10, 100), 1e307, xMax, Inf)) 157s > stopifnot(exprs = { 157s + plgamma(Inf, 2, ratelog = xMax) == 1 157s + plgamma(xMax, 2, ratelog = 0) == 0 157s + all.equal(plgamma(1e300, 2, ratelog = 1/scLrg, log = TRUE), 157s + pgamma(log(1e300), 2, scale = scLrg, log = TRUE)) 157s + }) 157s > 157s > ## Tests for first three positive moments and first two negative 157s > ## moments. 157s > k <- c(-2, -1, 1, 2, 3) # orders 157s > for(a in round(rlnorm(30), 2)) 157s + { 157s + Ga <- gamma(a) 157s + for(r in 3 + round(rlnorm(30), 2)) 157s + stopifnot(exprs = { 157s + All.eq(mlgamma(k, shapelog = a, ratelog = r), 157s + (1 - k/r)^(-a)) 157s + }) 157s + } 157s > 157s > ## Tests for first three positive limited moments and first two 157s > ## negative limited moments. 157s > order <- c(-2, -1, 1, 2, 3) # orders 157s > q <- c(0.25, 0.50, 0.75, 0.9, 0.95) # quantiles 157s > for(a in round(rlnorm(30), 2)) 157s + { 157s + Ga <- gamma(a) 157s + for(r in 3 + round(rlnorm(30), 2)) 157s + { 157s + limit <- qlgamma(q, shapelog = a, ratelog = r) 157s + for (k in order) 157s + { 157s + u <- log(limit) 157s + stopifnot(exprs = { 157s + All.eq(levlgamma(limit, order = k, shapelog = a, ratelog = r), 157s + (1 - k/r)^(-a) * pgamma((r - k) * u, a, scale = 1) + 157s + limit^k * pgamma(r * u, a, scale = 1,lower = FALSE)) 157s + }) 157s + } 157s + } 157s + } 157s > 157s > ## GUMBEL 157s > 157s > ## Tests on the density. 157s > stopifnot(exprs = { 157s + dgumbel(c(1, 3, Inf), alpha = 2, scale = Inf) == c(0, 0, 0) 157s + dgumbel(c(1, 2, 3), alpha = 2, scale = 0) == c(0, Inf, 0) 157s + dgumbel(c(-Inf, Inf), alpha = 1, scale = 1) == c(0, 0) 157s + dgumbel(1, alpha = Inf, scale = 1) == 0 157s + }) 157s > assertWarning(stopifnot(exprs = { 157s + is.nan(dgumbel(Inf, alpha = Inf, scale = 1)) 157s + is.nan(dgumbel(-Inf, alpha = -Inf, scale = 1)) 157s + is.nan(dgumbel(Inf, alpha = 1, scale = -1)) 157s + is.nan(dgumbel(1, alpha = 1, scale = -1)) 157s + is.nan(dgumbel(1, alpha = Inf, scale = -1)) 157s + })) 157s > x <- rgumbel(100, alpha = 2, scale = 5) 157s > for(a in round(rlnorm(30), 2)) 157s + { 157s + Ga <- gamma(a) 157s + for(s in round(rlnorm(30), 2)) 157s + { 157s + u <- (x - a)/s 157s + stopifnot(exprs = { 157s + All.eq(dgumbel(x, alpha = a, scale = s), 157s + exp(-(u + exp(-u)))/s) 157s + }) 157s + } 157s + } 157s > 157s > ## Tests on the cumulative distribution function. 157s > assertWarning(stopifnot(exprs = { 157s + is.nan(pgumbel(Inf, alpha = Inf, scale = 1)) 157s + is.nan(pgumbel(-Inf, alpha = -Inf, scale = 1)) 157s + is.nan(pgumbel(Inf, alpha = 1, scale = -1)) 157s + is.nan(pgumbel(1, alpha = 1, scale = -1)) 157s + is.nan(pgumbel(1, alpha = Inf, scale = -1)) 157s + })) 157s > scLrg <- c(2, 100, 1e300 * c(0.1, 1, 10, 100), 1e307, xMax, Inf) 157s > stopifnot(exprs = { 157s + pgumbel(c(-Inf, Inf), 2, scale = xMax) == c(0, 1) 157s + pgumbel(c(xMin, xMax), 2, scale = 0) == c(0, 1) 157s + all.equal(pgumbel(1e300, 0, scale = scLrg, log = TRUE), 157s + -exp(-c(5e299, 1e+298, 10, 1, 0.1, 0.01, 1e-7, 1e+300/xMax, 0))) 157s + }) 157s > 157s > ## Test the first two moments, the only ones implemented. 157s > assertWarning(stopifnot(exprs = { 157s + is.nan(mgumbel(c(-2, -1, 3, 4), alpha = 2, scale = 5)) 157s + })) 157s > stopifnot(exprs = { 157s + All.eq(mgumbel(1, alpha = 2, scale = 5), 157s + 2 + 5 * 0.577215664901532860606512090082) 157s + All.eq(mgumbel(2, alpha = 2, scale = 5), 157s + pi^2 * 25/6 + (2 + 5 * 0.577215664901532860606512090082)^2) 157s + }) 157s > 157s > ## INVERSE GAUSSIAN 157s > 157s > ## Tests on the density. 157s > stopifnot(exprs = { 157s + dinvgauss(c(1, 3, Inf), mean = 2, dispersion = Inf) == c(0, 0, 0) 157s + dinvgauss(c(0, 42, Inf), mean = 2, dispersion = 0) == c(Inf, 0, 0) 157s + dinvgauss(c(0, Inf), mean = 1, dispersion = 1) == c(0, 0) 157s + dinvgauss(1, mean = Inf, dispersion = 2) == dinvgamma(1, 0.5, scale = 0.25) 157s + }) 157s > assertWarning(stopifnot(exprs = { 157s + is.nan(dinvgauss(-Inf, mean = -1, dispersion = 1)) 157s + is.nan(dinvgauss(Inf, mean = 1, dispersion = -1)) 157s + is.nan(dinvgauss(1, mean = 1, dispersion = -1)) 157s + is.nan(dinvgauss(1, mean = Inf, dispersion = -1)) 157s + })) 157s > x <- rinvgauss(100, mean = 2, dispersion = 5) 157s > for(mu in round(rlnorm(30), 2)) 157s + { 157s + for(phi in round(rlnorm(30), 2)) 157s + stopifnot(exprs = { 157s + All.eq(dinvgauss(x, mean = mu, dispersion = phi), 157s + 1/sqrt(2*pi*phi*x^3) * exp(-((x/mu - 1)^2)/(2*phi*x))) 157s + }) 157s + } 157s > 157s > ## Tests on the cumulative distribution function. 157s > assertWarning(stopifnot(exprs = { 157s + is.nan(pinvgauss(-Inf, mean = -Inf, dispersion = 1)) 157s + is.nan(pinvgauss(Inf, mean = 1, dispersion = -1)) 157s + is.nan(pinvgauss(1, mean = Inf, dispersion = -1)) 157s + })) 157s > x <- c(1:50, 10^c(3:10, 20, 50, 150, 250)) 157s > sqx <- sqrt(x) 157s > stopifnot(exprs = { 157s + pinvgauss(c(0, Inf), mean = 2, dispersion = xMax) == c(0, 1) 157s + pinvgauss(c(0, xMax), mean = xMax, dispersion = 0) == c(0, 1) 157s + all.equal(pinvgauss(x, 1, dispersion = 1, log = TRUE), 157s + log(pnorm(sqx - 1/sqx) + exp(2) * pnorm(-sqx - 1/sqx))) 157s + }) 157s > 157s > ## Tests for small value of 'shape'. Added for the patch in 4294e9c. 157s > q <- runif(100) 157s > stopifnot(exprs = { 157s + all.equal(q, 157s + pinvgauss(qinvgauss(q, 0.1, 1e-2), 0.1, 1e-2)) 157s + all.equal(q, 157s + pinvgauss(qinvgauss(q, 0.1, 1e-6), 0.1, 1e-6)) 157s + }) 157s > 157s > ## Tests for first three positive, integer moments. 157s > k <- 1:3 157s > for(mu in round(rlnorm(30), 2)) 157s + { 157s + for(phi in round(rlnorm(30), 2)) 157s + stopifnot(exprs = { 157s + All.eq(minvgauss(k, mean = mu, dispersion = phi), 157s + c(mu, 157s + mu^2 * (1 + phi * mu), 157s + mu^3 * (1 + 3 * phi * mu + 3 * (phi * mu)^2))) 157s + }) 157s + } 157s > 157s > ## Tests for limited expected value. 157s > q <- c(0.25, 0.50, 0.75, 0.9, 0.95) # quantiles 157s > for(mu in round(rlnorm(30), 2)) 157s + { 157s + for(phi in round(rlnorm(30), 2)) 157s + { 157s + limit <- qinvgauss(q, mean = mu, dispersion = phi) 157s + stopifnot(exprs = { 157s + All.eq(levinvgauss(limit, mean = mu, dispersion = phi), 157s + mu * (pnorm((limit/mu - 1)/sqrt(phi * limit)) - 157s + exp(2/phi/mu) * pnorm(-(limit/mu + 1)/sqrt(phi * limit))) + 157s + limit * pinvgauss(limit, mean = mu, dispersion = phi, lower = FALSE)) 157s + }) 157s + } 157s + } 157s > 157s > ## GENERALIZED BETA 157s > stopifnot(exprs = { 157s + dgenbeta(c(0, 2.5, 5), shape1 = 0, shape2 = 0, shape3 = 3, scale = 5) == c(Inf, 0, Inf) 157s + dgenbeta(c(0, 2.5, 5), shape1 = 0, shape2 = 0, shape3 = 0, scale = 5) == c(Inf, 0, Inf) 157s + dgenbeta(c(0, 2.5, 5), shape1 = 0, shape2 = 2, shape3 = 0, scale = 5) == c(Inf, 0, 0) 157s + dgenbeta(c(0, 2.5, 5), shape1 = 0, shape2 = Inf, shape3 = 3, scale = 5) == c(Inf, 0, 0) 157s + dgenbeta(c(0, 2.5, 5), shape1 = 1, shape2 = Inf, shape3 = 3, scale = 5) == c(Inf, 0, 0) 157s + dgenbeta(c(0, 2.5, 5), shape1 = Inf, shape2 = Inf, shape3 = 3, scale = 5) == c(0, Inf, 0) 157s + dgenbeta(c(0, 2.5, 5), shape1 = Inf, shape2 = Inf, shape3 = Inf, scale = 5) == c(0, 0, Inf) 157s + }) 157s > nshpar <- 3 # number of shape parameters 157s > shpar <- replicate(30, rlnorm(nshpar, 2), simplify = FALSE) 157s > scpar <- rlnorm(30, 2) # scale parameters 157s > for (i in seq_along(shpar)) 157s + { 157s + a <- shpar[[c(i, 1)]]; b <- shpar[[c(i, 2)]]; t <- shpar[[c(i, 3)]] 157s + Be <- beta(a, b) 157s + for (s in scpar) 157s + { 157s + u <- rbeta(100, a, b) 157s + y <- u^(1/t) 157s + x <- s * y 157s + stopifnot(exprs = { 157s + all.equal(d1 <- dgenbeta(x, shape1 = a, shape2 = b, shape3 = t, 157s + scale = s), 157s + d2 <- dgenbeta(y, shape1 = a, shape2 = b, shape3 = t, 157s + scale = 1)/s, 157s + tolerance = 1e-10) 157s + all.equal(d1, 157s + t * y^(a*t - 1) * (1 - y^t)^(b - 1)/(s * Be), 157s + tolerance = 1e-10) 157s + all.equal(d1, 157s + t * u^a * (1 - u)^(b - 1)/(x * Be), 157s + tolerance = 1e-10) 157s + }) 157s + } 157s + } 157s > 157s > ## Tests on the cumulative distribution function. 157s > scLrg <- 1e300 * c(0.5, 1, 2, 4) 157s > stopifnot(exprs = { 157s + all.equal(pgenbeta(1e300, 157s + shape1 = 3, shape2 = 1, 157s + shape3 = rep(c(1, 2), each = length(scLrg)), 157s + scale = scLrg, log = TRUE), 157s + c(0, pbeta(c(1, 1/2, 1/4), 3, 1, log = TRUE), 157s + 0, pbeta(c(1, 1/4, 1/16), 3, 1, log = TRUE))) 157s + }) 157s > 157s > ## Tests for first three positive moments and first two negative 157s > ## moments. 157s > ## 157s > ## Simulation of new parameters ensuring that said moments exist. 157s > set.seed(123) # reset the seed 157s > nshpar <- 3 # number of shape parameters 157s > shpar <- replicate(30, sqrt(c(3, 0, 3)) + rlnorm(nshpar, 2), simplify = FALSE) 157s > scpar <- rlnorm(30, 2) # scale parameters 157s > k <- c(-2, -1, 1, 2, 3) # orders 157s > for (i in seq_along(shpar)) 157s + { 157s + a <- shpar[[c(i, 1)]]; b <- shpar[[c(i, 2)]]; t <- shpar[[c(i, 3)]] 157s + Be <- beta(a, b) 157s + for (s in scpar) 157s + stopifnot(exprs = { 157s + All.eq(mgenbeta(k, shape1 = a, shape2 = b, shape3 = t, scale = s), 157s + s^k * beta(a + k/t, b)/Be) 157s + }) 157s + } 157s > 157s > ## Tests for first three positive limited moments and first two 157s > ## negative limited moments. 157s > ## 157s > ## Simulation of new parameters ensuring that said moments exist. 157s > order <- c(-2, -1, 1, 2, 3) # orders 157s > q <- c(0.25, 0.50, 0.75, 0.9, 0.95) # quantiles 157s > for (i in seq_along(shpar)) 157s + { 157s + a <- shpar[[c(i, 1)]]; g <- shpar[[c(i, 2)]]; t <- shpar[[c(i, 3)]] 157s + Be <- beta(a, b) 157s + for (s in scpar) 157s + { 157s + limit <- qgenbeta(q, shape1 = a, shape2 = b, shape3 = t, scale = s) 157s + u <- (limit/s)^t 157s + for (k in order) 157s + stopifnot(exprs = { 157s + All.eq(levgenbeta(limit, order = k, shape1 = a, shape2 = b, shape3 = t, scale = s), 157s + s^k * beta(a + k/t, b)/Be * pbeta(u, a + k/t, b) + 157s + limit^k * pbeta(u, a, b, lower = FALSE)) 157s + }) 157s + } 157s + } 158s > 158s > ## 158s > ## RANDOM NUMBERS (all continuous distributions) 158s > ## 158s > set.seed(123) 158s > n <- 20 158s > m <- rnorm(1) 158s > 158s > ## Generate variates 158s > Rfpareto <- rfpareto(n, min = m, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2) 158s > Rpareto4 <- rpareto4(n, min = m, shape1 = 0.8, shape2 = 1.5, scale = 2) 158s > Rpareto3 <- rpareto3(n, min = m, shape = 1.5, scale = 2) 158s > Rpareto2 <- rpareto2(n, min = m, shape = 0.8, scale = 2) 158s > Rtrbeta <- rtrbeta (n, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2) 158s > Rburr <- rburr (n, shape1 = 0.8, shape2 = 1.5, scale = 2) 158s > Rllogis <- rllogis (n, shape = 1.5, scale = 2) 158s > Rparalogis <- rparalogis (n, shape = 0.8, scale = 2) 158s > Rgenpareto <- rgenpareto (n, shape1 = 0.8, shape2 = 2, scale = 2) 158s > Rpareto <- rpareto (n, shape = 0.8, scale = 2) 158s > Rpareto1 <- rpareto1 (n, shape = 0.8, min = 2) 158s > Rinvburr <- rinvburr (n, shape1 = 1.5, shape2 = 2, scale = 2) 158s > Rinvpareto <- rinvpareto (n, shape = 2, scale = 2) 158s > Rinvparalogis <- rinvparalogis(n, shape = 2, scale = 2) 158s > Rtrgamma <- rtrgamma (n, shape1 = 2, shape2 = 3, scale = 5) 158s > Rinvtrgamma <- rinvtrgamma (n, shape1 = 2, shape2 = 3, scale = 5) 158s > Rinvgamma <- rinvgamma (n, shape = 2, scale = 5) 158s > Rinvweibull <- rinvweibull (n, shape = 3, scale = 5) 158s > Rinvexp <- rinvexp (n, scale = 5) 158s > Rlgamma <- rlgamma(n, shapelog = 1.5, ratelog = 5) 158s > Rgumbel <- rgumbel(n, alpha = 2, scale = 5) 158s > Rinvgauss <- rinvgauss(n, mean = 2, dispersion = 5) 158s > Rgenbeta <- rgenbeta(n, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2) 158s > 158s > ## Compute quantiles 158s > Pfpareto <- pfpareto(Rfpareto, min = m, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2) 158s > Ppareto4 <- ppareto4(Rpareto4, min = m, shape1 = 0.8, shape2 = 1.5, scale = 2) 158s > Ppareto3 <- ppareto3(Rpareto3, min = m, shape = 1.5, scale = 2) 158s > Ppareto2 <- ppareto2(Rpareto2, min = m, shape = 0.8, scale = 2) 158s > Ptrbeta <- ptrbeta (Rtrbeta, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2) 158s > Pburr <- pburr (Rburr, shape1 = 0.8, shape2 = 1.5, scale = 2) 158s > Pllogis <- pllogis (Rllogis, shape = 1.5, scale = 2) 158s > Pparalogis <- pparalogis (Rparalogis, shape = 0.8, scale = 2) 158s > Pgenpareto <- pgenpareto (Rgenpareto, shape1 = 0.8, shape2 = 2, scale = 2) 158s > Ppareto <- ppareto (Rpareto, shape = 0.8, scale = 2) 158s > Ppareto1 <- ppareto1 (Rpareto1, shape = 0.8, min = 2) 158s > Pinvburr <- pinvburr (Rinvburr, shape1 = 1.5, shape2 = 2, scale = 2) 158s > Pinvpareto <- pinvpareto (Rinvpareto, shape = 2, scale = 2) 158s > Pinvparalogis <- pinvparalogis(Rinvparalogis, shape = 2, scale = 2) 158s > Ptrgamma <- ptrgamma (Rtrgamma, shape1 = 2, shape2 = 3, scale = 5) 158s > Pinvtrgamma <- pinvtrgamma (Rinvtrgamma, shape1 = 2, shape2 = 3, scale = 5) 158s > Pinvgamma <- pinvgamma (Rinvgamma, shape = 2, scale = 5) 158s > Pinvweibull <- pinvweibull (Rinvweibull, shape = 3, scale = 5) 158s > Pinvexp <- pinvexp (Rinvexp, scale = 5) 158s > Plgamma <- plgamma(Rlgamma, shapelog = 1.5, ratelog = 5) 158s > Pgumbel <- pgumbel(Rgumbel, alpha = 2, scale = 5) 158s > Pinvgauss <- pinvgauss(Rinvgauss, mean = 2, dispersion = 5) 158s > Pgenbeta <- pgenbeta(Rgenbeta, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2) 158s > 158s > ## Just compute pdf 158s > Dfpareto <- dfpareto(Rfpareto, min = m, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2) 158s > Dpareto4 <- dpareto4(Rpareto4, min = m, shape1 = 0.8, shape2 = 1.5, scale = 2) 158s > Dpareto3 <- dpareto3(Rpareto3, min = m, shape = 1.5, scale = 2) 158s > Dpareto2 <- dpareto2(Rpareto2, min = m, shape = 0.8, scale = 2) 158s > Dtrbeta <- dtrbeta (Rtrbeta, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2) 158s > Dburr <- dburr (Rburr, shape1 = 0.8, shape2 = 1.5, scale = 2) 158s > Dllogis <- dllogis (Rllogis, shape = 1.5, scale = 2) 158s > Dparalogis <- dparalogis (Rparalogis, shape = 0.8, scale = 2) 158s > Dgenpareto <- dgenpareto (Rgenpareto, shape1 = 0.8, shape2 = 2, scale = 2) 158s > Dpareto <- dpareto (Rpareto, shape = 0.8, scale = 2) 158s > Dpareto1 <- dpareto1 (Rpareto1, shape = 0.8, min = 2) 158s > Dinvburr <- dinvburr (Rinvburr, shape1 = 1.5, shape2 = 2, scale = 2) 158s > Dinvpareto <- dinvpareto (Rinvpareto, shape = 2, scale = 2) 158s > Dinvparalogis <- dinvparalogis(Rinvparalogis, shape = 2, scale = 2) 158s > Dtrgamma <- dtrgamma (Rtrgamma, shape1 = 2, shape2 = 3, scale = 5) 158s > Dinvtrgamma <- dinvtrgamma (Rinvtrgamma, shape1 = 2, shape2 = 3, scale = 5) 158s > Dinvgamma <- dinvgamma (Rinvtrgamma, shape = 2, scale = 5) 158s > Dinvweibull <- dinvweibull (Rinvweibull, shape = 3, scale = 5) 158s > Dinvexp <- dinvexp (Rinvexp, scale = 5) 158s > Dlgamma <- dlgamma(Rlgamma, shapelog = 1.5, ratelog = 5) 158s > Dgumbel <- dgumbel(Rgumbel, alpha = 2, scale = 5) 158s > Dinvgauss <- dinvgauss(Rinvgauss, mean = 2, dispersion = 5) 158s > Dgenbeta <- dgenbeta(Rgenbeta, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2) 158s > 158s > ## Check q(p(.)) identity 158s > stopifnot(exprs = { 158s + All.eq(Rfpareto, qfpareto(Pfpareto, min = m, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2)) 158s + All.eq(Rpareto4, qpareto4(Ppareto4, min = m, shape1 = 0.8, shape2 = 1.5, scale = 2)) 158s + All.eq(Rpareto3, qpareto3(Ppareto3, min = m, shape = 1.5, scale = 2)) 158s + All.eq(Rpareto2, qpareto2(Ppareto2, min = m, shape = 0.8, scale = 2)) 158s + All.eq(Rtrbeta, qtrbeta (Ptrbeta, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2)) 158s + All.eq(Rburr, qburr (Pburr, shape1 = 0.8, shape2 = 1.5, scale = 2)) 158s + All.eq(Rllogis, qllogis (Pllogis, shape = 1.5, scale = 2)) 158s + All.eq(Rparalogis, qparalogis (Pparalogis, shape = 0.8, scale = 2)) 158s + All.eq(Rgenpareto, qgenpareto (Pgenpareto, shape1 = 0.8, shape2 = 2, scale = 2)) 158s + All.eq(Rpareto, qpareto (Ppareto, shape = 0.8, scale = 2)) 158s + All.eq(Rpareto1, qpareto1 (Ppareto1, shape = 0.8, min = 2)) 158s + All.eq(Rinvburr, qinvburr (Pinvburr, shape1 = 1.5, shape2 = 2, scale = 2)) 158s + All.eq(Rinvpareto, qinvpareto (Pinvpareto, shape = 2, scale = 2)) 158s + All.eq(Rinvparalogis, qinvparalogis(Pinvparalogis, shape = 2, scale = 2)) 158s + All.eq(Rtrgamma, qtrgamma (Ptrgamma, shape1 = 2, shape2 = 3, scale = 5)) 158s + All.eq(Rinvtrgamma, qinvtrgamma (Pinvtrgamma, shape1 = 2, shape2 = 3, scale = 5)) 158s + All.eq(Rinvgamma, qinvgamma (Pinvgamma, shape = 2, scale = 5)) 158s + All.eq(Rinvweibull, qinvweibull (Pinvweibull, shape = 3, scale = 5)) 158s + All.eq(Rinvexp, qinvexp (Pinvexp, scale = 5)) 158s + All.eq(Rlgamma, qlgamma(Plgamma, shapelog = 1.5, ratelog = 5)) 158s + All.eq(Rgumbel, qgumbel(Pgumbel, alpha = 2, scale = 5)) 158s + All.eq(Rinvgauss, qinvgauss(Pinvgauss, mean = 2, dispersion = 5)) 158s + All.eq(Rgenbeta, qgenbeta(Pgenbeta, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2)) 158s + }) 158s > 158s > ## Check q(p(.)) identity for special cases 158s > stopifnot(exprs = { 158s + All.eq(Rfpareto - m, qtrbeta(Pfpareto, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2)) 158s + All.eq(Rpareto4 - m, qburr (Ppareto4, shape1 = 0.8, shape2 = 1.5, scale = 2)) 158s + All.eq(Rpareto3 - m, qllogis(Ppareto3, shape = 1.5, scale = 2)) 158s + All.eq(Rpareto2 - m, qpareto(Ppareto2, shape = 0.8, scale = 2)) 158s + }) 158s > 158s > ## Check q(p(.)) identity with upper tail 158s > stopifnot(exprs = { 158s + All.eq(Rfpareto, qfpareto(1 - Pfpareto, min = m, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2, lower = FALSE)) 158s + All.eq(Rpareto4, qpareto4(1 - Ppareto4, min = m, shape1 = 0.8, shape2 = 1.5, scale = 2, lower = FALSE)) 158s + All.eq(Rpareto3, qpareto3(1 - Ppareto3, min = m, shape = 1.5, scale = 2, lower = FALSE)) 158s + All.eq(Rpareto2, qpareto2(1 - Ppareto2, min = m, shape = 0.8, scale = 2, lower = FALSE)) 158s + All.eq(Rtrbeta, qtrbeta (1 - Ptrbeta, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2, lower = FALSE)) 158s + All.eq(Rburr, qburr (1 - Pburr, shape1 = 0.8, shape2 = 1.5, scale = 2, lower = FALSE)) 158s + All.eq(Rllogis, qllogis (1 - Pllogis, shape = 1.5, scale = 2, lower = FALSE)) 158s + All.eq(Rparalogis, qparalogis (1 - Pparalogis, shape = 0.8, scale = 2, lower = FALSE)) 158s + All.eq(Rgenpareto, qgenpareto (1 - Pgenpareto, shape1 = 0.8, shape2 = 2, scale = 2, lower = FALSE)) 158s + All.eq(Rpareto, qpareto (1 - Ppareto, shape = 0.8, scale = 2, lower = FALSE)) 158s + All.eq(Rpareto1, qpareto1 (1 - Ppareto1, shape = 0.8, min = 2, lower = FALSE)) 158s + All.eq(Rinvburr, qinvburr (1 - Pinvburr, shape1 = 1.5, shape2 = 2, scale = 2, lower = FALSE)) 158s + All.eq(Rinvpareto, qinvpareto (1 - Pinvpareto, shape = 2, scale = 2, lower = FALSE)) 158s + All.eq(Rinvparalogis, qinvparalogis(1 - Pinvparalogis, shape = 2, scale = 2, lower = FALSE)) 158s + All.eq(Rtrgamma, qtrgamma (1 - Ptrgamma, shape1 = 2, shape2 = 3, scale = 5, lower = FALSE)) 158s + All.eq(Rinvtrgamma, qinvtrgamma (1 - Pinvtrgamma, shape1 = 2, shape2 = 3, scale = 5, lower = FALSE)) 158s + All.eq(Rinvgamma, qinvgamma (1 - Pinvgamma, shape = 2, scale = 5, lower = FALSE)) 158s + All.eq(Rinvweibull, qinvweibull (1 - Pinvweibull, shape = 3, scale = 5, lower = FALSE)) 158s + All.eq(Rinvexp, qinvexp (1 - Pinvexp, scale = 5, lower = FALSE)) 158s + All.eq(Rlgamma, qlgamma(1 - Plgamma, shapelog = 1.5, ratelog = 5, lower = FALSE)) 158s + All.eq(Rgumbel, qgumbel(1 - Pgumbel, alpha = 2, scale = 5, lower = FALSE)) 158s + All.eq(Rinvgauss, qinvgauss(1 - Pinvgauss, mean = 2, dispersion = 5, lower = FALSE)) 158s + All.eq(Rgenbeta, qgenbeta(1 - Pgenbeta, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2, lower = FALSE)) 158s + }) 158s > 158s > ## Check q(p(., log), log) identity 158s > stopifnot(exprs = { 158s + All.eq(Rfpareto, qfpareto(log(Pfpareto), min = m, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2, log = TRUE)) 158s + All.eq(Rpareto4, qpareto4(log(Ppareto4), min = m, shape1 = 0.8, shape2 = 1.5, scale = 2, log = TRUE)) 158s + All.eq(Rpareto3, qpareto3(log(Ppareto3), min = m, shape = 1.5, scale = 2, log = TRUE)) 158s + All.eq(Rpareto2, qpareto2(log(Ppareto2), min = m, shape = 0.8, scale = 2, log = TRUE)) 158s + All.eq(Rtrbeta, qtrbeta (log(Ptrbeta), shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2, log = TRUE)) 158s + All.eq(Rburr, qburr (log(Pburr), shape1 = 0.8, shape2 = 1.5, scale = 2, log = TRUE)) 158s + All.eq(Rllogis, qllogis (log(Pllogis), shape = 1.5, scale = 2, log = TRUE)) 158s + All.eq(Rparalogis, qparalogis (log(Pparalogis), shape = 0.8, scale = 2, log = TRUE)) 158s + All.eq(Rgenpareto, qgenpareto (log(Pgenpareto), shape1 = 0.8, shape2 = 2, scale = 2, log = TRUE)) 158s + All.eq(Rpareto, qpareto (log(Ppareto), shape = 0.8, scale = 2, log = TRUE)) 158s + All.eq(Rpareto1, qpareto1 (log(Ppareto1), shape = 0.8, min = 2, log = TRUE)) 158s + All.eq(Rinvburr, qinvburr (log(Pinvburr), shape1 = 1.5, shape2 = 2, scale = 2, log = TRUE)) 158s + All.eq(Rinvpareto, qinvpareto (log(Pinvpareto), shape = 2, scale = 2, log = TRUE)) 158s + All.eq(Rinvparalogis, qinvparalogis(log(Pinvparalogis), shape = 2, scale = 2, log = TRUE)) 158s + All.eq(Rtrgamma, qtrgamma (log(Ptrgamma), shape1 = 2, shape2 = 3, scale = 5, log = TRUE)) 158s + All.eq(Rinvtrgamma, qinvtrgamma (log(Pinvtrgamma), shape1 = 2, shape2 = 3, scale = 5, log = TRUE)) 158s + All.eq(Rinvgamma, qinvgamma (log(Pinvgamma), shape = 2, scale = 5, log = TRUE)) 158s + All.eq(Rinvweibull, qinvweibull (log(Pinvweibull), shape = 3, scale = 5, log = TRUE)) 158s + All.eq(Rinvexp, qinvexp (log(Pinvexp), scale = 5, log = TRUE)) 158s + All.eq(Rlgamma, qlgamma(log(Plgamma), shapelog = 1.5, ratelog = 5, log = TRUE)) 158s + All.eq(Rgumbel, qgumbel(log(Pgumbel), alpha = 2, scale = 5, log = TRUE)) 158s + All.eq(Rinvgauss, qinvgauss(log(Pinvgauss), mean = 2, dispersion = 5, log = TRUE)) 158s + All.eq(Rgenbeta, qgenbeta(log(Pgenbeta), shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2, log = TRUE)) 158s + }) 158s > 158s > ## Check q(p(., log), log) identity with upper tail 158s > stopifnot(exprs = { 158s + All.eq(Rfpareto, qfpareto(log1p(-Pfpareto), min = m, shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2, lower = FALSE, log = TRUE)) 158s + All.eq(Rpareto4, qpareto4(log1p(-Ppareto4), min = m, shape1 = 0.8, shape2 = 1.5, scale = 2, lower = FALSE, log = TRUE)) 158s + All.eq(Rpareto3, qpareto3(log1p(-Ppareto3), min = m, shape = 1.5, scale = 2, lower = FALSE, log = TRUE)) 158s + All.eq(Rpareto2, qpareto2(log1p(-Ppareto2), min = m, shape = 0.8, scale = 2, lower = FALSE, log = TRUE)) 158s + All.eq(Rtrbeta, qtrbeta (log1p(-Ptrbeta), shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2, lower = FALSE, log = TRUE)) 158s + All.eq(Rburr, qburr (log1p(-Pburr), shape1 = 0.8, shape2 = 1.5, scale = 2, lower = FALSE, log = TRUE)) 158s + All.eq(Rllogis, qllogis (log1p(-Pllogis), shape = 1.5, scale = 2, lower = FALSE, log = TRUE)) 158s + All.eq(Rparalogis, qparalogis (log1p(-Pparalogis), shape = 0.8, scale = 2, lower = FALSE, log = TRUE)) 158s + All.eq(Rgenpareto, qgenpareto (log1p(-Pgenpareto), shape1 = 0.8, shape2 = 2, scale = 2, lower = FALSE, log = TRUE)) 158s + All.eq(Rpareto, qpareto (log1p(-Ppareto), shape = 0.8, scale = 2, lower = FALSE, log = TRUE)) 158s + All.eq(Rpareto1, qpareto1 (log1p(-Ppareto1), shape = 0.8, min = 2, lower = FALSE, log = TRUE)) 158s + All.eq(Rinvburr, qinvburr (log1p(-Pinvburr), shape1 = 1.5, shape2 = 2, scale = 2, lower = FALSE, log = TRUE)) 158s + All.eq(Rinvpareto, qinvpareto (log1p(-Pinvpareto), shape = 2, scale = 2, lower = FALSE, log = TRUE)) 158s + All.eq(Rinvparalogis, qinvparalogis(log1p(-Pinvparalogis), shape = 2, scale = 2, lower = FALSE, log = TRUE)) 158s + All.eq(Rtrgamma, qtrgamma (log1p(-Ptrgamma), shape1 = 2, shape2 = 3, scale = 5, lower = FALSE, log = TRUE)) 158s + All.eq(Rinvtrgamma, qinvtrgamma (log1p(-Pinvtrgamma), shape1 = 2, shape2 = 3, scale = 5, lower = FALSE, log = TRUE)) 158s + All.eq(Rinvgamma, qinvgamma (log1p(-Pinvgamma), shape = 2, scale = 5, lower = FALSE, log = TRUE)) 158s + All.eq(Rinvweibull, qinvweibull (log1p(-Pinvweibull), shape = 3, scale = 5, lower = FALSE, log = TRUE)) 158s + All.eq(Rinvexp, qinvexp (log1p(-Pinvexp), scale = 5, lower = FALSE, log = TRUE)) 158s + All.eq(Rlgamma, qlgamma(log1p(-Plgamma), shapelog = 1.5, ratelog = 5, lower = FALSE, log = TRUE)) 158s + All.eq(Rgumbel, qgumbel(log1p(-Pgumbel), alpha = 2, scale = 5, lower = FALSE, log = TRUE)) 158s + All.eq(Rinvgauss, qinvgauss(log1p(-Pinvgauss), mean = 2, dispersion = 5, lower = FALSE, log = TRUE)) 158s + All.eq(Rgenbeta, qgenbeta(log1p(-Pgenbeta), shape1 = 0.8, shape2 = 1.5, shape3 = 2, scale = 2, lower = FALSE, log = TRUE)) 158s + }) 158s > 158s > 158s > ### 158s > ### DISCRETE DISTRIBUTIONS 158s > ### 158s > 158s > ## Reset seed 158s > set.seed(123) 158s > 158s > ## Define a small function to compute probabilities for the (a, b, 1) 158s > ## family of discrete distributions using the recursive relation 158s > ## 158s > ## p[k] = (a + b/k)p[k - 1], k = 2, 3, ... 158s > ## 158s > ## for a, b and p[1] given. 158s > dab1 <- function(x, a, b, p1) 158s + { 158s + x <- floor(x) 158s + if (x < 1) 158s + stop("recursive computations possible for x >= 2 only") 158s + for (k in seq(2, length.out = x - 1)) 158s + { 158s + p2 <- (a + b/k) * p1 158s + p1 <- p2 158s + } 158s + p1 158s + } 158s > 158s > ## ZERO-TRUNCATED (a, b, 1) CLASS 158s > 158s > ## Tests on the probability mass function: 158s > ## 158s > ## 1. probability is 0 at x = 0; 158s > ## 2. pmf satisfies the recursive relation 158s > lambda <- rlnorm(30, 2) # Poisson parameters 158s > r <- lambda # size for negative binomial 158s > prob <- runif(30) # probs 158s > size <- round(lambda) # size for binomial 158s > stopifnot(exprs = { 158s + dztpois(0, lambda) == 0 158s + dztnbinom(0, r, prob) == 0 158s + dztgeom(0, prob) == 0 158s + dztbinom(0, size, prob) == 0 158s + dlogarithmic(0, prob) == 0 158s + }) 158s > 158s > x <- sapply(size, sample, size = 1) 158s > stopifnot(exprs = { 158s + All.eq(dztpois(x, lambda), 158s + mapply(dab1, x, 158s + a = 0, 158s + b = lambda, 158s + p1 = lambda/(exp(lambda) - 1))) 158s + All.eq(dztnbinom(x, r, prob), 158s + mapply(dab1, x, 158s + a = 1 - prob, 158s + b = (r - 1) * (1 - prob), 158s + p1 = r * prob^r * (1 - prob)/(1 - prob^r))) 158s + All.eq(dztgeom(x, prob), 158s + mapply(dab1, x, 158s + a = 1 - prob, 158s + b = 0, 158s + p1 = prob)) 158s + All.eq(dztbinom(x, size, prob), 158s + mapply(dab1, x, 158s + a = -prob/(1 - prob), 158s + b = (size + 1) * prob/(1 - prob), 158s + p1 = size * prob * (1 - prob)^(size - 1)/(1 - (1 - prob)^size))) 158s + All.eq(dlogarithmic(x, prob), 158s + mapply(dab1, x, 158s + a = prob, 158s + b = -prob, 158s + p1 = -prob/log1p(-prob))) 158s + }) 158s > 158s > ## Tests on cumulative distribution function. 158s > for (l in lambda) 158s + stopifnot(exprs = { 158s + all.equal(cumsum(dztpois(0:20, l)), 158s + pztpois(0:20, l), 158s + tolerance = 1e-8) 158s + }) 158s > for (i in seq_along(r)) 158s + stopifnot(exprs = { 158s + all.equal(cumsum(dztnbinom(0:20, r[i], prob[i])), 158s + pztnbinom(0:20, r[i], prob[i]), 158s + tolerance = 1e-8) 158s + }) 158s > for (i in seq_along(r)) 158s + stopifnot(exprs = { 158s + all.equal(cumsum(dztgeom(0:20, prob[i])), 158s + pztgeom(0:20, prob[i]), 158s + tolerance = 1e-8) 158s + }) 158s > for (i in seq_along(size)) 158s + stopifnot(exprs = { 158s + all.equal(cumsum(dztbinom(0:20, size[i], prob[i])), 158s + pztbinom(0:20, size[i], prob[i]), 158s + tolerance = 1e-8) 158s + }) 158s > for (p in prob) 158s + stopifnot(exprs = { 158s + all.equal(cumsum(dlogarithmic(0:20, p)), 158s + plogarithmic(0:20, p), 158s + tolerance = 1e-8) 158s + }) 158s > 158s > ## ZERO-MODIFIED (a, b, 1) CLASS 158s > 158s > ## Tests on the probability mass function: 158s > ## 158s > ## 1. probability is p0 at x = 0 (trivial, but...); 158s > ## 2. pmf satisfies the recursive relation 158s > lambda <- rlnorm(30, 2) # Poisson parameters 158s > r <- lambda # size for negative binomial 158s > prob <- runif(30) # probs 158s > size <- round(lambda) # size for binomial 158s > p0 <- runif(30) # probs at 0 158s > stopifnot(exprs = { 158s + dzmpois(0, lambda, p0) == p0 158s + dzmnbinom(0, r, prob, p0) == p0 158s + dzmgeom(0, prob, p0) == p0 158s + dzmbinom(0, size, prob, p0) == p0 158s + dzmlogarithmic(0, prob, p0) == p0 158s + }) 158s > 158s > x <- sapply(size, sample, size = 1) 158s > stopifnot(exprs = { 158s + All.eq(dzmpois(x, lambda, p0), 158s + mapply(dab1, x, 158s + a = 0, 158s + b = lambda, 158s + p1 = (1 - p0) *lambda/(exp(lambda) - 1))) 158s + All.eq(dzmnbinom(x, r, prob, p0), 158s + mapply(dab1, x, 158s + a = 1 - prob, 158s + b = (r - 1) * (1 - prob), 158s + p1 = (1 - p0) * r * prob^r * (1 - prob)/(1 - prob^r))) 158s + All.eq(dzmgeom(x, prob, p0), 158s + mapply(dab1, x, 158s + a = 1 - prob, 158s + b = 0, 158s + p1 = (1 - p0) * prob)) 158s + All.eq(dzmbinom(x, size, prob, p0), 158s + mapply(dab1, x, 158s + a = -prob/(1 - prob), 158s + b = (size + 1) * prob/(1 - prob), 158s + p1 = (1 - p0) * size * prob * (1 - prob)^(size - 1)/(1 - (1 - prob)^size))) 158s + All.eq(dzmlogarithmic(x, prob, p0), 158s + mapply(dab1, x, 158s + a = prob, 158s + b = -prob, 158s + p1 = -(1 - p0) * prob/log1p(-prob))) 158s + }) 158s > 158s > ## Tests on cumulative distribution function. 158s > for (i in seq_along(lambda)) 158s + stopifnot(exprs = { 158s + all.equal(cumsum(dzmpois(0:20, lambda[i], p0 = p0[i])), 158s + pzmpois(0:20, lambda[i], p0 = p0[i]), 158s + tolerance = 1e-8) 158s + }) 158s > for (i in seq_along(r)) 158s + stopifnot(exprs = { 158s + all.equal(cumsum(dzmnbinom(0:20, r[i], prob[i], p0[i])), 158s + pzmnbinom(0:20, r[i], prob[i], p0[i]), 158s + tolerance = 1e-8) 158s + }) 158s > for (i in seq_along(r)) 158s + stopifnot(exprs = { 158s + all.equal(cumsum(dzmgeom(0:20, prob[i], p0[i])), 158s + pzmgeom(0:20, prob[i], p0[i]), 158s + tolerance = 1e-8) 158s + }) 158s > for (i in seq_along(size)) 158s + stopifnot(exprs = { 158s + all.equal(cumsum(dzmbinom(0:20, size[i], prob[i], p0[i])), 158s + pzmbinom(0:20, size[i], prob[i], p0[i]), 158s + tolerance = 1e-8) 158s + }) 158s > for (i in seq_along(prob)) 158s + stopifnot(exprs = { 158s + all.equal(cumsum(dzmlogarithmic(0:20, prob[i], p0[i])), 158s + pzmlogarithmic(0:20, prob[i], p0[i]), 158s + tolerance = 1e-8) 158s + }) 158s > 158s > ## POISSON-INVERSE GAUSSIAN 158s > 158s > ## Reset seed 158s > set.seed(123) 158s > 158s > ## Define a small function to compute probabilities for the PIG 158s > ## directly using the Bessel function. 158s > dpigBK <- function(x, mu, phi) 158s + { 158s + M_LN2 <- 0.693147180559945309417232121458 158s + M_SQRT_2dPI <- 0.225791352644727432363097614947 158s + 158s + phimu <- phi * mu 158s + lphi <- log(phi) 158s + y <- x - 0.5 158s + 158s + logA = -lphi/2 - M_SQRT_2dPI 158s + logB = (M_LN2 + lphi + log1p(1/(2 * phimu * mu)))/2; 158s + 158s + exp(logA + 1/phimu - lfactorial(x) - y * logB) * 158s + besselK(exp(logB - lphi), y) 158s + } 158s > 158s > ## Tests on the probability mass function. 158s > mu <- rlnorm(30, 2) 158s > phi <- rlnorm(30, 2) 158s > x <- 0:100 158s > for (i in seq_along(phi)) 158s + { 158s + stopifnot(exprs = { 158s + all.equal(dpoisinvgauss(x, mean = mu[i], dispersion = phi[i]), 158s + dpigBK(x, mu[i], phi[i])) 158s + all.equal(dpoisinvgauss(x, mean = Inf, dispersion = phi[i]), 158s + dpigBK(x, Inf, phi[i])) 158s + }) 158s + } 158s > 158s > ## Tests on cumulative distribution function. 158s > for (i in seq_along(phi)) 158s + stopifnot(exprs = { 158s + all.equal(cumsum(dpoisinvgauss(0:20, mu[i], phi[i])), 158s + ppoisinvgauss(0:20, mu[i], phi[i]), 158s + tolerance = 1e-8) 158s + all.equal(cumsum(dpoisinvgauss(0:20, Inf, phi[i])), 158s + ppoisinvgauss(0:20, Inf, phi[i]), 158s + tolerance = 1e-8) 158s + }) 158s > 158s > ## 158s > ## RANDOM NUMBERS (all discrete distributions) 158s > ## 158s > set.seed(123) 158s > n <- 20 158s > 158s > ## Generate variates. 158s > ## 158s > ## For zero-modified distributions, we simulate two sets of values: 158s > ## one with p0m < p0 (suffix 'p0lt') and one with p0m > p0 (suffix 158s > ## 'p0gt'). 158s > Rztpois <- rztpois (n, lambda = 12) 158s > Rztnbinom <- rztnbinom (n, size = 7, prob = 0.01) 158s > Rztgeom <- rztgeom (n, prob = pi/16) 158s > Rztbinom <- rztbinom (n, size = 55, prob = pi/16) 158s > Rlogarithmic <- rlogarithmic(n, prob = 0.99) 158s > Rzmpoisp0lt <- rzmpois (n, lambda = 6, p0 = 0.001) 158s > Rzmpoisp0gt <- rzmpois (n, lambda = 6, p0 = 0.010) 158s > Rzmnbinomp0lt <- rzmnbinom (n, size = 7, prob = 0.8, p0 = 0.01) 158s > Rzmnbinomp0gt <- rzmnbinom (n, size = 7, prob = 0.8, p0 = 0.40) 158s > Rzmgeomp0lt <- rzmgeom (n, prob = pi/16, p0 = 0.01) 158s > Rzmgeomp0gt <- rzmgeom (n, prob = pi/16, p0 = 0.40) 158s > Rzmbinomp0lt <- rzmbinom (n, size = 12, prob = pi/16, p0 = 0.01) 158s > Rzmbinomp0gt <- rzmbinom (n, size = 12, prob = pi/16, p0 = 0.12) 158s > Rzmlogarithmicp0lt <- rzmlogarithmic(n, prob = 0.99, p0 = 0.05) 158s > Rzmlogarithmicp0gt <- rzmlogarithmic(n, prob = 0.99, p0 = 0.55) 158s > Rpoisinvgauss <- rpoisinvgauss(n, mean = 12, dispersion = 0.1) 158s > RpoisinvgaussInf <- rpoisinvgauss(n, mean = Inf, dispersion = 1.1) 158s > 158s > ## Compute quantiles 158s > Pztpois <- pztpois (Rztpois, lambda = 12) 158s > Pztnbinom <- pztnbinom (Rztnbinom, size = 7, prob = 0.01) 158s > Pztgeom <- pztgeom (Rztgeom, prob = pi/16) 158s > Pztbinom <- pztbinom (Rztbinom, size = 55, prob = pi/16) 158s > Plogarithmic <- plogarithmic(Rlogarithmic, prob = 0.99) 158s > Pzmpoisp0lt <- pzmpois (Rzmpoisp0lt, lambda = 6, p0 = 0.001) 158s > Pzmpoisp0gt <- pzmpois (Rzmpoisp0gt, lambda = 6, p0 = 0.010) 158s > Pzmnbinomp0lt <- pzmnbinom (Rzmnbinomp0lt, size = 7, prob = 0.8, p0 = 0.01) 158s > Pzmnbinomp0gt <- pzmnbinom (Rzmnbinomp0gt, size = 7, prob = 0.8, p0 = 0.40) 158s > Pzmgeomp0lt <- pzmgeom (Rzmgeomp0lt, prob = pi/16, p0 = 0.01) 158s > Pzmgeomp0gt <- pzmgeom (Rzmgeomp0gt, prob = pi/16, p0 = 0.40) 158s > Pzmbinomp0lt <- pzmbinom (Rzmbinomp0lt, size = 12, prob = pi/16, p0 = 0.01) 158s > Pzmbinomp0gt <- pzmbinom (Rzmbinomp0gt, size = 12, prob = pi/16, p0 = 0.12) 158s > Pzmlogarithmicp0lt <- pzmlogarithmic(Rzmlogarithmicp0lt, prob = 0.99, p0 = 0.05) 158s > Pzmlogarithmicp0gt <- pzmlogarithmic(Rzmlogarithmicp0gt, prob = 0.99, p0 = 0.55) 158s > Ppoisinvgauss <- ppoisinvgauss(Rpoisinvgauss, mean = 12, dispersion = 0.1) 158s > PpoisinvgaussInf <- ppoisinvgauss(RpoisinvgaussInf, mean = Inf, dispersion = 1.1) 158s > 158s > ## Just compute pmf 158s > Dztpois <- dztpois (Rztpois, lambda = 12) 158s > Dztnbinom <- dztnbinom (Rztnbinom, size = 7, prob = 0.01) 158s > Dztgeom <- dztgeom (Rztgeom, prob = pi/16) 158s > Dztbinom <- dztbinom (Rztbinom, size = 55, prob = pi/16) 158s > Dlogarithmic <- dlogarithmic(Rlogarithmic, prob = pi/16) 158s > Dzmpoisp0lt <- dzmpois (Rzmpoisp0lt, lambda = 6, p0 = 0.001) 158s > Dzmpoisp0gt <- dzmpois (Rzmpoisp0gt, lambda = 6, p0 = 0.010) 158s > Dzmnbinomp0lt <- dzmnbinom (Rzmnbinomp0lt, size = 7, prob = 0.8, p0 = 0.01) 158s > Dzmnbinomp0gt <- dzmnbinom (Rzmnbinomp0gt, size = 7, prob = 0.8, p0 = 0.40) 158s > Dzmgeomp0lt <- dzmgeom (Rzmgeomp0lt, prob = pi/16, p0 = 0.01) 158s > Dzmgeomp0gt <- dzmgeom (Rzmgeomp0gt, prob = pi/16, p0 = 0.40) 158s > Dzmbinomp0lt <- dzmbinom (Rzmbinomp0lt, size = 12, prob = pi/16, p0 = 0.01) 158s > Dzmbinomp0gt <- dzmbinom (Rzmbinomp0gt, size = 12, prob = pi/16, p0 = 0.12) 158s > Dzmlogarithmicp0lt <- dzmlogarithmic(Rzmlogarithmicp0lt, prob = 0.99, p0 = 0.05) 158s > Dzmlogarithmicp0gt <- dzmlogarithmic(Rzmlogarithmicp0gt, prob = 0.99, p0 = 0.55) 158s > Dpoisinvgauss <- dpoisinvgauss(Rpoisinvgauss, mean = 12, dispersion = 0.1) 158s > DpoisinvgaussInf <- dpoisinvgauss(RpoisinvgaussInf, mean = Inf, dispersion = 1.1) 158s > 158s > ## Check q(p(.)) identity 158s > stopifnot(exprs = { 158s + Rztpois == qztpois (Pztpois, lambda = 12) 158s + Rztnbinom == qztnbinom (Pztnbinom, size = 7, prob = 0.01) 158s + Rztgeom == qztgeom (Pztgeom, prob = pi/16) 158s + Rztbinom == qztbinom (Pztbinom, size = 55, prob = pi/16) 158s + Rlogarithmic == qlogarithmic(Plogarithmic, prob = 0.99) 158s + Rzmpoisp0lt == qzmpois (Pzmpoisp0lt, lambda = 6, p0 = 0.001) 158s + Rzmpoisp0gt == qzmpois (Pzmpoisp0gt, lambda = 6, p0 = 0.010) 158s + Rzmnbinomp0lt == qzmnbinom (Pzmnbinomp0lt, size = 7, prob = 0.8, p0 = 0.01) 158s + Rzmnbinomp0gt == qzmnbinom (Pzmnbinomp0gt, size = 7, prob = 0.8, p0 = 0.40) 158s + Rzmgeomp0lt == qzmgeom (Pzmgeomp0lt, prob = pi/16, p0 = 0.01) 158s + Rzmgeomp0gt == qzmgeom (Pzmgeomp0gt, prob = pi/16, p0 = 0.40) 158s + Rzmbinomp0lt == qzmbinom (Pzmbinomp0lt, size = 12, prob = pi/16, p0 = 0.01) 158s + Rzmbinomp0gt == qzmbinom (Pzmbinomp0gt, size = 12, prob = pi/16, p0 = 0.12) 158s + Rzmlogarithmicp0lt == qzmlogarithmic(Pzmlogarithmicp0lt, prob = 0.99, p0 = 0.05) 158s + Rzmlogarithmicp0gt == qzmlogarithmic(Pzmlogarithmicp0gt, prob = 0.99, p0 = 0.55) 158s + Rpoisinvgauss == qpoisinvgauss(Ppoisinvgauss, mean = 12, dispersion = 0.1) 158s + RpoisinvgaussInf == qpoisinvgauss(PpoisinvgaussInf, mean = Inf, dispersion = 1.1) 158s + }) 159s > 159s > ## Check q(p(.)) identity with upper tail 159s > stopifnot(exprs = { 159s + Rztpois == qztpois (1 - Pztpois, lambda = 12, lower = FALSE) 159s + Rztnbinom == qztnbinom (1 - Pztnbinom, size = 7, prob = 0.01, lower = FALSE) 159s + Rztgeom == qztgeom (1 - Pztgeom, prob = pi/16, lower = FALSE) 159s + Rztbinom == qztbinom (1 - Pztbinom, size = 55, prob = pi/16, lower = FALSE) 159s + Rlogarithmic == qlogarithmic(1 - Plogarithmic, prob = 0.99, lower = FALSE) 159s + Rzmpoisp0lt == qzmpois (1 - Pzmpoisp0lt, lambda = 6, p0 = 0.001, lower = FALSE) 159s + Rzmpoisp0gt == qzmpois (1 - Pzmpoisp0gt, lambda = 6, p0 = 0.010, lower = FALSE) 159s + Rzmnbinomp0lt == qzmnbinom (1 - Pzmnbinomp0lt, size = 7, prob = 0.8, p0 = 0.01, lower = FALSE) 159s + Rzmnbinomp0gt == qzmnbinom (1 - Pzmnbinomp0gt, size = 7, prob = 0.8, p0 = 0.40, lower = FALSE) 159s + Rzmgeomp0lt == qzmgeom (1 - Pzmgeomp0lt, prob = pi/16, p0 = 0.01, lower = FALSE) 159s + Rzmgeomp0gt == qzmgeom (1 - Pzmgeomp0gt, prob = pi/16, p0 = 0.40, lower = FALSE) 159s + Rzmbinomp0lt == qzmbinom (1 - Pzmbinomp0lt, size = 12, prob = pi/16, p0 = 0.01, lower = FALSE) 159s + Rzmbinomp0gt == qzmbinom (1 - Pzmbinomp0gt, size = 12, prob = pi/16, p0 = 0.12, lower = FALSE) 159s + Rzmlogarithmicp0lt == qzmlogarithmic(1 - Pzmlogarithmicp0lt, prob = 0.99, p0 = 0.05, lower = FALSE) 159s + Rzmlogarithmicp0gt == qzmlogarithmic(1 - Pzmlogarithmicp0gt, prob = 0.99, p0 = 0.55, lower = FALSE) 159s + Rpoisinvgauss == qpoisinvgauss(1 - Ppoisinvgauss, mean = 12, dispersion = 0.1, lower = FALSE) 159s + RpoisinvgaussInf == qpoisinvgauss(1 - PpoisinvgaussInf, mean = Inf, dispersion = 1.1, lower = FALSE) 159s + }) 160s > 160s > ## Check q(p(., log), log) identity 160s > stopifnot(exprs = { 160s + Rztpois == qztpois (log(Pztpois), lambda = 12, log = TRUE) 160s + Rztnbinom == qztnbinom (log(Pztnbinom), size = 7, prob = 0.01, log = TRUE) 160s + Rztgeom == qztgeom (log(Pztgeom), prob = pi/16, log = TRUE) 160s + Rztbinom == qztbinom (log(Pztbinom), size = 55, prob = pi/16, log = TRUE) 160s + Rlogarithmic == qlogarithmic(log(Plogarithmic), prob = 0.99, log = TRUE) 160s + Rzmpoisp0lt == qzmpois (log(Pzmpoisp0lt), lambda = 6, p0 = 0.001, log = TRUE) 160s + Rzmpoisp0gt == qzmpois (log(Pzmpoisp0gt), lambda = 6, p0 = 0.010, log = TRUE) 160s + Rzmnbinomp0lt == qzmnbinom (log(Pzmnbinomp0lt), size = 7, prob = 0.8, p0 = 0.01, log = TRUE) 160s + Rzmnbinomp0gt == qzmnbinom (log(Pzmnbinomp0gt), size = 7, prob = 0.8, p0 = 0.40, log = TRUE) 160s + Rzmgeomp0lt == qzmgeom (log(Pzmgeomp0lt), prob = pi/16, p0 = 0.01, log = TRUE) 160s + Rzmgeomp0gt == qzmgeom (log(Pzmgeomp0gt), prob = pi/16, p0 = 0.40, log = TRUE) 160s + Rzmbinomp0lt == qzmbinom (log(Pzmbinomp0lt), size = 12, prob = pi/16, p0 = 0.01, log = TRUE) 160s + Rzmbinomp0gt == qzmbinom (log(Pzmbinomp0gt), size = 12, prob = pi/16, p0 = 0.12, log = TRUE) 160s + Rzmlogarithmicp0lt == qzmlogarithmic(log(Pzmlogarithmicp0lt), prob = 0.99, p0 = 0.05, log = TRUE) 160s + Rzmlogarithmicp0gt == qzmlogarithmic(log(Pzmlogarithmicp0gt), prob = 0.99, p0 = 0.55, log = TRUE) 160s + Rpoisinvgauss == qpoisinvgauss(log(Ppoisinvgauss), mean = 12, dispersion = 0.1, log = TRUE) 160s + RpoisinvgaussInf == qpoisinvgauss(log(PpoisinvgaussInf), mean = Inf, dispersion = 1.1, log = TRUE) 160s + }) 161s > 161s > ## Check q(p(., log), log) identity with upper tail 161s > stopifnot(exprs = { 161s + Rztpois == qztpois (log1p(-Pztpois), lambda = 12, lower = FALSE, log = TRUE) 161s + Rztnbinom == qztnbinom (log1p(-Pztnbinom), size = 7, prob = 0.01, lower = FALSE, log = TRUE) 161s + Rztgeom == qztgeom (log1p(-Pztgeom), prob = pi/16, lower = FALSE, log = TRUE) 161s + Rztbinom == qztbinom (log1p(-Pztbinom), size = 55, prob = pi/16, lower = FALSE, log = TRUE) 161s + Rlogarithmic == qlogarithmic(log1p(-Plogarithmic), prob = 0.99, lower = FALSE, log = TRUE) 161s + Rzmpoisp0lt == qzmpois (log1p(-Pzmpoisp0lt), lambda = 6, p0 = 0.001, lower = FALSE, log = TRUE) 161s + Rzmpoisp0gt == qzmpois (log1p(-Pzmpoisp0gt), lambda = 6, p0 = 0.010, lower = FALSE, log = TRUE) 161s + Rzmnbinomp0lt == qzmnbinom (log1p(-Pzmnbinomp0lt), size = 7, prob = 0.8, p0 = 0.01, lower = FALSE, log = TRUE) 161s + Rzmnbinomp0gt == qzmnbinom (log1p(-Pzmnbinomp0gt), size = 7, prob = 0.8, p0 = 0.40, lower = FALSE, log = TRUE) 161s + Rzmgeomp0lt == qzmgeom (log1p(-Pzmgeomp0lt), prob = pi/16, p0 = 0.01, lower = FALSE, log = TRUE) 161s + Rzmgeomp0gt == qzmgeom (log1p(-Pzmgeomp0gt), prob = pi/16, p0 = 0.40, lower = FALSE, log = TRUE) 161s + Rzmbinomp0lt == qzmbinom (log1p(-Pzmbinomp0lt), size = 12, prob = pi/16, p0 = 0.01, lower = FALSE, log = TRUE) 161s + Rzmbinomp0gt == qzmbinom (log1p(-Pzmbinomp0gt), size = 12, prob = pi/16, p0 = 0.12, lower = FALSE, log = TRUE) 161s + Rzmlogarithmicp0lt == qzmlogarithmic(log1p(-Pzmlogarithmicp0lt), prob = 0.99, p0 = 0.05, lower = FALSE, log = TRUE) 161s + Rzmlogarithmicp0gt == qzmlogarithmic(log1p(-Pzmlogarithmicp0gt), prob = 0.99, p0 = 0.55, lower = FALSE, log = TRUE) 161s + Rpoisinvgauss == qpoisinvgauss(log1p(-Ppoisinvgauss), mean = 12, dispersion = 0.1, lower = FALSE, log = TRUE) 161s + RpoisinvgaussInf == qpoisinvgauss(log1p(-PpoisinvgaussInf), mean = Inf, dispersion = 1.1, lower = FALSE, log = TRUE) 161s + }) 162s > 162s BEGIN TEST rcompound-tests.R 162s 162s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 162s Copyright (C) 2024 The R Foundation for Statistical Computing 162s Platform: aarch64-unknown-linux-gnu (64-bit) 162s 162s R is free software and comes with ABSOLUTELY NO WARRANTY. 162s You are welcome to redistribute it under certain conditions. 162s Type 'license()' or 'licence()' for distribution details. 162s 162s R is a collaborative project with many contributors. 162s Type 'contributors()' for more information and 162s 'citation()' on how to cite R or R packages in publications. 162s 162s Type 'demo()' for some demos, 'help()' for on-line help, or 162s 'help.start()' for an HTML browser interface to help. 162s Type 'q()' to quit R. 162s 162s > ### actuar: Actuarial Functions and Heavy Tailed Distributions 162s > ### 162s > ### Tests for the simulation of compound models with 'rcompound' and 162s > ### 'rcomppois'. 162s > ### 162s > ### AUTHOR: Vincent Goulet 162s > 162s > ## Load the package 162s > library(actuar) 162s 162s Attaching package: ‘actuar’ 162s 162s The following objects are masked from ‘package:stats’: 162s 162s sd, var 162s 162s The following object is masked from ‘package:grDevices’: 162s 162s cm 162s 162s > 162s > ## Copy of tools::assertError. 162s > assertError <- tools::assertError 162s > 162s > ### 162s > ### Tests for rcompound 162s > ### 162s > 162s > ## Test the function itself with various types of arguments. 162s > n <- 20 162s > fmodel <- expression(rnbinom(2, 0.8)) 162s > smodel <- expression(rgamma(2, 1)) 162s > set.seed(123) 162s > x <- numeric(n) 162s > N <- rnbinom(n, 2, 0.8) 162s > y <- rgamma(sum(N), 2, 1) 162s > x[which(N != 0)] <- tapply(y, rep(seq_len(n), N), sum) 162s > stopifnot(exprs = { 162s + identical(x, { 162s + set.seed(123) 162s + rcompound(n, rnbinom(2, 0.8), rgamma(2, 1)) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + rcompound(n, rnbinom(2, 0.8), expression(rgamma(2, 1))) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + rcompound(n, expression(rnbinom(2, 0.8)), rgamma(2, 1)) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + rcompound(n, fmodel, smodel) 162s + }) 162s + }) 162s > 162s > ## Test the calling environment, that is that arguments are correctly 162s > ## identified when 'rcompound' is called inside another function. 162s > n <- 20 162s > lambda <- 2 162s > smodel <- expression(rgamma(2, 1)) 162s > set.seed(123) 162s > x <- rcompound(n, rpois(2), rgamma(2, 1)) 162s > f <- function(n, p, model.sev) 162s + { 162s + ## safe way to pass down the arguments 162s + model.freq <- substitute(rpois(p), list(p = p)) 162s + model.sev <- substitute(model.sev) 162s + if (is.name(model.sev)) 162s + model.sev <- eval.parent(model.sev) 162s + rcompound(n, model.freq, model.sev) 162s + } 162s > g1 <- function(n, p, s, r) 162s + rcompound(n, rpois(p), rgamma(s, r)) 162s > g2 <- function(n, p, s, r) 162s + rcompound(n, expression(rpois(p)), expression(rgamma(s, r))) 162s > h <- function(n, p, model.sev) 162s + { 162s + ## safe way to pass down the arguments 162s + model.sev <- substitute(model.sev) 162s + if (is.name(model.sev)) 162s + model.sev <- eval.parent(model.sev) 162s + f(n, p, model.sev) 162s + } 162s > stopifnot(exprs = { 162s + identical(x, { 162s + set.seed(123) 162s + f(n, 2, rgamma(2, 1)) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + f(n, lambda, expression(rgamma(2, 1))) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + f(n, lambda, smodel) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + g1(n, lambda, 2, 1) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + g2(n, lambda, 2, 1) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + h(n, 2, rgamma(2, 1)) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + h(n, lambda, smodel) 162s + }) 162s + }) 162s > 162s > ## Test invalid arguments. 162s > assertError(rcompound(-1, rpois(2), rgamma(2, 1))) 162s > 162s > 162s > ### 162s > ### Tests for rcomppois 162s > ### 162s > 162s > ## Test the function itself with various types of arguments. 162s > n <- 20 162s > lambda <- 2 162s > smodel <- expression(rgamma(2, 1)) 162s > set.seed(123) 162s > x <- numeric(n) 162s > N <- rpois(n, 2) 162s > y <- rgamma(sum(N), 2, 1) 162s > x[which(N != 0)] <- tapply(y, rep(seq_len(n), N), sum) 162s > stopifnot(exprs = { 162s + identical(x, { 162s + set.seed(123) 162s + rcomppois(n, 2, rgamma(2, 1)) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + rcomppois(n, lambda, expression(rgamma(2, 1))) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + rcomppois(n, lambda, smodel) 162s + }) 162s + }) 162s > 162s > ## Test the calling environment, that is that arguments are correctly 162s > ## identified when 'rcomppois' is called inside another function. 162s > n <- 20 162s > lambda <- 2 162s > smodel <- expression(rgamma(2, 1)) 162s > set.seed(123) 162s > x <- rcomppois(n, lambda, smodel) 162s > f <- function(n, p, model) 162s + { 162s + ## safe way to pass down all sorts of 'model' objects 162s + model <- substitute(model) 162s + if (is.name(model)) 162s + model <- eval.parent(model) 162s + rcomppois(n, p, model) 162s + } 162s > g1 <- function(n, p, s, r) 162s + rcomppois(n, p, rgamma(s, r)) 162s > g2 <- function(n, p, s, r) 162s + rcomppois(n, p, expression(rgamma(s, r))) 162s > h <- function(n, p, model) 162s + { 162s + ## safe way to pass down all sorts of 'model' objects 162s + model <- substitute(model) 162s + if (is.name(model)) 162s + model <- eval.parent(model) 162s + f(n, p, model) 162s + } 162s > stopifnot(exprs = { 162s + identical(x, { 162s + set.seed(123) 162s + f(n, 2, rgamma(2, 1)) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + f(n, lambda, expression(rgamma(2, 1))) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + f(n, lambda, smodel) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + g1(n, 2, 2, 1) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + g2(n, 2, 2, 1) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + h(n, 2, rgamma(2, 1)) 162s + }) 162s + identical(x, { 162s + set.seed(123) 162s + h(n, lambda, smodel) 162s + }) 162s + }) 162s > 162s > ## Test invalid arguments. 162s > assertError(rcomppois(-1, lambda, smodel)) 162s > assertError(rcomppois(n, -1, smodel)) 162s > assertError(rcomppois(n, c(3, -1), smodel)) 162s > 162s BEGIN TEST rmixture-tests.R 162s 162s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 162s Copyright (C) 2024 The R Foundation for Statistical Computing 162s Platform: aarch64-unknown-linux-gnu (64-bit) 162s 162s R is free software and comes with ABSOLUTELY NO WARRANTY. 162s You are welcome to redistribute it under certain conditions. 162s Type 'license()' or 'licence()' for distribution details. 162s 162s R is a collaborative project with many contributors. 162s Type 'contributors()' for more information and 162s 'citation()' on how to cite R or R packages in publications. 162s 162s Type 'demo()' for some demos, 'help()' for on-line help, or 162s 'help.start()' for an HTML browser interface to help. 162s Type 'q()' to quit R. 162s 162s > ### actuar: Actuarial Functions and Heavy Tailed Distributions 162s > ### 162s > ### Tests for the simulation of discrete mixtures with 'rmixture'. 162s > ### 162s > ### AUTHOR: Vincent Goulet 162s > 162s > ## Load the package 162s > library(actuar) 162s 162s Attaching package: ‘actuar’ 162s 162s The following objects are masked from ‘package:stats’: 162s 162s sd, var 162s 162s The following object is masked from ‘package:grDevices’: 162s 162s cm 162s 162s > 162s > ## Copy of tools::assertError. 162s > assertError <- tools::assertError 162s > 162s > ## Set common values for the tests 162s > n <- 20 162s > bmodels <- expression(rexp(1/20), 162s + rlnorm(3.6, 0.6), 162s + rpareto(shape = 4, scale = 240)) 162s > 162s > ## Function to inject the number of variates in an expression and 162s > ## evaluate it. 162s > f <- function(n, expr) 162s + { 162s + expr$n <- n 162s + eval(expr) 162s + } 162s > 162s > ## Test a "normal" case (with data that is not reshuffled). 162s > set.seed(123) 162s > probs <- c(2, 3, 5)/10 162s > nj <- rmultinom(1, n, prob = probs) 162s > x <- c(f(nj[1], bmodels[[1]]), f(nj[2], bmodels[[2]]), f(nj[3], bmodels[[3]])) 162s > set.seed(123) 162s > stopifnot(exprs = { 162s + identical(x, rmixture(n, probs, bmodels, shuffle = FALSE)) 162s + }) 162s > 162s > ## Test recycling of the probability vector. 162s > set.seed(123) 162s > probs <- 1 162s > nj <- rmultinom(1, n, prob = rep_len(probs, 3)) 162s > x <- c(f(nj[1], bmodels[[1]]), f(nj[2], bmodels[[2]]), f(nj[3], bmodels[[3]])) 162s > set.seed(123) 162s > stopifnot(exprs = { 162s + identical(x, rmixture(n, probs, bmodels, shuffle = FALSE)) 162s + }) 162s > 162s > ## Test recycling of the models vector. 162s > set.seed(123) 162s > probs <- c(2, 3, 5) 162s > nj <- rmultinom(1, n, prob = probs) 162s > x <- f(n, bmodels[[1]]) 162s > set.seed(123) 162s > stopifnot(exprs = { 162s + identical(x, rmixture(n, probs, bmodels[1], shuffle = FALSE)) 162s + }) 162s > 162s > ## Test special cases. 162s > stopifnot(exprs = { 162s + identical(numeric(0), rmixture(0, probs, bmodels)) 162s + identical(2L, length(rmixture(c(n, n), probs, bmodels))) 162s + }) 162s > 162s > ## Test the calling environment, that is that arguments are correctly 162s > ## identified when 'rmixture' is called inside another function. 162s > set.seed(123) 162s > probs <- c(2, 3, 5)/10 162s > x <- rmixture(n, probs, bmodels) 162s > f <- function(n, p, model) 162s + rmixture(n, p, model) 163s > g <- function(n, p, m, q) 163s + rmixture(n, p, expression(rexp(m[1]), rlnorm(m[2], q[2]), rpareto(m[3], q[3]))) 163s > h <- function(n, p, model) 163s + f(n, c(p[1], p[2], p[3]), 163s + c(model[1], model[2], model[3])) 163s > k <- function(n, p, m, q) 163s + { 163s + ## Pathological case where the models expression does not evaluate 163s + ## in the frame of 'rmixture' as 'm' and 'q' will not be bound. 163s + ## The fix is to substitute variables by their values. 163s + models <- substitute(expression(rexp(m[1]), rlnorm(m[2], q[2]), rpareto(m[3], q[3])), 163s + list(m = m, q = q)) 163s + 163s + f(n, p, eval(models)) 163s + } 163s > stopifnot(exprs = { 163s + identical(x, { 163s + set.seed(123) 163s + f(n, probs, bmodels) 163s + }) 163s + identical(x, { 163s + set.seed(123) 163s + f(n, c(probs[1], probs[2], probs[3]), 163s + c(bmodels[1], bmodels[2], bmodels[3])) 163s + }) 163s + identical(x, { 163s + set.seed(123) 163s + g(n, p = probs, 163s + m = c(eval(bmodels[[c(1, 2)]]), eval(bmodels[[c(2, 2)]]), eval(bmodels[[c(3, 2)]])), 163s + q = c(NA, eval(bmodels[[c(2, 3)]]), eval(bmodels[[c(3, 3)]]))) 163s + }) 163s + identical(x, { 163s + set.seed(123) 163s + h(n, probs, 163s + expression(rexp(eval(bmodels[[c(1, 2)]])), 163s + rlnorm(eval(bmodels[[c(2, 2)]]), eval(bmodels[[c(2, 3)]])), 163s + rpareto(shape = eval(bmodels[[c(3, 2)]]), scale = eval(bmodels[[c(3, 3)]])))) 163s + }) 163s + identical(x, { 163s + set.seed(123) 163s + k(n, p = probs, 163s + m = c(eval(bmodels[[c(1, 2)]]), eval(bmodels[[c(2, 2)]]), eval(bmodels[[c(3, 2)]])), 163s + q = c(NA, eval(bmodels[[c(2, 3)]]), eval(bmodels[[c(3, 3)]]))) 163s + }) 163s + }) 163s > 163s > ## Finally, test invalid arguments. 163s > assertError(rmixture(-1, probs, bmodels)) 163s > assertError(rmixture(c(3, -1), probs, bmodels)) 163s > assertError(rmixture(n, numeric(0), bmodels)) 163s > assertError(rmixture(n, 0, bmodels)) 163s > assertError(rmixture(n, c(0, 0), bmodels)) 163s > assertError(rmixture(n, probs, c(rexp(2), rexp(7)))) 163s > 163s autopkgtest [17:51:15]: test run-unit-test: -----------------------] 164s run-unit-test PASS 164s autopkgtest [17:51:16]: test run-unit-test: - - - - - - - - - - results - - - - - - - - - - 164s autopkgtest [17:51:16]: test pkg-r-autopkgtest: preparing testbed 165s Reading package lists... 165s Building dependency tree... 165s Reading state information... 166s Starting pkgProblemResolver with broken count: 0 166s Starting 2 pkgProblemResolver with broken count: 0 166s Done 167s The following additional packages will be installed: 167s build-essential cpp cpp-13 cpp-13-aarch64-linux-gnu cpp-aarch64-linux-gnu 167s dctrl-tools g++ g++-13 g++-13-aarch64-linux-gnu g++-aarch64-linux-gnu gcc 167s gcc-13 gcc-13-aarch64-linux-gnu gcc-aarch64-linux-gnu gfortran gfortran-13 167s gfortran-13-aarch64-linux-gnu gfortran-aarch64-linux-gnu icu-devtools 167s libasan8 libatomic1 libblas-dev libbz2-dev libc-dev-bin libc6-dev libcc1-0 167s libcrypt-dev libgcc-13-dev libgfortran-13-dev libhwasan0 libicu-dev libisl23 167s libitm1 libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev liblapack-dev liblsan0 167s liblzma-dev libmpc3 libncurses-dev libnsl-dev libpcre2-16-0 libpcre2-32-0 167s libpcre2-dev libpcre2-posix3 libpkgconf3 libpng-dev libreadline-dev 167s libstdc++-13-dev libtirpc-dev libtsan2 libubsan1 linux-libc-dev pkg-config 167s pkg-r-autopkgtest pkgconf pkgconf-bin r-base-dev rpcsvc-proto zlib1g-dev 167s Suggested packages: 167s cpp-doc gcc-13-locales cpp-13-doc debtags gcc-13-doc gcc-multilib 167s manpages-dev autoconf automake libtool flex bison gdb gcc-doc 167s gdb-aarch64-linux-gnu gfortran-doc gfortran-13-doc libcoarrays-dev 167s liblapack-doc glibc-doc icu-doc liblzma-doc ncurses-doc readline-doc 167s libstdc++-13-doc texlive-base texlive-latex-base texlive-plain-generic 167s texlive-fonts-recommended texlive-fonts-extra texlive-extra-utils 167s texlive-latex-recommended texlive-latex-extra texinfo 167s Recommended packages: 167s bzip2-doc manpages manpages-dev libc-devtools libpng-tools 167s The following NEW packages will be installed: 167s autopkgtest-satdep build-essential cpp cpp-13 cpp-13-aarch64-linux-gnu 167s cpp-aarch64-linux-gnu dctrl-tools g++ g++-13 g++-13-aarch64-linux-gnu 167s g++-aarch64-linux-gnu gcc gcc-13 gcc-13-aarch64-linux-gnu 167s gcc-aarch64-linux-gnu gfortran gfortran-13 gfortran-13-aarch64-linux-gnu 167s gfortran-aarch64-linux-gnu icu-devtools libasan8 libatomic1 libblas-dev 167s libbz2-dev libc-dev-bin libc6-dev libcc1-0 libcrypt-dev libgcc-13-dev 167s libgfortran-13-dev libhwasan0 libicu-dev libisl23 libitm1 libjpeg-dev 167s libjpeg-turbo8-dev libjpeg8-dev liblapack-dev liblsan0 liblzma-dev libmpc3 167s libncurses-dev libnsl-dev libpcre2-16-0 libpcre2-32-0 libpcre2-dev 167s libpcre2-posix3 libpkgconf3 libpng-dev libreadline-dev libstdc++-13-dev 167s libtirpc-dev libtsan2 libubsan1 linux-libc-dev pkg-config pkg-r-autopkgtest 167s pkgconf pkgconf-bin r-base-dev rpcsvc-proto zlib1g-dev 167s 0 upgraded, 62 newly installed, 0 to remove and 0 not upgraded. 167s Need to get 92.8 MB/92.8 MB of archives. 167s After this operation, 343 MB of additional disk space will be used. 167s Get:1 /tmp/autopkgtest.L9T0fu/2-autopkgtest-satdep.deb autopkgtest-satdep arm64 0 [720 B] 167s Get:2 http://ftpmaster.internal/ubuntu noble/main arm64 libc-dev-bin arm64 2.39-0ubuntu2 [19.7 kB] 167s Get:3 http://ftpmaster.internal/ubuntu noble/main arm64 linux-libc-dev arm64 6.8.0-11.11 [1569 kB] 168s Get:4 http://ftpmaster.internal/ubuntu noble/main arm64 libcrypt-dev arm64 1:4.4.36-4 [136 kB] 168s Get:5 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libtirpc-dev arm64 1.3.4+ds-1.1 [201 kB] 168s Get:6 http://ftpmaster.internal/ubuntu noble/main arm64 libnsl-dev arm64 1.3.0-3 [71.9 kB] 168s Get:7 http://ftpmaster.internal/ubuntu noble/main arm64 rpcsvc-proto arm64 1.4.2-0ubuntu6 [65.4 kB] 168s Get:8 http://ftpmaster.internal/ubuntu noble/main arm64 libc6-dev arm64 2.39-0ubuntu2 [1596 kB] 168s Get:9 http://ftpmaster.internal/ubuntu noble/main arm64 libisl23 arm64 0.26-3 [713 kB] 168s Get:10 http://ftpmaster.internal/ubuntu noble/main arm64 libmpc3 arm64 1.3.1-1 [55.3 kB] 168s Get:11 http://ftpmaster.internal/ubuntu noble/main arm64 cpp-13-aarch64-linux-gnu arm64 13.2.0-17ubuntu2 [10.3 MB] 168s Get:12 http://ftpmaster.internal/ubuntu noble/main arm64 cpp-13 arm64 13.2.0-17ubuntu2 [1028 B] 168s Get:13 http://ftpmaster.internal/ubuntu noble/main arm64 cpp-aarch64-linux-gnu arm64 4:13.2.0-7ubuntu1 [5316 B] 168s Get:14 http://ftpmaster.internal/ubuntu noble/main arm64 cpp arm64 4:13.2.0-7ubuntu1 [22.4 kB] 168s Get:15 http://ftpmaster.internal/ubuntu noble/main arm64 libcc1-0 arm64 14-20240303-1ubuntu1 [44.7 kB] 168s Get:16 http://ftpmaster.internal/ubuntu noble/main arm64 libitm1 arm64 14-20240303-1ubuntu1 [27.7 kB] 168s Get:17 http://ftpmaster.internal/ubuntu noble/main arm64 libatomic1 arm64 14-20240303-1ubuntu1 [11.4 kB] 168s Get:18 http://ftpmaster.internal/ubuntu noble/main arm64 libasan8 arm64 14-20240303-1ubuntu1 [2919 kB] 168s Get:19 http://ftpmaster.internal/ubuntu noble/main arm64 liblsan0 arm64 14-20240303-1ubuntu1 [1282 kB] 168s Get:20 http://ftpmaster.internal/ubuntu noble/main arm64 libtsan2 arm64 14-20240303-1ubuntu1 [2687 kB] 168s Get:21 http://ftpmaster.internal/ubuntu noble/main arm64 libubsan1 arm64 14-20240303-1ubuntu1 [1151 kB] 168s Get:22 http://ftpmaster.internal/ubuntu noble/main arm64 libhwasan0 arm64 14-20240303-1ubuntu1 [1597 kB] 168s Get:23 http://ftpmaster.internal/ubuntu noble/main arm64 libgcc-13-dev arm64 13.2.0-17ubuntu2 [2464 kB] 168s Get:24 http://ftpmaster.internal/ubuntu noble/main arm64 gcc-13-aarch64-linux-gnu arm64 13.2.0-17ubuntu2 [20.1 MB] 169s Get:25 http://ftpmaster.internal/ubuntu noble/main arm64 gcc-13 arm64 13.2.0-17ubuntu2 [467 kB] 169s Get:26 http://ftpmaster.internal/ubuntu noble/main arm64 gcc-aarch64-linux-gnu arm64 4:13.2.0-7ubuntu1 [1198 B] 169s Get:27 http://ftpmaster.internal/ubuntu noble/main arm64 gcc arm64 4:13.2.0-7ubuntu1 [5018 B] 169s Get:28 http://ftpmaster.internal/ubuntu noble/main arm64 libstdc++-13-dev arm64 13.2.0-17ubuntu2 [2322 kB] 169s Get:29 http://ftpmaster.internal/ubuntu noble/main arm64 g++-13-aarch64-linux-gnu arm64 13.2.0-17ubuntu2 [11.7 MB] 169s Get:30 http://ftpmaster.internal/ubuntu noble/main arm64 g++-13 arm64 13.2.0-17ubuntu2 [14.4 kB] 169s Get:31 http://ftpmaster.internal/ubuntu noble/main arm64 g++-aarch64-linux-gnu arm64 4:13.2.0-7ubuntu1 [962 B] 169s Get:32 http://ftpmaster.internal/ubuntu noble/main arm64 g++ arm64 4:13.2.0-7ubuntu1 [1082 B] 169s Get:33 http://ftpmaster.internal/ubuntu noble/main arm64 build-essential arm64 12.10ubuntu1 [4932 B] 169s Get:34 http://ftpmaster.internal/ubuntu noble/main arm64 dctrl-tools arm64 2.24-3build2 [65.2 kB] 169s Get:35 http://ftpmaster.internal/ubuntu noble/main arm64 libgfortran-13-dev arm64 13.2.0-17ubuntu2 [478 kB] 169s Get:36 http://ftpmaster.internal/ubuntu noble/main arm64 gfortran-13-aarch64-linux-gnu arm64 13.2.0-17ubuntu2 [10.8 MB] 169s Get:37 http://ftpmaster.internal/ubuntu noble/main arm64 gfortran-13 arm64 13.2.0-17ubuntu2 [10.3 kB] 169s Get:38 http://ftpmaster.internal/ubuntu noble/main arm64 gfortran-aarch64-linux-gnu arm64 4:13.2.0-7ubuntu1 [1022 B] 169s Get:39 http://ftpmaster.internal/ubuntu noble/main arm64 gfortran arm64 4:13.2.0-7ubuntu1 [1164 B] 169s Get:40 http://ftpmaster.internal/ubuntu noble/main arm64 icu-devtools arm64 74.2-1ubuntu1 [209 kB] 169s Get:41 http://ftpmaster.internal/ubuntu noble/main arm64 libblas-dev arm64 3.12.0-3 [111 kB] 169s Get:42 http://ftpmaster.internal/ubuntu noble/main arm64 libbz2-dev arm64 1.0.8-5ubuntu1 [35.8 kB] 169s Get:43 http://ftpmaster.internal/ubuntu noble/main arm64 libicu-dev arm64 74.2-1ubuntu1 [11.9 MB] 169s Get:44 http://ftpmaster.internal/ubuntu noble/main arm64 libjpeg-turbo8-dev arm64 2.1.5-2ubuntu1 [304 kB] 169s Get:45 http://ftpmaster.internal/ubuntu noble/main arm64 libjpeg8-dev arm64 8c-2ubuntu11 [1484 B] 169s Get:46 http://ftpmaster.internal/ubuntu noble/main arm64 libjpeg-dev arm64 8c-2ubuntu11 [1482 B] 169s Get:47 http://ftpmaster.internal/ubuntu noble/main arm64 liblapack-dev arm64 3.12.0-3 [4293 kB] 170s Get:48 http://ftpmaster.internal/ubuntu noble/main arm64 libncurses-dev arm64 6.4+20240113-1ubuntu1 [385 kB] 170s Get:49 http://ftpmaster.internal/ubuntu noble/main arm64 libpcre2-16-0 arm64 10.42-4ubuntu1 [195 kB] 170s Get:50 http://ftpmaster.internal/ubuntu noble/main arm64 libpcre2-32-0 arm64 10.42-4ubuntu1 [183 kB] 170s Get:51 http://ftpmaster.internal/ubuntu noble/main arm64 libpcre2-posix3 arm64 10.42-4ubuntu1 [6654 B] 170s Get:52 http://ftpmaster.internal/ubuntu noble/main arm64 libpcre2-dev arm64 10.42-4ubuntu1 [679 kB] 170s Get:53 http://ftpmaster.internal/ubuntu noble/main arm64 libpkgconf3 arm64 1.8.1-2 [31.2 kB] 170s Get:54 http://ftpmaster.internal/ubuntu noble/main arm64 zlib1g-dev arm64 1:1.3.dfsg-3ubuntu1 [895 kB] 170s Get:55 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libpng-dev arm64 1.6.43-3 [267 kB] 170s Get:56 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libreadline-dev arm64 8.2-3.1 [177 kB] 170s Get:57 http://ftpmaster.internal/ubuntu noble/main arm64 pkgconf-bin arm64 1.8.1-2 [20.4 kB] 170s Get:58 http://ftpmaster.internal/ubuntu noble/main arm64 pkgconf arm64 1.8.1-2 [16.7 kB] 170s Get:59 http://ftpmaster.internal/ubuntu noble/main arm64 pkg-config arm64 1.8.1-2 [7170 B] 170s Get:60 http://ftpmaster.internal/ubuntu noble/main arm64 liblzma-dev arm64 5.4.5-0.3 [209 kB] 170s Get:61 http://ftpmaster.internal/ubuntu noble-proposed/universe arm64 r-base-dev all 4.3.3-2build1 [4334 B] 170s Get:62 http://ftpmaster.internal/ubuntu noble/universe arm64 pkg-r-autopkgtest all 20231212ubuntu1 [6448 B] 170s Fetched 92.8 MB in 3s (33.2 MB/s) 171s Selecting previously unselected package libc-dev-bin. 171s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 76995 files and directories currently installed.) 171s Preparing to unpack .../00-libc-dev-bin_2.39-0ubuntu2_arm64.deb ... 171s Unpacking libc-dev-bin (2.39-0ubuntu2) ... 171s Selecting previously unselected package linux-libc-dev:arm64. 171s Preparing to unpack .../01-linux-libc-dev_6.8.0-11.11_arm64.deb ... 171s Unpacking linux-libc-dev:arm64 (6.8.0-11.11) ... 171s Selecting previously unselected package libcrypt-dev:arm64. 171s Preparing to unpack .../02-libcrypt-dev_1%3a4.4.36-4_arm64.deb ... 171s Unpacking libcrypt-dev:arm64 (1:4.4.36-4) ... 171s Selecting previously unselected package libtirpc-dev:arm64. 171s Preparing to unpack .../03-libtirpc-dev_1.3.4+ds-1.1_arm64.deb ... 171s Unpacking libtirpc-dev:arm64 (1.3.4+ds-1.1) ... 171s Selecting previously unselected package libnsl-dev:arm64. 171s Preparing to unpack .../04-libnsl-dev_1.3.0-3_arm64.deb ... 171s Unpacking libnsl-dev:arm64 (1.3.0-3) ... 171s Selecting previously unselected package rpcsvc-proto. 171s Preparing to unpack .../05-rpcsvc-proto_1.4.2-0ubuntu6_arm64.deb ... 171s Unpacking rpcsvc-proto (1.4.2-0ubuntu6) ... 171s Selecting previously unselected package libc6-dev:arm64. 171s Preparing to unpack .../06-libc6-dev_2.39-0ubuntu2_arm64.deb ... 171s Unpacking libc6-dev:arm64 (2.39-0ubuntu2) ... 171s Selecting previously unselected package libisl23:arm64. 171s Preparing to unpack .../07-libisl23_0.26-3_arm64.deb ... 171s Unpacking libisl23:arm64 (0.26-3) ... 171s Selecting previously unselected package libmpc3:arm64. 171s Preparing to unpack .../08-libmpc3_1.3.1-1_arm64.deb ... 171s Unpacking libmpc3:arm64 (1.3.1-1) ... 171s Selecting previously unselected package cpp-13-aarch64-linux-gnu. 171s Preparing to unpack .../09-cpp-13-aarch64-linux-gnu_13.2.0-17ubuntu2_arm64.deb ... 171s Unpacking cpp-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 171s Selecting previously unselected package cpp-13. 171s Preparing to unpack .../10-cpp-13_13.2.0-17ubuntu2_arm64.deb ... 171s Unpacking cpp-13 (13.2.0-17ubuntu2) ... 171s Selecting previously unselected package cpp-aarch64-linux-gnu. 171s Preparing to unpack .../11-cpp-aarch64-linux-gnu_4%3a13.2.0-7ubuntu1_arm64.deb ... 171s Unpacking cpp-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 171s Selecting previously unselected package cpp. 171s Preparing to unpack .../12-cpp_4%3a13.2.0-7ubuntu1_arm64.deb ... 171s Unpacking cpp (4:13.2.0-7ubuntu1) ... 171s Selecting previously unselected package libcc1-0:arm64. 171s Preparing to unpack .../13-libcc1-0_14-20240303-1ubuntu1_arm64.deb ... 171s Unpacking libcc1-0:arm64 (14-20240303-1ubuntu1) ... 171s Selecting previously unselected package libitm1:arm64. 171s Preparing to unpack .../14-libitm1_14-20240303-1ubuntu1_arm64.deb ... 171s Unpacking libitm1:arm64 (14-20240303-1ubuntu1) ... 171s Selecting previously unselected package libatomic1:arm64. 171s Preparing to unpack .../15-libatomic1_14-20240303-1ubuntu1_arm64.deb ... 171s Unpacking libatomic1:arm64 (14-20240303-1ubuntu1) ... 172s Selecting previously unselected package libasan8:arm64. 172s Preparing to unpack .../16-libasan8_14-20240303-1ubuntu1_arm64.deb ... 172s Unpacking libasan8:arm64 (14-20240303-1ubuntu1) ... 172s Selecting previously unselected package liblsan0:arm64. 172s Preparing to unpack .../17-liblsan0_14-20240303-1ubuntu1_arm64.deb ... 172s Unpacking liblsan0:arm64 (14-20240303-1ubuntu1) ... 172s Selecting previously unselected package libtsan2:arm64. 172s Preparing to unpack .../18-libtsan2_14-20240303-1ubuntu1_arm64.deb ... 172s Unpacking libtsan2:arm64 (14-20240303-1ubuntu1) ... 172s Selecting previously unselected package libubsan1:arm64. 172s Preparing to unpack .../19-libubsan1_14-20240303-1ubuntu1_arm64.deb ... 172s Unpacking libubsan1:arm64 (14-20240303-1ubuntu1) ... 172s Selecting previously unselected package libhwasan0:arm64. 172s Preparing to unpack .../20-libhwasan0_14-20240303-1ubuntu1_arm64.deb ... 172s Unpacking libhwasan0:arm64 (14-20240303-1ubuntu1) ... 172s Selecting previously unselected package libgcc-13-dev:arm64. 172s Preparing to unpack .../21-libgcc-13-dev_13.2.0-17ubuntu2_arm64.deb ... 172s Unpacking libgcc-13-dev:arm64 (13.2.0-17ubuntu2) ... 172s Selecting previously unselected package gcc-13-aarch64-linux-gnu. 172s Preparing to unpack .../22-gcc-13-aarch64-linux-gnu_13.2.0-17ubuntu2_arm64.deb ... 172s Unpacking gcc-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 172s Selecting previously unselected package gcc-13. 172s Preparing to unpack .../23-gcc-13_13.2.0-17ubuntu2_arm64.deb ... 172s Unpacking gcc-13 (13.2.0-17ubuntu2) ... 172s Selecting previously unselected package gcc-aarch64-linux-gnu. 172s Preparing to unpack .../24-gcc-aarch64-linux-gnu_4%3a13.2.0-7ubuntu1_arm64.deb ... 172s Unpacking gcc-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 172s Selecting previously unselected package gcc. 172s Preparing to unpack .../25-gcc_4%3a13.2.0-7ubuntu1_arm64.deb ... 172s Unpacking gcc (4:13.2.0-7ubuntu1) ... 172s Selecting previously unselected package libstdc++-13-dev:arm64. 173s Preparing to unpack .../26-libstdc++-13-dev_13.2.0-17ubuntu2_arm64.deb ... 173s Unpacking libstdc++-13-dev:arm64 (13.2.0-17ubuntu2) ... 173s Selecting previously unselected package g++-13-aarch64-linux-gnu. 173s Preparing to unpack .../27-g++-13-aarch64-linux-gnu_13.2.0-17ubuntu2_arm64.deb ... 173s Unpacking g++-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 173s Selecting previously unselected package g++-13. 173s Preparing to unpack .../28-g++-13_13.2.0-17ubuntu2_arm64.deb ... 173s Unpacking g++-13 (13.2.0-17ubuntu2) ... 173s Selecting previously unselected package g++-aarch64-linux-gnu. 173s Preparing to unpack .../29-g++-aarch64-linux-gnu_4%3a13.2.0-7ubuntu1_arm64.deb ... 173s Unpacking g++-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 173s Selecting previously unselected package g++. 173s Preparing to unpack .../30-g++_4%3a13.2.0-7ubuntu1_arm64.deb ... 173s Unpacking g++ (4:13.2.0-7ubuntu1) ... 173s Selecting previously unselected package build-essential. 173s Preparing to unpack .../31-build-essential_12.10ubuntu1_arm64.deb ... 173s Unpacking build-essential (12.10ubuntu1) ... 173s Selecting previously unselected package dctrl-tools. 174s Preparing to unpack .../32-dctrl-tools_2.24-3build2_arm64.deb ... 174s Unpacking dctrl-tools (2.24-3build2) ... 174s Selecting previously unselected package libgfortran-13-dev:arm64. 174s Preparing to unpack .../33-libgfortran-13-dev_13.2.0-17ubuntu2_arm64.deb ... 174s Unpacking libgfortran-13-dev:arm64 (13.2.0-17ubuntu2) ... 174s Selecting previously unselected package gfortran-13-aarch64-linux-gnu. 174s Preparing to unpack .../34-gfortran-13-aarch64-linux-gnu_13.2.0-17ubuntu2_arm64.deb ... 174s Unpacking gfortran-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 174s Selecting previously unselected package gfortran-13. 174s Preparing to unpack .../35-gfortran-13_13.2.0-17ubuntu2_arm64.deb ... 174s Unpacking gfortran-13 (13.2.0-17ubuntu2) ... 174s Selecting previously unselected package gfortran-aarch64-linux-gnu. 174s Preparing to unpack .../36-gfortran-aarch64-linux-gnu_4%3a13.2.0-7ubuntu1_arm64.deb ... 174s Unpacking gfortran-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 174s Selecting previously unselected package gfortran. 174s Preparing to unpack .../37-gfortran_4%3a13.2.0-7ubuntu1_arm64.deb ... 174s Unpacking gfortran (4:13.2.0-7ubuntu1) ... 174s Selecting previously unselected package icu-devtools. 174s Preparing to unpack .../38-icu-devtools_74.2-1ubuntu1_arm64.deb ... 174s Unpacking icu-devtools (74.2-1ubuntu1) ... 174s Selecting previously unselected package libblas-dev:arm64. 174s Preparing to unpack .../39-libblas-dev_3.12.0-3_arm64.deb ... 174s Unpacking libblas-dev:arm64 (3.12.0-3) ... 174s Selecting previously unselected package libbz2-dev:arm64. 174s Preparing to unpack .../40-libbz2-dev_1.0.8-5ubuntu1_arm64.deb ... 174s Unpacking libbz2-dev:arm64 (1.0.8-5ubuntu1) ... 174s Selecting previously unselected package libicu-dev:arm64. 174s Preparing to unpack .../41-libicu-dev_74.2-1ubuntu1_arm64.deb ... 174s Unpacking libicu-dev:arm64 (74.2-1ubuntu1) ... 174s Selecting previously unselected package libjpeg-turbo8-dev:arm64. 174s Preparing to unpack .../42-libjpeg-turbo8-dev_2.1.5-2ubuntu1_arm64.deb ... 174s Unpacking libjpeg-turbo8-dev:arm64 (2.1.5-2ubuntu1) ... 174s Selecting previously unselected package libjpeg8-dev:arm64. 175s Preparing to unpack .../43-libjpeg8-dev_8c-2ubuntu11_arm64.deb ... 175s Unpacking libjpeg8-dev:arm64 (8c-2ubuntu11) ... 175s Selecting previously unselected package libjpeg-dev:arm64. 175s Preparing to unpack .../44-libjpeg-dev_8c-2ubuntu11_arm64.deb ... 175s Unpacking libjpeg-dev:arm64 (8c-2ubuntu11) ... 175s Selecting previously unselected package liblapack-dev:arm64. 175s Preparing to unpack .../45-liblapack-dev_3.12.0-3_arm64.deb ... 175s Unpacking liblapack-dev:arm64 (3.12.0-3) ... 175s Selecting previously unselected package libncurses-dev:arm64. 175s Preparing to unpack .../46-libncurses-dev_6.4+20240113-1ubuntu1_arm64.deb ... 175s Unpacking libncurses-dev:arm64 (6.4+20240113-1ubuntu1) ... 175s Selecting previously unselected package libpcre2-16-0:arm64. 175s Preparing to unpack .../47-libpcre2-16-0_10.42-4ubuntu1_arm64.deb ... 175s Unpacking libpcre2-16-0:arm64 (10.42-4ubuntu1) ... 175s Selecting previously unselected package libpcre2-32-0:arm64. 175s Preparing to unpack .../48-libpcre2-32-0_10.42-4ubuntu1_arm64.deb ... 175s Unpacking libpcre2-32-0:arm64 (10.42-4ubuntu1) ... 175s Selecting previously unselected package libpcre2-posix3:arm64. 175s Preparing to unpack .../49-libpcre2-posix3_10.42-4ubuntu1_arm64.deb ... 175s Unpacking libpcre2-posix3:arm64 (10.42-4ubuntu1) ... 175s Selecting previously unselected package libpcre2-dev:arm64. 175s Preparing to unpack .../50-libpcre2-dev_10.42-4ubuntu1_arm64.deb ... 175s Unpacking libpcre2-dev:arm64 (10.42-4ubuntu1) ... 175s Selecting previously unselected package libpkgconf3:arm64. 175s Preparing to unpack .../51-libpkgconf3_1.8.1-2_arm64.deb ... 175s Unpacking libpkgconf3:arm64 (1.8.1-2) ... 175s Selecting previously unselected package zlib1g-dev:arm64. 175s Preparing to unpack .../52-zlib1g-dev_1%3a1.3.dfsg-3ubuntu1_arm64.deb ... 175s Unpacking zlib1g-dev:arm64 (1:1.3.dfsg-3ubuntu1) ... 175s Selecting previously unselected package libpng-dev:arm64. 175s Preparing to unpack .../53-libpng-dev_1.6.43-3_arm64.deb ... 175s Unpacking libpng-dev:arm64 (1.6.43-3) ... 175s Selecting previously unselected package libreadline-dev:arm64. 175s Preparing to unpack .../54-libreadline-dev_8.2-3.1_arm64.deb ... 175s Unpacking libreadline-dev:arm64 (8.2-3.1) ... 175s Selecting previously unselected package pkgconf-bin. 175s Preparing to unpack .../55-pkgconf-bin_1.8.1-2_arm64.deb ... 175s Unpacking pkgconf-bin (1.8.1-2) ... 175s Selecting previously unselected package pkgconf:arm64. 175s Preparing to unpack .../56-pkgconf_1.8.1-2_arm64.deb ... 175s Unpacking pkgconf:arm64 (1.8.1-2) ... 175s Selecting previously unselected package pkg-config:arm64. 175s Preparing to unpack .../57-pkg-config_1.8.1-2_arm64.deb ... 175s Unpacking pkg-config:arm64 (1.8.1-2) ... 175s Selecting previously unselected package liblzma-dev:arm64. 175s Preparing to unpack .../58-liblzma-dev_5.4.5-0.3_arm64.deb ... 175s Unpacking liblzma-dev:arm64 (5.4.5-0.3) ... 175s Selecting previously unselected package r-base-dev. 175s Preparing to unpack .../59-r-base-dev_4.3.3-2build1_all.deb ... 175s Unpacking r-base-dev (4.3.3-2build1) ... 175s Selecting previously unselected package pkg-r-autopkgtest. 176s Preparing to unpack .../60-pkg-r-autopkgtest_20231212ubuntu1_all.deb ... 176s Unpacking pkg-r-autopkgtest (20231212ubuntu1) ... 176s Selecting previously unselected package autopkgtest-satdep. 176s Preparing to unpack .../61-2-autopkgtest-satdep.deb ... 176s Unpacking autopkgtest-satdep (0) ... 176s Setting up linux-libc-dev:arm64 (6.8.0-11.11) ... 176s Setting up libpcre2-16-0:arm64 (10.42-4ubuntu1) ... 176s Setting up libpcre2-32-0:arm64 (10.42-4ubuntu1) ... 176s Setting up libtirpc-dev:arm64 (1.3.4+ds-1.1) ... 176s Setting up libpkgconf3:arm64 (1.8.1-2) ... 176s Setting up rpcsvc-proto (1.4.2-0ubuntu6) ... 176s Setting up libmpc3:arm64 (1.3.1-1) ... 176s Setting up libatomic1:arm64 (14-20240303-1ubuntu1) ... 176s Setting up icu-devtools (74.2-1ubuntu1) ... 176s Setting up pkgconf-bin (1.8.1-2) ... 176s Setting up liblzma-dev:arm64 (5.4.5-0.3) ... 176s Setting up libubsan1:arm64 (14-20240303-1ubuntu1) ... 176s Setting up libpcre2-posix3:arm64 (10.42-4ubuntu1) ... 176s Setting up libnsl-dev:arm64 (1.3.0-3) ... 176s Setting up libhwasan0:arm64 (14-20240303-1ubuntu1) ... 176s Setting up libcrypt-dev:arm64 (1:4.4.36-4) ... 176s Setting up libasan8:arm64 (14-20240303-1ubuntu1) ... 176s Setting up libtsan2:arm64 (14-20240303-1ubuntu1) ... 176s Setting up libisl23:arm64 (0.26-3) ... 176s Setting up libc-dev-bin (2.39-0ubuntu2) ... 176s Setting up libcc1-0:arm64 (14-20240303-1ubuntu1) ... 176s Setting up liblsan0:arm64 (14-20240303-1ubuntu1) ... 176s Setting up libblas-dev:arm64 (3.12.0-3) ... 176s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so to provide /usr/lib/aarch64-linux-gnu/libblas.so (libblas.so-aarch64-linux-gnu) in auto mode 176s Setting up dctrl-tools (2.24-3build2) ... 176s Setting up libitm1:arm64 (14-20240303-1ubuntu1) ... 176s Setting up cpp-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 176s Setting up pkgconf:arm64 (1.8.1-2) ... 176s Setting up cpp-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 176s Setting up liblapack-dev:arm64 (3.12.0-3) ... 176s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so to provide /usr/lib/aarch64-linux-gnu/liblapack.so (liblapack.so-aarch64-linux-gnu) in auto mode 176s Setting up pkg-config:arm64 (1.8.1-2) ... 176s Setting up libgcc-13-dev:arm64 (13.2.0-17ubuntu2) ... 176s Setting up libc6-dev:arm64 (2.39-0ubuntu2) ... 176s Setting up libgfortran-13-dev:arm64 (13.2.0-17ubuntu2) ... 176s Setting up libicu-dev:arm64 (74.2-1ubuntu1) ... 176s Setting up libstdc++-13-dev:arm64 (13.2.0-17ubuntu2) ... 176s Setting up libbz2-dev:arm64 (1.0.8-5ubuntu1) ... 176s Setting up libjpeg-turbo8-dev:arm64 (2.1.5-2ubuntu1) ... 176s Setting up libncurses-dev:arm64 (6.4+20240113-1ubuntu1) ... 176s Setting up libpcre2-dev:arm64 (10.42-4ubuntu1) ... 176s Setting up cpp-13 (13.2.0-17ubuntu2) ... 176s Setting up gcc-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 176s Setting up libreadline-dev:arm64 (8.2-3.1) ... 176s Setting up gcc-13 (13.2.0-17ubuntu2) ... 176s Setting up zlib1g-dev:arm64 (1:1.3.dfsg-3ubuntu1) ... 176s Setting up cpp (4:13.2.0-7ubuntu1) ... 176s Setting up libjpeg8-dev:arm64 (8c-2ubuntu11) ... 176s Setting up g++-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 176s Setting up gcc-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 176s Setting up g++-13 (13.2.0-17ubuntu2) ... 176s Setting up libpng-dev:arm64 (1.6.43-3) ... 176s Setting up libjpeg-dev:arm64 (8c-2ubuntu11) ... 176s Setting up gfortran-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 176s Setting up gcc (4:13.2.0-7ubuntu1) ... 176s Setting up gfortran-13 (13.2.0-17ubuntu2) ... 176s Setting up g++-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 176s Setting up gfortran-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 176s Setting up gfortran (4:13.2.0-7ubuntu1) ... 176s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 176s update-alternatives: warning: skip creation of /usr/share/man/man1/f95.1.gz because associated file /usr/share/man/man1/gfortran.1.gz (of link group f95) doesn't exist 176s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 176s update-alternatives: warning: skip creation of /usr/share/man/man1/f77.1.gz because associated file /usr/share/man/man1/gfortran.1.gz (of link group f77) doesn't exist 176s Setting up g++ (4:13.2.0-7ubuntu1) ... 176s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 176s Setting up build-essential (12.10ubuntu1) ... 176s Setting up r-base-dev (4.3.3-2build1) ... 176s Setting up pkg-r-autopkgtest (20231212ubuntu1) ... 176s Setting up autopkgtest-satdep (0) ... 176s Processing triggers for man-db (2.12.0-3) ... 177s Processing triggers for install-info (7.1-3) ... 177s Processing triggers for libc-bin (2.39-0ubuntu2) ... 180s (Reading database ... 80554 files and directories currently installed.) 180s Removing autopkgtest-satdep (0) ... 181s autopkgtest [17:51:33]: test pkg-r-autopkgtest: /usr/share/dh-r/pkg-r-autopkgtest 181s autopkgtest [17:51:33]: test pkg-r-autopkgtest: [----------------------- 181s Test: Try to load the R library actuar 181s 181s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 181s Copyright (C) 2024 The R Foundation for Statistical Computing 181s Platform: aarch64-unknown-linux-gnu (64-bit) 181s 181s R is free software and comes with ABSOLUTELY NO WARRANTY. 181s You are welcome to redistribute it under certain conditions. 181s Type 'license()' or 'licence()' for distribution details. 181s 181s R is a collaborative project with many contributors. 181s Type 'contributors()' for more information and 181s 'citation()' on how to cite R or R packages in publications. 181s 181s Type 'demo()' for some demos, 'help()' for on-line help, or 181s 'help.start()' for an HTML browser interface to help. 181s Type 'q()' to quit R. 181s 181s > library('actuar') 181s 181s Attaching package: ‘actuar’ 181s 181s The following objects are masked from ‘package:stats’: 181s 181s sd, var 181s 181s > 181s > 181s The following object is masked from ‘package:grDevices’: 181s 181s cm 181s 181s Other tests are currently unsupported! 181s They will be progressively added. 182s autopkgtest [17:51:34]: test pkg-r-autopkgtest: -----------------------] 182s pkg-r-autopkgtest PASS 182s autopkgtest [17:51:34]: test pkg-r-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 183s autopkgtest [17:51:35]: @@@@@@@@@@@@@@@@@@@@ summary 183s run-unit-test PASS 183s pkg-r-autopkgtest PASS 194s Creating nova instance adt-noble-arm64-r-cran-actuar-20240316-174832-juju-7f2275-prod-proposed-migration-environment-2 from image adt/ubuntu-noble-arm64-server-20240314.img (UUID 7faf5f09-d335-4346-a441-4eab2f9c04fe)...