0s autopkgtest [22:16:33]: starting date and time: 2025-03-15 22:16:33+0000 0s autopkgtest [22:16:33]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [22:16:33]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.t99lip83/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:glibc --apt-upgrade r-cran-mcmc --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=glibc/2.41-1ubuntu2 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@lcy02-4.secgroup --name adt-plucky-amd64-r-cran-mcmc-20250315-221633-juju-7f2275-prod-proposed-migration-environment-2-f6d11774-69f8-47ab-8047-6c4239d5925a --image adt/ubuntu-plucky-amd64-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,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 46s autopkgtest [22:17:19]: testbed dpkg architecture: amd64 46s autopkgtest [22:17:19]: testbed apt version: 2.9.31ubuntu1 46s autopkgtest [22:17:19]: @@@@@@@@@@@@@@@@@@@@ test bed setup 46s autopkgtest [22:17:19]: testbed release detected to be: None 47s autopkgtest [22:17:20]: updating testbed package index (apt update) 47s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [126 kB] 47s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 47s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 47s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 47s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [14.5 kB] 47s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [369 kB] 47s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [44.1 kB] 47s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 Packages [85.7 kB] 47s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main i386 Packages [67.4 kB] 47s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 c-n-f Metadata [1852 B] 47s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/restricted amd64 c-n-f Metadata [116 B] 47s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/universe amd64 Packages [342 kB] 47s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/universe i386 Packages [174 kB] 47s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/universe amd64 c-n-f Metadata [15.3 kB] 47s Get:15 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse i386 Packages [8544 B] 47s Get:16 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse amd64 Packages [16.1 kB] 47s Get:17 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse amd64 c-n-f Metadata [628 B] 47s Fetched 1265 kB in 0s (5877 kB/s) 48s Reading package lists... 48s Reading package lists... 49s Building dependency tree... 49s Reading state information... 49s Calculating upgrade... 49s Calculating upgrade... 50s The following package was automatically installed and is no longer required: 50s libnl-genl-3-200 50s Use 'sudo apt autoremove' to remove it. 50s The following NEW packages will be installed: 50s bpftool libdebuginfod-common libdebuginfod1t64 linux-headers-6.14.0-10 50s linux-headers-6.14.0-10-generic linux-image-6.14.0-10-generic 50s linux-modules-6.14.0-10-generic linux-modules-extra-6.14.0-10-generic 50s linux-perf linux-tools-6.14.0-10 linux-tools-6.14.0-10-generic pnp.ids 50s The following packages will be upgraded: 50s apparmor apt apt-utils binutils binutils-common binutils-x86-64-linux-gnu 50s cloud-init cloud-init-base curl dosfstools fwupd gir1.2-girepository-2.0 50s gir1.2-glib-2.0 htop hwdata libapparmor1 libapt-pkg7.0 libaudit-common 50s libaudit1 libbinutils libbrotli1 libcap-ng0 libctf-nobfd0 libctf0 50s libcurl3t64-gnutls libcurl4t64 libestr0 libfwupd3 libgirepository-1.0-1 50s libglib2.0-0t64 libglib2.0-data libgprofng0 libjemalloc2 liblz4-1 liblzma5 50s libmm-glib0 libncurses6 libncursesw6 libnl-3-200 libnl-genl-3-200 50s libnl-route-3-200 libpci3 libpython3-stdlib libpython3.13 50s libpython3.13-minimal libpython3.13-stdlib libselinux1 libsframe1 50s libsqlite3-0 libtinfo6 libxml2 linux-firmware linux-generic 50s linux-headers-generic linux-headers-virtual linux-image-generic 50s linux-image-virtual linux-libc-dev linux-tools-common linux-virtual 50s media-types ncurses-base ncurses-bin ncurses-term pci.ids pciutils 50s pinentry-curses python-apt-common python3 python3-apt python3-cffi-backend 50s python3-dbus python3-gi python3-jinja2 python3-lazr.uri python3-markupsafe 50s python3-minimal python3-systemd python3-yaml python3.13 python3.13-gdbm 50s python3.13-minimal rsync rsyslog strace xz-utils 50s 86 upgraded, 12 newly installed, 0 to remove and 0 not upgraded. 50s Need to get 807 MB of archives. 50s After this operation, 326 MB of additional disk space will be used. 50s Get:1 http://ftpmaster.internal/ubuntu plucky/main amd64 ncurses-bin amd64 6.5+20250216-2 [194 kB] 50s Get:2 http://ftpmaster.internal/ubuntu plucky/main amd64 ncurses-base all 6.5+20250216-2 [25.9 kB] 50s Get:3 http://ftpmaster.internal/ubuntu plucky/main amd64 ncurses-term all 6.5+20250216-2 [276 kB] 50s Get:4 http://ftpmaster.internal/ubuntu plucky/main amd64 liblz4-1 amd64 1.10.0-4 [66.4 kB] 50s Get:5 http://ftpmaster.internal/ubuntu plucky/main amd64 liblzma5 amd64 5.6.4-1 [157 kB] 50s Get:6 http://ftpmaster.internal/ubuntu plucky/main amd64 libapt-pkg7.0 amd64 2.9.33 [1138 kB] 50s Get:7 http://ftpmaster.internal/ubuntu plucky/main amd64 apt amd64 2.9.33 [1439 kB] 50s Get:8 http://ftpmaster.internal/ubuntu plucky/main amd64 apt-utils amd64 2.9.33 [222 kB] 50s Get:9 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-minimal amd64 3.13.2-2 [27.7 kB] 50s Get:10 http://ftpmaster.internal/ubuntu plucky/main amd64 python3 amd64 3.13.2-2 [24.0 kB] 50s Get:11 http://ftpmaster.internal/ubuntu plucky/main amd64 libpython3.13 amd64 3.13.2-2 [2341 kB] 50s Get:12 http://ftpmaster.internal/ubuntu plucky/main amd64 media-types all 13.0.0 [29.9 kB] 50s Get:13 http://ftpmaster.internal/ubuntu plucky/main amd64 libncurses6 amd64 6.5+20250216-2 [126 kB] 50s Get:14 http://ftpmaster.internal/ubuntu plucky/main amd64 libncursesw6 amd64 6.5+20250216-2 [165 kB] 50s Get:15 http://ftpmaster.internal/ubuntu plucky/main amd64 libtinfo6 amd64 6.5+20250216-2 [119 kB] 50s Get:16 http://ftpmaster.internal/ubuntu plucky/main amd64 libsqlite3-0 amd64 3.46.1-2 [715 kB] 50s Get:17 http://ftpmaster.internal/ubuntu plucky/main amd64 python3.13 amd64 3.13.2-2 [735 kB] 50s Get:18 http://ftpmaster.internal/ubuntu plucky/main amd64 python3.13-minimal amd64 3.13.2-2 [2365 kB] 50s Get:19 http://ftpmaster.internal/ubuntu plucky/main amd64 libpython3.13-minimal amd64 3.13.2-2 [883 kB] 50s Get:20 http://ftpmaster.internal/ubuntu plucky/main amd64 libpython3.13-stdlib amd64 3.13.2-2 [2066 kB] 50s Get:21 http://ftpmaster.internal/ubuntu plucky/main amd64 libpython3-stdlib amd64 3.13.2-2 [10.4 kB] 50s Get:22 http://ftpmaster.internal/ubuntu plucky/main amd64 rsync amd64 3.4.1+ds1-3 [482 kB] 50s Get:23 http://ftpmaster.internal/ubuntu plucky/main amd64 libdebuginfod-common all 0.192-4 [15.4 kB] 50s Get:24 http://ftpmaster.internal/ubuntu plucky/main amd64 libaudit-common all 1:4.0.2-2ubuntu2 [6628 B] 50s Get:25 http://ftpmaster.internal/ubuntu plucky/main amd64 libcap-ng0 amd64 0.8.5-4build1 [15.6 kB] 50s Get:26 http://ftpmaster.internal/ubuntu plucky/main amd64 libaudit1 amd64 1:4.0.2-2ubuntu2 [54.0 kB] 50s Get:27 http://ftpmaster.internal/ubuntu plucky/main amd64 libselinux1 amd64 3.7-3ubuntu3 [87.3 kB] 50s Get:28 http://ftpmaster.internal/ubuntu plucky/main amd64 gir1.2-girepository-2.0 amd64 1.83.4-1 [25.3 kB] 50s Get:29 http://ftpmaster.internal/ubuntu plucky/main amd64 gir1.2-glib-2.0 amd64 2.84.0-1 [184 kB] 50s Get:30 http://ftpmaster.internal/ubuntu plucky/main amd64 libglib2.0-0t64 amd64 2.84.0-1 [1669 kB] 50s Get:31 http://ftpmaster.internal/ubuntu plucky/main amd64 libgirepository-1.0-1 amd64 1.83.4-1 [89.5 kB] 50s Get:32 http://ftpmaster.internal/ubuntu plucky/main amd64 libapparmor1 amd64 4.1.0~beta5-0ubuntu8 [55.0 kB] 50s Get:33 http://ftpmaster.internal/ubuntu plucky/main amd64 libestr0 amd64 0.1.11-2 [8340 B] 50s Get:34 http://ftpmaster.internal/ubuntu plucky/main amd64 libglib2.0-data all 2.84.0-1 [53.0 kB] 50s Get:35 http://ftpmaster.internal/ubuntu plucky/main amd64 libxml2 amd64 2.12.7+dfsg+really2.9.14-0.2ubuntu5 [772 kB] 50s Get:36 http://ftpmaster.internal/ubuntu plucky/main amd64 python-apt-common all 2.9.9build1 [21.3 kB] 50s Get:37 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-apt amd64 2.9.9build1 [172 kB] 50s Get:38 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-cffi-backend amd64 1.17.1-2build2 [96.6 kB] 50s Get:39 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-dbus amd64 1.3.2-5build5 [102 kB] 50s Get:40 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-gi amd64 3.50.0-4build1 [252 kB] 50s Get:41 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-yaml amd64 6.0.2-1build2 [144 kB] 50s Get:42 http://ftpmaster.internal/ubuntu plucky/main amd64 rsyslog amd64 8.2412.0-2ubuntu2 [555 kB] 50s Get:43 http://ftpmaster.internal/ubuntu plucky/main amd64 apparmor amd64 4.1.0~beta5-0ubuntu8 [701 kB] 50s Get:44 http://ftpmaster.internal/ubuntu plucky/main amd64 dosfstools amd64 4.2-1.2 [95.0 kB] 50s Get:45 http://ftpmaster.internal/ubuntu plucky/main amd64 libnl-genl-3-200 amd64 3.7.0-1 [12.2 kB] 50s Get:46 http://ftpmaster.internal/ubuntu plucky/main amd64 libnl-route-3-200 amd64 3.7.0-1 [191 kB] 50s Get:47 http://ftpmaster.internal/ubuntu plucky/main amd64 libnl-3-200 amd64 3.7.0-1 [64.9 kB] 51s Get:48 http://ftpmaster.internal/ubuntu plucky/main amd64 pci.ids all 0.0~2025.03.09-1 [285 kB] 51s Get:49 http://ftpmaster.internal/ubuntu plucky/main amd64 pciutils amd64 1:3.13.0-2 [110 kB] 51s Get:50 http://ftpmaster.internal/ubuntu plucky/main amd64 libpci3 amd64 1:3.13.0-2 [39.8 kB] 51s Get:51 http://ftpmaster.internal/ubuntu plucky/main amd64 strace amd64 6.13+ds-1ubuntu1 [622 kB] 51s Get:52 http://ftpmaster.internal/ubuntu plucky/main amd64 xz-utils amd64 5.6.4-1 [278 kB] 51s Get:53 http://ftpmaster.internal/ubuntu plucky/main amd64 libgprofng0 amd64 2.44-3ubuntu1 [886 kB] 51s Get:54 http://ftpmaster.internal/ubuntu plucky/main amd64 libctf0 amd64 2.44-3ubuntu1 [96.5 kB] 51s Get:55 http://ftpmaster.internal/ubuntu plucky/main amd64 libctf-nobfd0 amd64 2.44-3ubuntu1 [98.9 kB] 51s Get:56 http://ftpmaster.internal/ubuntu plucky/main amd64 binutils-x86-64-linux-gnu amd64 2.44-3ubuntu1 [1108 kB] 51s Get:57 http://ftpmaster.internal/ubuntu plucky/main amd64 libbinutils amd64 2.44-3ubuntu1 [585 kB] 51s Get:58 http://ftpmaster.internal/ubuntu plucky/main amd64 binutils amd64 2.44-3ubuntu1 [208 kB] 51s Get:59 http://ftpmaster.internal/ubuntu plucky/main amd64 binutils-common amd64 2.44-3ubuntu1 [215 kB] 51s Get:60 http://ftpmaster.internal/ubuntu plucky/main amd64 libsframe1 amd64 2.44-3ubuntu1 [14.8 kB] 51s Get:61 http://ftpmaster.internal/ubuntu plucky/main amd64 hwdata all 0.393-3 [1562 B] 51s Get:62 http://ftpmaster.internal/ubuntu plucky/main amd64 pnp.ids all 0.393-3 [29.5 kB] 51s Get:63 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-tools-common all 6.14.0-10.10 [295 kB] 51s Get:64 http://ftpmaster.internal/ubuntu plucky/main amd64 bpftool amd64 7.6.0+6.14.0-10.10 [1147 kB] 51s Get:65 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-markupsafe amd64 2.1.5-1build4 [13.4 kB] 51s Get:66 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-jinja2 all 3.1.5-2ubuntu1 [109 kB] 51s Get:67 http://ftpmaster.internal/ubuntu plucky/main amd64 cloud-init-base all 25.1-0ubuntu3 [616 kB] 51s Get:68 http://ftpmaster.internal/ubuntu plucky/main amd64 libbrotli1 amd64 1.1.0-2build4 [365 kB] 51s Get:69 http://ftpmaster.internal/ubuntu plucky/main amd64 curl amd64 8.12.1-3ubuntu1 [258 kB] 51s Get:70 http://ftpmaster.internal/ubuntu plucky/main amd64 libcurl4t64 amd64 8.12.1-3ubuntu1 [437 kB] 51s Get:71 http://ftpmaster.internal/ubuntu plucky/main amd64 libcurl3t64-gnutls amd64 8.12.1-3ubuntu1 [432 kB] 51s Get:72 http://ftpmaster.internal/ubuntu plucky/main amd64 fwupd amd64 2.0.6-4 [5408 kB] 51s Get:73 http://ftpmaster.internal/ubuntu plucky/main amd64 libfwupd3 amd64 2.0.6-4 [136 kB] 51s Get:74 http://ftpmaster.internal/ubuntu plucky/main amd64 libmm-glib0 amd64 1.23.4-0ubuntu3 [251 kB] 51s Get:75 http://ftpmaster.internal/ubuntu plucky/main amd64 htop amd64 3.4.0-2 [195 kB] 51s Get:76 http://ftpmaster.internal/ubuntu plucky/main amd64 libdebuginfod1t64 amd64 0.192-4 [21.0 kB] 51s Get:77 http://ftpmaster.internal/ubuntu plucky/main amd64 libjemalloc2 amd64 5.3.0-3 [277 kB] 51s Get:78 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-firmware amd64 20250310.git9e1370d3-0ubuntu1 [571 MB] 56s Get:79 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-modules-6.14.0-10-generic amd64 6.14.0-10.10 [41.2 MB] 56s Get:80 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-image-6.14.0-10-generic amd64 6.14.0-10.10 [15.3 MB] 56s Get:81 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-modules-extra-6.14.0-10-generic amd64 6.14.0-10.10 [120 MB] 57s Get:82 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-generic amd64 6.14.0-10.10 [1730 B] 57s Get:83 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-image-generic amd64 6.14.0-10.10 [11.1 kB] 57s Get:84 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-virtual amd64 6.14.0-10.10 [1722 B] 57s Get:85 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-image-virtual amd64 6.14.0-10.10 [11.1 kB] 57s Get:86 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-headers-virtual amd64 6.14.0-10.10 [1642 B] 57s Get:87 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-headers-6.14.0-10 all 6.14.0-10.10 [14.2 MB] 57s Get:88 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-headers-6.14.0-10-generic amd64 6.14.0-10.10 [3915 kB] 57s Get:89 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-headers-generic amd64 6.14.0-10.10 [11.0 kB] 57s Get:90 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-libc-dev amd64 6.14.0-10.10 [1723 kB] 57s Get:91 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-perf amd64 6.14.0-10.10 [4122 kB] 57s Get:92 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-tools-6.14.0-10 amd64 6.14.0-10.10 [1394 kB] 57s Get:93 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-tools-6.14.0-10-generic amd64 6.14.0-10.10 [830 B] 57s Get:94 http://ftpmaster.internal/ubuntu plucky/main amd64 pinentry-curses amd64 1.3.1-2ubuntu3 [42.3 kB] 57s Get:95 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-lazr.uri all 1.0.6-6 [13.7 kB] 57s Get:96 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-systemd amd64 235-1build6 [43.9 kB] 57s Get:97 http://ftpmaster.internal/ubuntu plucky/main amd64 python3.13-gdbm amd64 3.13.2-2 [31.9 kB] 57s Get:98 http://ftpmaster.internal/ubuntu plucky/main amd64 cloud-init all 25.1-0ubuntu3 [2100 B] 58s Preconfiguring packages ... 58s Fetched 807 MB in 8s (103 MB/s) 58s (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 ... 109138 files and directories currently installed.) 58s Preparing to unpack .../ncurses-bin_6.5+20250216-2_amd64.deb ... 58s Unpacking ncurses-bin (6.5+20250216-2) over (6.5+20250216-1) ... 58s Setting up ncurses-bin (6.5+20250216-2) ... 58s (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 ... 109138 files and directories currently installed.) 58s Preparing to unpack .../ncurses-base_6.5+20250216-2_all.deb ... 58s Unpacking ncurses-base (6.5+20250216-2) over (6.5+20250216-1) ... 58s Setting up ncurses-base (6.5+20250216-2) ... 59s (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 ... 109138 files and directories currently installed.) 59s Preparing to unpack .../ncurses-term_6.5+20250216-2_all.deb ... 59s Unpacking ncurses-term (6.5+20250216-2) over (6.5+20250216-1) ... 59s Preparing to unpack .../liblz4-1_1.10.0-4_amd64.deb ... 59s Unpacking liblz4-1:amd64 (1.10.0-4) over (1.10.0-3) ... 59s Setting up liblz4-1:amd64 (1.10.0-4) ... 59s (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 ... 109138 files and directories currently installed.) 59s Preparing to unpack .../liblzma5_5.6.4-1_amd64.deb ... 59s Unpacking liblzma5:amd64 (5.6.4-1) over (5.6.3-1) ... 59s Setting up liblzma5:amd64 (5.6.4-1) ... 59s (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 ... 109138 files and directories currently installed.) 59s Preparing to unpack .../libapt-pkg7.0_2.9.33_amd64.deb ... 59s Unpacking libapt-pkg7.0:amd64 (2.9.33) over (2.9.31ubuntu1) ... 59s Setting up libapt-pkg7.0:amd64 (2.9.33) ... 60s (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 ... 109138 files and directories currently installed.) 60s Preparing to unpack .../archives/apt_2.9.33_amd64.deb ... 60s Unpacking apt (2.9.33) over (2.9.31ubuntu1) ... 60s Setting up apt (2.9.33) ... 60s (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 ... 109138 files and directories currently installed.) 60s Preparing to unpack .../apt-utils_2.9.33_amd64.deb ... 60s Unpacking apt-utils (2.9.33) over (2.9.31ubuntu1) ... 60s Preparing to unpack .../python3-minimal_3.13.2-2_amd64.deb ... 60s Unpacking python3-minimal (3.13.2-2) over (3.13.2-1) ... 60s Setting up python3-minimal (3.13.2-2) ... 61s (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 ... 109138 files and directories currently installed.) 61s Preparing to unpack .../0-python3_3.13.2-2_amd64.deb ... 61s Unpacking python3 (3.13.2-2) over (3.13.2-1) ... 61s Preparing to unpack .../1-libpython3.13_3.13.2-2_amd64.deb ... 61s Unpacking libpython3.13:amd64 (3.13.2-2) over (3.13.2-1) ... 61s Preparing to unpack .../2-media-types_13.0.0_all.deb ... 61s Unpacking media-types (13.0.0) over (12.0.0) ... 61s Preparing to unpack .../3-libncurses6_6.5+20250216-2_amd64.deb ... 61s Unpacking libncurses6:amd64 (6.5+20250216-2) over (6.5+20250216-1) ... 61s Preparing to unpack .../4-libncursesw6_6.5+20250216-2_amd64.deb ... 61s Unpacking libncursesw6:amd64 (6.5+20250216-2) over (6.5+20250216-1) ... 61s Preparing to unpack .../5-libtinfo6_6.5+20250216-2_amd64.deb ... 61s Unpacking libtinfo6:amd64 (6.5+20250216-2) over (6.5+20250216-1) ... 61s Setting up libtinfo6:amd64 (6.5+20250216-2) ... 61s (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 ... 109138 files and directories currently installed.) 61s Preparing to unpack .../0-libsqlite3-0_3.46.1-2_amd64.deb ... 61s Unpacking libsqlite3-0:amd64 (3.46.1-2) over (3.46.1-1) ... 61s Preparing to unpack .../1-python3.13_3.13.2-2_amd64.deb ... 61s Unpacking python3.13 (3.13.2-2) over (3.13.2-1) ... 61s Preparing to unpack .../2-python3.13-minimal_3.13.2-2_amd64.deb ... 61s Unpacking python3.13-minimal (3.13.2-2) over (3.13.2-1) ... 61s Preparing to unpack .../3-libpython3.13-minimal_3.13.2-2_amd64.deb ... 61s Unpacking libpython3.13-minimal:amd64 (3.13.2-2) over (3.13.2-1) ... 62s Preparing to unpack .../4-libpython3.13-stdlib_3.13.2-2_amd64.deb ... 62s Unpacking libpython3.13-stdlib:amd64 (3.13.2-2) over (3.13.2-1) ... 62s Preparing to unpack .../5-libpython3-stdlib_3.13.2-2_amd64.deb ... 62s Unpacking libpython3-stdlib:amd64 (3.13.2-2) over (3.13.2-1) ... 62s Preparing to unpack .../6-rsync_3.4.1+ds1-3_amd64.deb ... 62s Unpacking rsync (3.4.1+ds1-3) over (3.4.1-0syncable1) ... 62s Selecting previously unselected package libdebuginfod-common. 62s Preparing to unpack .../7-libdebuginfod-common_0.192-4_all.deb ... 62s Unpacking libdebuginfod-common (0.192-4) ... 62s Preparing to unpack .../8-libaudit-common_1%3a4.0.2-2ubuntu2_all.deb ... 62s Unpacking libaudit-common (1:4.0.2-2ubuntu2) over (1:4.0.2-2ubuntu1) ... 62s Setting up libaudit-common (1:4.0.2-2ubuntu2) ... 62s (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 ... 109147 files and directories currently installed.) 62s Preparing to unpack .../libcap-ng0_0.8.5-4build1_amd64.deb ... 62s Unpacking libcap-ng0:amd64 (0.8.5-4build1) over (0.8.5-4) ... 62s Setting up libcap-ng0:amd64 (0.8.5-4build1) ... 62s (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 ... 109147 files and directories currently installed.) 62s Preparing to unpack .../libaudit1_1%3a4.0.2-2ubuntu2_amd64.deb ... 62s Unpacking libaudit1:amd64 (1:4.0.2-2ubuntu2) over (1:4.0.2-2ubuntu1) ... 62s Setting up libaudit1:amd64 (1:4.0.2-2ubuntu2) ... 62s (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 ... 109147 files and directories currently installed.) 62s Preparing to unpack .../libselinux1_3.7-3ubuntu3_amd64.deb ... 62s Unpacking libselinux1:amd64 (3.7-3ubuntu3) over (3.7-3ubuntu2) ... 62s Setting up libselinux1:amd64 (3.7-3ubuntu3) ... 62s (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 ... 109147 files and directories currently installed.) 62s Preparing to unpack .../00-gir1.2-girepository-2.0_1.83.4-1_amd64.deb ... 62s Unpacking gir1.2-girepository-2.0:amd64 (1.83.4-1) over (1.82.0-4) ... 62s Preparing to unpack .../01-gir1.2-glib-2.0_2.84.0-1_amd64.deb ... 62s Unpacking gir1.2-glib-2.0:amd64 (2.84.0-1) over (2.83.5-1) ... 63s Preparing to unpack .../02-libglib2.0-0t64_2.84.0-1_amd64.deb ... 63s Unpacking libglib2.0-0t64:amd64 (2.84.0-1) over (2.83.5-1) ... 63s Preparing to unpack .../03-libgirepository-1.0-1_1.83.4-1_amd64.deb ... 63s Unpacking libgirepository-1.0-1:amd64 (1.83.4-1) over (1.82.0-4) ... 63s Preparing to unpack .../04-libapparmor1_4.1.0~beta5-0ubuntu8_amd64.deb ... 63s Unpacking libapparmor1:amd64 (4.1.0~beta5-0ubuntu8) over (4.1.0~beta5-0ubuntu6) ... 63s Preparing to unpack .../05-libestr0_0.1.11-2_amd64.deb ... 63s Unpacking libestr0:amd64 (0.1.11-2) over (0.1.11-1build1) ... 63s Preparing to unpack .../06-libglib2.0-data_2.84.0-1_all.deb ... 63s Unpacking libglib2.0-data (2.84.0-1) over (2.83.5-1) ... 63s Preparing to unpack .../07-libxml2_2.12.7+dfsg+really2.9.14-0.2ubuntu5_amd64.deb ... 63s Unpacking libxml2:amd64 (2.12.7+dfsg+really2.9.14-0.2ubuntu5) over (2.12.7+dfsg+really2.9.14-0.2ubuntu4) ... 63s Preparing to unpack .../08-python-apt-common_2.9.9build1_all.deb ... 63s Unpacking python-apt-common (2.9.9build1) over (2.9.9) ... 63s Preparing to unpack .../09-python3-apt_2.9.9build1_amd64.deb ... 63s Unpacking python3-apt (2.9.9build1) over (2.9.9) ... 63s Preparing to unpack .../10-python3-cffi-backend_1.17.1-2build2_amd64.deb ... 63s Unpacking python3-cffi-backend:amd64 (1.17.1-2build2) over (1.17.1-2build1) ... 63s Preparing to unpack .../11-python3-dbus_1.3.2-5build5_amd64.deb ... 63s Unpacking python3-dbus (1.3.2-5build5) over (1.3.2-5build4) ... 63s Preparing to unpack .../12-python3-gi_3.50.0-4build1_amd64.deb ... 63s Unpacking python3-gi (3.50.0-4build1) over (3.50.0-4) ... 63s Preparing to unpack .../13-python3-yaml_6.0.2-1build2_amd64.deb ... 63s Unpacking python3-yaml (6.0.2-1build2) over (6.0.2-1build1) ... 63s Preparing to unpack .../14-rsyslog_8.2412.0-2ubuntu2_amd64.deb ... 64s Unpacking rsyslog (8.2412.0-2ubuntu2) over (8.2412.0-2ubuntu1) ... 64s Preparing to unpack .../15-apparmor_4.1.0~beta5-0ubuntu8_amd64.deb ... 64s Unpacking apparmor (4.1.0~beta5-0ubuntu8) over (4.1.0~beta5-0ubuntu6) ... 65s Preparing to unpack .../16-dosfstools_4.2-1.2_amd64.deb ... 65s Unpacking dosfstools (4.2-1.2) over (4.2-1.1build1) ... 65s Preparing to unpack .../17-libnl-genl-3-200_3.7.0-1_amd64.deb ... 65s Unpacking libnl-genl-3-200:amd64 (3.7.0-1) over (3.7.0-0.3build2) ... 65s Preparing to unpack .../18-libnl-route-3-200_3.7.0-1_amd64.deb ... 65s Unpacking libnl-route-3-200:amd64 (3.7.0-1) over (3.7.0-0.3build2) ... 65s Preparing to unpack .../19-libnl-3-200_3.7.0-1_amd64.deb ... 65s Unpacking libnl-3-200:amd64 (3.7.0-1) over (3.7.0-0.3build2) ... 65s Preparing to unpack .../20-pci.ids_0.0~2025.03.09-1_all.deb ... 65s Unpacking pci.ids (0.0~2025.03.09-1) over (0.0~2025.02.12-1) ... 65s Preparing to unpack .../21-pciutils_1%3a3.13.0-2_amd64.deb ... 65s Unpacking pciutils (1:3.13.0-2) over (1:3.13.0-1) ... 65s Preparing to unpack .../22-libpci3_1%3a3.13.0-2_amd64.deb ... 65s Unpacking libpci3:amd64 (1:3.13.0-2) over (1:3.13.0-1) ... 65s Preparing to unpack .../23-strace_6.13+ds-1ubuntu1_amd64.deb ... 65s Unpacking strace (6.13+ds-1ubuntu1) over (6.11-0ubuntu1) ... 65s Preparing to unpack .../24-xz-utils_5.6.4-1_amd64.deb ... 65s Unpacking xz-utils (5.6.4-1) over (5.6.3-1) ... 65s Preparing to unpack .../25-libgprofng0_2.44-3ubuntu1_amd64.deb ... 65s Unpacking libgprofng0:amd64 (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 65s Preparing to unpack .../26-libctf0_2.44-3ubuntu1_amd64.deb ... 65s Unpacking libctf0:amd64 (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 65s Preparing to unpack .../27-libctf-nobfd0_2.44-3ubuntu1_amd64.deb ... 65s Unpacking libctf-nobfd0:amd64 (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 65s Preparing to unpack .../28-binutils-x86-64-linux-gnu_2.44-3ubuntu1_amd64.deb ... 65s Unpacking binutils-x86-64-linux-gnu (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 65s Preparing to unpack .../29-libbinutils_2.44-3ubuntu1_amd64.deb ... 65s Unpacking libbinutils:amd64 (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 65s Preparing to unpack .../30-binutils_2.44-3ubuntu1_amd64.deb ... 65s Unpacking binutils (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 65s Preparing to unpack .../31-binutils-common_2.44-3ubuntu1_amd64.deb ... 65s Unpacking binutils-common:amd64 (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 66s Preparing to unpack .../32-libsframe1_2.44-3ubuntu1_amd64.deb ... 66s Unpacking libsframe1:amd64 (2.44-3ubuntu1) over (2.44-2ubuntu1) ... 66s Preparing to unpack .../33-hwdata_0.393-3_all.deb ... 66s Unpacking hwdata (0.393-3) over (0.393-1) ... 66s Selecting previously unselected package pnp.ids. 66s Preparing to unpack .../34-pnp.ids_0.393-3_all.deb ... 66s Unpacking pnp.ids (0.393-3) ... 66s Preparing to unpack .../35-linux-tools-common_6.14.0-10.10_all.deb ... 66s Unpacking linux-tools-common (6.14.0-10.10) over (6.12.0-16.16) ... 66s Selecting previously unselected package bpftool. 66s Preparing to unpack .../36-bpftool_7.6.0+6.14.0-10.10_amd64.deb ... 66s Unpacking bpftool (7.6.0+6.14.0-10.10) ... 66s Preparing to unpack .../37-python3-markupsafe_2.1.5-1build4_amd64.deb ... 66s Unpacking python3-markupsafe (2.1.5-1build4) over (2.1.5-1build3) ... 66s Preparing to unpack .../38-python3-jinja2_3.1.5-2ubuntu1_all.deb ... 66s Unpacking python3-jinja2 (3.1.5-2ubuntu1) over (3.1.5-2) ... 66s Preparing to unpack .../39-cloud-init-base_25.1-0ubuntu3_all.deb ... 66s Unpacking cloud-init-base (25.1-0ubuntu3) over (25.1-0ubuntu2) ... 66s Preparing to unpack .../40-libbrotli1_1.1.0-2build4_amd64.deb ... 66s Unpacking libbrotli1:amd64 (1.1.0-2build4) over (1.1.0-2build3) ... 66s Preparing to unpack .../41-curl_8.12.1-3ubuntu1_amd64.deb ... 66s Unpacking curl (8.12.1-3ubuntu1) over (8.12.1-2ubuntu1) ... 66s Preparing to unpack .../42-libcurl4t64_8.12.1-3ubuntu1_amd64.deb ... 66s Unpacking libcurl4t64:amd64 (8.12.1-3ubuntu1) over (8.12.1-2ubuntu1) ... 66s Preparing to unpack .../43-libcurl3t64-gnutls_8.12.1-3ubuntu1_amd64.deb ... 66s Unpacking libcurl3t64-gnutls:amd64 (8.12.1-3ubuntu1) over (8.12.1-2ubuntu1) ... 67s Preparing to unpack .../44-fwupd_2.0.6-4_amd64.deb ... 67s Unpacking fwupd (2.0.6-4) over (2.0.6-3) ... 67s Preparing to unpack .../45-libfwupd3_2.0.6-4_amd64.deb ... 67s Unpacking libfwupd3:amd64 (2.0.6-4) over (2.0.6-3) ... 67s Preparing to unpack .../46-libmm-glib0_1.23.4-0ubuntu3_amd64.deb ... 67s Unpacking libmm-glib0:amd64 (1.23.4-0ubuntu3) over (1.23.4-0ubuntu2) ... 67s Preparing to unpack .../47-htop_3.4.0-2_amd64.deb ... 67s Unpacking htop (3.4.0-2) over (3.3.0-5) ... 67s Selecting previously unselected package libdebuginfod1t64:amd64. 67s Preparing to unpack .../48-libdebuginfod1t64_0.192-4_amd64.deb ... 67s Unpacking libdebuginfod1t64:amd64 (0.192-4) ... 67s Preparing to unpack .../49-libjemalloc2_5.3.0-3_amd64.deb ... 67s Unpacking libjemalloc2:amd64 (5.3.0-3) over (5.3.0-2build1) ... 67s Preparing to unpack .../50-linux-firmware_20250310.git9e1370d3-0ubuntu1_amd64.deb ... 67s Unpacking linux-firmware (20250310.git9e1370d3-0ubuntu1) over (20250204.git0fd450ee-0ubuntu1) ... 70s Selecting previously unselected package linux-modules-6.14.0-10-generic. 70s Preparing to unpack .../51-linux-modules-6.14.0-10-generic_6.14.0-10.10_amd64.deb ... 70s Unpacking linux-modules-6.14.0-10-generic (6.14.0-10.10) ... 71s Selecting previously unselected package linux-image-6.14.0-10-generic. 71s Preparing to unpack .../52-linux-image-6.14.0-10-generic_6.14.0-10.10_amd64.deb ... 71s Unpacking linux-image-6.14.0-10-generic (6.14.0-10.10) ... 71s Selecting previously unselected package linux-modules-extra-6.14.0-10-generic. 71s Preparing to unpack .../53-linux-modules-extra-6.14.0-10-generic_6.14.0-10.10_amd64.deb ... 71s Unpacking linux-modules-extra-6.14.0-10-generic (6.14.0-10.10) ... 72s Preparing to unpack .../54-linux-generic_6.14.0-10.10_amd64.deb ... 72s Unpacking linux-generic (6.14.0-10.10) over (6.12.0-16.16+2) ... 72s Preparing to unpack .../55-linux-image-generic_6.14.0-10.10_amd64.deb ... 72s Unpacking linux-image-generic (6.14.0-10.10) over (6.12.0-16.16+2) ... 72s Preparing to unpack .../56-linux-virtual_6.14.0-10.10_amd64.deb ... 72s Unpacking linux-virtual (6.14.0-10.10) over (6.12.0-16.16+2) ... 72s Preparing to unpack .../57-linux-image-virtual_6.14.0-10.10_amd64.deb ... 72s Unpacking linux-image-virtual (6.14.0-10.10) over (6.12.0-16.16+2) ... 72s Preparing to unpack .../58-linux-headers-virtual_6.14.0-10.10_amd64.deb ... 72s Unpacking linux-headers-virtual (6.14.0-10.10) over (6.12.0-16.16+2) ... 72s Selecting previously unselected package linux-headers-6.14.0-10. 72s Preparing to unpack .../59-linux-headers-6.14.0-10_6.14.0-10.10_all.deb ... 72s Unpacking linux-headers-6.14.0-10 (6.14.0-10.10) ... 75s Selecting previously unselected package linux-headers-6.14.0-10-generic. 75s Preparing to unpack .../60-linux-headers-6.14.0-10-generic_6.14.0-10.10_amd64.deb ... 75s Unpacking linux-headers-6.14.0-10-generic (6.14.0-10.10) ... 76s Preparing to unpack .../61-linux-headers-generic_6.14.0-10.10_amd64.deb ... 76s Unpacking linux-headers-generic (6.14.0-10.10) over (6.12.0-16.16+2) ... 76s Preparing to unpack .../62-linux-libc-dev_6.14.0-10.10_amd64.deb ... 76s Unpacking linux-libc-dev:amd64 (6.14.0-10.10) over (6.12.0-16.16) ... 77s Selecting previously unselected package linux-perf. 77s Preparing to unpack .../63-linux-perf_6.14.0-10.10_amd64.deb ... 77s Unpacking linux-perf (6.14.0-10.10) ... 77s Selecting previously unselected package linux-tools-6.14.0-10. 77s Preparing to unpack .../64-linux-tools-6.14.0-10_6.14.0-10.10_amd64.deb ... 77s Unpacking linux-tools-6.14.0-10 (6.14.0-10.10) ... 77s Selecting previously unselected package linux-tools-6.14.0-10-generic. 77s Preparing to unpack .../65-linux-tools-6.14.0-10-generic_6.14.0-10.10_amd64.deb ... 77s Unpacking linux-tools-6.14.0-10-generic (6.14.0-10.10) ... 77s Preparing to unpack .../66-pinentry-curses_1.3.1-2ubuntu3_amd64.deb ... 77s Unpacking pinentry-curses (1.3.1-2ubuntu3) over (1.3.1-2ubuntu2) ... 77s Preparing to unpack .../67-python3-lazr.uri_1.0.6-6_all.deb ... 77s Unpacking python3-lazr.uri (1.0.6-6) over (1.0.6-5) ... 77s Preparing to unpack .../68-python3-systemd_235-1build6_amd64.deb ... 77s Unpacking python3-systemd (235-1build6) over (235-1build5) ... 77s Preparing to unpack .../69-python3.13-gdbm_3.13.2-2_amd64.deb ... 77s Unpacking python3.13-gdbm (3.13.2-2) over (3.13.2-1) ... 77s Preparing to unpack .../70-cloud-init_25.1-0ubuntu3_all.deb ... 77s Unpacking cloud-init (25.1-0ubuntu3) over (25.1-0ubuntu2) ... 77s Setting up linux-headers-6.14.0-10 (6.14.0-10.10) ... 77s Setting up media-types (13.0.0) ... 77s Installing new version of config file /etc/mime.types ... 77s Setting up linux-headers-6.14.0-10-generic (6.14.0-10.10) ... 77s Setting up libapparmor1:amd64 (4.1.0~beta5-0ubuntu8) ... 77s Setting up pci.ids (0.0~2025.03.09-1) ... 77s Setting up apt-utils (2.9.33) ... 77s Setting up libdebuginfod-common (0.192-4) ... 78s Setting up linux-firmware (20250310.git9e1370d3-0ubuntu1) ... 78s Setting up bpftool (7.6.0+6.14.0-10.10) ... 78s Setting up libestr0:amd64 (0.1.11-2) ... 78s Setting up libbrotli1:amd64 (1.1.0-2build4) ... 78s Setting up libsqlite3-0:amd64 (3.46.1-2) ... 78s Setting up dosfstools (4.2-1.2) ... 78s Setting up rsyslog (8.2412.0-2ubuntu2) ... 78s info: The user `syslog' is already a member of `adm'. 79s Setting up binutils-common:amd64 (2.44-3ubuntu1) ... 79s Setting up libcurl3t64-gnutls:amd64 (8.12.1-3ubuntu1) ... 79s Setting up linux-libc-dev:amd64 (6.14.0-10.10) ... 79s Setting up libctf-nobfd0:amd64 (2.44-3ubuntu1) ... 79s Setting up linux-headers-generic (6.14.0-10.10) ... 79s Setting up libjemalloc2:amd64 (5.3.0-3) ... 79s Setting up libsframe1:amd64 (2.44-3ubuntu1) ... 79s Setting up libpython3.13-minimal:amd64 (3.13.2-2) ... 79s Setting up apparmor (4.1.0~beta5-0ubuntu8) ... 79s Installing new version of config file /etc/apparmor.d/openvpn ... 80s Reloading AppArmor profiles 81s Setting up libglib2.0-0t64:amd64 (2.84.0-1) ... 81s No schema files found: doing nothing. 81s Setting up libglib2.0-data (2.84.0-1) ... 81s Setting up libncurses6:amd64 (6.5+20250216-2) ... 81s Setting up strace (6.13+ds-1ubuntu1) ... 81s Setting up xz-utils (5.6.4-1) ... 81s Setting up gir1.2-glib-2.0:amd64 (2.84.0-1) ... 81s Setting up linux-modules-6.14.0-10-generic (6.14.0-10.10) ... 84s Setting up libncursesw6:amd64 (6.5+20250216-2) ... 84s Setting up libpci3:amd64 (1:3.13.0-2) ... 84s Setting up python-apt-common (2.9.9build1) ... 84s Setting up libmm-glib0:amd64 (1.23.4-0ubuntu3) ... 84s Setting up pnp.ids (0.393-3) ... 84s Setting up libnl-3-200:amd64 (3.7.0-1) ... 84s Setting up python3.13-minimal (3.13.2-2) ... 85s Setting up libgirepository-1.0-1:amd64 (1.83.4-1) ... 85s Setting up libbinutils:amd64 (2.44-3ubuntu1) ... 85s Setting up libpython3.13-stdlib:amd64 (3.13.2-2) ... 85s Setting up libxml2:amd64 (2.12.7+dfsg+really2.9.14-0.2ubuntu5) ... 85s Setting up rsync (3.4.1+ds1-3) ... 85s rsync.service is a disabled or a static unit not running, not starting it. 85s Setting up python3.13-gdbm (3.13.2-2) ... 85s Setting up libpython3-stdlib:amd64 (3.13.2-2) ... 85s Setting up ncurses-term (6.5+20250216-2) ... 85s Setting up libctf0:amd64 (2.44-3ubuntu1) ... 85s Setting up libpython3.13:amd64 (3.13.2-2) ... 85s Setting up pinentry-curses (1.3.1-2ubuntu3) ... 85s Setting up libdebuginfod1t64:amd64 (0.192-4) ... 85s Setting up linux-headers-virtual (6.14.0-10.10) ... 85s Setting up libcurl4t64:amd64 (8.12.1-3ubuntu1) ... 85s Setting up python3.13 (3.13.2-2) ... 86s Setting up htop (3.4.0-2) ... 86s Setting up linux-image-6.14.0-10-generic (6.14.0-10.10) ... 88s I: /boot/vmlinuz.old is now a symlink to vmlinuz-6.12.0-16-generic 88s I: /boot/initrd.img.old is now a symlink to initrd.img-6.12.0-16-generic 88s I: /boot/vmlinuz is now a symlink to vmlinuz-6.14.0-10-generic 88s I: /boot/initrd.img is now a symlink to initrd.img-6.14.0-10-generic 88s Setting up libfwupd3:amd64 (2.0.6-4) ... 88s Setting up python3 (3.13.2-2) ... 89s Setting up python3-markupsafe (2.1.5-1build4) ... 89s Setting up linux-modules-extra-6.14.0-10-generic (6.14.0-10.10) ... 91s Setting up libnl-route-3-200:amd64 (3.7.0-1) ... 91s Setting up hwdata (0.393-3) ... 91s Setting up python3-jinja2 (3.1.5-2ubuntu1) ... 91s Setting up libgprofng0:amd64 (2.44-3ubuntu1) ... 91s Setting up linux-perf (6.14.0-10.10) ... 91s Setting up gir1.2-girepository-2.0:amd64 (1.83.4-1) ... 91s Setting up python3-gi (3.50.0-4build1) ... 91s Setting up pciutils (1:3.13.0-2) ... 91s Setting up libnl-genl-3-200:amd64 (3.7.0-1) ... 91s Setting up curl (8.12.1-3ubuntu1) ... 91s Setting up linux-image-virtual (6.14.0-10.10) ... 91s Setting up linux-tools-common (6.14.0-10.10) ... 91s Setting up fwupd (2.0.6-4) ... 92s fwupd-refresh.service is a disabled or a static unit not running, not starting it. 92s fwupd.service is a disabled or a static unit not running, not starting it. 92s Setting up python3-systemd (235-1build6) ... 92s Setting up python3-cffi-backend:amd64 (1.17.1-2build2) ... 92s Setting up binutils-x86-64-linux-gnu (2.44-3ubuntu1) ... 92s Setting up linux-image-generic (6.14.0-10.10) ... 92s Setting up python3-dbus (1.3.2-5build5) ... 92s Setting up linux-tools-6.14.0-10 (6.14.0-10.10) ... 92s Setting up linux-generic (6.14.0-10.10) ... 92s Setting up python3-apt (2.9.9build1) ... 92s Setting up python3-yaml (6.0.2-1build2) ... 93s Setting up python3-lazr.uri (1.0.6-6) ... 93s Setting up binutils (2.44-3ubuntu1) ... 93s Setting up cloud-init-base (25.1-0ubuntu3) ... 94s Setting up linux-virtual (6.14.0-10.10) ... 94s Setting up linux-tools-6.14.0-10-generic (6.14.0-10.10) ... 94s Setting up cloud-init (25.1-0ubuntu3) ... 94s Processing triggers for systemd (257.3-1ubuntu3) ... 94s Processing triggers for man-db (2.13.0-1) ... 96s Processing triggers for dbus (1.16.2-1ubuntu1) ... 96s Processing triggers for libc-bin (2.41-1ubuntu1) ... 96s Processing triggers for initramfs-tools (0.146ubuntu1) ... 96s update-initramfs: Generating /boot/initrd.img-6.12.0-16-generic 96s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 107s Processing triggers for linux-image-6.14.0-10-generic (6.14.0-10.10) ... 107s /etc/kernel/postinst.d/initramfs-tools: 107s update-initramfs: Generating /boot/initrd.img-6.14.0-10-generic 107s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 118s /etc/kernel/postinst.d/zz-update-grub: 118s Sourcing file `/etc/default/grub' 118s Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg' 118s Sourcing file `/etc/default/grub.d/90-autopkgtest.cfg' 118s Generating grub configuration file ... 118s Found linux image: /boot/vmlinuz-6.14.0-10-generic 118s Found initrd image: /boot/initrd.img-6.14.0-10-generic 118s Found linux image: /boot/vmlinuz-6.12.0-16-generic 118s Found initrd image: /boot/initrd.img-6.12.0-16-generic 118s Found linux image: /boot/vmlinuz-6.11.0-8-generic 118s Found initrd image: /boot/initrd.img-6.11.0-8-generic 118s Warning: os-prober will not be executed to detect other bootable partitions. 118s Systems on them will not be added to the GRUB boot configuration. 118s Check GRUB_DISABLE_OS_PROBER documentation entry. 118s Adding boot menu entry for UEFI Firmware Settings ... 118s done 120s Reading package lists... 120s Building dependency tree... 120s Reading state information... 120s Solving dependencies... 120s The following packages will be REMOVED: 120s libnl-genl-3-200* libnsl2* libpython3.12-minimal* libpython3.12-stdlib* 120s libpython3.12t64* linux-headers-6.11.0-8* linux-headers-6.11.0-8-generic* 120s linux-headers-6.12.0-16* linux-headers-6.12.0-16-generic* 120s linux-image-6.11.0-8-generic* linux-image-6.12.0-16-generic* 120s linux-modules-6.11.0-8-generic* linux-modules-6.12.0-16-generic* 120s linux-modules-extra-6.12.0-16-generic* linux-tools-6.11.0-8* 120s linux-tools-6.11.0-8-generic* linux-tools-6.12.0-16* 120s linux-tools-6.12.0-16-generic* 121s 0 upgraded, 0 newly installed, 18 to remove and 5 not upgraded. 121s After this operation, 545 MB disk space will be freed. 121s (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 ... 148643 files and directories currently installed.) 121s Removing libnl-genl-3-200:amd64 (3.7.0-1) ... 121s Removing linux-tools-6.11.0-8-generic (6.11.0-8.8) ... 121s Removing linux-tools-6.11.0-8 (6.11.0-8.8) ... 121s Removing libpython3.12t64:amd64 (3.12.9-1) ... 121s Removing libpython3.12-stdlib:amd64 (3.12.9-1) ... 121s Removing libnsl2:amd64 (1.3.0-3build3) ... 121s Removing libpython3.12-minimal:amd64 (3.12.9-1) ... 121s Removing linux-headers-6.11.0-8-generic (6.11.0-8.8) ... 121s Removing linux-headers-6.11.0-8 (6.11.0-8.8) ... 124s Removing linux-headers-6.12.0-16-generic (6.12.0-16.16) ... 124s Removing linux-headers-6.12.0-16 (6.12.0-16.16) ... 126s Removing linux-image-6.11.0-8-generic (6.11.0-8.8) ... 126s /etc/kernel/postrm.d/initramfs-tools: 126s update-initramfs: Deleting /boot/initrd.img-6.11.0-8-generic 126s /etc/kernel/postrm.d/zz-update-grub: 126s Sourcing file `/etc/default/grub' 126s Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg' 126s Sourcing file `/etc/default/grub.d/90-autopkgtest.cfg' 126s Generating grub configuration file ... 127s Found linux image: /boot/vmlinuz-6.14.0-10-generic 127s Found initrd image: /boot/initrd.img-6.14.0-10-generic 127s Found linux image: /boot/vmlinuz-6.12.0-16-generic 127s Found initrd image: /boot/initrd.img-6.12.0-16-generic 127s Warning: os-prober will not be executed to detect other bootable partitions. 127s Systems on them will not be added to the GRUB boot configuration. 127s Check GRUB_DISABLE_OS_PROBER documentation entry. 127s Adding boot menu entry for UEFI Firmware Settings ... 127s done 127s Removing linux-image-6.12.0-16-generic (6.12.0-16.16) ... 127s W: Removing the running kernel 127s I: /boot/vmlinuz.old is now a symlink to vmlinuz-6.14.0-10-generic 127s I: /boot/initrd.img.old is now a symlink to initrd.img-6.14.0-10-generic 127s /etc/kernel/postrm.d/initramfs-tools: 127s update-initramfs: Deleting /boot/initrd.img-6.12.0-16-generic 127s /etc/kernel/postrm.d/zz-update-grub: 127s Sourcing file `/etc/default/grub' 127s Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg' 127s Sourcing file `/etc/default/grub.d/90-autopkgtest.cfg' 127s Generating grub configuration file ... 127s Found linux image: /boot/vmlinuz-6.14.0-10-generic 127s Found initrd image: /boot/initrd.img-6.14.0-10-generic 128s Warning: os-prober will not be executed to detect other bootable partitions. 128s Systems on them will not be added to the GRUB boot configuration. 128s Check GRUB_DISABLE_OS_PROBER documentation entry. 128s Adding boot menu entry for UEFI Firmware Settings ... 128s done 128s Removing linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 128s Removing linux-modules-extra-6.12.0-16-generic (6.12.0-16.16) ... 129s Removing linux-modules-6.12.0-16-generic (6.12.0-16.16) ... 129s Removing linux-tools-6.12.0-16-generic (6.12.0-16.16) ... 129s Removing linux-tools-6.12.0-16 (6.12.0-16.16) ... 129s Processing triggers for libc-bin (2.41-1ubuntu1) ... 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 ... 76972 files and directories currently installed.) 129s Purging configuration files for linux-image-6.11.0-8-generic (6.11.0-8.8) ... 130s Purging configuration files for libpython3.12-minimal:amd64 (3.12.9-1) ... 130s Purging configuration files for linux-modules-extra-6.12.0-16-generic (6.12.0-16.16) ... 130s Purging configuration files for linux-modules-6.12.0-16-generic (6.12.0-16.16) ... 130s dpkg: warning: while removing linux-modules-6.12.0-16-generic, directory '/lib/modules/6.12.0-16-generic' not empty so not removed 130s Purging configuration files for linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 130s Purging configuration files for linux-image-6.12.0-16-generic (6.12.0-16.16) ... 130s rmdir: failed to remove '/lib/modules/6.12.0-16-generic': Directory not empty 130s autopkgtest [22:18:43]: upgrading testbed (apt dist-upgrade and autopurge) 130s Reading package lists... 130s Building dependency tree... 130s Reading state information... 131s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 131s Starting 2 pkgProblemResolver with broken count: 0 131s Done 131s Entering ResolveByKeep 131s 132s Calculating upgrade... 132s The following packages will be upgraded: 132s libc-bin libc-dev-bin libc6 libc6-dev locales 132s 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 132s Need to get 10.5 MB of archives. 132s After this operation, 1024 B of additional disk space will be used. 132s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 libc6-dev amd64 2.41-1ubuntu2 [2183 kB] 132s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 libc-dev-bin amd64 2.41-1ubuntu2 [24.7 kB] 132s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 libc6 amd64 2.41-1ubuntu2 [3327 kB] 132s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 libc-bin amd64 2.41-1ubuntu2 [700 kB] 132s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 locales all 2.41-1ubuntu2 [4246 kB] 132s Preconfiguring packages ... 132s Fetched 10.5 MB in 0s (102 MB/s) 132s (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 ... 76968 files and directories currently installed.) 132s Preparing to unpack .../libc6-dev_2.41-1ubuntu2_amd64.deb ... 132s Unpacking libc6-dev:amd64 (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 133s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu2_amd64.deb ... 133s Unpacking libc-dev-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 133s Preparing to unpack .../libc6_2.41-1ubuntu2_amd64.deb ... 133s Unpacking libc6:amd64 (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 133s Setting up libc6:amd64 (2.41-1ubuntu2) ... 133s (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 ... 76968 files and directories currently installed.) 133s Preparing to unpack .../libc-bin_2.41-1ubuntu2_amd64.deb ... 133s Unpacking libc-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 133s Setting up libc-bin (2.41-1ubuntu2) ... 133s (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 ... 76968 files and directories currently installed.) 133s Preparing to unpack .../locales_2.41-1ubuntu2_all.deb ... 133s Unpacking locales (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 133s Setting up locales (2.41-1ubuntu2) ... 134s Generating locales (this might take a while)... 135s en_US.UTF-8... done 135s Generation complete. 135s Setting up libc-dev-bin (2.41-1ubuntu2) ... 135s Setting up libc6-dev:amd64 (2.41-1ubuntu2) ... 135s Processing triggers for man-db (2.13.0-1) ... 136s Processing triggers for systemd (257.3-1ubuntu3) ... 137s Reading package lists... 137s Building dependency tree... 137s Reading state information... 137s Starting pkgProblemResolver with broken count: 0 137s Starting 2 pkgProblemResolver with broken count: 0 137s Done 138s Solving dependencies... 138s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 138s autopkgtest [22:18:51]: rebooting testbed after setup commands that affected boot 142s autopkgtest-virt-ssh: WARNING: ssh connection failed. Retrying in 3 seconds... 154s autopkgtest [22:19:07]: testbed running kernel: Linux 6.14.0-10-generic #10-Ubuntu SMP PREEMPT_DYNAMIC Wed Mar 12 16:07:00 UTC 2025 155s autopkgtest [22:19:08]: @@@@@@@@@@@@@@@@@@@@ apt-source r-cran-mcmc 156s Get:1 http://ftpmaster.internal/ubuntu plucky/universe r-cran-mcmc 0.9-8-1 (dsc) [2083 B] 156s Get:2 http://ftpmaster.internal/ubuntu plucky/universe r-cran-mcmc 0.9-8-1 (tar) [1542 kB] 156s Get:3 http://ftpmaster.internal/ubuntu plucky/universe r-cran-mcmc 0.9-8-1 (diff) [3320 B] 156s gpgv: Signature made Tue Nov 21 10:57:44 2023 UTC 156s gpgv: using RSA key F1F007320A035541F0A663CA578A0494D1C646D1 156s gpgv: issuer "tille@debian.org" 156s gpgv: Can't check signature: No public key 156s dpkg-source: warning: cannot verify inline signature for ./r-cran-mcmc_0.9-8-1.dsc: no acceptable signature found 156s autopkgtest [22:19:09]: testing package r-cran-mcmc version 0.9-8-1 157s autopkgtest [22:19:10]: build not needed 159s autopkgtest [22:19:12]: test generic: preparing testbed 159s Reading package lists... 159s Building dependency tree... 159s Reading state information... 159s Starting pkgProblemResolver with broken count: 0 159s Starting 2 pkgProblemResolver with broken count: 0 159s Done 160s The following NEW packages will be installed: 160s fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-mono libblas3 160s libcairo2 libdatrie1 libdeflate0 libfontconfig1 libgfortran5 libgomp1 160s libgraphite2-3 libharfbuzz0b libice6 libjbig0 libjpeg-turbo8 libjpeg8 160s liblapack3 liblerc4 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 160s libpaper-utils libpaper2 libpixman-1-0 libsharpyuv0 libsm6 libtcl8.6 160s libthai-data libthai0 libtiff6 libtk8.6 libwebp7 libxcb-render0 libxcb-shm0 160s libxft2 libxrender1 libxss1 libxt6t64 r-base-core r-cran-iso r-cran-mcmc 160s r-cran-xtable unzip x11-common xdg-utils zip 160s 0 upgraded, 47 newly installed, 0 to remove and 0 not upgraded. 160s Need to get 43.4 MB of archives. 160s After this operation, 88.3 MB of additional disk space will be used. 160s Get:1 http://ftpmaster.internal/ubuntu plucky/main amd64 fonts-dejavu-mono all 2.37-8 [502 kB] 160s Get:2 http://ftpmaster.internal/ubuntu plucky/main amd64 fonts-dejavu-core all 2.37-8 [835 kB] 160s Get:3 http://ftpmaster.internal/ubuntu plucky/main amd64 fontconfig-config amd64 2.15.0-2ubuntu1 [37.4 kB] 160s Get:4 http://ftpmaster.internal/ubuntu plucky/main amd64 libfontconfig1 amd64 2.15.0-2ubuntu1 [164 kB] 160s Get:5 http://ftpmaster.internal/ubuntu plucky/main amd64 fontconfig amd64 2.15.0-2ubuntu1 [180 kB] 160s Get:6 http://ftpmaster.internal/ubuntu plucky/main amd64 libblas3 amd64 3.12.1-2 [359 kB] 160s Get:7 http://ftpmaster.internal/ubuntu plucky/main amd64 libpixman-1-0 amd64 0.44.0-3 [427 kB] 160s Get:8 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-render0 amd64 1.17.0-2 [16.2 kB] 160s Get:9 http://ftpmaster.internal/ubuntu plucky/main amd64 libxcb-shm0 amd64 1.17.0-2 [5758 B] 160s Get:10 http://ftpmaster.internal/ubuntu plucky/main amd64 libxrender1 amd64 1:0.9.10-1.1build1 [19.0 kB] 160s Get:11 http://ftpmaster.internal/ubuntu plucky/main amd64 libcairo2 amd64 1.18.2-2 [569 kB] 160s Get:12 http://ftpmaster.internal/ubuntu plucky/main amd64 libdatrie1 amd64 0.2.13-3build1 [19.0 kB] 160s Get:13 http://ftpmaster.internal/ubuntu plucky/main amd64 libdeflate0 amd64 1.23-1 [64.1 kB] 160s Get:14 http://ftpmaster.internal/ubuntu plucky/main amd64 libgfortran5 amd64 15-20250222-0ubuntu1 [919 kB] 160s Get:15 http://ftpmaster.internal/ubuntu plucky/main amd64 libgomp1 amd64 15-20250222-0ubuntu1 [148 kB] 160s Get:16 http://ftpmaster.internal/ubuntu plucky/main amd64 libgraphite2-3 amd64 1.3.14-2ubuntu1 [73.1 kB] 160s Get:17 http://ftpmaster.internal/ubuntu plucky/main amd64 libharfbuzz0b amd64 10.2.0-1 [543 kB] 160s Get:18 http://ftpmaster.internal/ubuntu plucky/main amd64 x11-common all 1:7.7+23ubuntu3 [21.7 kB] 160s Get:19 http://ftpmaster.internal/ubuntu plucky/main amd64 libice6 amd64 2:1.1.1-1 [44.1 kB] 160s Get:20 http://ftpmaster.internal/ubuntu plucky/main amd64 libjpeg-turbo8 amd64 2.1.5-3ubuntu2 [179 kB] 160s Get:21 http://ftpmaster.internal/ubuntu plucky/main amd64 libjpeg8 amd64 8c-2ubuntu11 [2148 B] 160s Get:22 http://ftpmaster.internal/ubuntu plucky/main amd64 liblapack3 amd64 3.12.1-2 [3179 kB] 160s Get:23 http://ftpmaster.internal/ubuntu plucky/main amd64 liblerc4 amd64 4.0.0+ds-5ubuntu1 [271 kB] 160s Get:24 http://ftpmaster.internal/ubuntu plucky/main amd64 libthai-data all 0.1.29-2build1 [158 kB] 160s Get:25 http://ftpmaster.internal/ubuntu plucky/main amd64 libthai0 amd64 0.1.29-2build1 [18.9 kB] 160s Get:26 http://ftpmaster.internal/ubuntu plucky/main amd64 libpango-1.0-0 amd64 1.56.2-1 [255 kB] 160s Get:27 http://ftpmaster.internal/ubuntu plucky/main amd64 libpangoft2-1.0-0 amd64 1.56.2-1 [52.6 kB] 160s Get:28 http://ftpmaster.internal/ubuntu plucky/main amd64 libpangocairo-1.0-0 amd64 1.56.2-1 [29.1 kB] 160s Get:29 http://ftpmaster.internal/ubuntu plucky/main amd64 libpaper2 amd64 2.2.5-0.3 [17.4 kB] 160s Get:30 http://ftpmaster.internal/ubuntu plucky/main amd64 libpaper-utils amd64 2.2.5-0.3 [15.5 kB] 160s Get:31 http://ftpmaster.internal/ubuntu plucky/main amd64 libsharpyuv0 amd64 1.5.0-0.1 [25.9 kB] 160s Get:32 http://ftpmaster.internal/ubuntu plucky/main amd64 libsm6 amd64 2:1.2.4-1 [17.4 kB] 160s Get:33 http://ftpmaster.internal/ubuntu plucky/main amd64 libtcl8.6 amd64 8.6.16+dfsg-1 [1086 kB] 160s Get:34 http://ftpmaster.internal/ubuntu plucky/main amd64 libjbig0 amd64 2.1-6.1ubuntu2 [29.7 kB] 160s Get:35 http://ftpmaster.internal/ubuntu plucky/main amd64 libwebp7 amd64 1.5.0-0.1 [378 kB] 160s Get:36 http://ftpmaster.internal/ubuntu plucky/main amd64 libtiff6 amd64 4.5.1+git230720-4ubuntu4 [200 kB] 160s Get:37 http://ftpmaster.internal/ubuntu plucky/main amd64 libxft2 amd64 2.3.6-1build1 [45.3 kB] 160s Get:38 http://ftpmaster.internal/ubuntu plucky/main amd64 libxss1 amd64 1:1.2.3-1build3 [7204 B] 160s Get:39 http://ftpmaster.internal/ubuntu plucky/main amd64 libtk8.6 amd64 8.6.16-1 [868 kB] 160s Get:40 http://ftpmaster.internal/ubuntu plucky/main amd64 libxt6t64 amd64 1:1.2.1-1.2build1 [171 kB] 160s Get:41 http://ftpmaster.internal/ubuntu plucky/main amd64 zip amd64 3.0-14ubuntu2 [185 kB] 160s Get:42 http://ftpmaster.internal/ubuntu plucky/main amd64 unzip amd64 6.0-28ubuntu6 [181 kB] 160s Get:43 http://ftpmaster.internal/ubuntu plucky/main amd64 xdg-utils all 1.2.1-2ubuntu1 [66.0 kB] 160s Get:44 http://ftpmaster.internal/ubuntu plucky/universe amd64 r-base-core amd64 4.4.3-1 [28.9 MB] 160s Get:45 http://ftpmaster.internal/ubuntu plucky/universe amd64 r-cran-iso amd64 0.0-21-1 [165 kB] 160s Get:46 http://ftpmaster.internal/ubuntu plucky/universe amd64 r-cran-mcmc amd64 0.9-8-1 [1225 kB] 160s Get:47 http://ftpmaster.internal/ubuntu plucky/universe amd64 r-cran-xtable all 1:1.8-4-2 [689 kB] 161s Preconfiguring packages ... 161s Fetched 43.4 MB in 1s (71.8 MB/s) 161s Selecting previously unselected package fonts-dejavu-mono. 161s (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 ... 76968 files and directories currently installed.) 161s Preparing to unpack .../00-fonts-dejavu-mono_2.37-8_all.deb ... 161s Unpacking fonts-dejavu-mono (2.37-8) ... 161s Selecting previously unselected package fonts-dejavu-core. 161s Preparing to unpack .../01-fonts-dejavu-core_2.37-8_all.deb ... 161s Unpacking fonts-dejavu-core (2.37-8) ... 161s Selecting previously unselected package fontconfig-config. 161s Preparing to unpack .../02-fontconfig-config_2.15.0-2ubuntu1_amd64.deb ... 161s Unpacking fontconfig-config (2.15.0-2ubuntu1) ... 161s Selecting previously unselected package libfontconfig1:amd64. 161s Preparing to unpack .../03-libfontconfig1_2.15.0-2ubuntu1_amd64.deb ... 161s Unpacking libfontconfig1:amd64 (2.15.0-2ubuntu1) ... 161s Selecting previously unselected package fontconfig. 161s Preparing to unpack .../04-fontconfig_2.15.0-2ubuntu1_amd64.deb ... 161s Unpacking fontconfig (2.15.0-2ubuntu1) ... 161s Selecting previously unselected package libblas3:amd64. 161s Preparing to unpack .../05-libblas3_3.12.1-2_amd64.deb ... 161s Unpacking libblas3:amd64 (3.12.1-2) ... 161s Selecting previously unselected package libpixman-1-0:amd64. 161s Preparing to unpack .../06-libpixman-1-0_0.44.0-3_amd64.deb ... 161s Unpacking libpixman-1-0:amd64 (0.44.0-3) ... 161s Selecting previously unselected package libxcb-render0:amd64. 161s Preparing to unpack .../07-libxcb-render0_1.17.0-2_amd64.deb ... 161s Unpacking libxcb-render0:amd64 (1.17.0-2) ... 161s Selecting previously unselected package libxcb-shm0:amd64. 161s Preparing to unpack .../08-libxcb-shm0_1.17.0-2_amd64.deb ... 161s Unpacking libxcb-shm0:amd64 (1.17.0-2) ... 161s Selecting previously unselected package libxrender1:amd64. 161s Preparing to unpack .../09-libxrender1_1%3a0.9.10-1.1build1_amd64.deb ... 161s Unpacking libxrender1:amd64 (1:0.9.10-1.1build1) ... 161s Selecting previously unselected package libcairo2:amd64. 161s Preparing to unpack .../10-libcairo2_1.18.2-2_amd64.deb ... 161s Unpacking libcairo2:amd64 (1.18.2-2) ... 162s Selecting previously unselected package libdatrie1:amd64. 162s Preparing to unpack .../11-libdatrie1_0.2.13-3build1_amd64.deb ... 162s Unpacking libdatrie1:amd64 (0.2.13-3build1) ... 162s Selecting previously unselected package libdeflate0:amd64. 162s Preparing to unpack .../12-libdeflate0_1.23-1_amd64.deb ... 162s Unpacking libdeflate0:amd64 (1.23-1) ... 162s Selecting previously unselected package libgfortran5:amd64. 162s Preparing to unpack .../13-libgfortran5_15-20250222-0ubuntu1_amd64.deb ... 162s Unpacking libgfortran5:amd64 (15-20250222-0ubuntu1) ... 162s Selecting previously unselected package libgomp1:amd64. 162s Preparing to unpack .../14-libgomp1_15-20250222-0ubuntu1_amd64.deb ... 162s Unpacking libgomp1:amd64 (15-20250222-0ubuntu1) ... 162s Selecting previously unselected package libgraphite2-3:amd64. 162s Preparing to unpack .../15-libgraphite2-3_1.3.14-2ubuntu1_amd64.deb ... 162s Unpacking libgraphite2-3:amd64 (1.3.14-2ubuntu1) ... 162s Selecting previously unselected package libharfbuzz0b:amd64. 162s Preparing to unpack .../16-libharfbuzz0b_10.2.0-1_amd64.deb ... 162s Unpacking libharfbuzz0b:amd64 (10.2.0-1) ... 162s Selecting previously unselected package x11-common. 162s Preparing to unpack .../17-x11-common_1%3a7.7+23ubuntu3_all.deb ... 162s Unpacking x11-common (1:7.7+23ubuntu3) ... 162s Selecting previously unselected package libice6:amd64. 162s Preparing to unpack .../18-libice6_2%3a1.1.1-1_amd64.deb ... 162s Unpacking libice6:amd64 (2:1.1.1-1) ... 162s Selecting previously unselected package libjpeg-turbo8:amd64. 162s Preparing to unpack .../19-libjpeg-turbo8_2.1.5-3ubuntu2_amd64.deb ... 162s Unpacking libjpeg-turbo8:amd64 (2.1.5-3ubuntu2) ... 162s Selecting previously unselected package libjpeg8:amd64. 162s Preparing to unpack .../20-libjpeg8_8c-2ubuntu11_amd64.deb ... 162s Unpacking libjpeg8:amd64 (8c-2ubuntu11) ... 162s Selecting previously unselected package liblapack3:amd64. 162s Preparing to unpack .../21-liblapack3_3.12.1-2_amd64.deb ... 162s Unpacking liblapack3:amd64 (3.12.1-2) ... 162s Selecting previously unselected package liblerc4:amd64. 162s Preparing to unpack .../22-liblerc4_4.0.0+ds-5ubuntu1_amd64.deb ... 162s Unpacking liblerc4:amd64 (4.0.0+ds-5ubuntu1) ... 162s Selecting previously unselected package libthai-data. 162s Preparing to unpack .../23-libthai-data_0.1.29-2build1_all.deb ... 162s Unpacking libthai-data (0.1.29-2build1) ... 162s Selecting previously unselected package libthai0:amd64. 162s Preparing to unpack .../24-libthai0_0.1.29-2build1_amd64.deb ... 162s Unpacking libthai0:amd64 (0.1.29-2build1) ... 162s Selecting previously unselected package libpango-1.0-0:amd64. 162s Preparing to unpack .../25-libpango-1.0-0_1.56.2-1_amd64.deb ... 162s Unpacking libpango-1.0-0:amd64 (1.56.2-1) ... 162s Selecting previously unselected package libpangoft2-1.0-0:amd64. 162s Preparing to unpack .../26-libpangoft2-1.0-0_1.56.2-1_amd64.deb ... 162s Unpacking libpangoft2-1.0-0:amd64 (1.56.2-1) ... 162s Selecting previously unselected package libpangocairo-1.0-0:amd64. 162s Preparing to unpack .../27-libpangocairo-1.0-0_1.56.2-1_amd64.deb ... 162s Unpacking libpangocairo-1.0-0:amd64 (1.56.2-1) ... 162s Selecting previously unselected package libpaper2:amd64. 162s Preparing to unpack .../28-libpaper2_2.2.5-0.3_amd64.deb ... 162s Unpacking libpaper2:amd64 (2.2.5-0.3) ... 162s Selecting previously unselected package libpaper-utils. 162s Preparing to unpack .../29-libpaper-utils_2.2.5-0.3_amd64.deb ... 162s Unpacking libpaper-utils (2.2.5-0.3) ... 162s Selecting previously unselected package libsharpyuv0:amd64. 162s Preparing to unpack .../30-libsharpyuv0_1.5.0-0.1_amd64.deb ... 162s Unpacking libsharpyuv0:amd64 (1.5.0-0.1) ... 162s Selecting previously unselected package libsm6:amd64. 162s Preparing to unpack .../31-libsm6_2%3a1.2.4-1_amd64.deb ... 162s Unpacking libsm6:amd64 (2:1.2.4-1) ... 162s Selecting previously unselected package libtcl8.6:amd64. 162s Preparing to unpack .../32-libtcl8.6_8.6.16+dfsg-1_amd64.deb ... 162s Unpacking libtcl8.6:amd64 (8.6.16+dfsg-1) ... 162s Selecting previously unselected package libjbig0:amd64. 162s Preparing to unpack .../33-libjbig0_2.1-6.1ubuntu2_amd64.deb ... 162s Unpacking libjbig0:amd64 (2.1-6.1ubuntu2) ... 162s Selecting previously unselected package libwebp7:amd64. 162s Preparing to unpack .../34-libwebp7_1.5.0-0.1_amd64.deb ... 162s Unpacking libwebp7:amd64 (1.5.0-0.1) ... 162s Selecting previously unselected package libtiff6:amd64. 162s Preparing to unpack .../35-libtiff6_4.5.1+git230720-4ubuntu4_amd64.deb ... 162s Unpacking libtiff6:amd64 (4.5.1+git230720-4ubuntu4) ... 162s Selecting previously unselected package libxft2:amd64. 162s Preparing to unpack .../36-libxft2_2.3.6-1build1_amd64.deb ... 162s Unpacking libxft2:amd64 (2.3.6-1build1) ... 162s Selecting previously unselected package libxss1:amd64. 162s Preparing to unpack .../37-libxss1_1%3a1.2.3-1build3_amd64.deb ... 162s Unpacking libxss1:amd64 (1:1.2.3-1build3) ... 162s Selecting previously unselected package libtk8.6:amd64. 162s Preparing to unpack .../38-libtk8.6_8.6.16-1_amd64.deb ... 162s Unpacking libtk8.6:amd64 (8.6.16-1) ... 162s Selecting previously unselected package libxt6t64:amd64. 162s Preparing to unpack .../39-libxt6t64_1%3a1.2.1-1.2build1_amd64.deb ... 162s Unpacking libxt6t64:amd64 (1:1.2.1-1.2build1) ... 162s Selecting previously unselected package zip. 162s Preparing to unpack .../40-zip_3.0-14ubuntu2_amd64.deb ... 162s Unpacking zip (3.0-14ubuntu2) ... 162s Selecting previously unselected package unzip. 162s Preparing to unpack .../41-unzip_6.0-28ubuntu6_amd64.deb ... 162s Unpacking unzip (6.0-28ubuntu6) ... 162s Selecting previously unselected package xdg-utils. 163s Preparing to unpack .../42-xdg-utils_1.2.1-2ubuntu1_all.deb ... 163s Unpacking xdg-utils (1.2.1-2ubuntu1) ... 163s Selecting previously unselected package r-base-core. 163s Preparing to unpack .../43-r-base-core_4.4.3-1_amd64.deb ... 163s Unpacking r-base-core (4.4.3-1) ... 163s Selecting previously unselected package r-cran-iso. 163s Preparing to unpack .../44-r-cran-iso_0.0-21-1_amd64.deb ... 163s Unpacking r-cran-iso (0.0-21-1) ... 163s Selecting previously unselected package r-cran-mcmc. 163s Preparing to unpack .../45-r-cran-mcmc_0.9-8-1_amd64.deb ... 163s Unpacking r-cran-mcmc (0.9-8-1) ... 163s Selecting previously unselected package r-cran-xtable. 163s Preparing to unpack .../46-r-cran-xtable_1%3a1.8-4-2_all.deb ... 163s Unpacking r-cran-xtable (1:1.8-4-2) ... 163s Setting up libgraphite2-3:amd64 (1.3.14-2ubuntu1) ... 163s Setting up libpixman-1-0:amd64 (0.44.0-3) ... 163s Setting up libsharpyuv0:amd64 (1.5.0-0.1) ... 163s Setting up liblerc4:amd64 (4.0.0+ds-5ubuntu1) ... 163s Setting up libxrender1:amd64 (1:0.9.10-1.1build1) ... 163s Setting up libdatrie1:amd64 (0.2.13-3build1) ... 163s Setting up libxcb-render0:amd64 (1.17.0-2) ... 163s Setting up unzip (6.0-28ubuntu6) ... 163s Setting up x11-common (1:7.7+23ubuntu3) ... 163s Setting up libdeflate0:amd64 (1.23-1) ... 163s Setting up libxcb-shm0:amd64 (1.17.0-2) ... 163s Setting up libgomp1:amd64 (15-20250222-0ubuntu1) ... 163s Setting up libjbig0:amd64 (2.1-6.1ubuntu2) ... 163s Setting up zip (3.0-14ubuntu2) ... 163s Setting up libblas3:amd64 (3.12.1-2) ... 163s update-alternatives: using /usr/lib/x86_64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/x86_64-linux-gnu/libblas.so.3 (libblas.so.3-x86_64-linux-gnu) in auto mode 163s Setting up fonts-dejavu-mono (2.37-8) ... 163s Setting up libtcl8.6:amd64 (8.6.16+dfsg-1) ... 163s Setting up fonts-dejavu-core (2.37-8) ... 163s Setting up libjpeg-turbo8:amd64 (2.1.5-3ubuntu2) ... 163s Setting up libgfortran5:amd64 (15-20250222-0ubuntu1) ... 163s Setting up libwebp7:amd64 (1.5.0-0.1) ... 163s Setting up libharfbuzz0b:amd64 (10.2.0-1) ... 163s Setting up libthai-data (0.1.29-2build1) ... 163s Setting up libxss1:amd64 (1:1.2.3-1build3) ... 163s Setting up libpaper2:amd64 (2.2.5-0.3) ... 164s Setting up xdg-utils (1.2.1-2ubuntu1) ... 164s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 164s Setting up libjpeg8:amd64 (8c-2ubuntu11) ... 164s Setting up libice6:amd64 (2:1.1.1-1) ... 164s Setting up liblapack3:amd64 (3.12.1-2) ... 164s update-alternatives: using /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/x86_64-linux-gnu/liblapack.so.3 (liblapack.so.3-x86_64-linux-gnu) in auto mode 164s Setting up fontconfig-config (2.15.0-2ubuntu1) ... 164s Setting up libpaper-utils (2.2.5-0.3) ... 164s Setting up libthai0:amd64 (0.1.29-2build1) ... 164s Setting up libtiff6:amd64 (4.5.1+git230720-4ubuntu4) ... 164s Setting up libfontconfig1:amd64 (2.15.0-2ubuntu1) ... 164s Setting up libsm6:amd64 (2:1.2.4-1) ... 164s Setting up fontconfig (2.15.0-2ubuntu1) ... 166s Regenerating fonts cache... done. 166s Setting up libxft2:amd64 (2.3.6-1build1) ... 166s Setting up libtk8.6:amd64 (8.6.16-1) ... 166s Setting up libpango-1.0-0:amd64 (1.56.2-1) ... 166s Setting up libcairo2:amd64 (1.18.2-2) ... 166s Setting up libxt6t64:amd64 (1:1.2.1-1.2build1) ... 166s Setting up libpangoft2-1.0-0:amd64 (1.56.2-1) ... 166s Setting up libpangocairo-1.0-0:amd64 (1.56.2-1) ... 166s Setting up r-base-core (4.4.3-1) ... 166s Creating config file /etc/R/Renviron with new version 166s Setting up r-cran-mcmc (0.9-8-1) ... 166s Setting up r-cran-iso (0.0-21-1) ... 166s Setting up r-cran-xtable (1:1.8-4-2) ... 166s Processing triggers for libc-bin (2.41-1ubuntu2) ... 166s Processing triggers for man-db (2.13.0-1) ... 167s Processing triggers for install-info (7.1.1-1) ... 168s autopkgtest [22:19:21]: test generic: [----------------------- 168s BEGIN TEST tests/accept-batch.R 168s 168s R version 4.4.3 (2025-02-28) -- "Trophy Case" 168s Copyright (C) 2025 The R Foundation for Statistical Computing 168s Platform: x86_64-pc-linux-gnu 168s 168s R is free software and comes with ABSOLUTELY NO WARRANTY. 168s You are welcome to redistribute it under certain conditions. 168s Type 'license()' or 'licence()' for distribution details. 168s 168s R is a collaborative project with many contributors. 168s Type 'contributors()' for more information and 168s 'citation()' on how to cite R or R packages in publications. 168s 168s Type 'demo()' for some demos, 'help()' for on-line help, or 168s 'help.start()' for an HTML browser interface to help. 168s Type 'q()' to quit R. 168s 168s > 168s > # new feature batching acceptance rates 168s > 168s > set.seed(42) 168s > 168s > library(mcmc) 168s > 168s > h <- function(x) if (all(x >= 0) && sum(x) <= 1) return(1) else return(-Inf) 168s > out <- metrop(h, rep(0, 5), nbatch = 100, blen = 100, scale = 0.1, 168s + debug = TRUE) 168s > 168s > all.equal(out$accept, mean(out$accept.batch)) 168s [1] TRUE 168s > 168s > foo <- matrix(out$debug.accept, nrow = out$blen) 168s > bar <- colMeans(foo) 168s > all.equal(out$accept.batch, bar) 168s [1] TRUE 168s > 168s > options(digits = 4) # try to keep insanity of computer arithmetic under control 168s > 168s > out$accept 168s [1] 0.2257 168s > t.test(out$accept.batch)$conf.int 168s [1] 0.2124 0.2390 168s attr(,"conf.level") 168s [1] 0.95 168s > 168s > 168s BEGIN TEST tests/circle.R 168s 168s R version 4.4.3 (2025-02-28) -- "Trophy Case" 168s Copyright (C) 2025 The R Foundation for Statistical Computing 168s Platform: x86_64-pc-linux-gnu 168s 168s R is free software and comes with ABSOLUTELY NO WARRANTY. 168s You are welcome to redistribute it under certain conditions. 168s Type 'license()' or 'licence()' for distribution details. 168s 168s R is a collaborative project with many contributors. 168s Type 'contributors()' for more information and 168s 'citation()' on how to cite R or R packages in publications. 168s 168s Type 'demo()' for some demos, 'help()' for on-line help, or 168s 'help.start()' for an HTML browser interface to help. 168s Type 'q()' to quit R. 168s 168s > 168s > epsilon <- 1e-15 168s > 168s > library(mcmc) 168s > 168s > suppressWarnings(RNGkind("Marsaglia-Multicarry")) 168s > set.seed(42) 168s > 168s > d <- 5 168s > 168s > logh <- function(x) { 168s + if (! is.numeric(x)) stop("x not numeric") 168s + if (length(x) != d) stop("length(x) != d") 168s + fred <- 1 - sum(x^2) 168s + if (fred > 0) return(log(fred)) else return(-Inf) 168s + } 168s > 168s > out.metro <- metrop(logh, rep(0, d), 1e3, scale = 0.01) 168s > out.metro$accept 168s [1] 0.979 168s > 168s > out.metro <- metrop(out.metro, scale = 0.1) 168s > out.metro$accept 168s [1] 0.72 168s > 168s > out.metro <- metrop(out.metro, scale = 0.5) 168s > out.metro$accept 168s [1] 0.16 168s > 168s > out.metro <- metrop(out.metro, scale = 0.4) 168s > out.metro$accept 168s [1] 0.228 168s > 168s > out.metro <- metrop(out.metro, nbatch = 1e2, debug = TRUE) 168s > 168s > all(out.metro$batch[- out.metro$nbatch, ] == out.metro$current[- 1, ]) 168s [1] TRUE 168s > all(out.metro$current[1, ] == out.metro$initial) 168s [1] TRUE 168s > all(out.metro$batch[out.metro$nbatch, ] == out.metro$final) 168s [1] TRUE 168s > 168s > .Random.seed <- out.metro$initial.seed 168s > d <- ncol(out.metro$proposal) 168s > n <- nrow(out.metro$proposal) 168s > my.proposal <- matrix(NA, n, d) 168s > my.u <- double(n) 168s > ska <- out.metro$scale 168s > for (i in 1:n) { 168s + my.proposal[i, ] <- out.metro$current[i, ] + ska * rnorm(d) 168s + if (is.na(out.metro$u[i])) { 168s + my.u[i] <- NA 168s + } else { 168s + my.u[i] <- runif(1) 168s + } 168s + } 168s > max(abs(out.metro$proposal - my.proposal)) < epsilon 168s [1] TRUE 168s > all(is.na(out.metro$u) == is.na(my.u)) 168s [1] TRUE 168s > all(out.metro$u[!is.na(out.metro$u)] == my.u[!is.na(my.u)]) 168s [1] TRUE 168s > 168s > my.curr.log.green <- apply(out.metro$current, 1, logh) 168s > my.prop.log.green <- apply(out.metro$proposal, 1, logh) 168s > all(is.na(out.metro$u) == ((my.prop.log.green == -Inf) | 168s + (my.prop.log.green > my.curr.log.green))) 168s [1] TRUE 168s > foo <- my.prop.log.green - my.curr.log.green 168s > blurfle <- foo - out.metro$log.green 168s > blurfle[foo == -Inf & out.metro$log.green == -Inf] <- 0 168s > max(blurfle) < epsilon 168s [1] TRUE 168s > 168s > my.accept <- (my.prop.log.green > -Inf) & (is.na(my.u) | my.u < exp(foo)) 168s > sum(my.accept) == round(n * out.metro$accept) 168s [1] TRUE 168s > 168s > my.path <- matrix(NA, n, d) 168s > my.path[my.accept, ] <- out.metro$proposal[my.accept, ] 168s > my.path[! my.accept, ] <- out.metro$current[! my.accept, ] 168s > 168s > all(my.path == out.metro$batch) 168s [1] TRUE 168s > 168s > 168s BEGIN TEST tests/initseq.R 168s 168s R version 4.4.3 (2025-02-28) -- "Trophy Case" 168s Copyright (C) 2025 The R Foundation for Statistical Computing 168s Platform: x86_64-pc-linux-gnu 168s 168s R is free software and comes with ABSOLUTELY NO WARRANTY. 168s You are welcome to redistribute it under certain conditions. 168s Type 'license()' or 'licence()' for distribution details. 168s 168s R is a collaborative project with many contributors. 168s Type 'contributors()' for more information and 168s 'citation()' on how to cite R or R packages in publications. 168s 168s Type 'demo()' for some demos, 'help()' for on-line help, or 168s 'help.start()' for an HTML browser interface to help. 168s Type 'q()' to quit R. 168s 169s > 169s > library(mcmc) 169s > 169s > set.seed(42) 169s > 169s > n <- 1e5 169s > rho <- 0.99 169s > 169s > x <- arima.sim(model = list(ar = rho), n = n) 169s > gamma <- acf(x, lag.max = 1999, type = "covariance", 169s + plot = FALSE)$acf 169s > k <- seq(along = gamma) 169s > Gamma <- gamma[k %% 2 == 1] + gamma[k %% 2 == 0] 169s > k <- min(seq(along = Gamma)[Gamma < 0]) 169s > Gamma <- Gamma[1:k] 169s > Gamma[k] < 0 169s [1] TRUE 169s > Gamma[k] <- 0 169s > 169s > out <- .Call(mcmc:::C_initseq, x - mean(x)) 169s > names(out) 169s [1] "gamma0" "Gamma.pos" "Gamma.dec" "Gamma.con" "var.pos" "var.dec" 169s [7] "var.con" 169s > 169s > all.equal(gamma[1], out$gamma0) 169s [1] TRUE 169s > 169s > length(out$Gamma.pos) == length(Gamma) 169s [1] TRUE 169s > all.equal(out$Gamma.pos, Gamma) 169s [1] TRUE 169s > 169s > Gamma.dec <- cummin(Gamma) 169s > all.equal(out$Gamma.dec, Gamma.dec) 169s [1] TRUE 169s > 169s > ## IGNORE_RDIFF_BEGIN 169s > library(Iso) 169s > ## IGNORE_RDIFF_END 169s > Gamma.con <- Gamma.dec[1] + cumsum(c(0, pava(diff(Gamma.dec)))) 169s > all.equal(out$Gamma.con, Gamma.con) 169s [1] TRUE 169s > 169s > all.equal(0, min(out$Gamma.pos - out$Gamma.dec)) 169s [1] TRUE 169s > max(diff(out$Gamma.dec)) < sqrt(.Machine$double.eps) 169s [1] TRUE 169s > 169s > all.equal(0, min(out$Gamma.dec - out$Gamma.con)) 169s [1] TRUE 169s > min(diff(diff(out$Gamma.con))) > (- sqrt(.Machine$double.eps)) 169s [1] TRUE 169s > 169s > all.equal(2 * sum(out$Gamma.pos) - out$gamma0, out$var.pos) 169s [1] TRUE 169s > all.equal(2 * sum(out$Gamma.dec) - out$gamma0, out$var.dec) 169s [1] TRUE 169s > all.equal(2 * sum(out$Gamma.con) - out$gamma0, out$var.con) 169s [1] TRUE 169s > 169s > rev(out$Gamma.pos)[1] == 0 169s [1] TRUE 169s > rev(out$Gamma.dec)[1] == 0 169s [1] TRUE 169s > all.equal(rev(out$Gamma.con)[1], 0) 169s [1] TRUE 169s > 169s > 169s Iso 0.0-21 169s 169s An "infelicity" in the function ufit() (whereby 169s it was all too easy to conflate the location of 169s the mode with its index in the entries of the 169s "x" argument) has been corrected. To this end, 169s ufit() now has arguments "lmode" (the location 169s of the mode), and "imode" (its index). At most 169s one of these arguments should be specified. See 169s the help for ufit(). 169s BEGIN TEST tests/isotropic.R 169s 169s R version 4.4.3 (2025-02-28) -- "Trophy Case" 169s Copyright (C) 2025 The R Foundation for Statistical Computing 169s Platform: x86_64-pc-linux-gnu 169s 169s R is free software and comes with ABSOLUTELY NO WARRANTY. 169s You are welcome to redistribute it under certain conditions. 169s Type 'license()' or 'licence()' for distribution details. 169s 169s R is a collaborative project with many contributors. 169s Type 'contributors()' for more information and 169s 'citation()' on how to cite R or R packages in publications. 169s 169s Type 'demo()' for some demos, 'help()' for on-line help, or 169s 'help.start()' for an HTML browser interface to help. 169s Type 'q()' to quit R. 169s 169s > library(mcmc) 169s > isotropic <- mcmc:::isotropic 169s > isotropic.logjacobian <- mcmc:::isotropic.logjacobian 169s > 169s > # create identity test function 169s > identity <- function(x) x 169s > d.identity <- function(x) 1 169s > 169s > # check that isotropic is length preserving for vectors of lengths 1--1000 169s > all(sapply(1:1000, function(x) length(isotropic(identity)(rep(1, x))) == x)) 169s [1] TRUE 169s > 169s > # test that isotropic(identity) is an identity function 169s > all.equal(isotropic(identity)(1:10), 1:10) 169s [1] TRUE 169s > x <- seq(0, 1, length.out=200) 169s > all.equal(isotropic(identity)(x), x) 169s [1] TRUE 169s > 169s > # make sure that isotropic.logjacobian(identity, d.identity) is a 0 function 169s > all.equal(isotropic.logjacobian(identity, d.identity)(1:10), 0) 169s [1] TRUE 169s > 169s > # make sure that 0 as an input does not cause divide-by-zero errors 169s > all.equal(isotropic(identity)(0), 0) 169s [1] TRUE 169s > all.equal(isotropic(identity)(0 * 1:4), rep(0, 4)) 169s [1] TRUE 169s > all.equal(isotropic.logjacobian(identity, d.identity)(0), 0) 169s [1] TRUE 169s > all.equal(isotropic.logjacobian(identity, d.identity)(0 * 1:4), 0) 169s [1] TRUE 169s > 169s > # try isotropic with f(x) = x^2, then we should get 169s > # istropic(f)(x) := |x| * x 169s > f <- function(x) x^2 169s > all.equal(isotropic(f)(1), 1) 169s [1] TRUE 169s > all.equal(isotropic(f)(c(1, 1)), sqrt(2) * c(1, 1)) 169s [1] TRUE 169s > all.equal(isotropic(f)(c(1, 0, 1)), sqrt(2) * c(1, 0, 1)) 169s [1] TRUE 169s > 169s > # make sure lazy-loading works properly. 169s > g <- function(x) x^2 169s > g.iso <- isotropic(g) 169s > g <- function(x) x 169s > all.equal(g.iso(2), 2*2) 169s [1] TRUE 169s > 169s BEGIN TEST tests/logit.R 169s 169s R version 4.4.3 (2025-02-28) -- "Trophy Case" 169s Copyright (C) 2025 The R Foundation for Statistical Computing 169s Platform: x86_64-pc-linux-gnu 169s 169s R is free software and comes with ABSOLUTELY NO WARRANTY. 169s You are welcome to redistribute it under certain conditions. 169s Type 'license()' or 'licence()' for distribution details. 169s 169s R is a collaborative project with many contributors. 169s Type 'contributors()' for more information and 169s 'citation()' on how to cite R or R packages in publications. 169s 169s Type 'demo()' for some demos, 'help()' for on-line help, or 169s 'help.start()' for an HTML browser interface to help. 169s Type 'q()' to quit R. 169s 169s > 169s > epsilon <- 1e-15 169s > 169s > library(mcmc) 169s > 169s > suppressWarnings(RNGkind("Marsaglia-Multicarry")) 169s > set.seed(42) 169s > 169s > options(digits = 3) 169s > 169s > n <- 100 169s > rho <- 0.5 169s > beta0 <- 0.25 169s > beta1 <- 1 169s > beta2 <- 0.5 169s > 169s > x1 <- rnorm(n) 169s > x2 <- rho * x1 + sqrt(1 - rho^2) * rnorm(n) 169s > eta <- beta0 + beta1 * x1 + beta2 * x2 169s > p <- 1 / (1 + exp(- eta)) 169s > y <- as.numeric(runif(n) < p) 169s > 169s > out <- glm(y ~ x1 + x2, family = binomial()) 169s > ## IGNORE_RDIFF_BEGIN 169s > summary(out) 169s 169s Call: 169s glm(formula = y ~ x1 + x2, family = binomial()) 169s 169s Coefficients: 169s Estimate Std. Error z value Pr(>|z|) 169s (Intercept) 0.0599 0.2477 0.24 0.80905 169s x1 1.3682 0.3844 3.56 0.00037 *** 169s x2 0.4760 0.3135 1.52 0.12886 169s --- 169s Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 169s 169s (Dispersion parameter for binomial family taken to be 1) 169s 169s Null deviance: 138.469 on 99 degrees of freedom 169s Residual deviance: 99.293 on 97 degrees of freedom 169s AIC: 105.3 169s 169s Number of Fisher Scoring iterations: 5 169s 169s > ## IGNORE_RDIFF_END 169s > 169s > mlogl <- function(beta) { 169s + if (length(beta) != 3) stop("length(beta) != 3") 169s + beta0 <- beta[1] 169s + beta1 <- beta[2] 169s + beta2 <- beta[3] 169s + eta <- beta0 + beta1 * x1 + beta2 * x2 169s + p <- exp(eta) / (1 + exp(eta)) 169s + return(- sum(log(p[y == 1])) - sum(log(1 - p[y == 0]))) 169s + } 169s > 169s > ## IGNORE_RDIFF_BEGIN 169s > out.nlm <- nlm(mlogl, coefficients(out), print.level = 2) 169s iteration = 0 169s Parameter: 169s [1] 0.0599 1.3682 0.4760 169s Function Value 169s [1] 49.6 169s Gradient: 169s [1] 8.24e-06 5.50e-06 6.08e-06 169s 169s Relative gradient close to zero. 169s Current iterate is probably solution. 169s 169s > ## IGNORE_RDIFF_END 169s > 169s > logl <- function(beta) { 169s + if (length(beta) != 3) stop("length(beta) != 3") 169s + beta0 <- beta[1] 169s + beta1 <- beta[2] 169s + beta2 <- beta[3] 169s + eta <- beta0 + beta1 * x1 + beta2 * x2 169s + p <- exp(eta) / (1 + exp(eta)) 169s + return(sum(log(p[y == 1])) + sum(log(1 - p[y == 0]))) 169s + } 169s > 169s > out.metro <- metrop(logl, coefficients(out), 1e3, scale = 0.01) 169s > out.metro$accept 169s [1] 0.982 169s > 169s > out.metro <- metrop(out.metro, scale = 0.1) 170s > out.metro$accept 170s [1] 0.795 170s > 170s > out.metro <- metrop(out.metro, scale = 0.5) 170s > out.metro$accept 170s [1] 0.264 170s > 170s > apply(out.metro$batch, 2, mean) 170s [1] 0.0608 1.4230 0.5263 170s > var(out.metro$batch) 170s [,1] [,2] [,3] 170s [1,] 0.06755 -0.0108 0.00989 170s [2,] -0.01080 0.1758 -0.06155 170s [3,] 0.00989 -0.0615 0.10483 170s > olbm(out.metro$batch, 25) 170s [,1] [,2] [,3] 170s [1,] 4.54e-04 9.47e-05 -1.92e-05 170s [2,] 9.47e-05 1.84e-03 -6.45e-04 170s [3,] -1.92e-05 -6.45e-04 9.09e-04 170s > 170s > saveseed <- .Random.seed 170s > out.metro <- metrop(logl, as.numeric(coefficients(out)), 1e2, 170s + scale = 0.5, debug = TRUE) 170s > 170s > all(out.metro$batch[- out.metro$nbatch, ] == out.metro$current[- 1, ]) 170s [1] TRUE 170s > all(out.metro$current[1, ] == out.metro$initial) 170s [1] TRUE 170s > all(out.metro$batch[out.metro$nbatch, ] == out.metro$final) 170s [1] TRUE 170s > 170s > .Random.seed <- saveseed 170s > d <- ncol(out.metro$proposal) 170s > n <- nrow(out.metro$proposal) 170s > my.proposal <- matrix(NA, n, d) 170s > my.u <- double(n) 170s > ska <- out.metro$scale 170s > for (i in 1:n) { 170s + my.proposal[i, ] <- out.metro$current[i, ] + ska * rnorm(d) 170s + if (is.na(out.metro$u[i])) { 170s + my.u[i] <- NA 170s + } else { 170s + my.u[i] <- runif(1) 170s + } 170s + } 170s > max(abs(out.metro$proposal - my.proposal)) < epsilon 170s [1] TRUE 170s > all(is.na(out.metro$u) == is.na(my.u)) 170s [1] TRUE 170s > all(out.metro$u[!is.na(out.metro$u)] == my.u[!is.na(my.u)]) 170s [1] TRUE 170s > 170s > my.curr.log.green <- apply(out.metro$current, 1, logl) 170s > my.prop.log.green <- apply(out.metro$proposal, 1, logl) 170s > all(is.na(out.metro$u) == (my.prop.log.green > my.curr.log.green)) 170s [1] TRUE 170s > foo <- my.prop.log.green - my.curr.log.green 170s > max(abs(foo - out.metro$log.green)) < epsilon 170s [1] TRUE 170s > 170s > my.accept <- is.na(my.u) | my.u < exp(foo) 170s > sum(my.accept) == round(n * out.metro$accept) 170s [1] TRUE 170s > 170s > my.path <- matrix(NA, n, d) 170s > my.path[my.accept, ] <- out.metro$proposal[my.accept, ] 170s > my.path[! my.accept, ] <- out.metro$current[! my.accept, ] 170s > 170s > all(my.path == out.metro$batch) 170s [1] TRUE 170s > 170s > 170s BEGIN TEST tests/logitbat.R 170s 170s R version 4.4.3 (2025-02-28) -- "Trophy Case" 170s Copyright (C) 2025 The R Foundation for Statistical Computing 170s Platform: x86_64-pc-linux-gnu 170s 170s R is free software and comes with ABSOLUTELY NO WARRANTY. 170s You are welcome to redistribute it under certain conditions. 170s Type 'license()' or 'licence()' for distribution details. 170s 170s R is a collaborative project with many contributors. 170s Type 'contributors()' for more information and 170s 'citation()' on how to cite R or R packages in publications. 170s 170s Type 'demo()' for some demos, 'help()' for on-line help, or 170s 'help.start()' for an HTML browser interface to help. 170s Type 'q()' to quit R. 170s 170s > 170s > # test batching (blen) 170s > 170s > epsilon <- 1e-15 170s > 170s > library(mcmc) 170s > 170s > suppressWarnings(RNGkind("Marsaglia-Multicarry")) 170s > set.seed(42) 170s > 170s > n <- 100 170s > rho <- 0.5 170s > beta0 <- 0.25 170s > beta1 <- 1 170s > beta2 <- 0.5 170s > 170s > x1 <- rnorm(n) 170s > x2 <- rho * x1 + sqrt(1 - rho^2) * rnorm(n) 170s > eta <- beta0 + beta1 * x1 + beta2 * x2 170s > p <- 1 / (1 + exp(- eta)) 170s > y <- as.numeric(runif(n) < p) 170s > 170s > out <- glm(y ~ x1 + x2, family = binomial()) 170s > 170s > logl <- function(beta) { 170s + if (length(beta) != 3) stop("length(beta) != 3") 170s + beta0 <- beta[1] 170s + beta1 <- beta[2] 170s + beta2 <- beta[3] 170s + eta <- beta0 + beta1 * x1 + beta2 * x2 170s + p <- exp(eta) / (1 + exp(eta)) 170s + return(sum(log(p[y == 1])) + sum(log(1 - p[y == 0]))) 170s + } 170s > 170s > out.metro <- metrop(logl, coefficients(out), 1e3, scale = 0.01) 170s > out.metro$accept 170s [1] 0.982 170s > 170s > out.metro <- metrop(out.metro, scale = 0.1) 170s > out.metro$accept 170s [1] 0.795 170s > 170s > out.metro <- metrop(out.metro, scale = 0.5) 170s > out.metro$accept 170s [1] 0.264 170s > 170s > apply(out.metro$batch, 2, mean) 170s [1] 0.06080257 1.42304941 0.52634149 170s > 170s > out.metro <- metrop(logl, as.numeric(coefficients(out)), 1e2, 170s + scale = 0.5, debug = TRUE, blen = 5) 170s > 170s > niter <- out.metro$nbatch * out.metro$blen * out.metro$nspac 170s > niter == nrow(out.metro$current) 170s [1] TRUE 170s > niter == nrow(out.metro$proposal) 170s [1] TRUE 170s > all(out.metro$current[1, ] == out.metro$initial) 170s [1] TRUE 170s > all(out.metro$current[niter, ] == out.metro$final) | 170s + all(out.metro$proposal[niter, ] == out.metro$final) 170s [1] TRUE 170s > 170s > .Random.seed <- out.metro$initial.seed 170s > d <- ncol(out.metro$proposal) 170s > n <- nrow(out.metro$proposal) 170s > my.proposal <- matrix(NA, n, d) 170s > my.u <- double(n) 170s > ska <- out.metro$scale 170s > for (i in 1:n) { 170s + my.proposal[i, ] <- out.metro$current[i, ] + ska * rnorm(d) 170s + if (is.na(out.metro$u[i])) { 170s + my.u[i] <- NA 170s + } else { 170s + my.u[i] <- runif(1) 170s + } 170s + } 170s > max(abs(out.metro$proposal - my.proposal)) < epsilon 170s [1] TRUE 170s > all(is.na(out.metro$u) == is.na(my.u)) 170s [1] TRUE 170s > all(out.metro$u[!is.na(out.metro$u)] == my.u[!is.na(my.u)]) 170s [1] TRUE 170s > 170s > my.curr.log.green <- apply(out.metro$current, 1, logl) 170s > my.prop.log.green <- apply(out.metro$proposal, 1, logl) 170s > all(is.na(out.metro$u) == (my.prop.log.green > my.curr.log.green)) 170s [1] TRUE 170s > foo <- my.prop.log.green - my.curr.log.green 170s > max(abs(foo - out.metro$log.green)) < epsilon 170s [1] TRUE 170s > 170s > my.accept <- is.na(my.u) | my.u < exp(foo) 170s > sum(my.accept) == round(n * out.metro$accept) 170s [1] TRUE 170s > if (my.accept[niter]) { 170s + all(out.metro$proposal[niter, ] == out.metro$final) 170s + } else { 170s + all(out.metro$current[niter, ] == out.metro$final) 170s + } 170s [1] TRUE 170s > 170s > my.current <- out.metro$current 170s > my.current[my.accept, ] <- my.proposal[my.accept, ] 170s > my.current <- rbind(out.metro$initial, my.current[- niter, ]) 170s > max(abs(out.metro$current - my.current)) < epsilon 170s [1] TRUE 170s > 170s > my.path <- matrix(NA, n, d) 170s > my.path[my.accept, ] <- out.metro$proposal[my.accept, ] 170s > my.path[! my.accept, ] <- out.metro$current[! my.accept, ] 170s > nspac <- out.metro$nspac 170s > 170s > my.path <- my.path[seq(nspac, niter, by = nspac), ] 170s > 170s > foom <- array(as.vector(t(my.path)), c(d, out.metro$blen, out.metro$nbatch)) 170s > boom <- t(apply(foom, c(1, 3), mean)) 170s > 170s > all(dim(boom) == dim(out.metro$batch)) 170s [1] TRUE 170s > max(abs(boom - out.metro$batch)) < epsilon 170s [1] TRUE 170s > 170s > 170s BEGIN TEST tests/logitfun.R 170s 170s R version 4.4.3 (2025-02-28) -- "Trophy Case" 170s Copyright (C) 2025 The R Foundation for Statistical Computing 170s Platform: x86_64-pc-linux-gnu 170s 170s R is free software and comes with ABSOLUTELY NO WARRANTY. 170s You are welcome to redistribute it under certain conditions. 170s Type 'license()' or 'licence()' for distribution details. 170s 170s R is a collaborative project with many contributors. 170s Type 'contributors()' for more information and 170s 'citation()' on how to cite R or R packages in publications. 170s 170s Type 'demo()' for some demos, 'help()' for on-line help, or 170s 'help.start()' for an HTML browser interface to help. 170s Type 'q()' to quit R. 170s 170s > 170s > # test outfun (function) 170s > 170s > epsilon <- 1e-15 170s > 170s > library(mcmc) 170s > 170s > suppressWarnings(RNGkind("Marsaglia-Multicarry")) 170s > set.seed(42) 170s > 170s > n <- 100 170s > rho <- 0.5 170s > beta0 <- 0.25 170s > beta1 <- 1 170s > beta2 <- 0.5 170s > 170s > x1 <- rnorm(n) 170s > x2 <- rho * x1 + sqrt(1 - rho^2) * rnorm(n) 170s > eta <- beta0 + beta1 * x1 + beta2 * x2 170s > p <- 1 / (1 + exp(- eta)) 170s > y <- as.numeric(runif(n) < p) 170s > 170s > out <- glm(y ~ x1 + x2, family = binomial()) 170s > 170s > logl <- function(beta) { 170s + if (length(beta) != 3) stop("length(beta) != 3") 170s + beta0 <- beta[1] 170s + beta1 <- beta[2] 170s + beta2 <- beta[3] 170s + eta <- beta0 + beta1 * x1 + beta2 * x2 170s + p <- exp(eta) / (1 + exp(eta)) 170s + return(sum(log(p[y == 1])) + sum(log(1 - p[y == 0]))) 170s + } 170s > 170s > out.metro <- metrop(logl, coefficients(out), 1e3, scale = 0.01) 170s > out.metro$accept 170s [1] 0.982 170s > 170s > out.metro <- metrop(out.metro, scale = 0.1) 170s > out.metro$accept 170s [1] 0.795 170s > 170s > out.metro <- metrop(out.metro, scale = 0.5) 170s > out.metro$accept 170s [1] 0.264 170s > 170s > apply(out.metro$batch, 2, mean) 170s [1] 0.06080257 1.42304941 0.52634149 170s > 170s > out.metro <- metrop(logl, as.numeric(coefficients(out)), 1e2, 170s + scale = 0.5, debug = TRUE, outfun = function(x) c(x, x^2)) 170s > 170s > niter <- out.metro$nbatch * out.metro$blen * out.metro$nspac 170s > niter == nrow(out.metro$current) 170s [1] TRUE 170s > niter == nrow(out.metro$proposal) 170s [1] TRUE 170s > all(out.metro$current[1, ] == out.metro$initial) 170s [1] TRUE 170s > all(out.metro$current[niter, ] == out.metro$final) | 170s + all(out.metro$proposal[niter, ] == out.metro$final) 170s [1] TRUE 170s > 170s > .Random.seed <- out.metro$initial.seed 170s > d <- ncol(out.metro$proposal) 170s > n <- nrow(out.metro$proposal) 170s > my.proposal <- matrix(NA, n, d) 170s > my.u <- double(n) 170s > ska <- out.metro$scale 170s > for (i in 1:n) { 170s + my.proposal[i, ] <- out.metro$current[i, ] + ska * rnorm(d) 170s + if (is.na(out.metro$u[i])) { 170s + my.u[i] <- NA 170s + } else { 170s + my.u[i] <- runif(1) 170s + } 170s + } 170s > max(abs(out.metro$proposal - my.proposal)) < epsilon 170s [1] TRUE 170s > all(is.na(out.metro$u) == is.na(my.u)) 170s [1] TRUE 170s > all(out.metro$u[!is.na(out.metro$u)] == my.u[!is.na(my.u)]) 170s [1] TRUE 170s > 170s > my.curr.log.green <- apply(out.metro$current, 1, logl) 170s > my.prop.log.green <- apply(out.metro$proposal, 1, logl) 170s > all(is.na(out.metro$u) == (my.prop.log.green > my.curr.log.green)) 170s [1] TRUE 170s > foo <- my.prop.log.green - my.curr.log.green 170s > max(abs(foo - out.metro$log.green)) < epsilon 170s [1] TRUE 170s > 170s > my.accept <- is.na(my.u) | my.u < exp(foo) 170s > sum(my.accept) == round(n * out.metro$accept) 170s [1] TRUE 170s > if (my.accept[niter]) { 170s + all(out.metro$proposal[niter, ] == out.metro$final) 170s + } else { 170s + all(out.metro$current[niter, ] == out.metro$final) 170s + } 170s [1] TRUE 170s > 170s > my.current <- out.metro$current 170s > my.current[my.accept, ] <- my.proposal[my.accept, ] 170s > my.current <- rbind(out.metro$initial, my.current[- niter, ]) 170s > max(abs(out.metro$current - my.current)) < epsilon 170s [1] TRUE 170s > 170s > my.path <- matrix(NA, n, d) 170s > my.path[my.accept, ] <- out.metro$proposal[my.accept, ] 170s > my.path[! my.accept, ] <- out.metro$current[! my.accept, ] 170s > nspac <- out.metro$nspac 170s > 170s > my.path <- my.path[seq(nspac, niter, by = nspac), ] 170s > 170s > fred <- t(apply(my.path, 1, out.metro$outfun)) 170s > k <- ncol(fred) 170s > 170s > foom <- array(as.vector(t(fred)), c(k, out.metro$blen, out.metro$nbatch)) 170s > boom <- t(apply(foom, c(1, 3), mean)) 170s > 170s > all(dim(boom) == dim(out.metro$batch)) 170s [1] TRUE 170s > max(abs(boom - out.metro$batch)) < epsilon 170s [1] TRUE 170s > 170s > goom <- cbind(my.path, my.path^2) 170s > all(dim(goom) == dim(out.metro$batch)) 170s [1] TRUE 170s > max(abs(goom - out.metro$batch)) < epsilon 170s [1] TRUE 170s > 170s BEGIN TEST tests/logitfunarg.R 170s 170s R version 4.4.3 (2025-02-28) -- "Trophy Case" 170s Copyright (C) 2025 The R Foundation for Statistical Computing 170s Platform: x86_64-pc-linux-gnu 170s 170s R is free software and comes with ABSOLUTELY NO WARRANTY. 170s You are welcome to redistribute it under certain conditions. 170s Type 'license()' or 'licence()' for distribution details. 170s 170s R is a collaborative project with many contributors. 170s Type 'contributors()' for more information and 170s 'citation()' on how to cite R or R packages in publications. 170s 170s Type 'demo()' for some demos, 'help()' for on-line help, or 170s 'help.start()' for an HTML browser interface to help. 170s Type 'q()' to quit R. 170s 170s > 170s > # test outfun (function) 170s > 170s > epsilon <- 1e-15 170s > 170s > library(mcmc) 170s > 170s > suppressWarnings(RNGkind("Marsaglia-Multicarry")) 170s > set.seed(42) 170s > 170s > n <- 100 170s > rho <- 0.5 170s > beta0 <- 0.25 170s > beta1 <- 1 170s > beta2 <- 0.5 170s > 170s > x1 <- rnorm(n) 170s > x2 <- rho * x1 + sqrt(1 - rho^2) * rnorm(n) 170s > eta <- beta0 + beta1 * x1 + beta2 * x2 170s > p <- 1 / (1 + exp(- eta)) 170s > y <- as.numeric(runif(n) < p) 170s > 170s > out <- glm(y ~ x1 + x2, family = binomial()) 170s > 170s > logl <- function(beta) { 170s + if (length(beta) != 3) stop("length(beta) != 3") 170s + beta0 <- beta[1] 170s + beta1 <- beta[2] 170s + beta2 <- beta[3] 170s + eta <- beta0 + beta1 * x1 + beta2 * x2 170s + p <- exp(eta) / (1 + exp(eta)) 170s + return(sum(log(p[y == 1])) + sum(log(1 - p[y == 0]))) 170s + } 170s > 170s > out.metro <- metrop(logl, coefficients(out), 1e3, scale = 0.01) 171s > out.metro$accept 171s [1] 0.982 171s > 171s > out.metro <- metrop(out.metro, scale = 0.1) 171s > out.metro$accept 171s [1] 0.795 171s > 171s > out.metro <- metrop(out.metro, scale = 0.5) 171s > out.metro$accept 171s [1] 0.264 171s > 171s > apply(out.metro$batch, 2, mean) 171s [1] 0.06080257 1.42304941 0.52634149 171s > 171s > out.metro <- metrop(logl, as.numeric(coefficients(out)), 1e2, 171s + scale = 0.5, debug = TRUE, outfun = function(x) c(x, x^2)) 171s > 171s > out.metro <- metrop(out.metro) 171s > out.metro$outfun 171s function (x) 171s c(x, x^2) 171s 171s > dim(out.metro$batch) 171s [1] 100 6 171s > 171s > logl <- function(beta, x1, x2, y) { 171s + if (length(beta) != 3) stop("length(beta) != 3") 171s + beta0 <- beta[1] 171s + beta1 <- beta[2] 171s + beta2 <- beta[3] 171s + eta <- beta0 + beta1 * x1 + beta2 * x2 171s + p <- exp(eta) / (1 + exp(eta)) 171s + return(sum(log(p[y == 1])) + sum(log(1 - p[y == 0]))) 171s + } 171s > 171s > out.metro <- metrop(logl, as.numeric(coefficients(out)), 1e2, 171s + scale = 0.5, debug = TRUE, x1 = x1, x2 = x2, y = y) 171s > out.metro$lud 171s function (beta, x1, x2, y) 171s { 171s if (length(beta) != 3) 171s stop("length(beta) != 3") 171s beta0 <- beta[1] 171s beta1 <- beta[2] 171s beta2 <- beta[3] 171s eta <- beta0 + beta1 * x1 + beta2 * x2 171s p <- exp(eta)/(1 + exp(eta)) 171s return(sum(log(p[y == 1])) + sum(log(1 - p[y == 0]))) 171s } 171s > out.metro <- metrop(out.metro, x1 = x1, x2 = x2, y = y) 171s > out.metro$lud 171s function (beta, x1, x2, y) 171s { 171s if (length(beta) != 3) 171s stop("length(beta) != 3") 171s beta0 <- beta[1] 171s beta1 <- beta[2] 171s beta2 <- beta[3] 171s eta <- beta0 + beta1 * x1 + beta2 * x2 171s p <- exp(eta)/(1 + exp(eta)) 171s return(sum(log(p[y == 1])) + sum(log(1 - p[y == 0]))) 171s } 171s > 171s > 171s BEGIN TEST tests/logitidx.R 171s 171s R version 4.4.3 (2025-02-28) -- "Trophy Case" 171s Copyright (C) 2025 The R Foundation for Statistical Computing 171s Platform: x86_64-pc-linux-gnu 171s 171s R is free software and comes with ABSOLUTELY NO WARRANTY. 171s You are welcome to redistribute it under certain conditions. 171s Type 'license()' or 'licence()' for distribution details. 171s 171s R is a collaborative project with many contributors. 171s Type 'contributors()' for more information and 171s 'citation()' on how to cite R or R packages in publications. 171s 171s Type 'demo()' for some demos, 'help()' for on-line help, or 171s 'help.start()' for an HTML browser interface to help. 171s Type 'q()' to quit R. 171s 171s > 171s > # test outfun (positive index vector) 171s > 171s > epsilon <- 1e-15 171s > 171s > library(mcmc) 171s > 171s > suppressWarnings(RNGkind("Marsaglia-Multicarry")) 171s > set.seed(42) 171s > 171s > n <- 100 171s > rho <- 0.5 171s > beta0 <- 0.25 171s > beta1 <- 1 171s > beta2 <- 0.5 171s > 171s > x1 <- rnorm(n) 171s > x2 <- rho * x1 + sqrt(1 - rho^2) * rnorm(n) 171s > eta <- beta0 + beta1 * x1 + beta2 * x2 171s > p <- 1 / (1 + exp(- eta)) 171s > y <- as.numeric(runif(n) < p) 171s > 171s > out <- glm(y ~ x1 + x2, family = binomial()) 171s > 171s > logl <- function(beta) { 171s + if (length(beta) != 3) stop("length(beta) != 3") 171s + beta0 <- beta[1] 171s + beta1 <- beta[2] 171s + beta2 <- beta[3] 171s + eta <- beta0 + beta1 * x1 + beta2 * x2 171s + p <- exp(eta) / (1 + exp(eta)) 171s + return(sum(log(p[y == 1])) + sum(log(1 - p[y == 0]))) 171s + } 171s > 171s > out.metro <- metrop(logl, coefficients(out), 1e3, scale = 0.01) 171s > out.metro$accept 171s [1] 0.982 171s > 171s > out.metro <- metrop(out.metro, scale = 0.1) 171s > out.metro$accept 171s [1] 0.795 171s > 171s > out.metro <- metrop(out.metro, scale = 0.5) 171s > out.metro$accept 171s [1] 0.264 171s > 171s > apply(out.metro$batch, 2, mean) 171s [1] 0.06080257 1.42304941 0.52634149 171s > 171s > out.metro <- metrop(logl, as.numeric(coefficients(out)), 1e2, 171s + scale = 0.5, debug = TRUE, outfun = c(2, 3)) 171s > 171s > niter <- out.metro$nbatch * out.metro$blen * out.metro$nspac 171s > niter == nrow(out.metro$current) 171s [1] TRUE 171s > niter == nrow(out.metro$proposal) 171s [1] TRUE 171s > all(out.metro$current[1, ] == out.metro$initial) 171s [1] TRUE 171s > all(out.metro$current[niter, ] == out.metro$final) | 171s + all(out.metro$proposal[niter, ] == out.metro$final) 171s [1] TRUE 171s > 171s > .Random.seed <- out.metro$initial.seed 171s > d <- ncol(out.metro$proposal) 171s > n <- nrow(out.metro$proposal) 171s > my.proposal <- matrix(NA, n, d) 171s > my.u <- double(n) 171s > ska <- out.metro$scale 171s > for (i in 1:n) { 171s + my.proposal[i, ] <- out.metro$current[i, ] + ska * rnorm(d) 171s + if (is.na(out.metro$u[i])) { 171s + my.u[i] <- NA 171s + } else { 171s + my.u[i] <- runif(1) 171s + } 171s + } 171s > max(abs(out.metro$proposal - my.proposal)) < epsilon 171s [1] TRUE 171s > all(is.na(out.metro$u) == is.na(my.u)) 171s [1] TRUE 171s > all(out.metro$u[!is.na(out.metro$u)] == my.u[!is.na(my.u)]) 171s [1] TRUE 171s > 171s > my.curr.log.green <- apply(out.metro$current, 1, logl) 171s > my.prop.log.green <- apply(out.metro$proposal, 1, logl) 171s > all(is.na(out.metro$u) == (my.prop.log.green > my.curr.log.green)) 171s [1] TRUE 171s > foo <- my.prop.log.green - my.curr.log.green 171s > max(abs(foo - out.metro$log.green)) < epsilon 171s [1] TRUE 171s > 171s > my.accept <- is.na(my.u) | my.u < exp(foo) 171s > sum(my.accept) == round(n * out.metro$accept) 171s [1] TRUE 171s > if (my.accept[niter]) { 171s + all(out.metro$proposal[niter, ] == out.metro$final) 171s + } else { 171s + all(out.metro$current[niter, ] == out.metro$final) 171s + } 171s [1] TRUE 171s > 171s > my.current <- out.metro$current 171s > my.current[my.accept, ] <- my.proposal[my.accept, ] 171s > my.current <- rbind(out.metro$initial, my.current[- niter, ]) 171s > max(abs(out.metro$current - my.current)) < epsilon 171s [1] TRUE 171s > 171s > my.path <- matrix(NA, n, d) 171s > my.path[my.accept, ] <- out.metro$proposal[my.accept, ] 171s > my.path[! my.accept, ] <- out.metro$current[! my.accept, ] 171s > nspac <- out.metro$nspac 171s > 171s > my.path <- my.path[seq(nspac, niter, by = nspac), ] 171s > 171s > fred <- my.path[ , out.metro$outfun] 171s > k <- ncol(fred) 171s > 171s > foom <- array(as.vector(t(fred)), c(k, out.metro$blen, out.metro$nbatch)) 171s > boom <- t(apply(foom, c(1, 3), mean)) 171s > 171s > all(dim(boom) == dim(out.metro$batch)) 171s [1] TRUE 171s > max(abs(boom - out.metro$batch)) < epsilon 171s [1] TRUE 171s > 171s > 171s BEGIN TEST tests/logitlogidx.R 171s 171s R version 4.4.3 (2025-02-28) -- "Trophy Case" 171s Copyright (C) 2025 The R Foundation for Statistical Computing 171s Platform: x86_64-pc-linux-gnu 171s 171s R is free software and comes with ABSOLUTELY NO WARRANTY. 171s You are welcome to redistribute it under certain conditions. 171s Type 'license()' or 'licence()' for distribution details. 171s 171s R is a collaborative project with many contributors. 171s Type 'contributors()' for more information and 171s 'citation()' on how to cite R or R packages in publications. 171s 171s Type 'demo()' for some demos, 'help()' for on-line help, or 171s 'help.start()' for an HTML browser interface to help. 171s Type 'q()' to quit R. 171s 171s > 171s > # test outfun (logical index vector) 171s > 171s > epsilon <- 1e-15 171s > 171s > library(mcmc) 171s > 171s > suppressWarnings(RNGkind("Marsaglia-Multicarry")) 171s > set.seed(42) 171s > 171s > n <- 100 171s > rho <- 0.5 171s > beta0 <- 0.25 171s > beta1 <- 1 171s > beta2 <- 0.5 171s > 171s > x1 <- rnorm(n) 171s > x2 <- rho * x1 + sqrt(1 - rho^2) * rnorm(n) 171s > eta <- beta0 + beta1 * x1 + beta2 * x2 171s > p <- 1 / (1 + exp(- eta)) 171s > y <- as.numeric(runif(n) < p) 171s > 171s > out <- glm(y ~ x1 + x2, family = binomial()) 171s > 171s > logl <- function(beta) { 171s + if (length(beta) != 3) stop("length(beta) != 3") 171s + beta0 <- beta[1] 171s + beta1 <- beta[2] 171s + beta2 <- beta[3] 171s + eta <- beta0 + beta1 * x1 + beta2 * x2 171s + p <- exp(eta) / (1 + exp(eta)) 171s + return(sum(log(p[y == 1])) + sum(log(1 - p[y == 0]))) 171s + } 171s > 171s > out.metro <- metrop(logl, coefficients(out), 1e3, scale = 0.01) 171s > out.metro$accept 171s [1] 0.982 171s > 171s > out.metro <- metrop(out.metro, scale = 0.1) 171s > out.metro$accept 171s [1] 0.795 171s > 171s > out.metro <- metrop(out.metro, scale = 0.5) 171s > out.metro$accept 171s [1] 0.264 171s > 171s > apply(out.metro$batch, 2, mean) 171s [1] 0.06080257 1.42304941 0.52634149 171s > 171s > out.metro <- metrop(logl, as.numeric(coefficients(out)), 1e2, 171s + scale = 0.5, debug = TRUE, outfun = seq(1:3) > 1) 172s > 172s > niter <- out.metro$nbatch * out.metro$blen * out.metro$nspac 172s > niter == nrow(out.metro$current) 172s [1] TRUE 172s > niter == nrow(out.metro$proposal) 172s [1] TRUE 172s > all(out.metro$current[1, ] == out.metro$initial) 172s [1] TRUE 172s > all(out.metro$current[niter, ] == out.metro$final) | 172s + all(out.metro$proposal[niter, ] == out.metro$final) 172s [1] TRUE 172s > 172s > .Random.seed <- out.metro$initial.seed 172s > d <- ncol(out.metro$proposal) 172s > n <- nrow(out.metro$proposal) 172s > my.proposal <- matrix(NA, n, d) 172s > my.u <- double(n) 172s > ska <- out.metro$scale 172s > for (i in 1:n) { 172s + my.proposal[i, ] <- out.metro$current[i, ] + ska * rnorm(d) 172s + if (is.na(out.metro$u[i])) { 172s + my.u[i] <- NA 172s + } else { 172s + my.u[i] <- runif(1) 172s + } 172s + } 172s > max(abs(out.metro$proposal - my.proposal)) < epsilon 172s [1] TRUE 172s > all(is.na(out.metro$u) == is.na(my.u)) 172s [1] TRUE 172s > all(out.metro$u[!is.na(out.metro$u)] == my.u[!is.na(my.u)]) 172s [1] TRUE 172s > 172s > my.curr.log.green <- apply(out.metro$current, 1, logl) 172s > my.prop.log.green <- apply(out.metro$proposal, 1, logl) 172s > all(is.na(out.metro$u) == (my.prop.log.green > my.curr.log.green)) 172s [1] TRUE 172s > foo <- my.prop.log.green - my.curr.log.green 172s > max(abs(foo - out.metro$log.green)) < epsilon 172s [1] TRUE 172s > 172s > my.accept <- is.na(my.u) | my.u < exp(foo) 172s > sum(my.accept) == round(n * out.metro$accept) 172s [1] TRUE 172s > if (my.accept[niter]) { 172s + all(out.metro$proposal[niter, ] == out.metro$final) 172s + } else { 172s + all(out.metro$current[niter, ] == out.metro$final) 172s + } 172s [1] TRUE 172s > 172s > my.current <- out.metro$current 172s > my.current[my.accept, ] <- my.proposal[my.accept, ] 172s > my.current <- rbind(out.metro$initial, my.current[- niter, ]) 172s > max(abs(out.metro$current - my.current)) < epsilon 172s [1] TRUE 172s > 172s > my.path <- matrix(NA, n, d) 172s > my.path[my.accept, ] <- out.metro$proposal[my.accept, ] 172s > my.path[! my.accept, ] <- out.metro$current[! my.accept, ] 172s > nspac <- out.metro$nspac 172s > 172s > my.path <- my.path[seq(nspac, niter, by = nspac), ] 172s > 172s > fred <- my.path[ , out.metro$outfun] 172s > k <- ncol(fred) 172s > 172s > foom <- array(as.vector(t(fred)), c(k, out.metro$blen, out.metro$nbatch)) 172s > boom <- t(apply(foom, c(1, 3), mean)) 172s > 172s > all(dim(boom) == dim(out.metro$batch)) 172s [1] TRUE 172s > max(abs(boom - out.metro$batch)) < epsilon 172s [1] TRUE 172s > 172s > 172s BEGIN TEST tests/logitmat.R 172s 172s R version 4.4.3 (2025-02-28) -- "Trophy Case" 172s Copyright (C) 2025 The R Foundation for Statistical Computing 172s Platform: x86_64-pc-linux-gnu 172s 172s R is free software and comes with ABSOLUTELY NO WARRANTY. 172s You are welcome to redistribute it under certain conditions. 172s Type 'license()' or 'licence()' for distribution details. 172s 172s R is a collaborative project with many contributors. 172s Type 'contributors()' for more information and 172s 'citation()' on how to cite R or R packages in publications. 172s 172s Type 'demo()' for some demos, 'help()' for on-line help, or 172s 'help.start()' for an HTML browser interface to help. 172s Type 'q()' to quit R. 172s 172s > 172s > # test matrix scaling 172s > 172s > epsilon <- 1e-15 172s > 172s > library(mcmc) 172s > 172s > suppressWarnings(RNGkind("Marsaglia-Multicarry")) 172s > set.seed(42) 172s > 172s > n <- 100 172s > rho <- 0.5 172s > beta0 <- 0.25 172s > beta1 <- 1 172s > beta2 <- 0.5 172s > 172s > x1 <- rnorm(n) 172s > x2 <- rho * x1 + sqrt(1 - rho^2) * rnorm(n) 172s > eta <- beta0 + beta1 * x1 + beta2 * x2 172s > p <- 1 / (1 + exp(- eta)) 172s > y <- as.numeric(runif(n) < p) 172s > 172s > out <- glm(y ~ x1 + x2, family = binomial()) 172s > 172s > logl <- function(beta) { 172s + if (length(beta) != 3) stop("length(beta) != 3") 172s + beta0 <- beta[1] 172s + beta1 <- beta[2] 172s + beta2 <- beta[3] 172s + eta <- beta0 + beta1 * x1 + beta2 * x2 172s + p <- exp(eta) / (1 + exp(eta)) 172s + return(sum(log(p[y == 1])) + sum(log(1 - p[y == 0]))) 172s + } 172s > 172s > out.metro <- metrop(logl, coefficients(out), 1e3, scale = 0.01) 172s > out.metro$accept 172s [1] 0.982 172s > 172s > out.metro <- metrop(out.metro, scale = 0.1) 172s > out.metro$accept 172s [1] 0.795 172s > 172s > out.metro <- metrop(out.metro, scale = 0.5) 172s > out.metro$accept 172s [1] 0.264 172s > 172s > apply(out.metro$batch, 2, mean) 172s [1] 0.06080257 1.42304941 0.52634149 172s > fred <- var(out.metro$batch) 172s > sally <- t(chol(fred)) 172s > max(abs(fred - sally %*% t(sally))) < epsilon 172s [1] TRUE 172s > 172s > out.metro <- metrop(out.metro, scale = sally) 172s > out.metro$accept 172s [1] 0.451 172s > 172s > out.metro <- metrop(logl, as.numeric(coefficients(out)), 1e2, 172s + scale = sally, debug = TRUE) 172s > names(out.metro) 172s [1] "accept" "batch" "initial" "final" "accept.batch" 172s [6] "current" "proposal" "log.green" "u" "z" 172s [11] "debug.accept" "initial.seed" "final.seed" "time" "lud" 172s [16] "nbatch" "blen" "nspac" "scale" "debug" 172s > 172s > niter <- out.metro$nbatch * out.metro$blen * out.metro$nspac 172s > niter == nrow(out.metro$current) 172s [1] TRUE 172s > niter == nrow(out.metro$proposal) 172s [1] TRUE 172s > all(out.metro$current[1, ] == out.metro$initial) 172s [1] TRUE 172s > all(out.metro$current[niter, ] == out.metro$final) | 172s + all(out.metro$proposal[niter, ] == out.metro$final) 172s [1] TRUE 172s > 172s > .Random.seed <- out.metro$initial.seed 172s > d <- ncol(out.metro$proposal) 172s > n <- nrow(out.metro$proposal) 172s > my.proposal <- matrix(NA, n, d) 172s > my.u <- double(n) 172s > my.z <- matrix(NA, n, d) 172s > ska <- out.metro$scale 172s > for (i in 1:n) { 172s + zed <- rnorm(d) 172s + my.proposal[i, ] <- out.metro$current[i, ] + ska %*% zed 172s + if (is.na(out.metro$u[i])) { 172s + my.u[i] <- NA 172s + } else { 172s + my.u[i] <- runif(1) 172s + } 172s + my.z[i, ] <- zed 172s + } 172s > max(abs(out.metro$proposal - my.proposal)) < epsilon 172s [1] TRUE 172s > 172s > all(is.na(out.metro$u) == is.na(my.u)) 172s [1] TRUE 172s > all(out.metro$u[!is.na(out.metro$u)] == my.u[!is.na(my.u)]) 172s [1] TRUE 172s > identical(out.metro$z, my.z) 172s [1] TRUE 172s > 172s > my.curr.log.green <- apply(out.metro$current, 1, logl) 172s > my.prop.log.green <- apply(out.metro$proposal, 1, logl) 172s > all(is.na(out.metro$u) == (my.prop.log.green > my.curr.log.green)) 172s [1] TRUE 172s > foo <- my.prop.log.green - my.curr.log.green 172s > max(abs(foo - out.metro$log.green)) < epsilon 172s [1] TRUE 172s > 172s > my.accept <- is.na(my.u) | my.u < exp(foo) 172s > sum(my.accept) == round(n * out.metro$accept) 172s [1] TRUE 172s > if (my.accept[niter]) { 172s + all(out.metro$proposal[niter, ] == out.metro$final) 172s + } else { 172s + all(out.metro$current[niter, ] == out.metro$final) 172s + } 172s [1] TRUE 172s > identical(my.accept, out.metro$debug.accept) 172s [1] TRUE 172s > 172s > my.current <- out.metro$current 172s > my.current[my.accept, ] <- my.proposal[my.accept, ] 172s > my.current <- rbind(out.metro$initial, my.current[- niter, ]) 172s > max(abs(out.metro$current - my.current)) < epsilon 172s [1] TRUE 172s > 172s > my.path <- matrix(NA, n, d) 172s > my.path[my.accept, ] <- out.metro$proposal[my.accept, ] 172s > my.path[! my.accept, ] <- out.metro$current[! my.accept, ] 172s > nspac <- out.metro$nspac 172s > 172s > my.path <- my.path[seq(nspac, niter, by = nspac), ] 172s > 172s > fred <- my.path 172s > k <- ncol(fred) 172s > 172s > foom <- array(as.vector(t(fred)), c(k, out.metro$blen, out.metro$nbatch)) 172s > boom <- t(apply(foom, c(1, 3), mean)) 172s > 172s > all(dim(boom) == dim(out.metro$batch)) 172s [1] TRUE 172s > max(abs(boom - out.metro$batch)) < epsilon 172s [1] TRUE 172s > 172s > 172s BEGIN TEST tests/logitnegidx.R 172s 172s R version 4.4.3 (2025-02-28) -- "Trophy Case" 172s Copyright (C) 2025 The R Foundation for Statistical Computing 172s Platform: x86_64-pc-linux-gnu 172s 172s R is free software and comes with ABSOLUTELY NO WARRANTY. 172s You are welcome to redistribute it under certain conditions. 172s Type 'license()' or 'licence()' for distribution details. 172s 172s R is a collaborative project with many contributors. 172s Type 'contributors()' for more information and 172s 'citation()' on how to cite R or R packages in publications. 172s 172s Type 'demo()' for some demos, 'help()' for on-line help, or 172s 'help.start()' for an HTML browser interface to help. 172s Type 'q()' to quit R. 172s 172s > 172s > # test outfun (negative index vector) 172s > 172s > epsilon <- 1e-15 172s > 172s > library(mcmc) 172s > 172s > suppressWarnings(RNGkind("Marsaglia-Multicarry")) 172s > set.seed(42) 172s > 172s > n <- 100 172s > rho <- 0.5 172s > beta0 <- 0.25 172s > beta1 <- 1 172s > beta2 <- 0.5 172s > 172s > x1 <- rnorm(n) 172s > x2 <- rho * x1 + sqrt(1 - rho^2) * rnorm(n) 172s > eta <- beta0 + beta1 * x1 + beta2 * x2 172s > p <- 1 / (1 + exp(- eta)) 172s > y <- as.numeric(runif(n) < p) 172s > 172s > out <- glm(y ~ x1 + x2, family = binomial()) 172s > 172s > logl <- function(beta) { 172s + if (length(beta) != 3) stop("length(beta) != 3") 172s + beta0 <- beta[1] 172s + beta1 <- beta[2] 172s + beta2 <- beta[3] 172s + eta <- beta0 + beta1 * x1 + beta2 * x2 172s + p <- exp(eta) / (1 + exp(eta)) 172s + return(sum(log(p[y == 1])) + sum(log(1 - p[y == 0]))) 172s + } 172s > 172s > out.metro <- metrop(logl, coefficients(out), 1e3, scale = 0.01) 172s > out.metro$accept 172s [1] 0.982 172s > 172s > out.metro <- metrop(out.metro, scale = 0.1) 172s > out.metro$accept 172s [1] 0.795 172s > 172s > out.metro <- metrop(out.metro, scale = 0.5) 172s > out.metro$accept 172s [1] 0.264 172s > 172s > apply(out.metro$batch, 2, mean) 172s [1] 0.06080257 1.42304941 0.52634149 172s > 172s > out.metro <- metrop(logl, as.numeric(coefficients(out)), 1e2, 172s + scale = 0.5, debug = TRUE, outfun = - 2) 172s > 172s > niter <- out.metro$nbatch * out.metro$blen * out.metro$nspac 172s > niter == nrow(out.metro$current) 172s [1] TRUE 172s > niter == nrow(out.metro$proposal) 172s [1] TRUE 172s > all(out.metro$current[1, ] == out.metro$initial) 172s [1] TRUE 172s > all(out.metro$current[niter, ] == out.metro$final) | 172s + all(out.metro$proposal[niter, ] == out.metro$final) 172s [1] TRUE 172s > 172s > .Random.seed <- out.metro$initial.seed 172s > d <- ncol(out.metro$proposal) 172s > n <- nrow(out.metro$proposal) 172s > my.proposal <- matrix(NA, n, d) 172s > my.u <- double(n) 172s > ska <- out.metro$scale 172s > for (i in 1:n) { 172s + my.proposal[i, ] <- out.metro$current[i, ] + ska * rnorm(d) 172s + if (is.na(out.metro$u[i])) { 172s + my.u[i] <- NA 172s + } else { 172s + my.u[i] <- runif(1) 172s + } 172s + } 172s > max(abs(out.metro$proposal - my.proposal)) < epsilon 172s [1] TRUE 172s > all(is.na(out.metro$u) == is.na(my.u)) 172s [1] TRUE 172s > all(out.metro$u[!is.na(out.metro$u)] == my.u[!is.na(my.u)]) 172s [1] TRUE 172s > 172s > my.curr.log.green <- apply(out.metro$current, 1, logl) 172s > my.prop.log.green <- apply(out.metro$proposal, 1, logl) 172s > all(is.na(out.metro$u) == (my.prop.log.green > my.curr.log.green)) 172s [1] TRUE 172s > foo <- my.prop.log.green - my.curr.log.green 172s > max(abs(foo - out.metro$log.green)) < epsilon 172s [1] TRUE 172s > 172s > my.accept <- is.na(my.u) | my.u < exp(foo) 172s > sum(my.accept) == round(n * out.metro$accept) 172s [1] TRUE 172s > if (my.accept[niter]) { 172s + all(out.metro$proposal[niter, ] == out.metro$final) 172s + } else { 172s + all(out.metro$current[niter, ] == out.metro$final) 172s + } 172s [1] TRUE 172s > 172s > my.current <- out.metro$current 172s > my.current[my.accept, ] <- my.proposal[my.accept, ] 172s > my.current <- rbind(out.metro$initial, my.current[- niter, ]) 172s > max(abs(out.metro$current - my.current)) < epsilon 172s [1] TRUE 172s > 172s > my.path <- matrix(NA, n, d) 172s > my.path[my.accept, ] <- out.metro$proposal[my.accept, ] 172s > my.path[! my.accept, ] <- out.metro$current[! my.accept, ] 172s > nspac <- out.metro$nspac 172s > 172s > my.path <- my.path[seq(nspac, niter, by = nspac), ] 172s > 172s > fred <- my.path[ , out.metro$outfun] 172s > k <- ncol(fred) 172s > 172s > foom <- array(as.vector(t(fred)), c(k, out.metro$blen, out.metro$nbatch)) 172s > boom <- t(apply(foom, c(1, 3), mean)) 172s > 172s > all(dim(boom) == dim(out.metro$batch)) 172s [1] TRUE 172s > max(abs(boom - out.metro$batch)) < epsilon 172s [1] TRUE 172s > 172s > 172s BEGIN TEST tests/logitsub.R 172s 172s R version 4.4.3 (2025-02-28) -- "Trophy Case" 172s Copyright (C) 2025 The R Foundation for Statistical Computing 172s Platform: x86_64-pc-linux-gnu 172s 172s R is free software and comes with ABSOLUTELY NO WARRANTY. 172s You are welcome to redistribute it under certain conditions. 172s Type 'license()' or 'licence()' for distribution details. 172s 172s R is a collaborative project with many contributors. 172s Type 'contributors()' for more information and 172s 'citation()' on how to cite R or R packages in publications. 172s 172s Type 'demo()' for some demos, 'help()' for on-line help, or 172s 'help.start()' for an HTML browser interface to help. 172s Type 'q()' to quit R. 172s 172s > 172s > # test spacing (nspac) 172s > 172s > epsilon <- 1e-15 172s > 172s > library(mcmc) 172s > 172s > suppressWarnings(RNGkind("Marsaglia-Multicarry")) 172s > set.seed(42) 172s > 172s > n <- 100 172s > rho <- 0.5 172s > beta0 <- 0.25 172s > beta1 <- 1 172s > beta2 <- 0.5 172s > 172s > x1 <- rnorm(n) 172s > x2 <- rho * x1 + sqrt(1 - rho^2) * rnorm(n) 172s > eta <- beta0 + beta1 * x1 + beta2 * x2 172s > p <- 1 / (1 + exp(- eta)) 172s > y <- as.numeric(runif(n) < p) 172s > 172s > out <- glm(y ~ x1 + x2, family = binomial()) 172s > 172s > logl <- function(beta) { 172s + if (length(beta) != 3) stop("length(beta) != 3") 172s + beta0 <- beta[1] 172s + beta1 <- beta[2] 172s + beta2 <- beta[3] 172s + eta <- beta0 + beta1 * x1 + beta2 * x2 172s + p <- exp(eta) / (1 + exp(eta)) 172s + return(sum(log(p[y == 1])) + sum(log(1 - p[y == 0]))) 172s + } 172s > 172s > out.metro <- metrop(logl, coefficients(out), 1e3, scale = 0.01) 173s > out.metro$accept 173s [1] 0.982 173s > 173s > out.metro <- metrop(out.metro, scale = 0.1) 173s > out.metro$accept 173s [1] 0.795 173s > 173s > out.metro <- metrop(out.metro, scale = 0.5) 173s > out.metro$accept 173s [1] 0.264 173s > 173s > apply(out.metro$batch, 2, mean) 173s [1] 0.06080257 1.42304941 0.52634149 173s > 173s > out.metro <- metrop(logl, as.numeric(coefficients(out)), 1e2, 173s + scale = 0.5, debug = TRUE, nspac = 3) 173s > 173s > niter <- out.metro$nbatch * out.metro$blen * out.metro$nspac 173s > niter == nrow(out.metro$current) 173s [1] TRUE 173s > niter == nrow(out.metro$proposal) 173s [1] TRUE 173s > all(out.metro$current[1, ] == out.metro$initial) 173s [1] TRUE 173s > all(out.metro$current[niter, ] == out.metro$final) | 173s + all(out.metro$proposal[niter, ] == out.metro$final) 173s [1] TRUE 173s > 173s > .Random.seed <- out.metro$initial.seed 173s > d <- ncol(out.metro$proposal) 173s > n <- nrow(out.metro$proposal) 173s > my.proposal <- matrix(NA, n, d) 173s > my.u <- double(n) 173s > ska <- out.metro$scale 173s > for (i in 1:n) { 173s + my.proposal[i, ] <- out.metro$current[i, ] + ska * rnorm(d) 173s + if (is.na(out.metro$u[i])) { 173s + my.u[i] <- NA 173s + } else { 173s + my.u[i] <- runif(1) 173s + } 173s + } 173s > max(abs(out.metro$proposal - my.proposal)) < epsilon 173s [1] TRUE 173s > all(is.na(out.metro$u) == is.na(my.u)) 173s [1] TRUE 173s > all(out.metro$u[!is.na(out.metro$u)] == my.u[!is.na(my.u)]) 173s [1] TRUE 173s > 173s > my.curr.log.green <- apply(out.metro$current, 1, logl) 173s > my.prop.log.green <- apply(out.metro$proposal, 1, logl) 173s > all(is.na(out.metro$u) == (my.prop.log.green > my.curr.log.green)) 173s [1] TRUE 173s > foo <- my.prop.log.green - my.curr.log.green 173s > max(abs(foo - out.metro$log.green)) < epsilon 173s [1] TRUE 173s > 173s > my.accept <- is.na(my.u) | my.u < exp(foo) 173s > sum(my.accept) == round(n * out.metro$accept) 173s [1] TRUE 173s > if (my.accept[niter]) { 173s + all(out.metro$proposal[niter, ] == out.metro$final) 173s + } else { 173s + all(out.metro$current[niter, ] == out.metro$final) 173s + } 173s [1] TRUE 173s > 173s > my.current <- out.metro$current 173s > my.current[my.accept, ] <- my.proposal[my.accept, ] 173s > my.current <- rbind(out.metro$initial, my.current[- niter, ]) 173s > max(abs(out.metro$current - my.current)) < epsilon 173s [1] TRUE 173s > 173s > my.path <- matrix(NA, n, d) 173s > my.path[my.accept, ] <- out.metro$proposal[my.accept, ] 173s > my.path[! my.accept, ] <- out.metro$current[! my.accept, ] 173s > nspac <- out.metro$nspac 173s > my.path <- my.path[seq(nspac, niter, by = nspac), ] 173s > all(dim(my.path) == dim(out.metro$batch)) 173s [1] TRUE 173s > 173s > all(my.path == out.metro$batch) 173s [1] TRUE 173s > 173s > 173s BEGIN TEST tests/logitsubbat.R 173s 173s R version 4.4.3 (2025-02-28) -- "Trophy Case" 173s Copyright (C) 2025 The R Foundation for Statistical Computing 173s Platform: x86_64-pc-linux-gnu 173s 173s R is free software and comes with ABSOLUTELY NO WARRANTY. 173s You are welcome to redistribute it under certain conditions. 173s Type 'license()' or 'licence()' for distribution details. 173s 173s R is a collaborative project with many contributors. 173s Type 'contributors()' for more information and 173s 'citation()' on how to cite R or R packages in publications. 173s 173s Type 'demo()' for some demos, 'help()' for on-line help, or 173s 'help.start()' for an HTML browser interface to help. 173s Type 'q()' to quit R. 173s 173s > 173s > # test batching (blen) and spacing (nspac) together 173s > 173s > epsilon <- 1e-15 173s > 173s > library(mcmc) 173s > 173s > suppressWarnings(RNGkind("Marsaglia-Multicarry")) 173s > set.seed(42) 173s > 173s > n <- 100 173s > rho <- 0.5 173s > beta0 <- 0.25 173s > beta1 <- 1 173s > beta2 <- 0.5 173s > 173s > x1 <- rnorm(n) 173s > x2 <- rho * x1 + sqrt(1 - rho^2) * rnorm(n) 173s > eta <- beta0 + beta1 * x1 + beta2 * x2 173s > p <- 1 / (1 + exp(- eta)) 173s > y <- as.numeric(runif(n) < p) 173s > 173s > out <- glm(y ~ x1 + x2, family = binomial()) 173s > 173s > logl <- function(beta) { 173s + if (length(beta) != 3) stop("length(beta) != 3") 173s + beta0 <- beta[1] 173s + beta1 <- beta[2] 173s + beta2 <- beta[3] 173s + eta <- beta0 + beta1 * x1 + beta2 * x2 173s + p <- exp(eta) / (1 + exp(eta)) 173s + return(sum(log(p[y == 1])) + sum(log(1 - p[y == 0]))) 173s + } 173s > 173s > out.metro <- metrop(logl, coefficients(out), 1e3, scale = 0.01) 173s > out.metro$accept 173s [1] 0.982 173s > 173s > out.metro <- metrop(out.metro, scale = 0.1) 173s > out.metro$accept 173s [1] 0.795 173s > 173s > out.metro <- metrop(out.metro, scale = 0.5) 173s > out.metro$accept 173s [1] 0.264 173s > 173s > apply(out.metro$batch, 2, mean) 173s [1] 0.06080257 1.42304941 0.52634149 173s > 173s > out.metro <- metrop(logl, as.numeric(coefficients(out)), 1e2, 173s + scale = 0.5, debug = TRUE, blen = 5, nspac = 3) 173s > 173s > niter <- out.metro$nbatch * out.metro$blen * out.metro$nspac 173s > niter == nrow(out.metro$current) 173s [1] TRUE 173s > niter == nrow(out.metro$proposal) 173s [1] TRUE 173s > all(out.metro$current[1, ] == out.metro$initial) 173s [1] TRUE 173s > all(out.metro$current[niter, ] == out.metro$final) | 173s + all(out.metro$proposal[niter, ] == out.metro$final) 173s [1] TRUE 173s > 173s > .Random.seed <- out.metro$initial.seed 173s > d <- ncol(out.metro$proposal) 173s > n <- nrow(out.metro$proposal) 173s > my.proposal <- matrix(NA, n, d) 173s > my.u <- double(n) 173s > ska <- out.metro$scale 173s > for (i in 1:n) { 173s + my.proposal[i, ] <- out.metro$current[i, ] + ska * rnorm(d) 173s + if (is.na(out.metro$u[i])) { 173s + my.u[i] <- NA 173s + } else { 173s + my.u[i] <- runif(1) 173s + } 173s + } 173s > max(abs(out.metro$proposal - my.proposal)) < epsilon 173s [1] TRUE 173s > all(is.na(out.metro$u) == is.na(my.u)) 173s [1] TRUE 173s > all(out.metro$u[!is.na(out.metro$u)] == my.u[!is.na(my.u)]) 173s [1] TRUE 173s > 173s > my.curr.log.green <- apply(out.metro$current, 1, logl) 173s > my.prop.log.green <- apply(out.metro$proposal, 1, logl) 173s > all(is.na(out.metro$u) == (my.prop.log.green > my.curr.log.green)) 173s [1] TRUE 173s > foo <- my.prop.log.green - my.curr.log.green 173s > max(abs(foo - out.metro$log.green)) < epsilon 173s [1] TRUE 173s > 173s > my.accept <- is.na(my.u) | my.u < exp(foo) 173s > sum(my.accept) == round(n * out.metro$accept) 173s [1] TRUE 173s > if (my.accept[niter]) { 173s + all(out.metro$proposal[niter, ] == out.metro$final) 173s + } else { 173s + all(out.metro$current[niter, ] == out.metro$final) 173s + } 173s [1] TRUE 173s > 173s > my.current <- out.metro$current 173s > my.current[my.accept, ] <- my.proposal[my.accept, ] 173s > my.current <- rbind(out.metro$initial, my.current[- niter, ]) 173s > max(abs(out.metro$current - my.current)) < epsilon 173s [1] TRUE 173s > 173s > my.path <- matrix(NA, n, d) 173s > my.path[my.accept, ] <- out.metro$proposal[my.accept, ] 173s > my.path[! my.accept, ] <- out.metro$current[! my.accept, ] 173s > nspac <- out.metro$nspac 173s > 173s > my.path <- my.path[seq(nspac, niter, by = nspac), ] 173s > 173s > foom <- array(as.vector(t(my.path)), c(d, out.metro$blen, out.metro$nbatch)) 173s > boom <- t(apply(foom, c(1, 3), mean)) 173s > 173s > all(dim(boom) == dim(out.metro$batch)) 173s [1] TRUE 173s > max(abs(boom - out.metro$batch)) < epsilon 173s [1] TRUE 173s > 173s > 173s BEGIN TEST tests/logitvec.R 173s 173s R version 4.4.3 (2025-02-28) -- "Trophy Case" 173s Copyright (C) 2025 The R Foundation for Statistical Computing 173s Platform: x86_64-pc-linux-gnu 173s 173s R is free software and comes with ABSOLUTELY NO WARRANTY. 173s You are welcome to redistribute it under certain conditions. 173s Type 'license()' or 'licence()' for distribution details. 173s 173s R is a collaborative project with many contributors. 173s Type 'contributors()' for more information and 173s 'citation()' on how to cite R or R packages in publications. 173s 173s Type 'demo()' for some demos, 'help()' for on-line help, or 173s 'help.start()' for an HTML browser interface to help. 173s Type 'q()' to quit R. 173s 173s > 173s > # test vector (diag(foo)) scaling 173s > 173s > epsilon <- 1e-15 173s > 173s > library(mcmc) 173s > 173s > suppressWarnings(RNGkind("Marsaglia-Multicarry")) 173s > set.seed(42) 173s > 173s > n <- 100 173s > rho <- 0.5 173s > beta0 <- 0.25 173s > beta1 <- 1 173s > beta2 <- 0.5 173s > 173s > x1 <- rnorm(n) 173s > x2 <- rho * x1 + sqrt(1 - rho^2) * rnorm(n) 173s > eta <- beta0 + beta1 * x1 + beta2 * x2 173s > p <- 1 / (1 + exp(- eta)) 173s > y <- as.numeric(runif(n) < p) 173s > 173s > out <- glm(y ~ x1 + x2, family = binomial()) 173s > 173s > logl <- function(beta) { 173s + if (length(beta) != 3) stop("length(beta) != 3") 173s + beta0 <- beta[1] 173s + beta1 <- beta[2] 173s + beta2 <- beta[3] 173s + eta <- beta0 + beta1 * x1 + beta2 * x2 173s + p <- exp(eta) / (1 + exp(eta)) 173s + return(sum(log(p[y == 1])) + sum(log(1 - p[y == 0]))) 173s + } 173s > 173s > out.metro <- metrop(logl, coefficients(out), 1e3, scale = 0.01) 173s > out.metro$accept 173s [1] 0.982 173s > 173s > out.metro <- metrop(out.metro, scale = 0.1) 173s > out.metro$accept 173s [1] 0.795 173s > 173s > out.metro <- metrop(out.metro, scale = 0.5) 173s > out.metro$accept 173s [1] 0.264 173s > 173s > apply(out.metro$batch, 2, mean) 173s [1] 0.06080257 1.42304941 0.52634149 173s > sally <- apply(out.metro$batch, 2, sd) 173s > 173s > out.metro <- metrop(out.metro, scale = sally) 173s > out.metro$accept 173s [1] 0.398 173s > 173s > out.metro <- metrop(logl, as.numeric(coefficients(out)), 1e2, 173s + scale = sally, debug = TRUE) 173s > 173s > niter <- out.metro$nbatch * out.metro$blen * out.metro$nspac 173s > niter == nrow(out.metro$current) 173s [1] TRUE 173s > niter == nrow(out.metro$proposal) 173s [1] TRUE 173s > all(out.metro$current[1, ] == out.metro$initial) 173s [1] TRUE 173s > all(out.metro$current[niter, ] == out.metro$final) | 173s + all(out.metro$proposal[niter, ] == out.metro$final) 173s [1] TRUE 173s > 173s > .Random.seed <- out.metro$initial.seed 173s > d <- ncol(out.metro$proposal) 173s > n <- nrow(out.metro$proposal) 173s > my.proposal <- matrix(NA, n, d) 173s > my.u <- double(n) 173s > ska <- out.metro$scale 173s > for (i in 1:n) { 173s + my.proposal[i, ] <- out.metro$current[i, ] + ska * rnorm(d) 173s + if (is.na(out.metro$u[i])) { 173s + my.u[i] <- NA 173s + } else { 173s + my.u[i] <- runif(1) 173s + } 173s + } 173s > max(abs(out.metro$proposal - my.proposal)) < epsilon 173s [1] TRUE 173s > 173s > all(is.na(out.metro$u) == is.na(my.u)) 173s [1] TRUE 173s > all(out.metro$u[!is.na(out.metro$u)] == my.u[!is.na(my.u)]) 173s [1] TRUE 173s > 173s > my.curr.log.green <- apply(out.metro$current, 1, logl) 173s > my.prop.log.green <- apply(out.metro$proposal, 1, logl) 173s > all(is.na(out.metro$u) == (my.prop.log.green > my.curr.log.green)) 173s [1] TRUE 173s > foo <- my.prop.log.green - my.curr.log.green 173s > max(abs(foo - out.metro$log.green)) < epsilon 173s [1] TRUE 173s > 173s > my.accept <- is.na(my.u) | my.u < exp(foo) 173s > sum(my.accept) == round(n * out.metro$accept) 173s [1] TRUE 173s > if (my.accept[niter]) { 173s + all(out.metro$proposal[niter, ] == out.metro$final) 173s + } else { 173s + all(out.metro$current[niter, ] == out.metro$final) 173s + } 173s [1] TRUE 173s > 173s > my.current <- out.metro$current 173s > my.current[my.accept, ] <- my.proposal[my.accept, ] 173s > my.current <- rbind(out.metro$initial, my.current[- niter, ]) 173s > max(abs(out.metro$current - my.current)) < epsilon 173s [1] TRUE 173s > 173s > my.path <- matrix(NA, n, d) 173s > my.path[my.accept, ] <- out.metro$proposal[my.accept, ] 173s > my.path[! my.accept, ] <- out.metro$current[! my.accept, ] 173s > nspac <- out.metro$nspac 173s > 173s > my.path <- my.path[seq(nspac, niter, by = nspac), ] 173s > 173s > fred <- my.path 173s > k <- ncol(fred) 173s > 173s > foom <- array(as.vector(t(fred)), c(k, out.metro$blen, out.metro$nbatch)) 173s > boom <- t(apply(foom, c(1, 3), mean)) 173s > 173s > all(dim(boom) == dim(out.metro$batch)) 173s [1] TRUE 173s > max(abs(boom - out.metro$batch)) < epsilon 173s [1] TRUE 173s > 173s > 173s BEGIN TEST tests/morph.R 173s 173s R version 4.4.3 (2025-02-28) -- "Trophy Case" 173s Copyright (C) 2025 The R Foundation for Statistical Computing 173s Platform: x86_64-pc-linux-gnu 173s 173s R is free software and comes with ABSOLUTELY NO WARRANTY. 173s You are welcome to redistribute it under certain conditions. 173s Type 'license()' or 'licence()' for distribution details. 173s 173s R is a collaborative project with many contributors. 173s Type 'contributors()' for more information and 173s 'citation()' on how to cite R or R packages in publications. 173s 173s Type 'demo()' for some demos, 'help()' for on-line help, or 173s 'help.start()' for an HTML browser interface to help. 173s Type 'q()' to quit R. 173s 174s > library(mcmc) 174s > isotropic <- mcmc:::isotropic 174s > isotropic.logjacobian <- mcmc:::isotropic.logjacobian 174s > 174s > # make sure morph identity works properly 174s > TestMorphIdentity <- function(m.id) { 174s + ident.func <- function(x) x 174s + if (!all.equal(m.id$transform(1:10), 1:10)) 174s + return(FALSE) 174s + if (!all.equal(m.id$inverse(1:10), 1:10)) 174s + return(FALSE) 174s + x <- seq(-1,1, length.out=15) 174s + if (!all.equal(sapply(x, m.id$lud(function(x) dnorm(x, log=TRUE))), 174s + dnorm(x, log=TRUE))) 174s + return(FALSE) 174s + if (!all.equal(m.id$outfun(ident.func)(x), x)) 174s + return(FALSE) 174s + return(TRUE) 174s + } 174s > 174s > TestMorphIdentity(morph()) 174s [1] TRUE 174s > TestMorphIdentity(morph.identity()) 174s [1] TRUE 174s > 174s > TestMorphIdentityOutfun <- function(m) { 174s + f <- m$outfun(NULL) 174s + x <- 1:20 174s + if (!identical(x, f(x))) 174s + return(FALSE) 174s + f <- m$outfun(c(6, 8)) 174s + if (!identical(x[c(6, 8)], f(x))) 174s + return(FALSE) 174s + i <- rep(FALSE, 20) 174s + i[c(1, 3, 5)] <- TRUE 174s + f <- m$outfun(i) 174s + if (!identical(x[i], f(x))) 174s + return(FALSE) 174s + return(TRUE) 174s + } 174s > 174s > TestMorphIdentityOutfun(morph()) 174s [1] TRUE 174s > TestMorphIdentityOutfun(morph.identity()) 174s [1] TRUE 174s > 174s > # make sure that morph and morph.identity give back the same things 174s > all.equal(sort(names(morph.identity())), sort(names(morph(b=1)))) 174s [1] TRUE 174s > 174s > # test center parameter, univariate version 174s > zero.func <- function(x) 0 174s > center <- 2 174s > x <- seq(-1,1, length.out=15) 174s > morph.center <- morph(center=center) 174s > all.equal(sapply(x, morph.center$transform), x-center) 174s [1] TRUE 174s > all.equal(sapply(x, morph.center$inverse), x+center) 174s [1] TRUE 174s > all.equal(sapply(x, morph.center$lud(function(y) dnorm(y, log=TRUE))), 174s + dnorm(x, log=TRUE, mean=-2)) 174s [1] TRUE 174s > 174s > # test center parameter, multivariate version 174s > center <- 1:4 174s > x <- rep(0, 4) 174s > morph.center <- morph(center=center) 174s > lud.mult.dnorm <- function(x) prod(dnorm(x, log=TRUE)) 174s > all.equal(morph.center$transform(x), x-center) 174s [1] TRUE 174s > all.equal(morph.center$inverse(x), x+center) 174s [1] TRUE 174s > all.equal(morph.center$lud(lud.mult.dnorm)(x), 174s + lud.mult.dnorm(x - center)) 174s [1] TRUE 174s > # test 'r'. 174s > r <- 1 174s > morph.r <- morph(r=r) 174s > x <- seq(-1, 1, length.out=20) 174s > all.equal(sapply(x, morph.r$lud(function(x) dnorm(x, log=TRUE))), 174s + dnorm(x, log=TRUE)) 174s [1] TRUE 174s > x <- seq(1.1, 2, length.out=10) 174s > all(sapply(x, morph.r$lud(function(x) dnorm(x, log=TRUE))) 174s + != 174s + dnorm(x, log=TRUE)) 174s [1] TRUE 174s > 174s > TestExponentialEvenPWithRInverse <- function() { 174s + r <- 0.3 174s + p <- 2.2 174s + morph.r <- morph(r=r, p=p) 174s + x <- seq(0, r, length.out=20) 174s + all.equal(x, sapply(x, morph.r$inverse)) 174s + } 174s > 174s > TestExponentialEvenPWithRInverse() 174s [1] TRUE 174s > 174s > # make sure morph$lud passes '...' arguments. 174s > mean <- 2 174s > ident.morph <- morph() 174s > dnorm.morph <- ident.morph$lud(function(x, mean=0) 174s + dnorm(x, mean=mean, log=TRUE)) 174s > all.equal(dnorm.morph(2, mean), dnorm(2, mean=mean, log=TRUE)) 174s [1] TRUE 174s > x <- seq(-3, 3, length.out=20) 174s > m2 <- morph(r=10) 174s > dnorm.morph <- m2$lud(function(x, mean) 174s + dnorm(x, mean=mean, log=TRUE)) 174s > all.equal(sapply(x, function(y) dnorm.morph(y, 2)), 174s + dnorm(x, mean=2, log=TRUE)) 174s [1] TRUE 174s > 174s > # make sure morph$outfun passes '...' arguments. 174s > outfun.orig <- function(x, mean) x + mean 174s > ident.morph <- morph() 174s > mean <- 1 174s > outfun.morph <- ident.morph$outfun(outfun.orig) 174s > all.equal(outfun.morph(1:10, mean), 1:10+mean) 174s [1] TRUE 174s > 174s > m2 <- morph(r=10) 174s > outfun.morph <- m2$outfun(outfun.orig) 174s > all.equal(sapply(1:10, function(x) outfun.morph(x, mean)), 1:10+mean) 174s [1] TRUE 174s > 174s > ########################################################################### 174s > # test built-in exponential and polynomial transformations. 174s > f <- morph(b=3) 174s > x <- seq(0, 10, length.out=100) 174s > all.equal(x, sapply(sapply(x, f$transform), f$inverse)) 174s [1] TRUE 174s > 174s > f <- morph(p=3) 174s > all.equal(x, sapply(sapply(x, f$transform), f$inverse)) 174s [1] TRUE 174s > 174s > f <- morph(p=3, r=10) 174s > all.equal(-10:10, Vectorize(f$transform)(-10:10)) 174s [1] TRUE 174s > 174s > f <- morph(p=3, b=1) 174s > all.equal(x, sapply(sapply(x, f$transform), f$inverse)) 174s [1] TRUE 174s > 174s BEGIN TEST tests/morph.metrop.R 174s 174s R version 4.4.3 (2025-02-28) -- "Trophy Case" 174s Copyright (C) 2025 The R Foundation for Statistical Computing 174s Platform: x86_64-pc-linux-gnu 174s 174s R is free software and comes with ABSOLUTELY NO WARRANTY. 174s You are welcome to redistribute it under certain conditions. 174s Type 'license()' or 'licence()' for distribution details. 174s 174s R is a collaborative project with many contributors. 174s Type 'contributors()' for more information and 174s 'citation()' on how to cite R or R packages in publications. 174s 174s Type 'demo()' for some demos, 'help()' for on-line help, or 174s 'help.start()' for an HTML browser interface to help. 174s Type 'q()' to quit R. 174s 174s > library(mcmc) 174s > 174s > .morph.unmorph <- mcmc:::.morph.unmorph 174s > 174s > ########################################################################### 174s > # basic functionality check, can morph.metro run? Can we change the 174s > # transformation? 174s > set.seed(42) 174s > obj <- morph.metrop(function(x) dt(x, df=3, log=TRUE), 174s + 100, 100, morph=morph(b=3)) 174s > obj <- morph.metrop(obj, morph=morph(b=1)) 174s > 174s > obj <- morph.metrop(function(x) prod(dt(x, df=3, log=TRUE)), 174s + rep(100, 3), 100, morph=morph(p=3, b=1)) 174s > obj <- morph.metrop(obj, morph=morph(r=1, p=3, b=1)) 174s > 174s > all.equal(class(obj), c("mcmc", "morph.metropolis")) 174s [1] TRUE 174s > 174s > ########################################################################### 174s > # check .morph.unmorph 174s > obj <- list(final=10) 174s > outfun <- function(x) x 174s > m <- morph(p=3) 174s > obj <- .morph.unmorph(obj, m, outfun) 174s > all.equal(class(obj), c("mcmc", "morph.metropolis")) 174s [1] TRUE 174s > all.equal(sort(names(obj)), 174s + sort(c("final", "morph", "morph.final", "outfun"))) 174s [1] TRUE 174s > all.equal(c(obj$final, obj$morph.final), c(m$inverse(10), 10)) 174s [1] TRUE 174s > all.equal(obj$outfun, outfun) 174s [1] TRUE 174s > all.equal(obj$morph, m) 174s [1] TRUE 174s > 174s BEGIN TEST tests/morphtoo.R 174s 174s R version 4.4.3 (2025-02-28) -- "Trophy Case" 174s Copyright (C) 2025 The R Foundation for Statistical Computing 174s Platform: x86_64-pc-linux-gnu 174s 174s R is free software and comes with ABSOLUTELY NO WARRANTY. 174s You are welcome to redistribute it under certain conditions. 174s Type 'license()' or 'licence()' for distribution details. 174s 174s R is a collaborative project with many contributors. 174s Type 'contributors()' for more information and 174s 'citation()' on how to cite R or R packages in publications. 174s 174s Type 'demo()' for some demos, 'help()' for on-line help, or 174s 'help.start()' for an HTML browser interface to help. 174s Type 'q()' to quit R. 174s 174s > 174s > library(mcmc) 174s > 174s > x <- seq(0, 10, length = 10001) 174s > 174s > ### sub-exponentially light transformation 174s > 174s > b <- 0.5 174s > fsub <- morph(b = b) 174s > 174s > y <- unlist(Map(fsub$inverse, x)) 174s > 174s > myfsub <- function(x) ifelse(x > 1 / b, exp(b * x) - exp(1) / 3, 174s + (x * b)^3 * exp(1) / 6 + x * b * exp(1) / 2) 174s > y2 <- myfsub(x) 174s > all.equal(y, y2, tolerance = 1e-14) 174s [1] TRUE 174s > 174s > z <- unlist(Map(fsub$transform, y)) 174s > all.equal(z, x, tolerance = 1e-14) 174s [1] TRUE 174s > 174s > ### exponentially light transformation 174s > 174s > r <- 5 174s > p <- 3 174s > fp3 <- morph(r = r) 174s > 174s > y <- unlist(Map(fp3$inverse, x)) 174s > 174s > myfp3 <- function(x) ifelse(x < r, x, x + (x - r)^p) 174s > y2 <- myfp3(x) 174s > all.equal(y, y2, tolerance = 1e-14) 174s [1] TRUE 174s > 174s > z <- unlist(Map(fp3$transform, y)) 174s > all.equal(z, x, tolerance = 1e-12) 174s [1] TRUE 174s > 174s > ### both together 174s > 174s > fboth <- morph(b = b, r = r) 174s > 174s > y <- unlist(Map(fboth$inverse, x)) 174s > y2 <- myfsub(myfp3(x)) 174s > all.equal(y, y2, tolerance = 1e-14) 174s [1] TRUE 174s > 174s > z <- unlist(Map(fboth$transform, y)) 174s > all.equal(z, x, tolerance = 1e-12) 174s [1] TRUE 174s > 174s > ### exponentially light transformation with p != 3 174s > 174s > r <- 5 174s > p <- 2.2 174s > fpo <- morph(r = r, p = p) 174s > 174s > y <- unlist(Map(fpo$inverse, x)) 175s > 175s > myfpo <- function(x) ifelse(x < r, x, x + (x - r)^p) 175s > y2 <- myfpo(x) 175s > all.equal(y, y2, tolerance = 1e-14) 175s [1] TRUE 175s > 175s > z <- unlist(Map(fpo$transform, y)) 175s > all.equal(z, x, tolerance = 1e-14) 175s [1] TRUE 175s > 175s > 175s BEGIN TEST tests/saveseed.R 175s 175s R version 4.4.3 (2025-02-28) -- "Trophy Case" 175s Copyright (C) 2025 The R Foundation for Statistical Computing 175s Platform: x86_64-pc-linux-gnu 175s 175s R is free software and comes with ABSOLUTELY NO WARRANTY. 175s You are welcome to redistribute it under certain conditions. 175s Type 'license()' or 'licence()' for distribution details. 175s 175s R is a collaborative project with many contributors. 175s Type 'contributors()' for more information and 175s 'citation()' on how to cite R or R packages in publications. 175s 175s Type 'demo()' for some demos, 'help()' for on-line help, or 175s 'help.start()' for an HTML browser interface to help. 175s Type 'q()' to quit R. 175s 175s > 175s > library(mcmc) 175s > 175s > set.seed(42) 175s > 175s > h <- function(x) if (all(x >= 0) && sum(x) <= 1) return(1) else return(-Inf) 175s > out <- metrop(h, initial = rep(0, 5), nbatch = 100, blen = 17, nspac = 3, 175s + scale = 0.1) 175s > 175s > save.seed <- .Random.seed 175s > 175s > out1 <- metrop(out) 175s > out2 <- metrop(out1) 175s > out3 <- metrop(out, nbatch = 2 * out$nbatch) 175s > 175s > fred <- rbind(out1$batch, out2$batch) 175s > identical(fred, out3$batch) 175s [1] TRUE 175s > 175s > 175s BEGIN TEST tests/saveseedmorph.R 175s 175s R version 4.4.3 (2025-02-28) -- "Trophy Case" 175s Copyright (C) 2025 The R Foundation for Statistical Computing 175s Platform: x86_64-pc-linux-gnu 175s 175s R is free software and comes with ABSOLUTELY NO WARRANTY. 175s You are welcome to redistribute it under certain conditions. 175s Type 'license()' or 'licence()' for distribution details. 175s 175s R is a collaborative project with many contributors. 175s Type 'contributors()' for more information and 175s 'citation()' on how to cite R or R packages in publications. 175s 175s Type 'demo()' for some demos, 'help()' for on-line help, or 175s 'help.start()' for an HTML browser interface to help. 175s Type 'q()' to quit R. 175s 175s > 175s > library(mcmc) 175s > 175s > set.seed(42) 175s > 175s > h <- function(x) if (all(x >= 0) && sum(x) <= 1) return(1) else return(-Inf) 175s > out <- morph.metrop(obj = h, initial = rep(0, 5), nbatch = 100, blen = 17, 175s + nspac = 3, scale = 0.1) 175s > 175s > out1 <- morph.metrop(out) 175s > out2 <- morph.metrop(out1) 175s > out3 <- morph.metrop(out, nbatch = 2 * out$nbatch) 175s > 175s > fred <- rbind(out1$batch, out2$batch) 175s > identical(fred, out3$batch) 175s [1] TRUE 175s > 175s > out <- morph.metrop(out, morph = morph(p = 2.2, r = 0.3)) 175s > 175s > out1 <- morph.metrop(out) 176s > out2 <- morph.metrop(out1) 176s > out3 <- morph.metrop(out, nbatch = 2 * out$nbatch) 176s > 176s > fred <- rbind(out1$batch, out2$batch) 176s > identical(fred, out3$batch) 176s [1] TRUE 176s > 176s > 176s BEGIN TEST tests/temp-par-witch.R 176s 176s R version 4.4.3 (2025-02-28) -- "Trophy Case" 176s Copyright (C) 2025 The R Foundation for Statistical Computing 176s Platform: x86_64-pc-linux-gnu 176s 176s R is free software and comes with ABSOLUTELY NO WARRANTY. 176s You are welcome to redistribute it under certain conditions. 176s Type 'license()' or 'licence()' for distribution details. 176s 176s R is a collaborative project with many contributors. 176s Type 'contributors()' for more information and 176s 'citation()' on how to cite R or R packages in publications. 176s 176s Type 'demo()' for some demos, 'help()' for on-line help, or 176s 'help.start()' for an HTML browser interface to help. 176s Type 'q()' to quit R. 176s 176s > 176s > if ((! exists("DEBUG")) || (! identical(DEBUG, TRUE))) DEBUG <- FALSE 176s > 176s > library(mcmc) 176s > 176s > options(digits=4) # avoid rounding differences 176s > 176s > set.seed(42) 176s > 176s > save.initial.seed <- .Random.seed 176s > 176s > d <- 3 176s > witch.which <- 1 - (1 / 2)^(1 / d) * (1 / 4)^(seq(0, 5) / d) 176s > witch.which 176s [1] 0.2063 0.5000 0.6850 0.8016 0.8750 0.9213 176s > 176s > ncomp <- length(witch.which) 176s > 176s > neighbors <- matrix(FALSE, ncomp, ncomp) 176s > neighbors[row(neighbors) == col(neighbors) + 1] <- TRUE 176s > neighbors[row(neighbors) == col(neighbors) - 1] <- TRUE 176s > neighbors[row(neighbors) == col(neighbors) + 2] <- TRUE 176s > neighbors[row(neighbors) == col(neighbors) - 2] <- TRUE 176s > 176s > ludfun <- function(state) { 176s + stopifnot(is.numeric(state)) 176s + stopifnot(length(state) == d + 1) 176s + icomp <- state[1] 176s + stopifnot(icomp == as.integer(icomp)) 176s + stopifnot(1 <= icomp && icomp <= ncomp) 176s + theta <- state[-1] 176s + if (any(abs(theta) > 1.0)) return(-Inf) 176s + bnd <- witch.which[icomp] 176s + if(bnd >= 1.0) 176s + stop(sprintf("witch.which[%d] >= 1.0", icomp)) 176s + if(bnd <= 0.0) 176s + stop(sprintf("witch.which[%d] <= 0.0", icomp)) 176s + if (all(abs(theta) > bnd)) 176s + return(- (d + 1) * log(2) - d * log(1 - bnd)) 176s + return(- (d + 1) * log(2) - log1p(- (1 - bnd)^d)) 176s + } 176s > 176s > thetas <- matrix(0, ncomp, d) 176s > out <- temper(ludfun, initial = thetas, neighbors = neighbors, nbatch = 50, 176s + blen = 13, nspac = 7, scale = 0.3456789, parallel = TRUE, debug = DEBUG) 176s > 176s > names(out) 176s [1] "lud" "neighbors" "nbatch" "blen" "nspac" 176s [6] "scale" "outfun" "debug" "parallel" "initial.seed" 176s [11] "final.seed" "time" "batch" "acceptx" "accepti" 176s [16] "initial" "final" 176s > 176s > out$acceptx 176s [1] 0.6336 0.4974 0.3245 0.6022 0.6130 0.5914 176s > 176s > out$accepti 176s [,1] [,2] [,3] [,4] [,5] [,6] 176s [1,] NA 0.7051 0.5497 NA NA NA 176s [2,] 0.7523 NA 0.5547 0.6288 NA NA 176s [3,] 0.5794 0.5865 NA 0.5309 0.5476 NA 176s [4,] NA 0.6667 0.5506 NA 0.8272 0.6837 176s [5,] NA NA 0.5439 0.8926 NA 0.8374 176s [6,] NA NA NA 0.8391 0.9023 NA 176s > 176s > ### check that have prob 1 / 2 for corners 176s > 176s > outfun <- function(state) { 176s + stopifnot(is.matrix(state)) 176s + ncomp <- nrow(state) 176s + d <- ncol(state) 176s + foo <- sweep(abs(state), 1, witch.which) 176s + bar <- apply(foo > 0, 1, all) 176s + return(as.numeric(bar)) 176s + } 176s > 176s > out2 <- temper(out, outfun = outfun) 176s > 176s > colMeans(out2$batch) 176s [1] 0.54923 0.40923 0.39538 0.09692 0.12923 0.60000 176s > apply(out2$batch, 2, sd) / sqrt(out$nbatch) 176s [1] 0.03482 0.04817 0.05464 0.02856 0.02113 0.05131 176s > 176s > ### try again 176s > 176s > out3 <- temper(out2, blen = 103) 177s > 177s > foo <- cbind(colMeans(out3$batch), 177s + apply(out3$batch, 2, sd) / sqrt(out$nbatch)) 177s > colnames(foo) <- c("means", "MCSE") 177s > foo 177s means MCSE 177s [1,] 0.5231 0.01390 177s [2,] 0.5361 0.02213 177s [3,] 0.4905 0.03961 177s [4,] 0.5652 0.04909 177s [5,] 0.4056 0.05107 177s [6,] 0.2450 0.05108 177s > 177s > 177s BEGIN TEST tests/temp-par.R 177s 177s R version 4.4.3 (2025-02-28) -- "Trophy Case" 177s Copyright (C) 2025 The R Foundation for Statistical Computing 177s Platform: x86_64-pc-linux-gnu 177s 177s R is free software and comes with ABSOLUTELY NO WARRANTY. 177s You are welcome to redistribute it under certain conditions. 177s Type 'license()' or 'licence()' for distribution details. 177s 177s R is a collaborative project with many contributors. 177s Type 'contributors()' for more information and 177s 'citation()' on how to cite R or R packages in publications. 177s 177s Type 'demo()' for some demos, 'help()' for on-line help, or 177s 'help.start()' for an HTML browser interface to help. 177s Type 'q()' to quit R. 177s 178s > 178s > library(mcmc) 178s > 178s > set.seed(42) 178s > 178s > data(foo) 178s > attach(foo) 178s > 178s > out <- glm(y ~ x1 + x2 + x3, family = binomial, x = TRUE) 178s > ## IGNORE_RDIFF_BEGIN 178s > summary(out) 178s 178s Call: 178s glm(formula = y ~ x1 + x2 + x3, family = binomial, x = TRUE) 178s 178s Coefficients: 178s Estimate Std. Error z value Pr(>|z|) 178s (Intercept) 0.5772 0.2766 2.087 0.036930 * 178s x1 0.3362 0.4256 0.790 0.429672 178s x2 0.8475 0.4701 1.803 0.071394 . 178s x3 1.5143 0.4426 3.422 0.000622 *** 178s --- 178s Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 178s 178s (Dispersion parameter for binomial family taken to be 1) 178s 178s Null deviance: 134.602 on 99 degrees of freedom 178s Residual deviance: 86.439 on 96 degrees of freedom 178s AIC: 94.439 178s 178s Number of Fisher Scoring iterations: 5 178s 178s > ## IGNORE_RDIFF_END 178s > 178s > modmat <- out$x 178s > 178s > models <- cbind(rep(0:1, each = 4), rep(rep(0:1, times = 2), each = 2), 178s + rep(0:1, times = 4)) 178s > 178s > exes <- paste("x", 1:3, sep = "") 178s > betas <- NULL 178s > for (i in 1:nrow(models)) { 178s + inies <- as.logical(models[i, ]) 178s + foo <- exes[inies] 178s + bar <- paste("y ~", paste(foo, collapse = " + ")) 178s + if (! any(inies)) bar <- paste(bar, "1") 178s + baz <- glm(as.formula(bar), family = binomial) 178s + beta <- rep(0, 4) 178s + beta[c(TRUE, inies)] <- baz$coef 178s + betas <- rbind(betas, beta) 178s + } 178s > 178s > neighbors <- matrix(FALSE, nrow(models), nrow(models)) 178s > for (i in 1:nrow(neighbors)) { 178s + for (j in 1:ncol(neighbors)) { 178s + foo <- models[i, ] 178s + bar <- models[j, ] 178s + if (sum(foo != bar) == 1) neighbors[i, j] <- TRUE 178s + } 178s + } 178s > 178s > ludfun <- function(state, ...) { 178s + stopifnot(is.numeric(state)) 178s + stopifnot(length(state) == ncol(models) + 2) 178s + stopifnot(length(state) == ncol(models) + 2) 178s + icomp <- state[1] 178s + stopifnot(icomp == as.integer(icomp)) 178s + stopifnot(1 <= icomp && icomp <= nrow(models)) 178s + beta <- state[-1] 178s + inies <- c(TRUE, as.logical(models[icomp, ])) 178s + beta.logl <- beta 178s + beta.logl[! inies] <- 0 178s + eta <- as.numeric(modmat %*% beta.logl) 178s + logp <- ifelse(eta < 0, eta - log1p(exp(eta)), - log1p(exp(- eta))) 178s + logq <- ifelse(eta < 0, - log1p(exp(eta)), - eta - log1p(exp(- eta))) 178s + logl <- sum(logp[y == 1]) + sum(logq[y == 0]) 178s + val <- logl - sum(beta^2) / 2 178s + return(val) 178s + } 178s > 178s > ludval <- NULL 178s > for (i in 1:nrow(models)) ludval <- c(ludval, ludfun(c(i, betas[i, ]))) 178s > all(is.finite(ludval)) 178s [1] TRUE 178s > 178s > 178s > out <- temper(ludfun, initial = betas, neighbors = neighbors, nbatch = 20, 178s + blen = 10, nspac = 5, scale = 0.56789, parallel = TRUE, debug = TRUE) 178s > 178s > names(out) 178s [1] "lud" "neighbors" "nbatch" "blen" 178s [5] "nspac" "scale" "outfun" "debug" 178s [9] "parallel" "initial.seed" "final.seed" "time" 178s [13] "batch" "acceptx" "accepti" "initial" 178s [17] "final" "which" "unif.which" "state" 178s [21] "log.hastings" "unif.hastings" "proposal" "acceptd" 178s [25] "norm" "unif.choose" "coproposal" 178s > 178s > ### check decision about within-component or jump/swap 178s > 178s > identical(out$unif.which < 0.5, out$which) 178s [1] TRUE 178s > 178s > identical(out$which, out$proposal[ , 1] == out$coproposal[ , 1]) 178s [1] TRUE 178s > 178s > ### check proposal and coproposal are actually current state or part thereof 178s > 178s > prop <- out$proposal 178s > coprop <- out$coproposal 178s > prop.i <- prop[ , 1] 178s > coprop.i <- coprop[ , 1] 178s > alt.prop <- prop 178s > alt.coprop <- coprop 178s > for (i in 1:nrow(prop)) { 178s + alt.prop[i, ] <- c(prop.i[i], out$state[i, prop.i[i], ]) 178s + alt.coprop[i, ] <- c(coprop.i[i], out$state[i, coprop.i[i], ]) 178s + } 178s > identical(coprop, alt.coprop) 178s [1] TRUE 178s > identical(prop[! out$which, ], alt.prop[! out$which, ]) 178s [1] TRUE 178s > identical(prop[out$which, 1], alt.prop[out$which, 1]) 178s [1] TRUE 178s > 178s > ### check hastings ratio calculated correctly 178s > 178s > foo <- apply(prop, 1, ludfun) 178s > fooco <- apply(coprop, 1, ludfun) 178s > prop[ , 1] <- out$coproposal[ , 1] 178s > coprop[ , 1] <- out$proposal[ , 1] 178s > foo.swap <- apply(prop, 1, ludfun) 178s > fooco.swap <- apply(coprop, 1, ludfun) 178s > log.haste <- ifelse(out$which, foo - fooco, 178s + foo.swap + fooco.swap - foo - fooco) 178s > all.equal(log.haste, out$log.hastings) 178s [1] TRUE 178s > 178s > ### check hastings rejection decided correctly 178s > 178s > identical(out$log.hastings >= 0, is.na(out$unif.hastings)) 178s [1] TRUE 178s > all(out$log.hastings < 0 | out$acceptd) 178s [1] TRUE 178s > identical(out$acceptd, 178s + out$log.hastings >= 0 | out$unif.hastings < exp(out$log.hastings)) 178s [1] TRUE 178s > 178s > ### check acceptance carried out or not (according to decision) correctly 178s > 178s > before <- out$state 178s > after <- before 178s > after[- dim(after)[1], , ] <- before[-1, , ] 178s > after[dim(after)[1], , ] <- out$final 178s > my.after <- before 178s > for (i in 1:length(out$acceptd)) { 178s + if (out$acceptd[i]) { 178s + if (out$which[i]) { 178s + j <- out$proposal[i, 1] 178s + my.after[i, j, ] <- out$proposal[i, -1] 178s + } else { 178s + j <- out$proposal[i, 1] 178s + k <- out$coproposal[i, 1] 178s + my.after[i, j, ] <- out$coproposal[i, -1] 178s + my.after[i, k, ] <- out$proposal[i, -1] 178s + } 178s + } 178s + } 178s > identical(after, my.after) 178s [1] TRUE 178s > 178s > ### check within-component proposal 178s > 178s > my.coproposal.within <- out$coproposal[out$which, ] 178s > proposal.within <- out$proposal[out$which, ] 178s > my.z <- out$norm[out$which, ] 178s > my.proposal.within <- my.coproposal.within 178s > my.proposal.within[ , -1] <- my.coproposal.within[ , -1] + out$scale * my.z 178s > all.equal(proposal.within, my.proposal.within) 178s [1] TRUE 178s > 178s > my.unif.choose <- out$unif.choose[out$which, 1] 178s > my.i <- floor(nrow(models) * my.unif.choose) + 1 178s > all(1 <= my.i & my.i <= nrow(models)) 178s [1] TRUE 178s > identical(my.i, my.coproposal.within[ , 1]) 178s [1] TRUE 178s > 178s > ### check swap proposal 178s > 178s > coproposal.swap <- out$coproposal[! out$which, ] 178s > proposal.swap <- out$proposal[! out$which, ] 178s > unif.choose.swap <- out$unif.choose[! out$which, ] 178s > my.i <- floor(nrow(models) * unif.choose.swap[ , 1]) + 1 178s > nneighbors <- apply(out$neighbors, 1, sum) 178s > my.nneighbors <- nneighbors[my.i] 178s > my.k <- floor(my.nneighbors * unif.choose.swap[ , 2]) + 1 178s > my.j <- my.k 178s > foo <- seq(1, ncol(out$neighbors)) 178s > for (i in seq(along = my.j)) { 178s + my.j[i] <- (foo[out$neighbors[my.i[i], ]])[my.k[i]] 178s + } 178s > identical(coproposal.swap[ , 1], my.i) 178s [1] TRUE 178s > identical(proposal.swap[ , 1], my.j) 178s [1] TRUE 178s > 178s > ### check standard normal and uniform random numbers are as purported 178s > 178s > save.Random.seed <- .Random.seed 178s > .Random.seed <- out$initial.seed 178s > 178s > nx <- ncol(out$initial) 178s > niter <- out$nbatch * out$blen * out$nspac 178s > my.norm <- matrix(NA, nrow = nrow(out$norm), ncol = ncol(out$norm)) 178s > my.unif.which <- rep(NA, niter) 178s > my.unif.hastings <- rep(NA, niter) 178s > my.unif.choose <- matrix(NA, niter, 2) 178s > for (iiter in 1:niter) { 178s + my.unif.which[iiter] <- runif(1) 178s + if (out$which[iiter]) { 178s + my.unif.choose[iiter, 1] <- runif(1) 178s + my.norm[iiter, ] <- rnorm(nx) 178s + if (out$log.hastings[iiter] < 0) my.unif.hastings[iiter] <- runif(1) 178s + } else { 178s + my.unif.choose[iiter, ] <- runif(2) 178s + if (out$log.hastings[iiter] < 0) my.unif.hastings[iiter] <- runif(1) 178s + } 178s + } 178s > identical(my.norm, out$norm) 178s [1] TRUE 178s > identical(my.unif.which, out$unif.which) 178s [1] TRUE 178s > identical(my.unif.hastings, out$unif.hastings) 178s [1] TRUE 178s > identical(my.unif.choose, out$unif.choose) 178s [1] TRUE 178s > 178s > .Random.seed <- save.Random.seed 178s > 178s > ### check batch means 178s > 178s > foo <- after[seq(1, niter) %% out$nspac == 0, , ] 178s > foo <- array(as.vector(foo), dim = c(out$blen, out$nbatch, dim(foo)[2:3])) 178s > foo <- apply(foo, c(2, 3, 4), mean) 178s > all.equal(foo, out$batch) 178s [1] TRUE 178s > 178s > ### check acceptance rates 178s > 178s > accept.within <- out$acceptd[out$which] 178s > my.i.within <- out$coproposal[out$which, 1] 178s > my.acceptx <- as.vector(sapply(split(accept.within, my.i.within), mean)) 178s > identical(my.acceptx, out$acceptx) 178s [1] TRUE 178s > 178s > accept.swap <- out$acceptd[! out$which] 178s > my.i.swap <- out$coproposal[! out$which, 1] 178s > my.j.swap <- out$proposal[! out$which, 1] 178s > nmodel <- nrow(out$neighbors) 178s > my.accepti <- matrix(NA, nmodel, nmodel) 178s > for (i in 1:nmodel) { 178s + for (j in 1:nmodel) { 178s + if (out$neighbors[i, j]) { 178s + my.accepti[i, j] <- 178s + mean(accept.swap[my.i.swap == i & my.j.swap == j]) 178s + } 178s + } 178s + } 178s > identical(my.accepti, out$accepti) 178s [1] TRUE 178s > 178s > ### check scale vector 178s > 178s > nx <- ncol(models) + 1 178s > newscale <- rnorm(nx, 0.5, 0.1) 178s > 178s > out <- temper(out, scale = newscale) 178s > 178s > my.coproposal.within <- out$coproposal[out$which, ] 178s > proposal.within <- out$proposal[out$which, ] 178s > my.z <- out$norm[out$which, ] 178s > my.proposal.within <- my.coproposal.within 178s > my.proposal.within[ , -1] <- my.coproposal.within[ , -1] + 178s + sweep(my.z, 2, out$scale, "*") 178s > all.equal(proposal.within, my.proposal.within) 178s [1] TRUE 178s > 178s > ### check scale matrix 178s > 178s > matscale <- matrix(rnorm(nx * nx, 0.0, 0.1), nx, nx) 178s > diag(matscale) <- 0.56789 178s > 178s > out <- temper(out, scale = matscale) 178s > 178s > my.coproposal.within <- out$coproposal[out$which, ] 178s > proposal.within <- out$proposal[out$which, ] 178s > my.z <- out$norm[out$which, ] 178s > my.proposal.within <- my.coproposal.within 178s > my.proposal.within[ , -1] <- my.coproposal.within[ , -1] + 178s + my.z %*% t(out$scale) 178s > all.equal(proposal.within, my.proposal.within) 178s [1] TRUE 178s > 178s > ### check scale list 178s > 178s > lisztscale <- list(0.56789, newscale, matscale, matscale, newscale, 178s + 0.98765, 0.98765, newscale) 178s > 178s > out <- temper(out, scale = lisztscale) 178s > 178s > my.coproposal.within <- out$coproposal[out$which, ] 178s > proposal.within <- out$proposal[out$which, ] 178s > my.z <- out$norm[out$which, ] 178s > my.proposal.within <- my.coproposal.within 178s > for (iiter in 1:nrow(my.z)) { 178s + my.i <- my.coproposal.within[iiter, 1] 178s + my.scale <- out$scale[[my.i]] 178s + if (is.matrix(my.scale)) { 178s + my.proposal.within[iiter, -1] <- my.coproposal.within[iiter, -1] + 178s + my.z[iiter, , drop = FALSE] %*% t(my.scale) 178s + } else { 178s + my.proposal.within[iiter, -1] <- my.coproposal.within[iiter, -1] + 178s + my.z[iiter, ] * my.scale 178s + } 178s + } 178s > all.equal(proposal.within, my.proposal.within) 178s [1] TRUE 178s > 178s > ### check outfun 178s > 178s > outfun <- function(state, icomp, ...) { 178s + stopifnot(is.matrix(state)) 178s + stopifnot(is.numeric(state)) 178s + nx <- ncol(betas) 178s + ncomp <- nrow(betas) 178s + stopifnot(ncol(state) == nx) 178s + stopifnot(nrow(state) == ncomp) 178s + stopifnot(1 <= icomp && icomp <= ncomp) 178s + foo <- state[icomp, ] 178s + bar <- foo^2 178s + return(c(foo, bar)) 178s + } 178s > 178s > out <- temper(out, outfun = outfun, icomp = 4) 179s > 179s > before <- out$state 179s > after <- before 179s > after[- dim(after)[1], , ] <- before[-1, , ] 179s > after[dim(after)[1], , ] <- out$final 179s > outies <- apply(after, 1, outfun, icomp = 4) 179s > outies <- t(outies) 179s > 179s > foo <- outies[seq(1, niter) %% out$nspac == 0, ] 179s > foo <- array(as.vector(foo), dim = c(out$blen, out$nbatch, dim(foo)[2])) 179s > foo <- apply(foo, c(2, 3), mean) 179s > all.equal(foo, out$batch) 179s [1] TRUE 179s > 179s > 179s BEGIN TEST tests/temp-ser-witch.R 179s 179s R version 4.4.3 (2025-02-28) -- "Trophy Case" 179s Copyright (C) 2025 The R Foundation for Statistical Computing 179s Platform: x86_64-pc-linux-gnu 179s 179s R is free software and comes with ABSOLUTELY NO WARRANTY. 179s You are welcome to redistribute it under certain conditions. 179s Type 'license()' or 'licence()' for distribution details. 179s 179s R is a collaborative project with many contributors. 179s Type 'contributors()' for more information and 179s 'citation()' on how to cite R or R packages in publications. 179s 179s Type 'demo()' for some demos, 'help()' for on-line help, or 179s 'help.start()' for an HTML browser interface to help. 179s Type 'q()' to quit R. 179s 179s > 179s > library(mcmc) 179s > 179s > set.seed(42) 179s > 179s > d <- 3 179s > witch.which <- 1 - (1 / 2)^(1 / d) * (1 / 4)^(seq(0, 5) / d) 179s > witch.which 179s [1] 0.2062995 0.5000000 0.6850197 0.8015749 0.8750000 0.9212549 179s > 179s > ncomp <- length(witch.which) 179s > 179s > neighbors <- matrix(FALSE, ncomp, ncomp) 179s > neighbors[row(neighbors) == col(neighbors) + 1] <- TRUE 179s > neighbors[row(neighbors) == col(neighbors) - 1] <- TRUE 179s > neighbors[row(neighbors) == col(neighbors) + 2] <- TRUE 179s > neighbors[row(neighbors) == col(neighbors) - 2] <- TRUE 179s > 179s > ludfun <- function(state) { 179s + stopifnot(is.numeric(state)) 179s + stopifnot(length(state) == d + 1) 179s + icomp <- state[1] 179s + stopifnot(icomp == as.integer(icomp)) 179s + stopifnot(1 <= icomp && icomp <= ncomp) 179s + theta <- state[-1] 179s + if (any(abs(theta) > 1.0)) return(-Inf) 179s + bnd <- witch.which[icomp] 179s + if(bnd >= 1.0) 179s + stop(sprintf("witch.which[%d] >= 1.0", icomp)) 179s + if(bnd <= 0.0) 179s + stop(sprintf("witch.which[%d] <= 0.0", icomp)) 179s + if (all(abs(theta) > bnd)) 179s + return(- (d + 1) * log(2) - d * log(1 - bnd)) 179s + return(- (d + 1) * log(2) - log1p(- (1 - bnd)^d)) 179s + } 179s > 179s > initial <- c(1, rep(0, d)) 179s > 179s > out <- temper(ludfun, initial = initial, neighbors = neighbors, 179s + nbatch = 50, blen = 13, nspac = 7, scale = 0.3456789) 179s > 179s > names(out) 179s [1] "lud" "neighbors" "nbatch" "blen" "nspac" 179s [6] "scale" "outfun" "debug" "parallel" "initial.seed" 179s [11] "final.seed" "time" "batch" "acceptx" "accepti" 179s [16] "initial" "final" "ibatch" 179s > 179s > out$acceptx 179s [1] 0.6388889 0.4385246 0.3631714 0.4885246 0.4709677 0.4735516 179s > 179s > out$accepti 179s [,1] [,2] [,3] [,4] [,5] [,6] 179s [1,] NA 0.5071770 0.2727273 NA NA NA 179s [2,] 0.7070064 NA 0.4355828 0.4186047 NA NA 179s [3,] 0.5816327 0.8039216 NA 0.5888889 0.5662651 NA 179s [4,] NA 0.7415730 0.8571429 NA 0.7857143 0.6626506 179s [5,] NA NA 0.5204082 0.6516854 NA 0.8378378 179s [6,] NA NA NA 0.3515152 0.5056818 NA 179s > 179s > colMeans(out$ibatch) 179s [1] 0.1830769 0.2153846 0.1630769 0.1369231 0.1353846 0.1661538 179s > 179s > ### check that have prob 1 / 2 for corners 179s > 179s > outfun <- function(state) { 179s + stopifnot(is.numeric(state)) 179s + icomp <- state[1] 179s + stopifnot(icomp == as.integer(icomp)) 179s + stopifnot(1 <= icomp && icomp <= length(witch.which)) 179s + theta <- state[-1] 179s + foo <- all(abs(theta) > witch.which[icomp]) 179s + bar <- rep(0, length(witch.which)) 179s + baz <- rep(0, length(witch.which)) 179s + bar[icomp] <- as.numeric(foo) 179s + baz[icomp] <- 1 179s + return(c(bar, baz)) 179s + } 179s > 179s > out <- temper(out, blen = 103, outfun = outfun, debug = TRUE) 180s > 180s > eta.batch <- out$batch[ , seq(1, ncomp)] 180s > noo.batch <- out$batch[ , seq(ncomp + 1, ncomp + ncomp)] 180s > eta <- colMeans(eta.batch) 180s > noo <- colMeans(noo.batch) 180s > mu <- eta / noo 180s > eta 180s [1] 0.06660194 0.06388350 0.05766990 0.06563107 0.10368932 0.22912621 180s > noo 180s [1] 0.1365049 0.1258252 0.1293204 0.1370874 0.1716505 0.2996117 180s > mu 180s [1] 0.4879090 0.5077160 0.4459459 0.4787535 0.6040724 0.7647440 180s > 180s > eta.batch.rel <- sweep(eta.batch, 2, eta, "/") 180s > noo.batch.rel <- sweep(noo.batch, 2, noo, "/") 180s > mu.batch.rel <- eta.batch.rel - noo.batch.rel 180s > 180s > mu.mcse.rel <- apply(mu.batch.rel, 2, sd) / sqrt(out$nbatch) 180s > mu.mcse.rel 180s [1] 0.05010927 0.07897321 0.09678339 0.12636113 0.11261781 0.07082685 180s > 180s > foo <- cbind(mu, mu * mu.mcse.rel) 180s > colnames(foo) <- c("means", "MCSE") 180s > foo 180s means MCSE 180s [1,] 0.4879090 0.02444876 180s [2,] 0.5077160 0.04009596 180s [3,] 0.4459459 0.04316016 180s [4,] 0.4787535 0.06049584 180s [5,] 0.6040724 0.06802931 180s [6,] 0.7647440 0.05416441 180s > 180s > ### check decision about within-component or jump/swap 180s > 180s > identical(out$unif.which < 0.5, out$which) 180s [1] TRUE 180s > 180s > identical(out$which, out$proposal[ , 1] == out$state[ , 1]) 180s [1] TRUE 180s > 180s > ### check hastings ratio calculated correctly 180s > 180s > n <- apply(neighbors, 1, sum) 180s > i <- out$state[ , 1] 180s > istar <- out$proposal[ , 1] 180s > foo <- apply(out$state, 1, ludfun) 180s > bar <- apply(out$proposal, 1, ludfun) 181s > my.log.hastings <- bar - foo - log(n[istar]) + log(n[i]) 181s > all.equal(my.log.hastings, out$log.hastings) 181s [1] TRUE 181s > 181s > 181s BEGIN TEST tests/temp-ser.R 181s 181s R version 4.4.3 (2025-02-28) -- "Trophy Case" 181s Copyright (C) 2025 The R Foundation for Statistical Computing 181s Platform: x86_64-pc-linux-gnu 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 > 181s > library(mcmc) 181s > 181s > set.seed(42) 181s > 181s > data(foo) 181s > attach(foo) 181s > 181s > out <- glm(y ~ x1 + x2 + x3, family = binomial, x = TRUE) 181s > ## IGNORE_RDIFF_BEGIN 181s > summary(out) 181s 181s Call: 181s glm(formula = y ~ x1 + x2 + x3, family = binomial, x = TRUE) 181s 181s Coefficients: 181s Estimate Std. Error z value Pr(>|z|) 181s (Intercept) 0.5772 0.2766 2.087 0.036930 * 181s x1 0.3362 0.4256 0.790 0.429672 181s x2 0.8475 0.4701 1.803 0.071394 . 181s x3 1.5143 0.4426 3.422 0.000622 *** 181s --- 181s Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 181s 181s (Dispersion parameter for binomial family taken to be 1) 181s 181s Null deviance: 134.602 on 99 degrees of freedom 181s Residual deviance: 86.439 on 96 degrees of freedom 181s AIC: 94.439 181s 181s Number of Fisher Scoring iterations: 5 181s 181s > ## IGNORE_RDIFF_END 181s > 181s > modmat <- out$x 181s > 181s > models <- cbind(rep(0:1, each = 4), rep(rep(0:1, times = 2), each = 2), 181s + rep(0:1, times = 4)) 181s > 181s > exes <- paste("x", 1:3, sep = "") 181s > models[nrow(models), ] 181s [1] 1 1 1 181s > beta.initial <- c(nrow(models), out$coefficients) 181s > 181s > neighbors <- matrix(FALSE, nrow(models), nrow(models)) 181s > for (i in 1:nrow(neighbors)) { 181s + for (j in 1:ncol(neighbors)) { 181s + foo <- models[i, ] 181s + bar <- models[j, ] 181s + if (sum(foo != bar) == 1) neighbors[i, j] <- TRUE 181s + } 181s + } 181s > neighbors 181s [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] 181s [1,] FALSE TRUE TRUE FALSE TRUE FALSE FALSE FALSE 181s [2,] TRUE FALSE FALSE TRUE FALSE TRUE FALSE FALSE 181s [3,] TRUE FALSE FALSE TRUE FALSE FALSE TRUE FALSE 181s [4,] FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE 181s [5,] TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE 181s [6,] FALSE TRUE FALSE FALSE TRUE FALSE FALSE TRUE 181s [7,] FALSE FALSE TRUE FALSE TRUE FALSE FALSE TRUE 181s [8,] FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE 181s > 181s > ludfun <- function(state, log.pseudo.prior, ...) { 181s + stopifnot(is.numeric(state)) 181s + stopifnot(length(state) == ncol(models) + 2) 181s + icomp <- state[1] 181s + stopifnot(icomp == as.integer(icomp)) 181s + stopifnot(1 <= icomp && icomp <= nrow(models)) 181s + stopifnot(is.numeric(log.pseudo.prior)) 181s + stopifnot(length(log.pseudo.prior) == nrow(models)) 181s + beta <- state[-1] 181s + inies <- c(TRUE, as.logical(models[icomp, ])) 181s + beta.logl <- beta 181s + beta.logl[! inies] <- 0 181s + eta <- as.numeric(modmat %*% beta.logl) 181s + logp <- ifelse(eta < 0, eta - log1p(exp(eta)), - log1p(exp(- eta))) 181s + logq <- ifelse(eta < 0, - log1p(exp(eta)), - eta - log1p(exp(- eta))) 181s + logl <- sum(logp[y == 1]) + sum(logq[y == 0]) 181s + val <- logl - sum(beta^2) / 2 + log.pseudo.prior[icomp] 181s + return(val) 181s + } 181s > 181s > qux <- c(25.01, 5.875, 9.028, 0.6959, 11.73, 2.367, 5.864, 0.0) 181s > 181s > out <- temper(ludfun, initial = beta.initial, neighbors = neighbors, 181s + nbatch = 25, blen = 20, nspac = 5, scale = 0.56789, debug = TRUE, 181s + log.pseudo.prior = qux) 181s > 181s > names(out) 181s [1] "lud" "neighbors" "nbatch" "blen" 181s [5] "nspac" "scale" "outfun" "debug" 181s [9] "parallel" "initial.seed" "final.seed" "time" 181s [13] "batch" "acceptx" "accepti" "initial" 181s [17] "final" "ibatch" "which" "unif.which" 181s [21] "state" "log.hastings" "unif.hastings" "proposal" 181s [25] "acceptd" "norm" "unif.choose" 181s > 181s > apply(out$ibatch, 2, mean) 181s [1] 0.776 0.170 0.000 0.006 0.024 0.010 0.004 0.010 181s > 181s > ### check decision about within-component or jump/swap 181s > 181s > identical(out$unif.which < 0.5, out$which) 181s [1] TRUE 181s > 181s > identical(out$which, out$proposal[ , 1] == out$state[ , 1]) 181s [1] TRUE 181s > 181s > ### check hastings ratio calculated correctly 181s > 181s > foo <- apply(out$state, 1, ludfun, log.pseudo.prior = qux) 181s > bar <- apply(out$proposal, 1, ludfun, log.pseudo.prior = qux) 182s > all.equal(bar - foo, out$log.hastings) 182s [1] TRUE 182s > 182s > ### check hastings rejection decided correctly 182s > 182s > identical(out$log.hastings >= 0, is.na(out$unif.hastings)) 182s [1] TRUE 182s > all(out$log.hastings < 0 | out$acceptd) 182s [1] TRUE 182s > identical(out$acceptd, 182s + out$log.hastings >= 0 | out$unif.hastings < exp(out$log.hastings)) 182s [1] TRUE 182s > 182s > ### check acceptance carried out or not (according to decision) correctly 182s > 182s > before <- out$state 182s > after <- before 182s > after[- dim(after)[1], ] <- before[-1, ] 182s > after[dim(after)[1], ] <- out$final 182s > my.after <- before 182s > my.after[out$acceptd, ] <- out$proposal[out$acceptd, ] 182s > identical(after, my.after) 182s [1] TRUE 182s > 182s > ### check within-component proposal 182s > 182s > my.coproposal.within <- out$state[out$which, ] 182s > proposal.within <- out$proposal[out$which, ] 182s > my.z <- out$norm[out$which, ] 182s > my.proposal.within <- my.coproposal.within 182s > my.proposal.within[ , -1] <- my.coproposal.within[ , -1] + out$scale * my.z 182s > all.equal(proposal.within, my.proposal.within) 182s [1] TRUE 182s > 182s > ### check swap proposal 182s > 182s > coproposal.swap <- out$state[! out$which, ] 182s > proposal.swap <- out$proposal[! out$which, ] 182s > unif.choose.swap <- out$unif.choose[! out$which] 182s > my.i <- coproposal.swap[ , 1] 182s > nneighbors <- apply(out$neighbors, 1, sum) 182s > my.nneighbors <- nneighbors[my.i] 182s > my.k <- floor(my.nneighbors * unif.choose.swap) + 1 182s > my.j <- my.k 182s > foo <- seq(1, ncol(out$neighbors)) 182s > for (i in seq(along = my.j)) { 182s + my.j[i] <- (foo[out$neighbors[my.i[i], ]])[my.k[i]] 182s + } 182s > identical(coproposal.swap[ , 1], my.i) 182s [1] TRUE 182s > identical(proposal.swap[ , 1], my.j) 182s [1] TRUE 182s > 182s > ### check standard normal and uniform random numbers are as purported 182s > 182s > save.Random.seed <- .Random.seed 182s > .Random.seed <- out$initial.seed 182s > 182s > nx <- length(out$initial) - 1 182s > niter <- out$nbatch * out$blen * out$nspac 182s > my.norm <- matrix(NA, nrow = nrow(out$norm), ncol = ncol(out$norm)) 182s > my.unif.which <- rep(NA, niter) 182s > my.unif.hastings <- rep(NA, niter) 182s > my.unif.choose <- rep(NA, niter) 182s > for (iiter in 1:niter) { 182s + my.unif.which[iiter] <- runif(1) 182s + if (out$which[iiter]) { 182s + my.norm[iiter, ] <- rnorm(nx) 182s + if (out$log.hastings[iiter] < 0) my.unif.hastings[iiter] <- runif(1) 182s + } else { 182s + my.unif.choose[iiter] <- runif(1) 182s + if (out$log.hastings[iiter] < 0) my.unif.hastings[iiter] <- runif(1) 182s + } 182s + } 182s > identical(my.norm, out$norm) 182s [1] TRUE 182s > identical(my.unif.which, out$unif.which) 182s [1] TRUE 182s > identical(my.unif.hastings, out$unif.hastings) 182s [1] TRUE 182s > identical(my.unif.choose, out$unif.choose) 182s [1] TRUE 182s > 182s > .Random.seed <- save.Random.seed 182s > 182s > ### check batch means 182s > 182s > my.xstate <- after[ , -1] 182s > foo <- my.xstate[seq(1, niter) %% out$nspac == 0, ] 182s > foo <- array(as.vector(foo), dim = c(out$blen, out$nbatch, dim(foo)[2])) 182s > foo <- apply(foo, c(2, 3), mean) 182s > all.equal(foo, out$batch) 182s [1] TRUE 182s > 182s > ### check ibatch means 182s > 182s > my.istate <- after[ , 1] 182s > my.istate.matrix <- matrix(0, length(my.istate), nrow(models)) 182s > for (i in 1:nrow(my.istate.matrix)) 182s + my.istate.matrix[i, my.istate[i]] <- 1 182s > foo <- my.istate.matrix[seq(1, niter) %% out$nspac == 0, ] 182s > foo <- array(as.vector(foo), dim = c(out$blen, out$nbatch, dim(foo)[2])) 182s > foo <- apply(foo, c(2, 3), mean) 182s > all.equal(foo, out$ibatch) 182s [1] TRUE 182s > 182s > ### check acceptance rates 182s > 182s > nmodel <- nrow(out$neighbors) 182s > 182s > accept.within <- out$acceptd[out$which] 182s > my.i.within <- out$state[out$which, 1] 182s > my.i.within.accept <- my.i.within[accept.within] 182s > my.acceptx.numer <- tabulate(my.i.within.accept, nbins = nmodel) 182s > my.acceptx.denom <- tabulate(my.i.within, nbins = nmodel) 182s > my.acceptx <- my.acceptx.numer / my.acceptx.denom 182s > identical(my.acceptx, out$acceptx) 182s [1] TRUE 182s > 182s > accept.swap <- out$acceptd[! out$which] 182s > my.i.swap <- out$state[! out$which, 1] 182s > my.j.swap <- out$proposal[! out$which, 1] 182s > my.accepti <- matrix(NA, nmodel, nmodel) 182s > for (i in 1:nmodel) { 182s + for (j in 1:nmodel) { 182s + if (out$neighbors[i, j]) { 182s + my.accepti[i, j] <- 182s + mean(accept.swap[my.i.swap == i & my.j.swap == j]) 182s + } 182s + } 182s + } 182s > identical(my.accepti, out$accepti) 182s [1] TRUE 182s > 182s > ### check scale vector 182s > 182s > nx <- ncol(models) + 1 182s > newscale <- rnorm(nx, 0.5, 0.1) 182s > 182s > out <- temper(out, scale = newscale, log.pseudo.prior = qux) 182s > 182s > my.coproposal.within <- out$state[out$which, ] 182s > proposal.within <- out$proposal[out$which, ] 182s > my.z <- out$norm[out$which, ] 182s > my.proposal.within <- my.coproposal.within 182s > my.proposal.within[ , -1] <- my.coproposal.within[ , -1] + 182s + sweep(my.z, 2, out$scale, "*") 182s > all.equal(proposal.within, my.proposal.within) 182s [1] TRUE 182s > 182s > ### check scale matrix 182s > 182s > matscale <- matrix(rnorm(nx * nx, 0.0, 0.1), nx, nx) 182s > diag(matscale) <- 0.56789 182s > 182s > out <- temper(out, scale = matscale, log.pseudo.prior = qux) 182s > 182s > my.coproposal.within <- out$state[out$which, ] 182s > proposal.within <- out$proposal[out$which, ] 182s > my.z <- out$norm[out$which, ] 182s > my.proposal.within <- my.coproposal.within 182s > my.proposal.within[ , -1] <- my.coproposal.within[ , -1] + 182s + my.z %*% t(out$scale) 182s > all.equal(proposal.within, my.proposal.within) 182s [1] TRUE 182s > 182s > ### check scale list 182s > 182s > lisztscale <- list(0.56789, newscale, matscale, matscale, newscale, 182s + 0.98765, 0.98765, newscale) 182s > 182s > out <- temper(out, scale = lisztscale, log.pseudo.prior = qux) 182s > 182s > my.coproposal.within <- out$state[out$which, ] 182s > proposal.within <- out$proposal[out$which, ] 182s > my.z <- out$norm[out$which, ] 182s > my.proposal.within <- my.coproposal.within 182s > for (iiter in 1:nrow(my.z)) { 182s + my.i <- my.coproposal.within[iiter, 1] 182s + my.scale <- out$scale[[my.i]] 182s + if (is.matrix(my.scale)) { 182s + my.proposal.within[iiter, -1] <- my.coproposal.within[iiter, -1] + 182s + my.z[iiter, , drop = FALSE] %*% t(my.scale) 182s + } else { 182s + my.proposal.within[iiter, -1] <- my.coproposal.within[iiter, -1] + 182s + my.z[iiter, ] * my.scale 182s + } 182s + } 182s > all.equal(proposal.within, my.proposal.within) 182s [1] TRUE 182s > 182s > ### check outfun 182s > 182s > outfun <- function(state, icomp) { 182s + stopifnot(is.matrix(state)) 182s + stopifnot(is.numeric(state)) 182s + nx <- ncol(initial) 182s + ncomp <- nrow(initial) 182s + stopifnot(ncol(state) == nx) 182s + stopifnot(nrow(state) == ncomp) 182s + stopifnot(1 <= icomp & icomp <= ncomp) 182s + foo <- state[icomp, ] 182s + bar <- foo^2 182s + return(c(foo, bar)) 182s + } 182s > 182s > ncomp <- nrow(models) 182s > nx <- length(beta.initial) - 1 182s > 182s > outfun <- function(state, icomp, ...) { 182s + stopifnot(is.numeric(state)) 182s + stopifnot(length(state) == nx + 1) 182s + istate <- state[1] 182s + stopifnot(istate == as.integer(istate)) 182s + stopifnot(1 <= istate && istate <= ncomp) 182s + stopifnot(1 <= icomp && icomp <= ncomp) 182s + if (istate == icomp) { 182s + foo <- state[-1] 182s + } else { 182s + foo <- rep(0, nx) 182s + } 182s + bar <- foo^2 182s + return(c(foo, bar)) 182s + } 182s > 182s > out <- temper(ludfun, initial = out$final, neighbors = neighbors, 182s + nbatch = 25, blen = 20, nspac = 5, scale = 0.56789, debug = TRUE, 182s + outfun = outfun, log.pseudo.prior = qux, icomp = 4) 182s > 182s > before <- out$state 182s > after <- before 182s > after[- dim(after)[1], ] <- before[-1, ] 182s > after[dim(after)[1], ] <- out$final 182s > outies <- apply(after, 1, outfun, icomp = 4) 182s > outies <- t(outies) 182s > 182s > foo <- outies[seq(1, niter) %% out$nspac == 0, ] 182s > foo <- array(as.vector(foo), dim = c(out$blen, out$nbatch, dim(foo)[2])) 182s > foo <- apply(foo, c(2, 3), mean) 182s > all.equal(foo, out$batch) 182s [1] TRUE 182s > 182s > 183s BEGIN TEST tests/zero-error.R 183s 183s R version 4.4.3 (2025-02-28) -- "Trophy Case" 183s Copyright (C) 2025 The R Foundation for Statistical Computing 183s Platform: x86_64-pc-linux-gnu 183s 183s R is free software and comes with ABSOLUTELY NO WARRANTY. 183s You are welcome to redistribute it under certain conditions. 183s Type 'license()' or 'licence()' for distribution details. 183s 183s R is a collaborative project with many contributors. 183s Type 'contributors()' for more information and 183s 'citation()' on how to cite R or R packages in publications. 183s 183s Type 'demo()' for some demos, 'help()' for on-line help, or 183s 'help.start()' for an HTML browser interface to help. 183s Type 'q()' to quit R. 183s 183s > 183s > library(mcmc) 183s > 183s > # should give intelligible error (unlike before ver 0.9-8) 183s > 183s > suppressMessages(try(metrop(function(x) x, double(0), nbatch = 10))) 183s Error in system.time(out <- .Call(C_metrop, func1, initial, nbatch, blen, : 183s argument "initial" must have nonzero length 183s > 183s autopkgtest [22:19:36]: test generic: -----------------------] 183s autopkgtest [22:19:36]: test generic: - - - - - - - - - - results - - - - - - - - - - 183s generic PASS 183s autopkgtest [22:19:36]: test pkg-r-autopkgtest: preparing testbed 184s Reading package lists... 184s Building dependency tree... 184s Reading state information... 184s Starting pkgProblemResolver with broken count: 0 184s Starting 2 pkgProblemResolver with broken count: 0 184s Done 185s The following NEW packages will be installed: 185s build-essential cpp cpp-14 cpp-14-x86-64-linux-gnu cpp-x86-64-linux-gnu 185s dctrl-tools g++ g++-14 g++-14-x86-64-linux-gnu g++-x86-64-linux-gnu gcc 185s gcc-14 gcc-14-x86-64-linux-gnu gcc-x86-64-linux-gnu gfortran gfortran-14 185s gfortran-14-x86-64-linux-gnu gfortran-x86-64-linux-gnu icu-devtools libasan8 185s libblas-dev libbz2-dev libcc1-0 libdeflate-dev libgcc-14-dev 185s libgfortran-14-dev libhwasan0 libicu-dev libisl23 libitm1 libjpeg-dev 185s libjpeg-turbo8-dev libjpeg8-dev liblapack-dev liblsan0 liblzma-dev libmpc3 185s libncurses-dev libpcre2-16-0 libpcre2-32-0 libpcre2-dev libpcre2-posix3 185s libpkgconf3 libpng-dev libquadmath0 libreadline-dev libstdc++-14-dev 185s libtirpc-dev libtsan2 libubsan1 pkg-r-autopkgtest pkgconf pkgconf-bin 185s r-base-dev zlib1g-dev 185s 0 upgraded, 55 newly installed, 0 to remove and 0 not upgraded. 185s Need to get 103 MB of archives. 185s After this operation, 363 MB of additional disk space will be used. 185s Get:1 http://ftpmaster.internal/ubuntu plucky/main amd64 libisl23 amd64 0.27-1 [685 kB] 185s Get:2 http://ftpmaster.internal/ubuntu plucky/main amd64 libmpc3 amd64 1.3.1-1build2 [55.3 kB] 185s Get:3 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp-14-x86-64-linux-gnu amd64 14.2.0-17ubuntu3 [11.9 MB] 185s Get:4 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp-14 amd64 14.2.0-17ubuntu3 [1030 B] 185s Get:5 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [5586 B] 185s Get:6 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp amd64 4:14.2.0-1ubuntu1 [22.4 kB] 185s Get:7 http://ftpmaster.internal/ubuntu plucky/main amd64 libcc1-0 amd64 15-20250222-0ubuntu1 [47.0 kB] 185s Get:8 http://ftpmaster.internal/ubuntu plucky/main amd64 libitm1 amd64 15-20250222-0ubuntu1 [28.6 kB] 185s Get:9 http://ftpmaster.internal/ubuntu plucky/main amd64 libasan8 amd64 15-20250222-0ubuntu1 [3055 kB] 185s Get:10 http://ftpmaster.internal/ubuntu plucky/main amd64 liblsan0 amd64 15-20250222-0ubuntu1 [1355 kB] 185s Get:11 http://ftpmaster.internal/ubuntu plucky/main amd64 libtsan2 amd64 15-20250222-0ubuntu1 [2756 kB] 185s Get:12 http://ftpmaster.internal/ubuntu plucky/main amd64 libubsan1 amd64 15-20250222-0ubuntu1 [1205 kB] 185s Get:13 http://ftpmaster.internal/ubuntu plucky/main amd64 libhwasan0 amd64 15-20250222-0ubuntu1 [1677 kB] 185s Get:14 http://ftpmaster.internal/ubuntu plucky/main amd64 libquadmath0 amd64 15-20250222-0ubuntu1 [152 kB] 185s Get:15 http://ftpmaster.internal/ubuntu plucky/main amd64 libgcc-14-dev amd64 14.2.0-17ubuntu3 [2816 kB] 185s Get:16 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc-14-x86-64-linux-gnu amd64 14.2.0-17ubuntu3 [23.3 MB] 185s Get:17 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc-14 amd64 14.2.0-17ubuntu3 [536 kB] 185s Get:18 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [1208 B] 185s Get:19 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc amd64 4:14.2.0-1ubuntu1 [5004 B] 185s Get:20 http://ftpmaster.internal/ubuntu plucky/main amd64 libstdc++-14-dev amd64 14.2.0-17ubuntu3 [2486 kB] 185s Get:21 http://ftpmaster.internal/ubuntu plucky/main amd64 g++-14-x86-64-linux-gnu amd64 14.2.0-17ubuntu3 [13.4 MB] 185s Get:22 http://ftpmaster.internal/ubuntu plucky/main amd64 g++-14 amd64 14.2.0-17ubuntu3 [21.8 kB] 185s Get:23 http://ftpmaster.internal/ubuntu plucky/main amd64 g++-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [968 B] 185s Get:24 http://ftpmaster.internal/ubuntu plucky/main amd64 g++ amd64 4:14.2.0-1ubuntu1 [1100 B] 185s Get:25 http://ftpmaster.internal/ubuntu plucky/main amd64 build-essential amd64 12.10ubuntu1 [4928 B] 185s Get:26 http://ftpmaster.internal/ubuntu plucky/main amd64 dctrl-tools amd64 2.24-3build3 [106 kB] 185s Get:27 http://ftpmaster.internal/ubuntu plucky/main amd64 libgfortran-14-dev amd64 14.2.0-17ubuntu3 [966 kB] 185s Get:28 http://ftpmaster.internal/ubuntu plucky/main amd64 gfortran-14-x86-64-linux-gnu amd64 14.2.0-17ubuntu3 [12.6 MB] 185s Get:29 http://ftpmaster.internal/ubuntu plucky/main amd64 gfortran-14 amd64 14.2.0-17ubuntu3 [13.6 kB] 185s Get:30 http://ftpmaster.internal/ubuntu plucky/main amd64 gfortran-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [1022 B] 185s Get:31 http://ftpmaster.internal/ubuntu plucky/main amd64 gfortran amd64 4:14.2.0-1ubuntu1 [1174 B] 185s Get:32 http://ftpmaster.internal/ubuntu plucky/main amd64 icu-devtools amd64 76.1-1ubuntu2 [237 kB] 185s Get:33 http://ftpmaster.internal/ubuntu plucky/main amd64 libblas-dev amd64 3.12.1-2 [338 kB] 185s Get:34 http://ftpmaster.internal/ubuntu plucky/main amd64 libbz2-dev amd64 1.0.8-6 [33.8 kB] 185s Get:35 http://ftpmaster.internal/ubuntu plucky/main amd64 libdeflate-dev amd64 1.23-1 [71.7 kB] 185s Get:36 http://ftpmaster.internal/ubuntu plucky/main amd64 libicu-dev amd64 76.1-1ubuntu2 [12.6 MB] 186s Get:37 http://ftpmaster.internal/ubuntu plucky/main amd64 libjpeg-turbo8-dev amd64 2.1.5-3ubuntu2 [324 kB] 186s Get:38 http://ftpmaster.internal/ubuntu plucky/main amd64 libjpeg8-dev amd64 8c-2ubuntu11 [1484 B] 186s Get:39 http://ftpmaster.internal/ubuntu plucky/main amd64 libjpeg-dev amd64 8c-2ubuntu11 [1482 B] 186s Get:40 http://ftpmaster.internal/ubuntu plucky/main amd64 liblapack-dev amd64 3.12.1-2 [6489 kB] 186s Get:41 http://ftpmaster.internal/ubuntu plucky/main amd64 libncurses-dev amd64 6.5+20250216-2 [424 kB] 186s Get:42 http://ftpmaster.internal/ubuntu plucky/main amd64 libpcre2-16-0 amd64 10.45-1 [268 kB] 186s Get:43 http://ftpmaster.internal/ubuntu plucky/main amd64 libpcre2-32-0 amd64 10.45-1 [251 kB] 186s Get:44 http://ftpmaster.internal/ubuntu plucky/main amd64 libpcre2-posix3 amd64 10.45-1 [7204 B] 186s Get:45 http://ftpmaster.internal/ubuntu plucky/main amd64 libpcre2-dev amd64 10.45-1 [908 kB] 186s Get:46 http://ftpmaster.internal/ubuntu plucky/main amd64 libpkgconf3 amd64 1.8.1-4 [32.3 kB] 186s Get:47 http://ftpmaster.internal/ubuntu plucky/main amd64 zlib1g-dev amd64 1:1.3.dfsg+really1.3.1-1ubuntu1 [895 kB] 186s Get:48 http://ftpmaster.internal/ubuntu plucky/main amd64 libpng-dev amd64 1.6.47-1 [298 kB] 186s Get:49 http://ftpmaster.internal/ubuntu plucky/main amd64 libreadline-dev amd64 8.2-6 [184 kB] 186s Get:50 http://ftpmaster.internal/ubuntu plucky/main amd64 liblzma-dev amd64 5.6.4-1 [189 kB] 186s Get:51 http://ftpmaster.internal/ubuntu plucky/main amd64 pkgconf-bin amd64 1.8.1-4 [21.6 kB] 186s Get:52 http://ftpmaster.internal/ubuntu plucky/main amd64 pkgconf amd64 1.8.1-4 [16.8 kB] 186s Get:53 http://ftpmaster.internal/ubuntu plucky/main amd64 libtirpc-dev amd64 1.3.4+ds-1.3 [193 kB] 186s Get:54 http://ftpmaster.internal/ubuntu plucky/universe amd64 r-base-dev all 4.4.3-1 [4176 B] 186s Get:55 http://ftpmaster.internal/ubuntu plucky/universe amd64 pkg-r-autopkgtest all 20231212ubuntu1 [6448 B] 186s Fetched 103 MB in 1s (103 MB/s) 186s Selecting previously unselected package libisl23:amd64. 186s (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 ... 79327 files and directories currently installed.) 186s Preparing to unpack .../00-libisl23_0.27-1_amd64.deb ... 186s Unpacking libisl23:amd64 (0.27-1) ... 186s Selecting previously unselected package libmpc3:amd64. 186s Preparing to unpack .../01-libmpc3_1.3.1-1build2_amd64.deb ... 186s Unpacking libmpc3:amd64 (1.3.1-1build2) ... 186s Selecting previously unselected package cpp-14-x86-64-linux-gnu. 186s Preparing to unpack .../02-cpp-14-x86-64-linux-gnu_14.2.0-17ubuntu3_amd64.deb ... 186s Unpacking cpp-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 186s Selecting previously unselected package cpp-14. 186s Preparing to unpack .../03-cpp-14_14.2.0-17ubuntu3_amd64.deb ... 186s Unpacking cpp-14 (14.2.0-17ubuntu3) ... 186s Selecting previously unselected package cpp-x86-64-linux-gnu. 186s Preparing to unpack .../04-cpp-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 186s Unpacking cpp-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 186s Selecting previously unselected package cpp. 186s Preparing to unpack .../05-cpp_4%3a14.2.0-1ubuntu1_amd64.deb ... 186s Unpacking cpp (4:14.2.0-1ubuntu1) ... 186s Selecting previously unselected package libcc1-0:amd64. 186s Preparing to unpack .../06-libcc1-0_15-20250222-0ubuntu1_amd64.deb ... 186s Unpacking libcc1-0:amd64 (15-20250222-0ubuntu1) ... 186s Selecting previously unselected package libitm1:amd64. 186s Preparing to unpack .../07-libitm1_15-20250222-0ubuntu1_amd64.deb ... 186s Unpacking libitm1:amd64 (15-20250222-0ubuntu1) ... 186s Selecting previously unselected package libasan8:amd64. 186s Preparing to unpack .../08-libasan8_15-20250222-0ubuntu1_amd64.deb ... 186s Unpacking libasan8:amd64 (15-20250222-0ubuntu1) ... 187s Selecting previously unselected package liblsan0:amd64. 187s Preparing to unpack .../09-liblsan0_15-20250222-0ubuntu1_amd64.deb ... 187s Unpacking liblsan0:amd64 (15-20250222-0ubuntu1) ... 187s Selecting previously unselected package libtsan2:amd64. 187s Preparing to unpack .../10-libtsan2_15-20250222-0ubuntu1_amd64.deb ... 187s Unpacking libtsan2:amd64 (15-20250222-0ubuntu1) ... 187s Selecting previously unselected package libubsan1:amd64. 187s Preparing to unpack .../11-libubsan1_15-20250222-0ubuntu1_amd64.deb ... 187s Unpacking libubsan1:amd64 (15-20250222-0ubuntu1) ... 187s Selecting previously unselected package libhwasan0:amd64. 187s Preparing to unpack .../12-libhwasan0_15-20250222-0ubuntu1_amd64.deb ... 187s Unpacking libhwasan0:amd64 (15-20250222-0ubuntu1) ... 187s Selecting previously unselected package libquadmath0:amd64. 187s Preparing to unpack .../13-libquadmath0_15-20250222-0ubuntu1_amd64.deb ... 187s Unpacking libquadmath0:amd64 (15-20250222-0ubuntu1) ... 187s Selecting previously unselected package libgcc-14-dev:amd64. 187s Preparing to unpack .../14-libgcc-14-dev_14.2.0-17ubuntu3_amd64.deb ... 187s Unpacking libgcc-14-dev:amd64 (14.2.0-17ubuntu3) ... 187s Selecting previously unselected package gcc-14-x86-64-linux-gnu. 187s Preparing to unpack .../15-gcc-14-x86-64-linux-gnu_14.2.0-17ubuntu3_amd64.deb ... 187s Unpacking gcc-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 187s Selecting previously unselected package gcc-14. 187s Preparing to unpack .../16-gcc-14_14.2.0-17ubuntu3_amd64.deb ... 187s Unpacking gcc-14 (14.2.0-17ubuntu3) ... 187s Selecting previously unselected package gcc-x86-64-linux-gnu. 187s Preparing to unpack .../17-gcc-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 187s Unpacking gcc-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 187s Selecting previously unselected package gcc. 187s Preparing to unpack .../18-gcc_4%3a14.2.0-1ubuntu1_amd64.deb ... 187s Unpacking gcc (4:14.2.0-1ubuntu1) ... 187s Selecting previously unselected package libstdc++-14-dev:amd64. 187s Preparing to unpack .../19-libstdc++-14-dev_14.2.0-17ubuntu3_amd64.deb ... 187s Unpacking libstdc++-14-dev:amd64 (14.2.0-17ubuntu3) ... 188s Selecting previously unselected package g++-14-x86-64-linux-gnu. 188s Preparing to unpack .../20-g++-14-x86-64-linux-gnu_14.2.0-17ubuntu3_amd64.deb ... 188s Unpacking g++-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 188s Selecting previously unselected package g++-14. 188s Preparing to unpack .../21-g++-14_14.2.0-17ubuntu3_amd64.deb ... 188s Unpacking g++-14 (14.2.0-17ubuntu3) ... 188s Selecting previously unselected package g++-x86-64-linux-gnu. 188s Preparing to unpack .../22-g++-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 188s Unpacking g++-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 188s Selecting previously unselected package g++. 188s Preparing to unpack .../23-g++_4%3a14.2.0-1ubuntu1_amd64.deb ... 188s Unpacking g++ (4:14.2.0-1ubuntu1) ... 188s Selecting previously unselected package build-essential. 188s Preparing to unpack .../24-build-essential_12.10ubuntu1_amd64.deb ... 188s Unpacking build-essential (12.10ubuntu1) ... 188s Selecting previously unselected package dctrl-tools. 188s Preparing to unpack .../25-dctrl-tools_2.24-3build3_amd64.deb ... 188s Unpacking dctrl-tools (2.24-3build3) ... 188s Selecting previously unselected package libgfortran-14-dev:amd64. 188s Preparing to unpack .../26-libgfortran-14-dev_14.2.0-17ubuntu3_amd64.deb ... 188s Unpacking libgfortran-14-dev:amd64 (14.2.0-17ubuntu3) ... 188s Selecting previously unselected package gfortran-14-x86-64-linux-gnu. 188s Preparing to unpack .../27-gfortran-14-x86-64-linux-gnu_14.2.0-17ubuntu3_amd64.deb ... 188s Unpacking gfortran-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 188s Selecting previously unselected package gfortran-14. 188s Preparing to unpack .../28-gfortran-14_14.2.0-17ubuntu3_amd64.deb ... 188s Unpacking gfortran-14 (14.2.0-17ubuntu3) ... 188s Selecting previously unselected package gfortran-x86-64-linux-gnu. 188s Preparing to unpack .../29-gfortran-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 188s Unpacking gfortran-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 188s Selecting previously unselected package gfortran. 188s Preparing to unpack .../30-gfortran_4%3a14.2.0-1ubuntu1_amd64.deb ... 188s Unpacking gfortran (4:14.2.0-1ubuntu1) ... 188s Selecting previously unselected package icu-devtools. 188s Preparing to unpack .../31-icu-devtools_76.1-1ubuntu2_amd64.deb ... 188s Unpacking icu-devtools (76.1-1ubuntu2) ... 188s Selecting previously unselected package libblas-dev:amd64. 188s Preparing to unpack .../32-libblas-dev_3.12.1-2_amd64.deb ... 188s Unpacking libblas-dev:amd64 (3.12.1-2) ... 188s Selecting previously unselected package libbz2-dev:amd64. 188s Preparing to unpack .../33-libbz2-dev_1.0.8-6_amd64.deb ... 188s Unpacking libbz2-dev:amd64 (1.0.8-6) ... 188s Selecting previously unselected package libdeflate-dev:amd64. 188s Preparing to unpack .../34-libdeflate-dev_1.23-1_amd64.deb ... 188s Unpacking libdeflate-dev:amd64 (1.23-1) ... 189s Selecting previously unselected package libicu-dev:amd64. 189s Preparing to unpack .../35-libicu-dev_76.1-1ubuntu2_amd64.deb ... 189s Unpacking libicu-dev:amd64 (76.1-1ubuntu2) ... 189s Selecting previously unselected package libjpeg-turbo8-dev:amd64. 189s Preparing to unpack .../36-libjpeg-turbo8-dev_2.1.5-3ubuntu2_amd64.deb ... 189s Unpacking libjpeg-turbo8-dev:amd64 (2.1.5-3ubuntu2) ... 189s Selecting previously unselected package libjpeg8-dev:amd64. 189s Preparing to unpack .../37-libjpeg8-dev_8c-2ubuntu11_amd64.deb ... 189s Unpacking libjpeg8-dev:amd64 (8c-2ubuntu11) ... 189s Selecting previously unselected package libjpeg-dev:amd64. 189s Preparing to unpack .../38-libjpeg-dev_8c-2ubuntu11_amd64.deb ... 189s Unpacking libjpeg-dev:amd64 (8c-2ubuntu11) ... 189s Selecting previously unselected package liblapack-dev:amd64. 189s Preparing to unpack .../39-liblapack-dev_3.12.1-2_amd64.deb ... 189s Unpacking liblapack-dev:amd64 (3.12.1-2) ... 189s Selecting previously unselected package libncurses-dev:amd64. 189s Preparing to unpack .../40-libncurses-dev_6.5+20250216-2_amd64.deb ... 189s Unpacking libncurses-dev:amd64 (6.5+20250216-2) ... 189s Selecting previously unselected package libpcre2-16-0:amd64. 189s Preparing to unpack .../41-libpcre2-16-0_10.45-1_amd64.deb ... 189s Unpacking libpcre2-16-0:amd64 (10.45-1) ... 189s Selecting previously unselected package libpcre2-32-0:amd64. 189s Preparing to unpack .../42-libpcre2-32-0_10.45-1_amd64.deb ... 189s Unpacking libpcre2-32-0:amd64 (10.45-1) ... 189s Selecting previously unselected package libpcre2-posix3:amd64. 189s Preparing to unpack .../43-libpcre2-posix3_10.45-1_amd64.deb ... 189s Unpacking libpcre2-posix3:amd64 (10.45-1) ... 189s Selecting previously unselected package libpcre2-dev:amd64. 189s Preparing to unpack .../44-libpcre2-dev_10.45-1_amd64.deb ... 189s Unpacking libpcre2-dev:amd64 (10.45-1) ... 189s Selecting previously unselected package libpkgconf3:amd64. 189s Preparing to unpack .../45-libpkgconf3_1.8.1-4_amd64.deb ... 189s Unpacking libpkgconf3:amd64 (1.8.1-4) ... 189s Selecting previously unselected package zlib1g-dev:amd64. 189s Preparing to unpack .../46-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_amd64.deb ... 189s Unpacking zlib1g-dev:amd64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 189s Selecting previously unselected package libpng-dev:amd64. 189s Preparing to unpack .../47-libpng-dev_1.6.47-1_amd64.deb ... 189s Unpacking libpng-dev:amd64 (1.6.47-1) ... 189s Selecting previously unselected package libreadline-dev:amd64. 189s Preparing to unpack .../48-libreadline-dev_8.2-6_amd64.deb ... 189s Unpacking libreadline-dev:amd64 (8.2-6) ... 189s Selecting previously unselected package liblzma-dev:amd64. 189s Preparing to unpack .../49-liblzma-dev_5.6.4-1_amd64.deb ... 189s Unpacking liblzma-dev:amd64 (5.6.4-1) ... 189s Selecting previously unselected package pkgconf-bin. 189s Preparing to unpack .../50-pkgconf-bin_1.8.1-4_amd64.deb ... 189s Unpacking pkgconf-bin (1.8.1-4) ... 189s Selecting previously unselected package pkgconf:amd64. 189s Preparing to unpack .../51-pkgconf_1.8.1-4_amd64.deb ... 189s Unpacking pkgconf:amd64 (1.8.1-4) ... 190s Selecting previously unselected package libtirpc-dev:amd64. 190s Preparing to unpack .../52-libtirpc-dev_1.3.4+ds-1.3_amd64.deb ... 190s Unpacking libtirpc-dev:amd64 (1.3.4+ds-1.3) ... 190s Selecting previously unselected package r-base-dev. 190s Preparing to unpack .../53-r-base-dev_4.4.3-1_all.deb ... 190s Unpacking r-base-dev (4.4.3-1) ... 190s Selecting previously unselected package pkg-r-autopkgtest. 190s Preparing to unpack .../54-pkg-r-autopkgtest_20231212ubuntu1_all.deb ... 190s Unpacking pkg-r-autopkgtest (20231212ubuntu1) ... 190s Setting up libjpeg-turbo8-dev:amd64 (2.1.5-3ubuntu2) ... 190s Setting up libncurses-dev:amd64 (6.5+20250216-2) ... 190s Setting up libreadline-dev:amd64 (8.2-6) ... 190s Setting up libpcre2-16-0:amd64 (10.45-1) ... 190s Setting up libpcre2-32-0:amd64 (10.45-1) ... 190s Setting up libtirpc-dev:amd64 (1.3.4+ds-1.3) ... 190s Setting up libpkgconf3:amd64 (1.8.1-4) ... 190s Setting up libquadmath0:amd64 (15-20250222-0ubuntu1) ... 190s Setting up libmpc3:amd64 (1.3.1-1build2) ... 190s Setting up icu-devtools (76.1-1ubuntu2) ... 190s Setting up pkgconf-bin (1.8.1-4) ... 190s Setting up liblzma-dev:amd64 (5.6.4-1) ... 190s Setting up libubsan1:amd64 (15-20250222-0ubuntu1) ... 190s Setting up zlib1g-dev:amd64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 190s Setting up libpcre2-posix3:amd64 (10.45-1) ... 190s Setting up libhwasan0:amd64 (15-20250222-0ubuntu1) ... 190s Setting up libasan8:amd64 (15-20250222-0ubuntu1) ... 190s Setting up libtsan2:amd64 (15-20250222-0ubuntu1) ... 190s Setting up libjpeg8-dev:amd64 (8c-2ubuntu11) ... 190s Setting up libisl23:amd64 (0.27-1) ... 190s Setting up libdeflate-dev:amd64 (1.23-1) ... 190s Setting up libicu-dev:amd64 (76.1-1ubuntu2) ... 190s Setting up libcc1-0:amd64 (15-20250222-0ubuntu1) ... 190s Setting up liblsan0:amd64 (15-20250222-0ubuntu1) ... 190s Setting up libblas-dev:amd64 (3.12.1-2) ... 190s update-alternatives: using /usr/lib/x86_64-linux-gnu/blas/libblas.so to provide /usr/lib/x86_64-linux-gnu/libblas.so (libblas.so-x86_64-linux-gnu) in auto mode 190s Setting up dctrl-tools (2.24-3build3) ... 190s Setting up libitm1:amd64 (15-20250222-0ubuntu1) ... 190s Setting up libbz2-dev:amd64 (1.0.8-6) ... 190s Setting up libpcre2-dev:amd64 (10.45-1) ... 190s Setting up libpng-dev:amd64 (1.6.47-1) ... 190s Setting up libjpeg-dev:amd64 (8c-2ubuntu11) ... 190s Setting up pkgconf:amd64 (1.8.1-4) ... 190s Setting up liblapack-dev:amd64 (3.12.1-2) ... 190s update-alternatives: using /usr/lib/x86_64-linux-gnu/lapack/liblapack.so to provide /usr/lib/x86_64-linux-gnu/liblapack.so (liblapack.so-x86_64-linux-gnu) in auto mode 190s Setting up cpp-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 190s Setting up cpp-14 (14.2.0-17ubuntu3) ... 190s Setting up libgcc-14-dev:amd64 (14.2.0-17ubuntu3) ... 190s Setting up libstdc++-14-dev:amd64 (14.2.0-17ubuntu3) ... 190s Setting up cpp-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 190s Setting up libgfortran-14-dev:amd64 (14.2.0-17ubuntu3) ... 190s Setting up cpp (4:14.2.0-1ubuntu1) ... 190s Setting up gcc-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 190s Setting up gcc-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 190s Setting up gcc-14 (14.2.0-17ubuntu3) ... 190s Setting up gfortran-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 190s Setting up g++-14-x86-64-linux-gnu (14.2.0-17ubuntu3) ... 190s Setting up g++-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 190s Setting up g++-14 (14.2.0-17ubuntu3) ... 190s Setting up gfortran-14 (14.2.0-17ubuntu3) ... 190s Setting up gfortran-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 190s Setting up gcc (4:14.2.0-1ubuntu1) ... 190s Setting up g++ (4:14.2.0-1ubuntu1) ... 190s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 190s Setting up build-essential (12.10ubuntu1) ... 190s Setting up gfortran (4:14.2.0-1ubuntu1) ... 190s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 190s 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 190s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 190s 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 190s Setting up r-base-dev (4.4.3-1) ... 190s Setting up pkg-r-autopkgtest (20231212ubuntu1) ... 190s Processing triggers for libc-bin (2.41-1ubuntu2) ... 190s Processing triggers for man-db (2.13.0-1) ... 191s Processing triggers for install-info (7.1.1-1) ... 191s autopkgtest [22:19:44]: test pkg-r-autopkgtest: /usr/share/dh-r/pkg-r-autopkgtest 191s autopkgtest [22:19:44]: test pkg-r-autopkgtest: [----------------------- 191s Test: Try to load the R library mcmc 192s 192s R version 4.4.3 (2025-02-28) -- "Trophy Case" 192s Copyright (C) 2025 The R Foundation for Statistical Computing 192s Platform: x86_64-pc-linux-gnu 192s 192s R is free software and comes with ABSOLUTELY NO WARRANTY. 192s You are welcome to redistribute it under certain conditions. 192s Type 'license()' or 'licence()' for distribution details. 192s 192s R is a collaborative project with many contributors. 192s Type 'contributors()' for more information and 192s 'citation()' on how to cite R or R packages in publications. 192s 192s Type 'demo()' for some demos, 'help()' for on-line help, or 192s 'help.start()' for an HTML browser interface to help. 192s Type 'q()' to quit R. 192s 192s > library('mcmc') 192s > 192s > 192s Other tests are currently unsupported! 192s They will be progressively added. 192s autopkgtest [22:19:45]: test pkg-r-autopkgtest: -----------------------] 192s pkg-r-autopkgtest PASS 192s autopkgtest [22:19:45]: test pkg-r-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 192s autopkgtest [22:19:45]: @@@@@@@@@@@@@@@@@@@@ summary 192s generic PASS 192s pkg-r-autopkgtest PASS 213s nova [W] Skipping flock for amd64 213s Creating nova instance adt-plucky-amd64-r-cran-mcmc-20250315-221633-juju-7f2275-prod-proposed-migration-environment-2-f6d11774-69f8-47ab-8047-6c4239d5925a from image adt/ubuntu-plucky-amd64-server-20250306.img (UUID 60d877d7-b74c-4f24-920d-f4570db0a338)... 213s nova [W] Timed out waiting for cdb55148-dcd1-484d-87ef-9f269f0381c2 to get deleted.