0s autopkgtest [11:22:30]: starting date and time: 2025-03-15 11:22:30+0000 0s autopkgtest [11:22:30]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [11:22:30]: host juju-7f2275-prod-proposed-migration-environment-15; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.ebqmry0s/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-ordinal --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-15@bos03-arm64-17.secgroup --name adt-plucky-arm64-r-cran-ordinal-20250315-112229-juju-7f2275-prod-proposed-migration-environment-15-8b0fe3b7-0b65-4701-9902-d67b0f92d31a --image adt/ubuntu-plucky-arm64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-15 --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/ 183s autopkgtest [11:25:33]: testbed dpkg architecture: arm64 183s autopkgtest [11:25:33]: testbed apt version: 2.9.33 184s autopkgtest [11:25:34]: @@@@@@@@@@@@@@@@@@@@ test bed setup 184s autopkgtest [11:25:34]: testbed release detected to be: None 185s autopkgtest [11:25:35]: updating testbed package index (apt update) 185s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [126 kB] 185s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 186s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 186s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 186s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [46.2 kB] 186s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [410 kB] 186s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.8 kB] 186s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 Packages [78.2 kB] 186s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 c-n-f Metadata [1888 B] 186s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted arm64 c-n-f Metadata [116 B] 186s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 Packages [353 kB] 187s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 c-n-f Metadata [15.7 kB] 187s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse arm64 Packages [4948 B] 187s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse arm64 c-n-f Metadata [572 B] 187s Fetched 1052 kB in 2s (587 kB/s) 188s Reading package lists... 188s + lsb_release --codename --short 188s + RELEASE=plucky 188s + cat 188s + [ plucky != trusty ] 188s + DEBIAN_FRONTEND=noninteractive eatmydata apt-get -y --allow-downgrades -o Dpkg::Options::=--force-confnew dist-upgrade 188s Reading package lists... 189s Building dependency tree... 189s Reading state information... 189s Calculating upgrade... 189s Calculating upgrade... 190s The following packages will be upgraded: 190s python3-jinja2 strace 190s 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 190s Need to get 608 kB of archives. 190s After this operation, 11.3 kB of additional disk space will be used. 190s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 strace arm64 6.13+ds-1ubuntu1 [499 kB] 191s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-jinja2 all 3.1.5-2ubuntu1 [109 kB] 192s Fetched 608 kB in 1s (512 kB/s) 192s (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 ... 117701 files and directories currently installed.) 192s Preparing to unpack .../strace_6.13+ds-1ubuntu1_arm64.deb ... 192s Unpacking strace (6.13+ds-1ubuntu1) over (6.11-0ubuntu1) ... 192s Preparing to unpack .../python3-jinja2_3.1.5-2ubuntu1_all.deb ... 192s Unpacking python3-jinja2 (3.1.5-2ubuntu1) over (3.1.5-2) ... 192s Setting up python3-jinja2 (3.1.5-2ubuntu1) ... 193s Setting up strace (6.13+ds-1ubuntu1) ... 193s Processing triggers for man-db (2.13.0-1) ... 194s + rm /etc/apt/preferences.d/force-downgrade-to-release.pref 194s + /usr/lib/apt/apt-helper analyze-pattern ?true 194s + uname -r 194s + sed s/\./\\./g 194s + running_kernel_pattern=^linux-.*6\.14\.0-10-generic.* 194s + apt list ?obsolete 194s + tail -n+2 194s + cut -d/ -f1 194s + grep -v ^linux-.*6\.14\.0-10-generic.* 194s + obsolete_pkgs=linux-headers-6.11.0-8-generic 194s linux-headers-6.11.0-8 194s linux-image-6.11.0-8-generic 194s linux-modules-6.11.0-8-generic 194s linux-tools-6.11.0-8-generic 194s linux-tools-6.11.0-8 194s + DEBIAN_FRONTEND=noninteractive eatmydata apt-get -y purge --autoremove linux-headers-6.11.0-8-generic linux-headers-6.11.0-8 linux-image-6.11.0-8-generic linux-modules-6.11.0-8-generic linux-tools-6.11.0-8-generic linux-tools-6.11.0-8 194s Reading package lists... 194s Building dependency tree... 194s Reading state information... 195s Solving dependencies... 195s The following packages will be REMOVED: 195s libnsl2* libpython3.12-minimal* libpython3.12-stdlib* libpython3.12t64* 195s libunwind8* linux-headers-6.11.0-8* linux-headers-6.11.0-8-generic* 195s linux-image-6.11.0-8-generic* linux-modules-6.11.0-8-generic* 195s linux-tools-6.11.0-8* linux-tools-6.11.0-8-generic* 195s 0 upgraded, 0 newly installed, 11 to remove and 5 not upgraded. 195s After this operation, 267 MB disk space will be freed. 195s (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 ... 117701 files and directories currently installed.) 195s Removing linux-tools-6.11.0-8-generic (6.11.0-8.8) ... 195s Removing linux-tools-6.11.0-8 (6.11.0-8.8) ... 195s Removing libpython3.12t64:arm64 (3.12.9-1) ... 195s Removing libpython3.12-stdlib:arm64 (3.12.9-1) ... 196s Removing libnsl2:arm64 (1.3.0-3build3) ... 196s Removing libpython3.12-minimal:arm64 (3.12.9-1) ... 196s Removing libunwind8:arm64 (1.6.2-3.1) ... 196s Removing linux-headers-6.11.0-8-generic (6.11.0-8.8) ... 196s Removing linux-headers-6.11.0-8 (6.11.0-8.8) ... 198s Removing linux-image-6.11.0-8-generic (6.11.0-8.8) ... 198s I: /boot/vmlinuz.old is now a symlink to vmlinuz-6.14.0-10-generic 198s I: /boot/initrd.img.old is now a symlink to initrd.img-6.14.0-10-generic 198s /etc/kernel/postrm.d/initramfs-tools: 198s update-initramfs: Deleting /boot/initrd.img-6.11.0-8-generic 198s /etc/kernel/postrm.d/zz-flash-kernel: 198s flash-kernel: Kernel 6.11.0-8-generic has been removed. 198s flash-kernel: A higher version (6.14.0-10-generic) is still installed, no reflashing required. 198s /etc/kernel/postrm.d/zz-update-grub: 198s Sourcing file `/etc/default/grub' 198s Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg' 198s Generating grub configuration file ... 199s Found linux image: /boot/vmlinuz-6.14.0-10-generic 199s Found initrd image: /boot/initrd.img-6.14.0-10-generic 199s Warning: os-prober will not be executed to detect other bootable partitions. 199s Systems on them will not be added to the GRUB boot configuration. 199s Check GRUB_DISABLE_OS_PROBER documentation entry. 199s Adding boot menu entry for UEFI Firmware Settings ... 199s done 199s Removing linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 199s Processing triggers for libc-bin (2.41-1ubuntu1) ... 199s (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 ... 81650 files and directories currently installed.) 199s Purging configuration files for linux-image-6.11.0-8-generic (6.11.0-8.8) ... 199s Purging configuration files for libpython3.12-minimal:arm64 (3.12.9-1) ... 199s Purging configuration files for linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 200s + grep -q trusty /etc/lsb-release 200s + [ ! -d /usr/share/doc/unattended-upgrades ] 200s + [ ! -d /usr/share/doc/lxd ] 200s + [ ! -d /usr/share/doc/lxd-client ] 200s + [ ! -d /usr/share/doc/snapd ] 200s + type iptables 200s + cat 200s + chmod 755 /etc/rc.local 200s + . /etc/rc.local 200s + iptables -w -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu 200s + iptables -A OUTPUT -d 10.255.255.1/32 -p tcp -j DROP 200s + iptables -A OUTPUT -d 10.255.255.2/32 -p tcp -j DROP 200s + uname -m 200s + [ aarch64 = ppc64le ] 200s + [ -d /run/systemd/system ] 200s + systemd-detect-virt --quiet --vm 200s + mkdir -p /etc/systemd/system/systemd-random-seed.service.d/ 200s + cat 200s + grep -q lz4 /etc/initramfs-tools/initramfs.conf 200s + echo COMPRESS=lz4 200s autopkgtest [11:25:50]: upgrading testbed (apt dist-upgrade and autopurge) 200s Reading package lists... 200s Building dependency tree... 200s Reading state information... 201s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 201s Starting 2 pkgProblemResolver with broken count: 0 201s Done 201s Entering ResolveByKeep 202s 202s Calculating upgrade... 202s The following packages will be upgraded: 202s libc-bin libc-dev-bin libc6 libc6-dev locales 202s 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 202s Need to get 9530 kB of archives. 202s After this operation, 0 B of additional disk space will be used. 202s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc6-dev arm64 2.41-1ubuntu2 [1750 kB] 205s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc-dev-bin arm64 2.41-1ubuntu2 [24.0 kB] 205s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc6 arm64 2.41-1ubuntu2 [2910 kB] 208s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc-bin arm64 2.41-1ubuntu2 [600 kB] 208s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 locales all 2.41-1ubuntu2 [4246 kB] 213s Preconfiguring packages ... 213s Fetched 9530 kB in 11s (905 kB/s) 213s (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 ... 81647 files and directories currently installed.) 213s Preparing to unpack .../libc6-dev_2.41-1ubuntu2_arm64.deb ... 213s Unpacking libc6-dev:arm64 (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 213s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu2_arm64.deb ... 213s Unpacking libc-dev-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 213s Preparing to unpack .../libc6_2.41-1ubuntu2_arm64.deb ... 213s Unpacking libc6:arm64 (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 214s Setting up libc6:arm64 (2.41-1ubuntu2) ... 214s (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 ... 81647 files and directories currently installed.) 214s Preparing to unpack .../libc-bin_2.41-1ubuntu2_arm64.deb ... 214s Unpacking libc-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 214s Setting up libc-bin (2.41-1ubuntu2) ... 214s (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 ... 81647 files and directories currently installed.) 214s Preparing to unpack .../locales_2.41-1ubuntu2_all.deb ... 214s Unpacking locales (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 214s Setting up locales (2.41-1ubuntu2) ... 215s Generating locales (this might take a while)... 217s en_US.UTF-8... done 217s Generation complete. 217s Setting up libc-dev-bin (2.41-1ubuntu2) ... 217s Setting up libc6-dev:arm64 (2.41-1ubuntu2) ... 217s Processing triggers for man-db (2.13.0-1) ... 218s Processing triggers for systemd (257.3-1ubuntu3) ... 218s Reading package lists... 219s Building dependency tree... 219s Reading state information... 219s Starting pkgProblemResolver with broken count: 0 219s Starting 2 pkgProblemResolver with broken count: 0 219s Done 219s Solving dependencies... 220s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 220s autopkgtest [11:26:10]: rebooting testbed after setup commands that affected boot 243s autopkgtest [11:26:33]: testbed running kernel: Linux 6.14.0-10-generic #10-Ubuntu SMP PREEMPT_DYNAMIC Wed Mar 12 15:45:31 UTC 2025 246s autopkgtest [11:26:36]: @@@@@@@@@@@@@@@@@@@@ apt-source r-cran-ordinal 249s Get:1 http://ftpmaster.internal/ubuntu plucky/universe r-cran-ordinal 2023.12-4.1-1 (dsc) [2258 B] 249s Get:2 http://ftpmaster.internal/ubuntu plucky/universe r-cran-ordinal 2023.12-4.1-1 (tar) [804 kB] 249s Get:3 http://ftpmaster.internal/ubuntu plucky/universe r-cran-ordinal 2023.12-4.1-1 (diff) [3132 B] 249s gpgv: Signature made Wed Oct 9 23:44:36 2024 UTC 249s gpgv: using RSA key 73471499CC60ED9EEE805946C5BD6C8F2295D502 249s gpgv: issuer "plessy@debian.org" 249s gpgv: Can't check signature: No public key 249s dpkg-source: warning: cannot verify inline signature for ./r-cran-ordinal_2023.12-4.1-1.dsc: no acceptable signature found 249s autopkgtest [11:26:39]: testing package r-cran-ordinal version 2023.12-4.1-1 249s autopkgtest [11:26:39]: build not needed 256s autopkgtest [11:26:46]: test run-unit-test: preparing testbed 257s Reading package lists... 257s Building dependency tree... 257s Reading state information... 257s Starting pkgProblemResolver with broken count: 0 257s Starting 2 pkgProblemResolver with broken count: 0 257s Done 258s The following NEW packages will be installed: 258s fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-mono libblas3 258s libcairo2 libdatrie1 libdeflate0 libfontconfig1 libgfortran5 libgomp1 258s libgraphite2-3 libharfbuzz0b libice6 libjbig0 libjpeg-turbo8 libjpeg8 258s liblapack3 liblerc4 libnlopt0 libpango-1.0-0 libpangocairo-1.0-0 258s libpangoft2-1.0-0 libpaper-utils libpaper2 libpixman-1-0 libsharpyuv0 libsm6 258s libtcl8.6 libthai-data libthai0 libtiff6 libtk8.6 libwebp7 libxcb-render0 258s libxcb-shm0 libxft2 libxrender1 libxss1 libxt6t64 littler r-base-core 258s r-cran-boot r-cran-brio r-cran-callr r-cran-cli r-cran-crayon r-cran-desc 258s r-cran-diffobj r-cran-digest r-cran-evaluate r-cran-fs r-cran-glue 258s r-cran-jsonlite r-cran-lattice r-cran-lifecycle r-cran-littler r-cran-lme4 258s r-cran-magrittr r-cran-mass r-cran-matrix r-cran-minqa r-cran-nlme 258s r-cran-nloptr r-cran-nnet r-cran-numderiv r-cran-ordinal r-cran-pkgbuild 258s r-cran-pkgkitten r-cran-pkgload r-cran-praise r-cran-processx r-cran-ps 258s r-cran-r6 r-cran-rbibutils r-cran-rcpp r-cran-rcppeigen r-cran-rdpack 258s r-cran-reformulas r-cran-rlang r-cran-rprojroot r-cran-statmod 258s r-cran-testthat r-cran-ucminf r-cran-waldo r-cran-withr r-cran-xtable unzip 258s x11-common xdg-utils zip 258s 0 upgraded, 91 newly installed, 0 to remove and 0 not upgraded. 258s Need to get 70.5 MB of archives. 258s After this operation, 147 MB of additional disk space will be used. 258s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 fonts-dejavu-mono all 2.37-8 [502 kB] 259s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 fonts-dejavu-core all 2.37-8 [835 kB] 260s Get:3 http://ftpmaster.internal/ubuntu plucky/main arm64 fontconfig-config arm64 2.15.0-2ubuntu1 [37.5 kB] 260s Get:4 http://ftpmaster.internal/ubuntu plucky/main arm64 libfontconfig1 arm64 2.15.0-2ubuntu1 [144 kB] 260s Get:5 http://ftpmaster.internal/ubuntu plucky/main arm64 fontconfig arm64 2.15.0-2ubuntu1 [191 kB] 260s Get:6 http://ftpmaster.internal/ubuntu plucky/main arm64 libblas3 arm64 3.12.1-2 [161 kB] 260s Get:7 http://ftpmaster.internal/ubuntu plucky/main arm64 libpixman-1-0 arm64 0.44.0-3 [197 kB] 261s Get:8 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-render0 arm64 1.17.0-2 [16.6 kB] 261s Get:9 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-shm0 arm64 1.17.0-2 [5884 B] 261s Get:10 http://ftpmaster.internal/ubuntu plucky/main arm64 libxrender1 arm64 1:0.9.10-1.1build1 [18.8 kB] 261s Get:11 http://ftpmaster.internal/ubuntu plucky/main arm64 libcairo2 arm64 1.18.2-2 [560 kB] 261s Get:12 http://ftpmaster.internal/ubuntu plucky/main arm64 libdatrie1 arm64 0.2.13-3build1 [19.2 kB] 261s Get:13 http://ftpmaster.internal/ubuntu plucky/main arm64 libdeflate0 arm64 1.23-1 [46.2 kB] 261s Get:14 http://ftpmaster.internal/ubuntu plucky/main arm64 libgfortran5 arm64 15-20250222-0ubuntu1 [444 kB] 262s Get:15 http://ftpmaster.internal/ubuntu plucky/main arm64 libgomp1 arm64 15-20250222-0ubuntu1 [146 kB] 262s Get:16 http://ftpmaster.internal/ubuntu plucky/main arm64 libgraphite2-3 arm64 1.3.14-2ubuntu1 [70.6 kB] 262s Get:17 http://ftpmaster.internal/ubuntu plucky/main arm64 libharfbuzz0b arm64 10.2.0-1 [490 kB] 263s Get:18 http://ftpmaster.internal/ubuntu plucky/main arm64 x11-common all 1:7.7+23ubuntu3 [21.7 kB] 263s Get:19 http://ftpmaster.internal/ubuntu plucky/main arm64 libice6 arm64 2:1.1.1-1 [42.3 kB] 263s Get:20 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg-turbo8 arm64 2.1.5-3ubuntu2 [165 kB] 263s Get:21 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg8 arm64 8c-2ubuntu11 [2148 B] 263s Get:22 http://ftpmaster.internal/ubuntu plucky/main arm64 liblapack3 arm64 3.12.1-2 [2307 kB] 265s Get:23 http://ftpmaster.internal/ubuntu plucky/main arm64 liblerc4 arm64 4.0.0+ds-5ubuntu1 [167 kB] 265s Get:24 http://ftpmaster.internal/ubuntu plucky/main arm64 libthai-data all 0.1.29-2build1 [158 kB] 266s Get:25 http://ftpmaster.internal/ubuntu plucky/main arm64 libthai0 arm64 0.1.29-2build1 [18.2 kB] 266s Get:26 http://ftpmaster.internal/ubuntu plucky/main arm64 libpango-1.0-0 arm64 1.56.1-1 [238 kB] 266s Get:27 http://ftpmaster.internal/ubuntu plucky/main arm64 libpangoft2-1.0-0 arm64 1.56.1-1 [49.6 kB] 266s Get:28 http://ftpmaster.internal/ubuntu plucky/main arm64 libpangocairo-1.0-0 arm64 1.56.1-1 [27.6 kB] 266s Get:29 http://ftpmaster.internal/ubuntu plucky/main arm64 libpaper2 arm64 2.2.5-0.3 [17.3 kB] 266s Get:30 http://ftpmaster.internal/ubuntu plucky/main arm64 libpaper-utils arm64 2.2.5-0.3 [15.4 kB] 266s Get:31 http://ftpmaster.internal/ubuntu plucky/main arm64 libsharpyuv0 arm64 1.5.0-0.1 [16.9 kB] 266s Get:32 http://ftpmaster.internal/ubuntu plucky/main arm64 libsm6 arm64 2:1.2.4-1 [16.4 kB] 266s Get:33 http://ftpmaster.internal/ubuntu plucky/main arm64 libtcl8.6 arm64 8.6.16+dfsg-1 [987 kB] 267s Get:34 http://ftpmaster.internal/ubuntu plucky/main arm64 libjbig0 arm64 2.1-6.1ubuntu2 [29.3 kB] 267s Get:35 http://ftpmaster.internal/ubuntu plucky/main arm64 libwebp7 arm64 1.5.0-0.1 [194 kB] 267s Get:36 http://ftpmaster.internal/ubuntu plucky/main arm64 libtiff6 arm64 4.5.1+git230720-4ubuntu4 [193 kB] 267s Get:37 http://ftpmaster.internal/ubuntu plucky/main arm64 libxft2 arm64 2.3.6-1build1 [44.1 kB] 267s Get:38 http://ftpmaster.internal/ubuntu plucky/main arm64 libxss1 arm64 1:1.2.3-1build3 [7244 B] 267s Get:39 http://ftpmaster.internal/ubuntu plucky/main arm64 libtk8.6 arm64 8.6.16-1 [776 kB] 268s Get:40 http://ftpmaster.internal/ubuntu plucky/main arm64 libxt6t64 arm64 1:1.2.1-1.2build1 [168 kB] 268s Get:41 http://ftpmaster.internal/ubuntu plucky/main arm64 zip arm64 3.0-14ubuntu2 [173 kB] 269s Get:42 http://ftpmaster.internal/ubuntu plucky/main arm64 unzip arm64 6.0-28ubuntu6 [178 kB] 269s Get:43 http://ftpmaster.internal/ubuntu plucky/main arm64 xdg-utils all 1.2.1-2ubuntu1 [66.0 kB] 269s Get:44 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-base-core arm64 4.4.3-1 [28.4 MB] 299s Get:45 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-littler arm64 0.3.20-2 [96.1 kB] 299s Get:46 http://ftpmaster.internal/ubuntu plucky/universe arm64 littler all 0.3.20-2 [2554 B] 299s Get:47 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-boot all 1.3-31-1 [635 kB] 300s Get:48 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-brio arm64 1.1.5-1 [39.1 kB] 300s Get:49 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-ps arm64 1.9.0-1 [407 kB] 300s Get:50 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-r6 all 2.6.1-1 [101 kB] 300s Get:51 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-processx arm64 3.8.6-1 [363 kB] 301s Get:52 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-callr all 3.7.6-1 [458 kB] 301s Get:53 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-cli arm64 3.6.4-1 [1374 kB] 303s Get:54 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-crayon all 1.5.3-1 [165 kB] 303s Get:55 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-desc all 1.4.3-1 [359 kB] 303s Get:56 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-diffobj arm64 0.3.5-1 [1116 kB] 305s Get:57 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-digest arm64 0.6.37-1 [200 kB] 305s Get:58 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-evaluate all 1.0.3-1 [114 kB] 305s Get:59 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-fs arm64 1.6.5+dfsg-1 [244 kB] 305s Get:60 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-glue arm64 1.8.0-1 [163 kB] 306s Get:61 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-jsonlite arm64 1.9.1+dfsg-1 [445 kB] 306s Get:62 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-lattice arm64 0.22-6-1 [1363 kB] 307s Get:63 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-rlang arm64 1.1.5-1 [1707 kB] 309s Get:64 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-lifecycle all 1.0.4+dfsg-1 [110 kB] 309s Get:65 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-matrix arm64 1.7-3-1 [4045 kB] 314s Get:66 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-mass arm64 7.3-64-1 [1110 kB] 315s Get:67 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-nlme arm64 3.1.167-1 [2311 kB] 317s Get:68 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-pkgkitten all 0.2.4-1 [27.2 kB] 317s Get:69 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-rcpp arm64 1.0.14-1 [1978 kB] 319s Get:70 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-minqa arm64 1.2.8-1 [112 kB] 320s Get:71 http://ftpmaster.internal/ubuntu plucky/universe arm64 libnlopt0 arm64 2.7.1-6ubuntu3 [179 kB] 320s Get:72 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-nloptr arm64 2.1.1-1 [251 kB] 320s Get:73 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-rbibutils arm64 2.3-1 [1016 kB] 321s Get:74 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-rdpack all 2.6.2-1syncable1 [756 kB] 322s Get:75 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-reformulas all 0.4.0-1 [91.5 kB] 322s Get:76 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-rcppeigen arm64 0.3.4.0.2-1 [1422 kB] 323s Get:77 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-statmod arm64 1.5.0-1 [294 kB] 324s Get:78 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-lme4 arm64 1.1-36-1 [4108 kB] 328s Get:79 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-magrittr arm64 2.0.3-1 [154 kB] 328s Get:80 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-nnet arm64 7.3-20-1 [113 kB] 328s Get:81 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-numderiv all 2016.8-1.1-3 [115 kB] 328s Get:82 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-ucminf arm64 1.2.2-1 [35.8 kB] 328s Get:83 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-ordinal arm64 2023.12-4.1-1 [1268 kB] 330s Get:84 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-pkgbuild all 1.4.6-1 [213 kB] 330s Get:85 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-rprojroot all 2.0.4-2 [125 kB] 330s Get:86 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-withr all 3.0.2+dfsg-1 [214 kB] 330s Get:87 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-pkgload all 1.4.0-1 [247 kB] 331s Get:88 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-praise all 1.0.0-4build1 [20.3 kB] 331s Get:89 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-waldo all 0.6.1-2 [150 kB] 331s Get:90 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-testthat arm64 3.2.3-1 [1644 kB] 333s Get:91 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-xtable all 1:1.8-4-2 [689 kB] 334s Preconfiguring packages ... 334s Fetched 70.5 MB in 1min 15s (936 kB/s) 334s Selecting previously unselected package fonts-dejavu-mono. 334s (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 ... 81647 files and directories currently installed.) 334s Preparing to unpack .../00-fonts-dejavu-mono_2.37-8_all.deb ... 334s Unpacking fonts-dejavu-mono (2.37-8) ... 334s Selecting previously unselected package fonts-dejavu-core. 334s Preparing to unpack .../01-fonts-dejavu-core_2.37-8_all.deb ... 334s Unpacking fonts-dejavu-core (2.37-8) ... 334s Selecting previously unselected package fontconfig-config. 334s Preparing to unpack .../02-fontconfig-config_2.15.0-2ubuntu1_arm64.deb ... 334s Unpacking fontconfig-config (2.15.0-2ubuntu1) ... 335s Selecting previously unselected package libfontconfig1:arm64. 335s Preparing to unpack .../03-libfontconfig1_2.15.0-2ubuntu1_arm64.deb ... 335s Unpacking libfontconfig1:arm64 (2.15.0-2ubuntu1) ... 335s Selecting previously unselected package fontconfig. 335s Preparing to unpack .../04-fontconfig_2.15.0-2ubuntu1_arm64.deb ... 335s Unpacking fontconfig (2.15.0-2ubuntu1) ... 335s Selecting previously unselected package libblas3:arm64. 335s Preparing to unpack .../05-libblas3_3.12.1-2_arm64.deb ... 335s Unpacking libblas3:arm64 (3.12.1-2) ... 335s Selecting previously unselected package libpixman-1-0:arm64. 335s Preparing to unpack .../06-libpixman-1-0_0.44.0-3_arm64.deb ... 335s Unpacking libpixman-1-0:arm64 (0.44.0-3) ... 335s Selecting previously unselected package libxcb-render0:arm64. 335s Preparing to unpack .../07-libxcb-render0_1.17.0-2_arm64.deb ... 335s Unpacking libxcb-render0:arm64 (1.17.0-2) ... 335s Selecting previously unselected package libxcb-shm0:arm64. 335s Preparing to unpack .../08-libxcb-shm0_1.17.0-2_arm64.deb ... 335s Unpacking libxcb-shm0:arm64 (1.17.0-2) ... 335s Selecting previously unselected package libxrender1:arm64. 335s Preparing to unpack .../09-libxrender1_1%3a0.9.10-1.1build1_arm64.deb ... 335s Unpacking libxrender1:arm64 (1:0.9.10-1.1build1) ... 335s Selecting previously unselected package libcairo2:arm64. 335s Preparing to unpack .../10-libcairo2_1.18.2-2_arm64.deb ... 335s Unpacking libcairo2:arm64 (1.18.2-2) ... 335s Selecting previously unselected package libdatrie1:arm64. 335s Preparing to unpack .../11-libdatrie1_0.2.13-3build1_arm64.deb ... 335s Unpacking libdatrie1:arm64 (0.2.13-3build1) ... 335s Selecting previously unselected package libdeflate0:arm64. 335s Preparing to unpack .../12-libdeflate0_1.23-1_arm64.deb ... 335s Unpacking libdeflate0:arm64 (1.23-1) ... 335s Selecting previously unselected package libgfortran5:arm64. 335s Preparing to unpack .../13-libgfortran5_15-20250222-0ubuntu1_arm64.deb ... 335s Unpacking libgfortran5:arm64 (15-20250222-0ubuntu1) ... 335s Selecting previously unselected package libgomp1:arm64. 335s Preparing to unpack .../14-libgomp1_15-20250222-0ubuntu1_arm64.deb ... 335s Unpacking libgomp1:arm64 (15-20250222-0ubuntu1) ... 335s Selecting previously unselected package libgraphite2-3:arm64. 335s Preparing to unpack .../15-libgraphite2-3_1.3.14-2ubuntu1_arm64.deb ... 335s Unpacking libgraphite2-3:arm64 (1.3.14-2ubuntu1) ... 335s Selecting previously unselected package libharfbuzz0b:arm64. 335s Preparing to unpack .../16-libharfbuzz0b_10.2.0-1_arm64.deb ... 335s Unpacking libharfbuzz0b:arm64 (10.2.0-1) ... 335s Selecting previously unselected package x11-common. 335s Preparing to unpack .../17-x11-common_1%3a7.7+23ubuntu3_all.deb ... 335s Unpacking x11-common (1:7.7+23ubuntu3) ... 335s Selecting previously unselected package libice6:arm64. 335s Preparing to unpack .../18-libice6_2%3a1.1.1-1_arm64.deb ... 335s Unpacking libice6:arm64 (2:1.1.1-1) ... 335s Selecting previously unselected package libjpeg-turbo8:arm64. 335s Preparing to unpack .../19-libjpeg-turbo8_2.1.5-3ubuntu2_arm64.deb ... 335s Unpacking libjpeg-turbo8:arm64 (2.1.5-3ubuntu2) ... 335s Selecting previously unselected package libjpeg8:arm64. 335s Preparing to unpack .../20-libjpeg8_8c-2ubuntu11_arm64.deb ... 335s Unpacking libjpeg8:arm64 (8c-2ubuntu11) ... 335s Selecting previously unselected package liblapack3:arm64. 335s Preparing to unpack .../21-liblapack3_3.12.1-2_arm64.deb ... 335s Unpacking liblapack3:arm64 (3.12.1-2) ... 335s Selecting previously unselected package liblerc4:arm64. 335s Preparing to unpack .../22-liblerc4_4.0.0+ds-5ubuntu1_arm64.deb ... 335s Unpacking liblerc4:arm64 (4.0.0+ds-5ubuntu1) ... 335s Selecting previously unselected package libthai-data. 335s Preparing to unpack .../23-libthai-data_0.1.29-2build1_all.deb ... 335s Unpacking libthai-data (0.1.29-2build1) ... 335s Selecting previously unselected package libthai0:arm64. 335s Preparing to unpack .../24-libthai0_0.1.29-2build1_arm64.deb ... 335s Unpacking libthai0:arm64 (0.1.29-2build1) ... 335s Selecting previously unselected package libpango-1.0-0:arm64. 335s Preparing to unpack .../25-libpango-1.0-0_1.56.1-1_arm64.deb ... 335s Unpacking libpango-1.0-0:arm64 (1.56.1-1) ... 335s Selecting previously unselected package libpangoft2-1.0-0:arm64. 335s Preparing to unpack .../26-libpangoft2-1.0-0_1.56.1-1_arm64.deb ... 335s Unpacking libpangoft2-1.0-0:arm64 (1.56.1-1) ... 335s Selecting previously unselected package libpangocairo-1.0-0:arm64. 335s Preparing to unpack .../27-libpangocairo-1.0-0_1.56.1-1_arm64.deb ... 335s Unpacking libpangocairo-1.0-0:arm64 (1.56.1-1) ... 335s Selecting previously unselected package libpaper2:arm64. 335s Preparing to unpack .../28-libpaper2_2.2.5-0.3_arm64.deb ... 335s Unpacking libpaper2:arm64 (2.2.5-0.3) ... 335s Selecting previously unselected package libpaper-utils. 335s Preparing to unpack .../29-libpaper-utils_2.2.5-0.3_arm64.deb ... 335s Unpacking libpaper-utils (2.2.5-0.3) ... 336s Selecting previously unselected package libsharpyuv0:arm64. 336s Preparing to unpack .../30-libsharpyuv0_1.5.0-0.1_arm64.deb ... 336s Unpacking libsharpyuv0:arm64 (1.5.0-0.1) ... 336s Selecting previously unselected package libsm6:arm64. 336s Preparing to unpack .../31-libsm6_2%3a1.2.4-1_arm64.deb ... 336s Unpacking libsm6:arm64 (2:1.2.4-1) ... 336s Selecting previously unselected package libtcl8.6:arm64. 336s Preparing to unpack .../32-libtcl8.6_8.6.16+dfsg-1_arm64.deb ... 336s Unpacking libtcl8.6:arm64 (8.6.16+dfsg-1) ... 336s Selecting previously unselected package libjbig0:arm64. 336s Preparing to unpack .../33-libjbig0_2.1-6.1ubuntu2_arm64.deb ... 336s Unpacking libjbig0:arm64 (2.1-6.1ubuntu2) ... 336s Selecting previously unselected package libwebp7:arm64. 336s Preparing to unpack .../34-libwebp7_1.5.0-0.1_arm64.deb ... 336s Unpacking libwebp7:arm64 (1.5.0-0.1) ... 336s Selecting previously unselected package libtiff6:arm64. 336s Preparing to unpack .../35-libtiff6_4.5.1+git230720-4ubuntu4_arm64.deb ... 336s Unpacking libtiff6:arm64 (4.5.1+git230720-4ubuntu4) ... 336s Selecting previously unselected package libxft2:arm64. 336s Preparing to unpack .../36-libxft2_2.3.6-1build1_arm64.deb ... 336s Unpacking libxft2:arm64 (2.3.6-1build1) ... 336s Selecting previously unselected package libxss1:arm64. 336s Preparing to unpack .../37-libxss1_1%3a1.2.3-1build3_arm64.deb ... 336s Unpacking libxss1:arm64 (1:1.2.3-1build3) ... 336s Selecting previously unselected package libtk8.6:arm64. 336s Preparing to unpack .../38-libtk8.6_8.6.16-1_arm64.deb ... 336s Unpacking libtk8.6:arm64 (8.6.16-1) ... 336s Selecting previously unselected package libxt6t64:arm64. 336s Preparing to unpack .../39-libxt6t64_1%3a1.2.1-1.2build1_arm64.deb ... 336s Unpacking libxt6t64:arm64 (1:1.2.1-1.2build1) ... 336s Selecting previously unselected package zip. 336s Preparing to unpack .../40-zip_3.0-14ubuntu2_arm64.deb ... 336s Unpacking zip (3.0-14ubuntu2) ... 336s Selecting previously unselected package unzip. 336s Preparing to unpack .../41-unzip_6.0-28ubuntu6_arm64.deb ... 336s Unpacking unzip (6.0-28ubuntu6) ... 336s Selecting previously unselected package xdg-utils. 336s Preparing to unpack .../42-xdg-utils_1.2.1-2ubuntu1_all.deb ... 336s Unpacking xdg-utils (1.2.1-2ubuntu1) ... 336s Selecting previously unselected package r-base-core. 336s Preparing to unpack .../43-r-base-core_4.4.3-1_arm64.deb ... 336s Unpacking r-base-core (4.4.3-1) ... 336s Selecting previously unselected package r-cran-littler. 336s Preparing to unpack .../44-r-cran-littler_0.3.20-2_arm64.deb ... 336s Unpacking r-cran-littler (0.3.20-2) ... 336s Selecting previously unselected package littler. 336s Preparing to unpack .../45-littler_0.3.20-2_all.deb ... 336s Unpacking littler (0.3.20-2) ... 336s Selecting previously unselected package r-cran-boot. 336s Preparing to unpack .../46-r-cran-boot_1.3-31-1_all.deb ... 336s Unpacking r-cran-boot (1.3-31-1) ... 336s Selecting previously unselected package r-cran-brio. 336s Preparing to unpack .../47-r-cran-brio_1.1.5-1_arm64.deb ... 336s Unpacking r-cran-brio (1.1.5-1) ... 337s Selecting previously unselected package r-cran-ps. 337s Preparing to unpack .../48-r-cran-ps_1.9.0-1_arm64.deb ... 337s Unpacking r-cran-ps (1.9.0-1) ... 337s Selecting previously unselected package r-cran-r6. 337s Preparing to unpack .../49-r-cran-r6_2.6.1-1_all.deb ... 337s Unpacking r-cran-r6 (2.6.1-1) ... 337s Selecting previously unselected package r-cran-processx. 337s Preparing to unpack .../50-r-cran-processx_3.8.6-1_arm64.deb ... 337s Unpacking r-cran-processx (3.8.6-1) ... 337s Selecting previously unselected package r-cran-callr. 337s Preparing to unpack .../51-r-cran-callr_3.7.6-1_all.deb ... 337s Unpacking r-cran-callr (3.7.6-1) ... 337s Selecting previously unselected package r-cran-cli. 337s Preparing to unpack .../52-r-cran-cli_3.6.4-1_arm64.deb ... 337s Unpacking r-cran-cli (3.6.4-1) ... 337s Selecting previously unselected package r-cran-crayon. 337s Preparing to unpack .../53-r-cran-crayon_1.5.3-1_all.deb ... 337s Unpacking r-cran-crayon (1.5.3-1) ... 337s Selecting previously unselected package r-cran-desc. 337s Preparing to unpack .../54-r-cran-desc_1.4.3-1_all.deb ... 337s Unpacking r-cran-desc (1.4.3-1) ... 337s Selecting previously unselected package r-cran-diffobj. 337s Preparing to unpack .../55-r-cran-diffobj_0.3.5-1_arm64.deb ... 337s Unpacking r-cran-diffobj (0.3.5-1) ... 337s Selecting previously unselected package r-cran-digest. 337s Preparing to unpack .../56-r-cran-digest_0.6.37-1_arm64.deb ... 337s Unpacking r-cran-digest (0.6.37-1) ... 337s Selecting previously unselected package r-cran-evaluate. 337s Preparing to unpack .../57-r-cran-evaluate_1.0.3-1_all.deb ... 337s Unpacking r-cran-evaluate (1.0.3-1) ... 337s Selecting previously unselected package r-cran-fs. 337s Preparing to unpack .../58-r-cran-fs_1.6.5+dfsg-1_arm64.deb ... 337s Unpacking r-cran-fs (1.6.5+dfsg-1) ... 337s Selecting previously unselected package r-cran-glue. 337s Preparing to unpack .../59-r-cran-glue_1.8.0-1_arm64.deb ... 337s Unpacking r-cran-glue (1.8.0-1) ... 337s Selecting previously unselected package r-cran-jsonlite. 337s Preparing to unpack .../60-r-cran-jsonlite_1.9.1+dfsg-1_arm64.deb ... 337s Unpacking r-cran-jsonlite (1.9.1+dfsg-1) ... 337s Selecting previously unselected package r-cran-lattice. 337s Preparing to unpack .../61-r-cran-lattice_0.22-6-1_arm64.deb ... 337s Unpacking r-cran-lattice (0.22-6-1) ... 337s Selecting previously unselected package r-cran-rlang. 337s Preparing to unpack .../62-r-cran-rlang_1.1.5-1_arm64.deb ... 337s Unpacking r-cran-rlang (1.1.5-1) ... 337s Selecting previously unselected package r-cran-lifecycle. 337s Preparing to unpack .../63-r-cran-lifecycle_1.0.4+dfsg-1_all.deb ... 337s Unpacking r-cran-lifecycle (1.0.4+dfsg-1) ... 337s Selecting previously unselected package r-cran-matrix. 337s Preparing to unpack .../64-r-cran-matrix_1.7-3-1_arm64.deb ... 337s Unpacking r-cran-matrix (1.7-3-1) ... 337s Selecting previously unselected package r-cran-mass. 337s Preparing to unpack .../65-r-cran-mass_7.3-64-1_arm64.deb ... 337s Unpacking r-cran-mass (7.3-64-1) ... 337s Selecting previously unselected package r-cran-nlme. 337s Preparing to unpack .../66-r-cran-nlme_3.1.167-1_arm64.deb ... 337s Unpacking r-cran-nlme (3.1.167-1) ... 337s Selecting previously unselected package r-cran-pkgkitten. 337s Preparing to unpack .../67-r-cran-pkgkitten_0.2.4-1_all.deb ... 337s Unpacking r-cran-pkgkitten (0.2.4-1) ... 337s Selecting previously unselected package r-cran-rcpp. 337s Preparing to unpack .../68-r-cran-rcpp_1.0.14-1_arm64.deb ... 337s Unpacking r-cran-rcpp (1.0.14-1) ... 338s Selecting previously unselected package r-cran-minqa. 338s Preparing to unpack .../69-r-cran-minqa_1.2.8-1_arm64.deb ... 338s Unpacking r-cran-minqa (1.2.8-1) ... 338s Selecting previously unselected package libnlopt0:arm64. 338s Preparing to unpack .../70-libnlopt0_2.7.1-6ubuntu3_arm64.deb ... 338s Unpacking libnlopt0:arm64 (2.7.1-6ubuntu3) ... 338s Selecting previously unselected package r-cran-nloptr. 338s Preparing to unpack .../71-r-cran-nloptr_2.1.1-1_arm64.deb ... 338s Unpacking r-cran-nloptr (2.1.1-1) ... 338s Selecting previously unselected package r-cran-rbibutils. 338s Preparing to unpack .../72-r-cran-rbibutils_2.3-1_arm64.deb ... 338s Unpacking r-cran-rbibutils (2.3-1) ... 338s Selecting previously unselected package r-cran-rdpack. 338s Preparing to unpack .../73-r-cran-rdpack_2.6.2-1syncable1_all.deb ... 338s Unpacking r-cran-rdpack (2.6.2-1syncable1) ... 338s Selecting previously unselected package r-cran-reformulas. 338s Preparing to unpack .../74-r-cran-reformulas_0.4.0-1_all.deb ... 338s Unpacking r-cran-reformulas (0.4.0-1) ... 338s Selecting previously unselected package r-cran-rcppeigen. 338s Preparing to unpack .../75-r-cran-rcppeigen_0.3.4.0.2-1_arm64.deb ... 338s Unpacking r-cran-rcppeigen (0.3.4.0.2-1) ... 338s Selecting previously unselected package r-cran-statmod. 338s Preparing to unpack .../76-r-cran-statmod_1.5.0-1_arm64.deb ... 338s Unpacking r-cran-statmod (1.5.0-1) ... 338s Selecting previously unselected package r-cran-lme4. 338s Preparing to unpack .../77-r-cran-lme4_1.1-36-1_arm64.deb ... 338s Unpacking r-cran-lme4 (1.1-36-1) ... 338s Selecting previously unselected package r-cran-magrittr. 338s Preparing to unpack .../78-r-cran-magrittr_2.0.3-1_arm64.deb ... 338s Unpacking r-cran-magrittr (2.0.3-1) ... 338s Selecting previously unselected package r-cran-nnet. 338s Preparing to unpack .../79-r-cran-nnet_7.3-20-1_arm64.deb ... 338s Unpacking r-cran-nnet (7.3-20-1) ... 338s Selecting previously unselected package r-cran-numderiv. 338s Preparing to unpack .../80-r-cran-numderiv_2016.8-1.1-3_all.deb ... 338s Unpacking r-cran-numderiv (2016.8-1.1-3) ... 338s Selecting previously unselected package r-cran-ucminf. 338s Preparing to unpack .../81-r-cran-ucminf_1.2.2-1_arm64.deb ... 338s Unpacking r-cran-ucminf (1.2.2-1) ... 338s Selecting previously unselected package r-cran-ordinal. 338s Preparing to unpack .../82-r-cran-ordinal_2023.12-4.1-1_arm64.deb ... 338s Unpacking r-cran-ordinal (2023.12-4.1-1) ... 338s Selecting previously unselected package r-cran-pkgbuild. 338s Preparing to unpack .../83-r-cran-pkgbuild_1.4.6-1_all.deb ... 338s Unpacking r-cran-pkgbuild (1.4.6-1) ... 338s Selecting previously unselected package r-cran-rprojroot. 338s Preparing to unpack .../84-r-cran-rprojroot_2.0.4-2_all.deb ... 338s Unpacking r-cran-rprojroot (2.0.4-2) ... 338s Selecting previously unselected package r-cran-withr. 338s Preparing to unpack .../85-r-cran-withr_3.0.2+dfsg-1_all.deb ... 338s Unpacking r-cran-withr (3.0.2+dfsg-1) ... 338s Selecting previously unselected package r-cran-pkgload. 338s Preparing to unpack .../86-r-cran-pkgload_1.4.0-1_all.deb ... 338s Unpacking r-cran-pkgload (1.4.0-1) ... 338s Selecting previously unselected package r-cran-praise. 338s Preparing to unpack .../87-r-cran-praise_1.0.0-4build1_all.deb ... 338s Unpacking r-cran-praise (1.0.0-4build1) ... 339s Selecting previously unselected package r-cran-waldo. 339s Preparing to unpack .../88-r-cran-waldo_0.6.1-2_all.deb ... 339s Unpacking r-cran-waldo (0.6.1-2) ... 339s Selecting previously unselected package r-cran-testthat. 339s Preparing to unpack .../89-r-cran-testthat_3.2.3-1_arm64.deb ... 339s Unpacking r-cran-testthat (3.2.3-1) ... 339s Selecting previously unselected package r-cran-xtable. 339s Preparing to unpack .../90-r-cran-xtable_1%3a1.8-4-2_all.deb ... 339s Unpacking r-cran-xtable (1:1.8-4-2) ... 339s Setting up libgraphite2-3:arm64 (1.3.14-2ubuntu1) ... 339s Setting up libpixman-1-0:arm64 (0.44.0-3) ... 339s Setting up libsharpyuv0:arm64 (1.5.0-0.1) ... 339s Setting up liblerc4:arm64 (4.0.0+ds-5ubuntu1) ... 339s Setting up libxrender1:arm64 (1:0.9.10-1.1build1) ... 339s Setting up libdatrie1:arm64 (0.2.13-3build1) ... 339s Setting up libxcb-render0:arm64 (1.17.0-2) ... 339s Setting up unzip (6.0-28ubuntu6) ... 339s Setting up x11-common (1:7.7+23ubuntu3) ... 339s Setting up libdeflate0:arm64 (1.23-1) ... 339s Setting up libnlopt0:arm64 (2.7.1-6ubuntu3) ... 339s Setting up libxcb-shm0:arm64 (1.17.0-2) ... 339s Setting up libgomp1:arm64 (15-20250222-0ubuntu1) ... 339s Setting up libjbig0:arm64 (2.1-6.1ubuntu2) ... 339s Setting up zip (3.0-14ubuntu2) ... 339s Setting up libblas3:arm64 (3.12.1-2) ... 339s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/aarch64-linux-gnu/libblas.so.3 (libblas.so.3-aarch64-linux-gnu) in auto mode 339s Setting up fonts-dejavu-mono (2.37-8) ... 339s Setting up libtcl8.6:arm64 (8.6.16+dfsg-1) ... 339s Setting up fonts-dejavu-core (2.37-8) ... 339s Setting up libjpeg-turbo8:arm64 (2.1.5-3ubuntu2) ... 339s Setting up libgfortran5:arm64 (15-20250222-0ubuntu1) ... 339s Setting up libwebp7:arm64 (1.5.0-0.1) ... 339s Setting up libharfbuzz0b:arm64 (10.2.0-1) ... 339s Setting up libthai-data (0.1.29-2build1) ... 339s Setting up libxss1:arm64 (1:1.2.3-1build3) ... 339s Setting up libpaper2:arm64 (2.2.5-0.3) ... 339s Setting up xdg-utils (1.2.1-2ubuntu1) ... 339s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 339s Setting up libjpeg8:arm64 (8c-2ubuntu11) ... 339s Setting up libice6:arm64 (2:1.1.1-1) ... 339s Setting up liblapack3:arm64 (3.12.1-2) ... 339s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/aarch64-linux-gnu/liblapack.so.3 (liblapack.so.3-aarch64-linux-gnu) in auto mode 339s Setting up fontconfig-config (2.15.0-2ubuntu1) ... 339s Setting up libpaper-utils (2.2.5-0.3) ... 339s Setting up libthai0:arm64 (0.1.29-2build1) ... 339s Setting up libtiff6:arm64 (4.5.1+git230720-4ubuntu4) ... 339s Setting up libfontconfig1:arm64 (2.15.0-2ubuntu1) ... 339s Setting up libsm6:arm64 (2:1.2.4-1) ... 339s Setting up fontconfig (2.15.0-2ubuntu1) ... 341s Regenerating fonts cache... done. 341s Setting up libxft2:arm64 (2.3.6-1build1) ... 341s Setting up libtk8.6:arm64 (8.6.16-1) ... 341s Setting up libpango-1.0-0:arm64 (1.56.1-1) ... 341s Setting up libcairo2:arm64 (1.18.2-2) ... 341s Setting up libxt6t64:arm64 (1:1.2.1-1.2build1) ... 341s Setting up libpangoft2-1.0-0:arm64 (1.56.1-1) ... 342s Setting up libpangocairo-1.0-0:arm64 (1.56.1-1) ... 342s Setting up r-base-core (4.4.3-1) ... 342s Creating config file /etc/R/Renviron with new version 342s Setting up r-cran-crayon (1.5.3-1) ... 342s Setting up r-cran-lattice (0.22-6-1) ... 342s Setting up r-cran-ps (1.9.0-1) ... 342s Setting up r-cran-nlme (3.1.167-1) ... 342s Setting up r-cran-statmod (1.5.0-1) ... 342s Setting up r-cran-nnet (7.3-20-1) ... 342s Setting up r-cran-r6 (2.6.1-1) ... 342s Setting up r-cran-pkgkitten (0.2.4-1) ... 342s Setting up r-cran-numderiv (2016.8-1.1-3) ... 342s Setting up r-cran-magrittr (2.0.3-1) ... 342s Setting up r-cran-littler (0.3.20-2) ... 342s Setting up r-cran-fs (1.6.5+dfsg-1) ... 342s Setting up r-cran-rcpp (1.0.14-1) ... 342s Setting up r-cran-brio (1.1.5-1) ... 342s Setting up r-cran-nloptr (2.1.1-1) ... 342s Setting up r-cran-boot (1.3-31-1) ... 342s Setting up r-cran-diffobj (0.3.5-1) ... 342s Setting up r-cran-rlang (1.1.5-1) ... 342s Setting up littler (0.3.20-2) ... 342s Setting up r-cran-withr (3.0.2+dfsg-1) ... 342s Setting up r-cran-processx (3.8.6-1) ... 342s Setting up r-cran-praise (1.0.0-4build1) ... 342s Setting up r-cran-digest (0.6.37-1) ... 342s Setting up r-cran-evaluate (1.0.3-1) ... 342s Setting up r-cran-mass (7.3-64-1) ... 342s Setting up r-cran-glue (1.8.0-1) ... 342s Setting up r-cran-xtable (1:1.8-4-2) ... 342s Setting up r-cran-cli (3.6.4-1) ... 342s Setting up r-cran-rbibutils (2.3-1) ... 342s Setting up r-cran-lifecycle (1.0.4+dfsg-1) ... 342s Setting up r-cran-rprojroot (2.0.4-2) ... 342s Setting up r-cran-jsonlite (1.9.1+dfsg-1) ... 342s Setting up r-cran-ucminf (1.2.2-1) ... 342s Setting up r-cran-waldo (0.6.1-2) ... 342s Setting up r-cran-matrix (1.7-3-1) ... 342s Setting up r-cran-rcppeigen (0.3.4.0.2-1) ... 342s Setting up r-cran-minqa (1.2.8-1) ... 342s Setting up r-cran-callr (3.7.6-1) ... 342s Setting up r-cran-ordinal (2023.12-4.1-1) ... 342s Setting up r-cran-desc (1.4.3-1) ... 342s Setting up r-cran-rdpack (2.6.2-1syncable1) ... 342s Setting up r-cran-pkgbuild (1.4.6-1) ... 342s Setting up r-cran-reformulas (0.4.0-1) ... 342s Setting up r-cran-pkgload (1.4.0-1) ... 342s Setting up r-cran-lme4 (1.1-36-1) ... 342s Setting up r-cran-testthat (3.2.3-1) ... 342s Processing triggers for libc-bin (2.41-1ubuntu2) ... 342s Processing triggers for man-db (2.13.0-1) ... 343s Processing triggers for install-info (7.1.1-1) ... 344s autopkgtest [11:28:14]: test run-unit-test: [----------------------- 344s BEGIN TEST anova.R 345s 345s R version 4.4.3 (2025-02-28) -- "Trophy Case" 345s Copyright (C) 2025 The R Foundation for Statistical Computing 345s Platform: aarch64-unknown-linux-gnu 345s 345s R is free software and comes with ABSOLUTELY NO WARRANTY. 345s You are welcome to redistribute it under certain conditions. 345s Type 'license()' or 'licence()' for distribution details. 345s 345s R is a collaborative project with many contributors. 345s Type 'contributors()' for more information and 345s 'citation()' on how to cite R or R packages in publications. 345s 345s Type 'demo()' for some demos, 'help()' for on-line help, or 345s 'help.start()' for an HTML browser interface to help. 345s Type 'q()' to quit R. 345s 345s > library(ordinal) 346s > data(wine) 346s > 346s > fm1 <- clm(rating ~ temp, data=wine) 346s > fmm1 <- clmm(rating ~ temp + (1|judge), data=wine) 346s > 346s > ## These now give identical printed results: 346s > ## Previously the printed model names were messed up when anova.clmm 346s > ## were called. 346s > anova(fm1, fmm1) 346s Likelihood ratio tests of cumulative link models: 346s 346s formula: link: threshold: 346s fm1 rating ~ temp logit flexible 346s fmm1 rating ~ temp + (1 | judge) logit flexible 346s 346s no.par AIC logLik LR.stat df Pr(>Chisq) 346s fm1 5 194.03 -92.013 346s fmm1 6 189.48 -88.739 6.5492 1 0.01049 * 346s --- 346s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 346s > anova(fmm1, fm1) 346s Likelihood ratio tests of cumulative link models: 346s 346s formula: link: threshold: 346s fm1 rating ~ temp logit flexible 346s fmm1 rating ~ temp + (1 | judge) logit flexible 346s 346s no.par AIC logLik LR.stat df Pr(>Chisq) 346s fm1 5 194.03 -92.013 346s fmm1 6 189.48 -88.739 6.5492 1 0.01049 * 346s --- 346s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 346s > 346s > ## Testing if 'test' and 'type' arguments are ignored properly: 346s > fm1 <- clm(rating ~ temp + contact, data=wine) 346s > fm2 <- clm(rating ~ temp, data=wine) 346s > anova(fm1, fm2, test="Chi") 346s Likelihood ratio tests of cumulative link models: 346s 346s formula: link: threshold: 346s fm2 rating ~ temp logit flexible 346s fm1 rating ~ temp + contact logit flexible 346s 346s no.par AIC logLik LR.stat df Pr(>Chisq) 346s fm2 5 194.03 -92.013 346s fm1 6 184.98 -86.492 11.043 1 0.0008902 *** 346s --- 346s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 346s > anova(fm1, fm2, type="Chi") 346s Likelihood ratio tests of cumulative link models: 346s 346s formula: link: threshold: 346s fm2 rating ~ temp logit flexible 346s fm1 rating ~ temp + contact logit flexible 346s 346s 'test' argument ignored in anova.clm 346s 346s 'test' argument ignored in anova.clm 346s 346s no.par AIC logLik LR.stat df Pr(>Chisq) 346s fm2 5 194.03 -92.013 346s fm1 6 184.98 -86.492 11.043 1 0.0008902 *** 346s --- 346s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 346s > anova(fm1, fm2) 346s Likelihood ratio tests of cumulative link models: 346s 346s formula: link: threshold: 346s fm2 rating ~ temp logit flexible 346s fm1 rating ~ temp + contact logit flexible 346s 346s no.par AIC logLik LR.stat df Pr(>Chisq) 346s fm2 5 194.03 -92.013 346s fm1 6 184.98 -86.492 11.043 1 0.0008902 *** 346s --- 346s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 346s > ## calling anova.clmm 346s > anova(fmm1, fm1, test="Chi") 346s Likelihood ratio tests of cumulative link models: 346s 346s formula: link: threshold: 346s fmm1 rating ~ temp + (1 | judge) logit flexible 346s fm1 rating ~ temp + contact logit flexible 346s 346s no.par AIC logLik LR.stat df Pr(>Chisq) 346s fmm1 6 189.48 -88.739 346s fm1 6 184.98 -86.492 4.4938 0 346s > anova(fmm1, fm1, type="Chi") 346s Likelihood ratio tests of cumulative link models: 346s 346s formula: link: threshold: 346s fmm1 rating ~ temp + (1 | judge) logit flexible 346s fm1 rating ~ temp + contact logit flexible 346s 346s no.par AIC logLik LR.stat df Pr(>Chisq) 346s fmm1 6 189.48 -88.739 346s fm1 6 184.98 -86.492 4.4938 0 346s > 346s > 346s BEGIN TEST clm.fit.R 346s 346s R version 4.4.3 (2025-02-28) -- "Trophy Case" 346s Copyright (C) 2025 The R Foundation for Statistical Computing 346s Platform: aarch64-unknown-linux-gnu 346s 346s R is free software and comes with ABSOLUTELY NO WARRANTY. 346s You are welcome to redistribute it under certain conditions. 346s Type 'license()' or 'licence()' for distribution details. 346s 346s R is a collaborative project with many contributors. 346s Type 'contributors()' for more information and 346s 'citation()' on how to cite R or R packages in publications. 346s 346s Type 'demo()' for some demos, 'help()' for on-line help, or 346s 'help.start()' for an HTML browser interface to help. 346s Type 'q()' to quit R. 346s 346s > library(ordinal) 347s > data(wine) 347s > 347s > ## clm.fit with nominal and scale effects: 347s > 347s > ## get simple model: 347s > fm1 <- clm(rating ~ temp, scale=~temp, nominal=~ contact, 347s + data=wine, method="design") 347s > str(fm1, give.attr=FALSE) 347s List of 23 347s $ y : Ord.factor w/ 5 levels "1"<"2"<"3"<"4"<..: 2 3 3 4 4 4 5 5 1 2 ... 347s $ y.levels : chr [1:5] "1" "2" "3" "4" ... 347s $ X : num [1:72, 1:2] 1 1 1 1 1 1 1 1 1 1 ... 347s $ offset : num [1:72] 0 0 0 0 0 0 0 0 0 0 ... 347s $ terms :Classes 'terms', 'formula' language rating ~ temp 347s $ contrasts :List of 1 347s ..$ temp: chr "contr.treatment" 347s $ xlevels :List of 1 347s ..$ temp: chr [1:2] "cold" "warm" 347s $ weights : num [1:72] 1 1 1 1 1 1 1 1 1 1 ... 347s $ S : num [1:72, 1:2] 1 1 1 1 1 1 1 1 1 1 ... 347s $ S.terms :Classes 'terms', 'formula' language ~temp 347s $ S.off : num [1:72] 0 0 0 0 0 0 0 0 0 0 ... 347s $ S.contrasts :List of 1 347s ..$ temp: chr "contr.treatment" 347s $ S.xlevels :List of 1 347s ..$ temp: chr [1:2] "cold" "warm" 347s $ NOM : num [1:72, 1:2] 1 1 1 1 1 1 1 1 1 1 ... 347s $ nom.terms :Classes 'terms', 'formula' language ~contact 347s $ nom.contrasts:List of 1 347s ..$ contact: chr "contr.treatment" 347s $ nom.xlevels :List of 1 347s ..$ contact: chr [1:2] "no" "yes" 347s $ doFit : logi TRUE 347s $ control :List of 11 347s ..$ method : chr "design" 347s ..$ sign.location: chr "negative" 347s ..$ sign.nominal : chr "positive" 347s ..$ convergence : chr "warn" 347s ..$ trace : int 0 347s ..$ maxIter : int 100 347s ..$ gradTol : num 1e-06 347s ..$ relTol : num 1e-06 347s ..$ tol : num 1.49e-08 347s ..$ maxLineIter : int 15 347s ..$ maxModIter : int 5 347s $ link : chr "logit" 347s $ threshold : chr "flexible" 347s $ start : NULL 347s $ formulas :List of 4 347s ..$ formula :Class 'formula' language rating ~ temp 347s ..$ scale :Class 'formula' language ~temp 347s ..$ nominal :Class 'formula' language ~contact 347s ..$ fullForm:Class 'formula' language rating ~ temp + temp + contact 347s > fm1$control$method <- "Newton" 347s > res <- clm.fit(fm1) 347s > names(res) 347s [1] "aliased" "alpha" "alpha.mat" "beta" 347s [5] "coefficients" "cond.H" "convergence" "df.residual" 347s [9] "edf" "fitted.values" "gradient" "Hessian" 347s [13] "logLik" "maxGradient" "message" "n" 347s [17] "niter" "nobs" "Theta" "tJac" 347s [21] "vcov" "zeta" 347s > res$Theta 347s contact 1|2 2|3 3|4 4|5 347s 1 no -1.357136 1.2482871 3.839568 5.114111 347s 2 yes -2.969353 -0.2819631 1.959306 3.923477 347s > 347s > ## construct some weights and offsets: 347s > set.seed(1) 347s > off1 <- runif(length(fm1$y)) 347s > set.seed(1) 347s > off2 <- rnorm(length(fm1$y)) 347s > set.seed(1) 347s > wet <- runif(length(fm1$y)) 347s > 347s > ## Fit various models: 347s > fit <- clm.fit(fm1$y, fm1$X, fm1$S, fm1$NOM, weights=wet) 347s > Coef <- 347s + c(-0.905224120279548, 1.31043498891987, 3.34235590523008, 347s + 4.52389661722693, -3.03954652971192, -1.56922389038976, 347s + -1.75662549320839, -1.16845464236365, 2.52988580848393, 347s + -0.0261457032829033) 347s > stopifnot(all.equal(coef(fit), Coef, check.attributes=FALSE, tol=1e-6)) 347s Warning message: 347s Cannot assess if all thresholds are increasing 347s > str(fit) 347s List of 20 347s $ aliased :List of 3 347s ..$ alpha: Named logi [1:8] FALSE FALSE FALSE FALSE FALSE FALSE ... 347s .. ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s ..$ beta : Named logi FALSE 347s .. ..- attr(*, "names")= chr "tempwarm" 347s ..$ zeta : Named logi FALSE 347s .. ..- attr(*, "names")= chr "tempwarm" 347s $ alpha : Named num [1:8] -0.905 1.31 3.342 4.524 -3.04 ... 347s ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s $ beta : Named num 2.53 347s ..- attr(*, "names")= chr "tempwarm" 347s $ coefficients : Named num [1:10] -0.905 1.31 3.342 4.524 -3.04 ... 347s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s $ cond.H : num 161 347s $ convergence :List of 3 347s ..$ code : int 0 347s ..$ messages : chr "successful convergence" 347s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 347s $ df.residual : num 27 347s $ edf : int 10 347s $ fitted.values: num [1:72] 0.5 0.178 0.394 0.136 0.188 ... 347s $ gradient : Named num [1:10] 7.28e-15 2.70e-13 2.67e-13 -5.17e-13 5.13e-16 ... 347s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s $ Hessian : num [1:10, 1:10] 2.488 -1.01 0 0 0.207 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s $ logLik : num -44.9 347s $ maxGradient : num 8.93e-13 347s $ message : chr "Absolute and relative convergence criteria were met" 347s $ n : int 72 347s $ niter : Named num [1:2] 9 0 347s ..- attr(*, "names")= chr [1:2] "outer" "inner" 347s $ nobs : num 37 347s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s $ vcov : num [1:10, 1:10] 0.5338 0.1835 0.0254 -0.0626 -0.511 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s $ zeta : Named num -0.0261 347s ..- attr(*, "names")= chr "tempwarm" 347s - attr(*, "class")= chr "clm.fit" 347s > 347s > fit <- clm.fit(fm1$y, fm1$X, fm1$S, fm1$NOM, offset=off1) 347s > str(fit) 347s List of 20 347s $ aliased :List of 3 347s ..$ alpha: Named logi [1:8] FALSE FALSE FALSE FALSE FALSE FALSE ... 347s .. ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s ..$ beta : Named logi FALSE 347s .. ..- attr(*, "names")= chr "tempwarm" 347s ..$ zeta : Named logi FALSE 347s .. ..- attr(*, "names")= chr "tempwarm" 347s $ alpha : Named num [1:8] -0.864 1.746 4.342 5.615 -1.567 ... 347s ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s $ beta : Named num 2.7 347s ..- attr(*, "names")= chr "tempwarm" 347s $ coefficients : Named num [1:10] -0.864 1.746 4.342 5.615 -1.567 ... 347s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s $ cond.H : num 196 347s $ convergence :List of 3 347s ..$ code : int 0 347s ..$ messages : chr "successful convergence" 347s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 347s $ df.residual : num 62 347s $ edf : int 10 347s $ fitted.values: num [1:72] 0.57 0.183 0.452 0.145 0.135 ... 347s $ gradient : Named num [1:10] 2.19e-09 6.14e-08 5.92e-08 -1.23e-07 4.69e-10 ... 347s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s $ Hessian : num [1:10, 1:10] 4.48 -1.89 0 0 1.02 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s $ logLik : num -86.1 347s $ maxGradient : num 2.17e-07 347s $ message : chr "Absolute and relative convergence criteria were met" 347s $ n : int 72 347s $ niter : Named num [1:2] 8 0 347s ..- attr(*, "names")= chr [1:2] "outer" "inner" 347s $ nobs : num 72 347s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s .. ..$ :Warning message: 347s Cannot assess if all thresholds are increasing 347s Warning message: 347s Cannot assess if all thresholds are increasing 347s chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s $ vcov : num [1:10, 1:10] 0.33117 0.09074 0.00108 -0.04015 -0.31468 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s $ zeta : Named num 0.114 347s ..- attr(*, "names")= chr "tempwarm" 347s - attr(*, "class")= chr "clm.fit" 347s > 347s > fit <- clm.fit(fm1$y, fm1$X, fm1$S, fm1$NOM, offset=off1, 347s + S.offset=off2) 347s > str(fit) 347s List of 20 347s $ aliased :List of 3 347s ..$ alpha: Named logi [1:8] FALSE FALSE FALSE FALSE FALSE FALSE ... 347s .. ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s ..$ beta : Named logi FALSE 347s .. ..- attr(*, "names")= chr "tempwarm" 347s ..$ zeta : Named logi FALSE 347s .. ..- attr(*, "names")= chr "tempwarm" 347s $ alpha : Named num [1:8] -0.585 1.951 3.24 4.18 -6.481 ... 347s ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s $ beta : Named num 2.12 347s ..- attr(*, "names")= chr "tempwarm" 347s $ coefficients : Named num [1:10] -0.585 1.951 3.24 4.18 -6.481 ... 347s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s $ cond.H : num 634 347s $ convergence :List of 3 347s ..$ code : int 0 347s ..$ messages : chr "successful convergence" 347s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 347s $ df.residual : num 62 347s $ edf : int 10 347s $ fitted.values: num [1:72] 0.7899 0.1277 0.7 0.0888 0.1521 ... 347s $ gradient : Named num [1:10] 6.73e-12 8.06e-10 7.28e-10 -7.85e-10 1.15e-12 ... 347s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s $ Hessian : num [1:10, 1:10] 4.126 -1.006 0 0 0.079 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s $ logLik : num -87.6 347s $ maxGradient : num 9.74e-10 347s $ message : chr "Absolute and relative convergence criteria were met" 347s $ n : int 72 347s $ niter : Named num [1:2] 13 0 347s ..- attr(*, "names")= chr [1:2] "outer" "inner" 347s $ nobs : num 72 347s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s $ vcov : num [1:10, 1:10] 0.2616 0.0523 0.0345 0.0236 -0.2449 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 347s $ zeta : Named num -0.502 347s ..- attr(*, "names")= chr "tempwarm" 347s - attr(*, "class")= chr "clm.fit" 347s > 347s > fit <- clm.fit(fm1$y, fm1$X, fm1$S) 347s > str(fit) 347s List of 21 347s $ aliased :List of 3 347s ..$ alpha: Named logi [1:4] FALSE FALSE FALSE FALSE 347s .. ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s ..$ beta : Named logi FALSE 347s .. ..- attr(*, "names")= chr "tempwarm" 347s ..$ zeta : Named logi FALSE 347s .. ..- attr(*, "names")= chr "tempwarm" 347s $ alpha : Named num [1:4] -1.988 0.418 2.648 4.306 347s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s $ beta : Named num 2.51 347s ..- attr(*, "names")= chr "tempwarm" 347s $ coefficients : Named num [1:6] -1.988 0.418 2.648 4.306 2.512 ... 347s ..- attr(*, "names")= chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 347s $ cond.H : num 80.6 347s $ convergence :List of 3 347s ..$ code : int 0 347s ..$ messages : chr "successful convergence" 347s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 347s $ df.residual : num 66 347s $ edf : int 6 347s $ fitted.values: num [1:72] 0.4826 0.3308 0.3308 0.0528 0.2897 ... 347s $ gradient : Named num [1:6] 7.03e-09 6.91e-08 5.99e-07 -7.42e-07 2.76e-08 ... 347s ..- attr(*, "names")= chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 347s $ Hessian : num [1:6, 1:6] 4.8066 -2.4889 0 0 -0.0926 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 347s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 347s $ logLik : num -91.8 347s $ maxGradient : num 8.53e-07 347s $ message : chr "Absolute and relative convergence criteria were met" 347s $ n : int 72 347s $ niter : Named num [1:2] 8 0 347s ..- attr(*, "names")= chr [1:2] "outer" "inner" 347s $ nobs : num 72 347s $ Theta : num [1, 1:4] -1.988 0.418 2.648 4.306 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : NULL 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s $ vcov : num [1:6, 1:6] 0.2481 0.0622 0.0179 -0.0253 0.0197 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 347s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 347s $ zeta : Named num 0.176 347s ..- attr(*, "names")= chr "tempwarm" 347s - attr(*, "class")= chr "clm.fit" 347s > 347s > fit <- clm.fit(fm1$y, fm1$X) 347s > str(fit) 347s List of 20 347s $ aliased :List of 2 347s ..$ alpha: Named logi [1:4] FALSE FALSE FALSE FALSE 347s .. ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s ..$ beta : Named logi FALSE 347s .. ..- attr(*, "names")= chr "tempwarm" 347s $ alpha : Named num [1:4] -1.936 0.435 2.432 3.827 347s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s $ beta : Named num 2.29 347s ..- attr(*, "names")= chr "tempwarm" 347s $ coefficients : Named num [1:5] -1.936 0.435 2.432 3.827 2.287 347s ..- attr(*, "names")= chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 347s $ cond.H : num 16.8 347s $ convergence :List of 3 347s ..$ code : int 0 347s ..$ messages : chr "successful convergence" 347s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 347s $ df.residual : num 67 347s $ edf : int 5 347s $ fitted.values: num [1:72] 0.481 0.3122 0.3122 0.0594 0.2871 ... 347s $ gradient : Named num [1:5] 4.12e-14 8.11e-14 -1.06e-13 9.19e-16 -1.79e-14 347s ..- attr(*, "names")= chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 347s $ Hessian : num [1:5, 1:5] 4.8983 -2.499 0 0 -0.0854 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 347s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 347s $ logLik : num -92 347s $ maxGradient : num 1.06e-13 347s $ message : chr "Absolute and relative convergence criteria were met" 347s $ n : int 72 347s $ niter : Named num [1:2] 6 0 347s ..- attr(*, "names")= chr [1:2] "outer" "inner" 347s $ nobs : num 72 347s $ Theta : num [1, 1:4] -1.936 0.435 2.432 3.827 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : NULL 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s $ vcov : num [1:5, 1:5] 0.2345 0.0577 0.0505 0.0512 0.0537 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 347s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 347s - attr(*, "class")= chr "clm.fit" 347s > 347s > fit <- clm.fit(fm1$y) 347s > coef(fit) 347s 1|2 2|3 3|4 4|5 347s -2.5952547 -0.5108256 1.0258529 2.2284771 347s > str(fit) 347s List of 19 347s $ aliased :List of 2 347s ..$ alpha: Named logi [1:4] FALSE FALSE FALSE FALSE 347s .. ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s ..$ beta : Named logi(0) 347s .. ..- attr(*, "names")= chr(0) 347s $ alpha : Named num [1:4] -2.595 -0.511 1.026 2.228 347s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s $ coefficients : Named num [1:4] -2.595 -0.511 1.026 2.228 347s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s $ cond.H : num 8.38 347s $ convergence :List of 3 347s ..$ code : int 0 347s ..$ messages : chr "successful convergence" 347s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 347s $ df.residual : num 68 347s $ edf : int 4 347s $ fitted.values: num [1:72] 0.306 0.361 0.361 0.167 0.167 ... 347s $ gradient : Named num [1:4] 7.23e-08 -5.51e-08 -1.72e-11 -4.87e-12 347s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s $ Hessian : num [1:4, 1:4] 5.31 -3.57 0 0 -3.57 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s $ logLik : num -104 347s $ maxGradient : num 7.23e-08 347s $ message : chr "Absolute and relative convergence criteria were met" 347s $ n : int 72 347s $ niter : Named num [1:2] 5 0 347s ..- attr(*, "names")= chr [1:2] "outer" "inner" 347s $ nobs : num 72 347s $ Theta : num [1, 1:4] -2.595 -0.511 1.026 2.228 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : NULL 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s $ vcov : num [1:4, 1:4] 0.2149 0.0398 0.0203 0.0165 0.0398 ... 347s ..- attr(*, "dimnames")=List of 2 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 347s - attr(*, "class")= chr "clm.fit" 347s > 347s > ## Remember: compare with corresponding .Rout file 347s > 347s BEGIN TEST clm.formula.R 347s 347s R version 4.4.3 (2025-02-28) -- "Trophy Case" 347s Copyright (C) 2025 The R Foundation for Statistical Computing 347s Platform: aarch64-unknown-linux-gnu 347s 347s R is free software and comes with ABSOLUTELY NO WARRANTY. 347s You are welcome to redistribute it under certain conditions. 347s Type 'license()' or 'licence()' for distribution details. 347s 347s R is a collaborative project with many contributors. 347s Type 'contributors()' for more information and 347s 'citation()' on how to cite R or R packages in publications. 347s 347s Type 'demo()' for some demos, 'help()' for on-line help, or 347s 'help.start()' for an HTML browser interface to help. 347s Type 'q()' to quit R. 347s 347s > library(ordinal) 348s > ## library(devtools) 348s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 348s > ## clean_dll(pkg = r2path) 348s > ## load_all(r2path) 348s > 348s > ################################# 348s > ## Appropriate evaluation of formulas: 348s > 348s > ## These fail and give appropriate error messages: 348s > ## fm1 <- clm(rating ~ contact, scale=temp, data=wine) 348s > ## fm1 <- clm(rating ~ contact, scale=~Temp, data=wine) 348s > ## fm1 <- clm(rating ~ contact, scale="temp", data=wine) 348s > ## sca <- "temp" 348s > ## fm1 <- clm(rating ~ contact, scale=sca, data=wine) 348s > ## sca <- as.formula(sca) 348s > ## sca <- as.formula(temp) 348s > ## sca <- with(wine, as.formula(temp)) 348s > 348s > ## These all work as intended with no warnings or errors: 348s > fm1 <- clm(rating ~ contact, scale="~temp", data=wine) 348s > fm1 <- clm(rating ~ contact, scale=~temp, data=wine) 348s > sca <- "~temp" 348s > fm1 <- clm(rating ~ contact, scale=sca, data=wine) 348s > sca <- as.formula("~temp") 348s > fm1 <- clm(rating ~ contact, scale=sca, data=wine) 348s > fm1 <- clm(rating ~ contact, scale=as.formula(~temp), data=wine) 348s > fm1 <- clm(rating ~ contact, scale=as.formula("~temp"), data=wine) 348s > 348s > ################################# 348s > ## can evaluate if 'formula' is a character: 348s > f <- "rating ~ contact + temp" 348s > clm(f, data=wine) 348s formula: rating ~ contact + temp 348s data: wine 348s 348s link threshold nobs logLik AIC niter max.grad cond.H 348s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 348s 348s Coefficients: 348s contactyes tempwarm 348s 1.528 2.503 348s 348s Threshold coefficients: 348s 1|2 2|3 3|4 4|5 348s -1.344 1.251 3.467 5.006 348s > clm(as.formula(f), data=wine) 348s formula: rating ~ contact + temp 348s data: wine 348s 348s link threshold nobs logLik AIC niter max.grad cond.H 348s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 348s 348s Coefficients: 348s contactyes tempwarm 348s 1.528 2.503 348s 348s Threshold coefficients: 348s 1|2 2|3 3|4 4|5 348s -1.344 1.251 3.467 5.006 348s > 348s > ################################# 348s > 348s > ### finding variables in the environment of the formula: 348s > makeform <- function() { 348s + f1 <- as.formula(rating ~ temp + contact) 348s + rating <- wine$rating 348s + temp <- wine$temp 348s + contact <- wine$contact 348s + f1 348s + } 348s > ## 'makeform' makes are formula object in the environment of the 348s > ## function makeform: 348s > f1 <- makeform() 348s > f1 # print 348s rating ~ temp + contact 348s 348s > class(f1) 348s [1] "formula" 348s > ## If we give the data, we can evaluate the model: 348s > fm1 <- clm(f1, data=wine) 348s > ## We can also evaluate the model because the data are available in 348s > ## the environment associated with the formula: 348s > fm1 <- clm(f1) 348s > ## For instance, the 'rating' variable is not found in the Global 348s > ## environment; we have to evaluate the 'name' of 'rating' in the 348s > ## appropriate environment: 348s > (try(rating, silent=TRUE)) 348s [1] "Error : object 'rating' not found\n" 348s attr(,"class") 348s [1] "try-error" 348s attr(,"condition") 348s 348s > eval(as.name("rating"), envir=environment(f1)) 348s [1] 2 3 3 4 4 4 5 5 1 2 1 3 2 3 5 4 2 3 3 2 5 5 4 4 3 2 3 2 3 2 5 3 2 3 4 3 3 3 348s [39] 3 3 3 2 3 2 2 4 5 4 1 1 2 2 2 3 2 3 2 2 2 3 3 3 3 4 1 2 3 2 3 2 4 4 348s Levels: 1 < 2 < 3 < 4 < 5 348s > ## If instead we generate the formula in the Global environment where 348s > ## the variables are not found, we cannot evaluate the model: 348s > f2 <- as.formula(rating ~ temp + contact) 348s > (try(fm2 <- clm(f2), silent=TRUE)) 348s [1] "Error in eval(predvars, data, env) : object 'rating' not found\n" 348s attr(,"class") 348s [1] "try-error" 348s attr(,"condition") 348s 348s > environment(f2) <- environment(f1) 348s > fm2 <- clm(f2) 348s > 348s > 348s > ################################# 348s > ## Use of formula-objects in location, scale and nominal: 348s > ## Bug-report from Llus Marco Almagro 348s > ## 5 May 2010 17:58 348s > f <- formula(rating ~ temp) 348s > fs <- formula( ~ contact) 348s > m2 <- clm(f, scale = fs, data = wine) 348s > summary(m2) 348s formula: rating ~ temp 348s scale: ~contact 348s data: wine 348s 348s link threshold nobs logLik AIC niter max.grad cond.H 348s logit flexible 72 -91.92 195.83 8(0) 1.57e-09 5.6e+01 348s 348s Coefficients: 348s Estimate Std. Error z value Pr(>|z|) 348s tempwarm 2.1690 0.5527 3.924 8.69e-05 *** 348s --- 348s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 348s 348s log-scale coefficients: 348s Estimate Std. Error z value Pr(>|z|) 348s contactyes -0.1222 0.2775 -0.44 0.66 348s 348s Threshold coefficients: 348s Estimate Std. Error z value 348s 1|2 -1.8957 0.4756 -3.986 348s 2|3 0.3668 0.3442 1.066 348s 3|4 2.2483 0.5932 3.790 348s 4|5 3.5393 0.8336 4.246 348s > 348s > ################################# 348s > ## Other ways to construct formulas: 348s > set.seed(12345) 348s > y <- factor(sample(1:4,20,replace=TRUE)) 348s > x <- rnorm(20) 348s > data <- data.frame(y=y,x=x) 348s > rm(x, y) 348s > fit <- clm(data$y ~ data$x) 348s > fit 348s formula: data$y ~ data$x 348s 348s link threshold nobs logLik AIC niter max.grad cond.H 348s logit flexible 20 -25.37 58.74 5(0) 2.68e-09 8.4e+00 348s 348s Coefficients: 348s data$x 348s 0.2527 348s 348s Threshold coefficients: 348s 1|2 2|3 3|4 348s -2.18234 0.06059 0.92746 348s > fit <- clm(data[,1] ~ data[,2]) 348s > fit 348s formula: data[, 1] ~ data[, 2] 348s 348s link threshold nobs logLik AIC niter max.grad cond.H 348s logit flexible 20 -25.37 58.74 5(0) 2.68e-09 8.4e+00 348s 348s Coefficients: 348s data[, 2] 348s 0.2527 348s 348s Threshold coefficients: 348s 1|2 2|3 3|4 348s -2.18234 0.06059 0.92746 348s > ## This previously failed, but now works: 348s > fit <- clm(data$y ~ data$x, ~data$x) 348s > fit 348s formula: data$y ~ data$x 348s scale: ~data$x 348s 348s link threshold nobs logLik AIC niter max.grad cond.H 348s logit flexible 20 -25.32 60.64 7(0) 1.86e-09 9.7e+00 348s 348s Coefficients: 348s data$x 348s 0.2477 348s 348s log-scale coefficients: 348s data$x 348s -0.1136 348s 348s Threshold coefficients: 348s 1|2 2|3 3|4 348s -2.16950 0.07039 0.91381 348s > 348s > ################################# 348s > ## Evaluation within other functions: 348s > ## date: January 18th 2012. 348s > ## 348s > ## The problem was raised by Stefan Herzog (stefan.herzog@unibas.ch) 348s > ## January 12th 2012 in trying to make clm work with glmulti. 348s > 348s > fun.clm <- function(formula, data) 348s + ### This only works because clm via eclm.model.frame is careful to 348s + ### evaluate the 'formula' in the parent environment such it is not the 348s + ### character "formula" that is attempted evaluated. 348s + clm(formula, data = data) 348s > 348s > fun2.clm <- function(formula, data, weights, subset) { 348s + ### This should be the safe way to ensure evaluation of clm in the 348s + ### right environment. 348s + mc <- match.call() 348s + mc[[1]] <- as.name("clm") 348s + eval.parent(mc) 348s + } 348s > 348s > fun.clm(rating ~ temp + contact, data=wine) ## works 348s formula: rating ~ temp + contact 348s data: data 348s 348s link threshold nobs logLik AIC niter max.grad cond.H 348s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 348s 348s Coefficients: 348s tempwarm contactyes 348s 2.503 1.528 348s 348s Threshold coefficients: 348s 1|2 2|3 3|4 4|5 348s -1.344 1.251 3.467 5.006 348s > fun2.clm(rating ~ temp + contact, data=wine) ## works 348s formula: rating ~ temp + contact 348s data: wine 348s 348s link threshold nobs logLik AIC niter max.grad cond.H 348s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 348s 348s Coefficients: 348s tempwarm contactyes 348s 2.503 1.528 348s 348s Threshold coefficients: 348s 1|2 2|3 3|4 4|5 348s -1.344 1.251 3.467 5.006 348s > 348s > form1 <- "rating ~ temp + contact" 348s > fun.clm(form1, data=wine) ## works 348s formula: rating ~ temp + contact 348s data: data 348s 348s link threshold nobs logLik AIC niter max.grad cond.H 348s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 348s 348s Coefficients: 348s tempwarm contactyes 348s 2.503 1.528 348s 348s Threshold coefficients: 348s 1|2 2|3 3|4 4|5 348s -1.344 1.251 3.467 5.006 348s > fun2.clm(form1, data=wine) ## works 348s formula: rating ~ temp + contact 348s data: wine 348s 348s link threshold nobs logLik AIC niter max.grad cond.H 348s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 348s 348s Coefficients: 348s tempwarm contactyes 348s 2.503 1.528 348s 348s Threshold coefficients: 348s 1|2 2|3 3|4 4|5 348s -1.344 1.251 3.467 5.006 348s > 348s > form2 <- formula(rating ~ temp + contact) 348s > fun.clm(form2, data=wine) ## works 348s formula: rating ~ temp + contact 348s data: data 348s 348s link threshold nobs logLik AIC niter max.grad cond.H 348s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 348s 348s Coefficients: 348s tempwarm contactyes 348s 2.503 1.528 348s 348s Threshold coefficients: 348s 1|2 2|3 3|4 4|5 348s -1.344 1.251 3.467 5.006 348s > fun2.clm(form2, data=wine) ## works 348s formula: rating ~ temp + contact 348s data: wine 348s 348s link threshold nobs logLik AIC niter max.grad cond.H 348s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 348s 348s Coefficients: 348s tempwarm contactyes 348s 2.503 1.528 348s 348s Threshold coefficients: 348s 1|2 2|3 3|4 4|5 348s -1.344 1.251 3.467 5.006 348s > ## Notice that clm is not able to get the name of the data (wine) 348s > ## correct when using fun.clm. 348s > 348s > ################################# 348s > ## Evaluation of long formulas: no line breaking in getFullForm: 348s > data(soup, package="ordinal") 348s > 348s > rhs <- paste(names(soup)[c(3, 5:12)], collapse=" + ") 348s > Location <- as.formula(paste("SURENESS ~ ", rhs, sep=" ")) 348s > Scale <- as.formula("~ PROD") 348s > 348s > fm5 <- clm(Location, scale=Scale, data=soup) 348s > summary(fm5) 348s formula: 348s SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ + COLD + EASY + GENDER + AGEGROUP + LOCATION 348s scale: ~PROD 348s data: soup 348s 348s link threshold nobs logLik AIC niter max.grad cond.H 348s logit flexible 1847 -2651.65 5367.30 8(1) 4.65e-07 1.1e+04 348s 348s Coefficients: 348s Estimate Std. Error z value Pr(>|z|) 348s PRODID2 1.09324 0.14790 7.392 1.45e-13 *** 348s PRODID3 1.54233 0.21252 7.257 3.95e-13 *** 348s PRODID4 0.95602 0.18180 5.258 1.45e-07 *** 348s PRODID5 1.52404 0.20311 7.504 6.21e-14 *** 348s PRODID6 1.83964 0.21750 8.458 < 2e-16 *** 348s DAY2 -0.26999 0.10280 -2.626 0.00863 ** 348s SOUPTYPECanned -0.31340 0.11745 -2.668 0.00762 ** 348s SOUPTYPEDry-mix 0.22429 0.14295 1.569 0.11665 348s SOUPFREQ1-4/month -0.06459 0.10551 -0.612 0.54046 348s SOUPFREQ<1/month 0.03664 0.21310 0.172 0.86350 348s COLDYes 0.31373 0.14894 2.106 0.03517 * 348s EASY2 0.16689 0.55063 0.303 0.76182 348s EASY3 0.34765 0.50432 0.689 0.49061 348s EASY4 0.30008 0.48283 0.621 0.53428 348s EASY5 0.23492 0.47686 0.493 0.62226 348s EASY6 -0.03205 0.46993 -0.068 0.94562 348s EASY7 0.02823 0.46963 0.060 0.95208 348s EASY8 -0.04600 0.47066 -0.098 0.92215 348s EASY9 -0.04084 0.49595 -0.082 0.93437 348s EASY10 1.03641 0.60080 1.725 0.08452 . 348s GENDERFemale -0.05092 0.10738 -0.474 0.63534 348s AGEGROUP31-40 0.02098 0.14822 0.142 0.88745 348s AGEGROUP41-50 0.23712 0.15824 1.498 0.13401 348s AGEGROUP51-65 -0.13791 0.14393 -0.958 0.33798 348s LOCATIONRegion 2 -0.09641 0.13225 -0.729 0.46599 348s LOCATIONRegion 3 0.06062 0.11981 0.506 0.61290 348s --- 348s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 348s 348s log-scale coefficients: 348s Estimate Std. Error z value Pr(>|z|) 348s PRODTest 0.14545 0.06621 2.197 0.028 * 348s --- 348s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 348s 348s Threshold coefficients: 348s Estimate Std. Error z value 348s 1|2 -1.64700 0.49982 -3.295 348s 2|3 -0.58840 0.49681 -1.184 348s 3|4 -0.23496 0.49669 -0.473 348s 4|5 0.04394 0.49679 0.088 348s 5|6 0.78551 0.49869 1.575 348s > 348s > ################################# 348s > ## Check that "."-notation works in formula: 348s > ## December 25th 2014, RHBC 348s > data(wine) 348s > wine2 <- wine[c("rating", "contact", "temp")] 348s > str(wine2) 348s 'data.frame': 72 obs. of 3 variables: 348s $ rating : Ord.factor w/ 5 levels "1"<"2"<"3"<"4"<..: 2 3 3 4 4 4 5 5 1 2 ... 348s $ contact: Factor w/ 2 levels "no","yes": 1 1 2 2 1 1 2 2 1 1 ... 348s $ temp : Factor w/ 2 levels "cold","warm": 1 1 1 1 2 2 2 2 1 1 ... 348s > fm0 <- clm(rating ~ ., data=wine2) 348s > fm1 <- clm(rating ~ contact + temp, data=wine2) 348s > keep <- c("coefficients", "logLik", "info") 348s > fun <- function(x, y) stopifnot(isTRUE(all.equal(x, y))) 348s > mapply(fun, fm0[keep], fm1[keep]) 348s $coefficients 348s NULL 348s 348s $logLik 348s NULL 348s 348s $info 348s NULL 348s 348s > ################################# 348s > 348s BEGIN TEST clmm.R 348s 348s R version 4.4.3 (2025-02-28) -- "Trophy Case" 348s Copyright (C) 2025 The R Foundation for Statistical Computing 348s Platform: aarch64-unknown-linux-gnu 348s 348s R is free software and comes with ABSOLUTELY NO WARRANTY. 348s You are welcome to redistribute it under certain conditions. 348s Type 'license()' or 'licence()' for distribution details. 348s 348s R is a collaborative project with many contributors. 348s Type 'contributors()' for more information and 348s 'citation()' on how to cite R or R packages in publications. 348s 348s Type 'demo()' for some demos, 'help()' for on-line help, or 348s 'help.start()' for an HTML browser interface to help. 348s Type 'q()' to quit R. 348s 349s > library(ordinal) 349s > data(wine) 349s > 349s > ################################# 349s > ## Estimation with a single simple RE term: 349s > ## Laplace: 349s > fmm1 <- clmm(rating ~ contact + temp + (1|judge), data=wine) 350s > summary(fmm1) 350s Cumulative Link Mixed Model fitted with the Laplace approximation 350s 350s formula: rating ~ contact + temp + (1 | judge) 350s data: wine 350s 350s link threshold nobs logLik AIC niter max.grad cond.H 350s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 2.8e+01 350s 350s Random effects: 350s Groups Name Variance Std.Dev. 350s judge (Intercept) 1.279 1.131 350s Number of groups: judge 9 350s 350s Coefficients: 350s Estimate Std. Error z value Pr(>|z|) 350s contactyes 1.8349 0.5125 3.580 0.000344 *** 350s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 350s --- 350s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 350s 350s Threshold coefficients: 350s Estimate Std. Error z value 350s 1|2 -1.6237 0.6824 -2.379 350s 2|3 1.5134 0.6038 2.507 350s 3|4 4.2285 0.8090 5.227 350s 4|5 6.0888 0.9725 6.261 350s > ## GHQ: 350s > fmm.ghq <- clmm(rating ~ contact + temp + (1|judge), data=wine, 350s + nAGQ=-10) 350s > summary(fmm.ghq) 350s Cumulative Link Mixed Model fitted with the Gauss-Hermite 350s quadrature approximation with 10 quadrature points 350s 350s formula: rating ~ contact + temp + (1 | judge) 350s data: wine 350s 350s link threshold nobs logLik AIC niter max.grad cond.H 350s logit flexible 72 -81.53 177.06 304(3) 1.67e-05 2.8e+01 350s 350s Random effects: 350s Groups Name Variance Std.Dev. 350s judge (Intercept) 1.288 1.135 350s Number of groups: judge 9 350s 350s Coefficients: 350s Estimate Std. Error z value Pr(>|z|) 350s contactyes 1.8335 0.5122 3.580 0.000344 *** 350s tempwarm 3.0620 0.5951 5.145 2.67e-07 *** 350s --- 350s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 350s 350s Threshold coefficients: 350s Estimate Std. Error z value 350s 1|2 -1.6231 0.6829 -2.377 350s 2|3 1.5133 0.6045 2.503 350s 3|4 4.2277 0.8094 5.223 350s 4|5 6.0869 0.9726 6.258 350s > ## AGQ: 350s > fmm.agq <- clmm(rating ~ contact + temp + (1|judge), data=wine, 350s + nAGQ=10) 350s > summary(fmm.agq) 350s Cumulative Link Mixed Model fitted with the adaptive Gauss-Hermite 350s quadrature approximation with 10 quadrature points 350s 350s formula: rating ~ contact + temp + (1 | judge) 350s data: wine 350s 350s link threshold nobs logLik AIC niter max.grad cond.H 350s logit flexible 72 -81.53 177.06 304(915) 2.26e-05 2.8e+01 350s 350s Random effects: 350s Groups Name Variance Std.Dev. 350s judge (Intercept) 1.288 1.135 350s Number of groups: judge 9 350s 350s Coefficients: 350s Estimate Std. Error z value Pr(>|z|) 350s contactyes 1.8334 0.5122 3.580 0.000344 *** 350s tempwarm 3.0619 0.5951 5.145 2.67e-07 *** 350s --- 350s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 350s 350s Threshold coefficients: 350s Estimate Std. Error z value 350s 1|2 -1.6235 0.6834 -2.376 350s 2|3 1.5128 0.6044 2.503 350s 3|4 4.2271 0.8090 5.225 350s 4|5 6.0862 0.9719 6.262 350s > ## tests: 350s > ## Notice warning about Laplace with multiple REs when nAGQ != 1: 350s > fmm1 <- try(clmm(rating ~ contact + temp + (1|judge) + (1|bottle), 350s + data=wine, nAGQ=10)) 350s > stopifnot(inherits(fmm1, "try-error")) 350s > 350s > ################################# 350s > ## Estimation with several RE terms: 350s > data(soup, package="ordinal") 350s > fmm <- clmm(SURENESS ~ PROD + (1|RESP) + (1|PROD:RESP), data=soup, 350s + threshold="equidistant") 350s Error : Quadrature methods are not available with more than one random effects term 351s > summary(fmm) 351s Cumulative Link Mixed Model fitted with the Laplace approximation 351s 351s formula: SURENESS ~ PROD + (1 | RESP) + (1 | PROD:RESP) 351s data: soup 351s 351s link threshold nobs logLik AIC niter max.grad cond.H 351s logit equidistant 1847 -2766.32 5542.63 225(711) 1.01e-03 1.3e+02 351s 351s Random effects: 351s Groups Name Variance Std.Dev. 351s PROD:RESP (Intercept) 0.4070 0.6379 351s RESP (Intercept) 0.1308 0.3616 351s Number of groups: PROD:RESP 370, RESP 185 351s 351s Coefficients: 351s Estimate Std. Error z value Pr(>|z|) 351s PRODTest 1.2865 0.1156 11.12 <2e-16 *** 351s --- 351s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 351s 351s Threshold coefficients: 351s Estimate Std. Error z value 351s threshold.1 -1.35104 0.09526 -14.18 351s spacing 0.56472 0.01905 29.65 351s > 351s > ################################# 351s > 351s > ## Estimation with implicit intercept: 351s > fm1 <- clmm(rating ~ 1 + (1|judge), data = wine) 351s > fm2 <- clmm(rating ~ (1|judge), data = wine) 351s > fm3 <- clmm(rating ~ 0 + (1|judge), data = wine) 351s > Warning message: 351s In getX(fullmf, fixedmf, contrasts) : an intercept is needed and assumed 351s stopifnot(isTRUE(all.equal(coef(fm1), coef(fm2), tolerance=1e-5)), 351s + isTRUE(all.equal(coef(fm1), coef(fm3), tolerance=1e-5))) 351s > 351s BEGIN TEST clmm.control.R 351s 351s R version 4.4.3 (2025-02-28) -- "Trophy Case" 351s Copyright (C) 2025 The R Foundation for Statistical Computing 351s Platform: aarch64-unknown-linux-gnu 351s 351s R is free software and comes with ABSOLUTELY NO WARRANTY. 351s You are welcome to redistribute it under certain conditions. 351s Type 'license()' or 'licence()' for distribution details. 351s 351s R is a collaborative project with many contributors. 351s Type 'contributors()' for more information and 351s 'citation()' on how to cite R or R packages in publications. 351s 351s Type 'demo()' for some demos, 'help()' for on-line help, or 351s 'help.start()' for an HTML browser interface to help. 351s Type 'q()' to quit R. 351s 352s > library(ordinal) 352s > data(wine) 352s > 352s > 352s > ### 3 options for specifying control arguments: 352s > ## 1) control is a simple list, e.g. list(trace=-1) 352s > ## 2) control is a call to clmm.control 352s > ## 3) control is an empty list; list() 352s > ## all in combination with extra control arguments. 352s > 352s > ordinal:::getCtrlArgs(clmm.control(), list(maxIter=200)) 352s $method 352s [1] "nlminb" 352s 352s $useMatrix 352s [1] FALSE 352s 352s $ctrl 352s $ctrl$trace 352s [1] 0 352s 352s $ctrl$maxIter 352s [1] 200 352s 352s $ctrl$gradTol 352s [1] 1e-04 352s 352s $ctrl$maxLineIter 352s [1] 50 352s 352s $ctrl$innerCtrl 352s [1] "warnOnly" 352s 352s 352s $optCtrl 352s $optCtrl$trace 352s [1] 0 352s 352s 352s $checkRanef 352s [1] "warn" 352s 352s > ordinal:::getCtrlArgs(list(), list(maxIter=200)) 352s $method 352s [1] "nlminb" 352s 352s $useMatrix 352s [1] FALSE 352s 352s $ctrl 352s $ctrl$trace 352s [1] 0 352s 352s $ctrl$maxIter 352s [1] 200 352s 352s $ctrl$gradTol 352s [1] 1e-04 352s 352s $ctrl$maxLineIter 352s [1] 50 352s 352s $ctrl$innerCtrl 352s [1] "warnOnly" 352s 352s 352s $optCtrl 352s $optCtrl$trace 352s [1] 0 352s 352s 352s $checkRanef 352s [1] "warn" 352s 352s > ordinal:::getCtrlArgs(list(), list(trace=-1)) 352s $method 352s [1] "nlminb" 352s 352s $useMatrix 352s [1] FALSE 352s 352s $ctrl 352s $ctrl$trace 352s [1] 1 352s 352s $ctrl$maxIter 352s [1] 50 352s 352s $ctrl$gradTol 352s [1] 1e-04 352s 352s $ctrl$maxLineIter 352s [1] 50 352s 352s $ctrl$innerCtrl 352s [1] "warnOnly" 352s 352s 352s $optCtrl 352s $optCtrl$trace 352s [1] 1 352s 352s 352s $checkRanef 352s [1] "warn" 352s 352s > ordinal:::getCtrlArgs(list(), list(trace=1)) 352s $method 352s [1] "nlminb" 352s 352s $useMatrix 352s [1] FALSE 352s 352s $ctrl 352s $ctrl$trace 353s [1] 0 353s 353s $ctrl$maxIter 353s [1] 50 353s 353s $ctrl$gradTol 353s [1] 1e-04 353s 353s $ctrl$maxLineIter 353s [1] 50 353s 353s $ctrl$innerCtrl 353s [1] "warnOnly" 353s 353s 353s $optCtrl 353s $optCtrl$trace 353s [1] 1 353s 353s 353s $checkRanef 353s [1] "warn" 353s 353s > ordinal:::getCtrlArgs(list(), list()) 353s $method 353s [1] "nlminb" 353s 353s $useMatrix 353s [1] FALSE 353s 353s $ctrl 353s $ctrl$trace 353s [1] 0 353s 353s $ctrl$maxIter 353s [1] 50 353s 353s $ctrl$gradTol 353s [1] 1e-04 353s 353s $ctrl$maxLineIter 353s [1] 50 353s 353s $ctrl$innerCtrl 353s [1] "warnOnly" 353s 353s 353s $optCtrl 353s $optCtrl$trace 353s [1] 0 353s 353s 353s $checkRanef 353s [1] "warn" 353s 353s > ordinal:::getCtrlArgs(list(maxIter=2), list()) 353s $method 353s [1] "nlminb" 353s 353s $useMatrix 353s [1] FALSE 353s 353s $ctrl 353s $ctrl$trace 353s [1] 0 353s 353s $ctrl$maxIter 353s [1] 2 353s 353s $ctrl$gradTol 353s [1] 1e-04 353s 353s $ctrl$maxLineIter 353s [1] 50 353s 353s $ctrl$innerCtrl 353s [1] "warnOnly" 353s 353s 353s $optCtrl 353s $optCtrl$trace 353s [1] 0 353s 353s 353s $checkRanef 353s [1] "warn" 353s 353s > 353s > ordinal:::getCtrlArgs(clmm.control(), list()) 353s $method 353s [1] "nlminb" 353s 353s $useMatrix 353s [1] FALSE 353s 353s $ctrl 353s $ctrl$trace 353s [1] 0 353s 353s $ctrl$maxIter 353s [1] 50 353s 353s $ctrl$gradTol 353s [1] 1e-04 353s 353s $ctrl$maxLineIter 353s [1] 50 353s 353s $ctrl$innerCtrl 353s [1] "warnOnly" 353s 353s 353s $optCtrl 353s $optCtrl$trace 353s [1] 0 353s 353s 353s $checkRanef 353s [1] "warn" 353s 353s > ordinal:::getCtrlArgs(clmm.control(maxIter=100), list(maxIter=200)) 353s $method 353s [1] "nlminb" 353s 353s $useMatrix 353s [1] FALSE 353s 353s $ctrl 353s $ctrl$trace 353s [1] 0 353s 353s $ctrl$maxIter 353s [1] 200 353s 353s $ctrl$gradTol 353s [1] 1e-04 353s 353s $ctrl$maxLineIter 353s [1] 50 353s 353s $ctrl$innerCtrl 353s [1] "warnOnly" 353s 353s 353s $optCtrl 353s $optCtrl$trace 353s [1] 0 353s 353s 353s $checkRanef 353s [1] "warn" 353s 353s > ordinal:::getCtrlArgs(clmm.control(maxIter=100), list(maxIter=200)) 353s $method 353s [1] "nlminb" 353s 353s $useMatrix 353s [1] FALSE 353s 353s $ctrl 353s $ctrl$trace 353s [1] 0 353s 353s $ctrl$maxIter 353s [1] 200 353s 353s $ctrl$gradTol 353s [1] 1e-04 353s 353s $ctrl$maxLineIter 353s [1] 50 353s 353s $ctrl$innerCtrl 353s [1] "warnOnly" 353s 353s 353s $optCtrl 353s $optCtrl$trace 353s [1] 0 353s 353s 353s $checkRanef 353s [1] "warn" 353s 353s > ordinal:::getCtrlArgs(clmm.control(), list(trace=1)) 353s $method 353s [1] "nlminb" 353s 353s $useMatrix 353s [1] FALSE 353s 353s $ctrl 353s $ctrl$trace 353s [1] 0 353s 353s $ctrl$maxIter 353s [1] 50 353s 353s $ctrl$gradTol 353s [1] 1e-04 353s 353s $ctrl$maxLineIter 353s [1] 50 353s 353s $ctrl$innerCtrl 353s [1] "warnOnly" 353s 353s 353s $optCtrl 353s $optCtrl$trace 353s [1] 1 353s 353s 353s $checkRanef 353s [1] "warn" 353s 353s > ordinal:::getCtrlArgs(clmm.control(), list(trace=-1)) 353s $method 353s [1] "nlminb" 353s 353s $useMatrix 353s [1] FALSE 353s 353s $ctrl 353s $ctrl$trace 353s [1] 1 353s 353s $ctrl$maxIter 353s [1] 50 353s 353s $ctrl$gradTol 353s [1] 1e-04 353s 353s $ctrl$maxLineIter 353s [1] 50 353s 353s $ctrl$innerCtrl 353s [1] "warnOnly" 353s 353s 353s $optCtrl 353s $optCtrl$trace 353s [1] 1 353s 353s 353s $checkRanef 353s [1] "warn" 353s 353s > ordinal:::getCtrlArgs(clmm.control(trace=1), list()) 353s $method 353s [1] "nlminb" 353s 353s $useMatrix 353s [1] FALSE 353s 353s $ctrl 353s $ctrl$trace 353s [1] 0 353s 353s $ctrl$maxIter 353s [1] 50 353s 353s $ctrl$gradTol 353s [1] 1e-04 353s 353s $ctrl$maxLineIter 353s [1] 50 353s 353s $ctrl$innerCtrl 353s [1] "warnOnly" 353s 353s 353s $optCtrl 353s $optCtrl$trace 353s [1] 1 353s 353s 353s $checkRanef 353s [1] "warn" 353s 353s > ordinal:::getCtrlArgs(clmm.control(trace=-1), list()) 353s $method 353s [1] "nlminb" 353s 353s $useMatrix 353s [1] FALSE 353s 353s $ctrl 353s $ctrl$trace 353s [1] 1 353s 353s $ctrl$maxIter 353s [1] 50 353s 353s $ctrl$gradTol 353s [1] 1e-04 353s 353s $ctrl$maxLineIter 353s [1] 50 353s 353s $ctrl$innerCtrl 353s [1] "warnOnly" 353s 353s 353s $optCtrl 353s $optCtrl$trace 353s [1] 1 353s 353s 353s $checkRanef 353s [1] "warn" 353s 353s > ordinal:::getCtrlArgs(clmm.control(trace=0), list()) 353s $method 353s [1] "nlminb" 353s 353s $useMatrix 353s [1] FALSE 353s 353s $ctrl 353s $ctrl$trace 353s [1] 0 353s 353s $ctrl$maxIter 353s [1] 50 353s 353s $ctrl$gradTol 353s [1] 1e-04 353s 353s $ctrl$maxLineIter 353s [1] 50 353s 353s $ctrl$innerCtrl 353s [1] "warnOnly" 353s 353s 353s $optCtrl 353s $optCtrl$trace 353s [1] 0 353s 353s 353s $checkRanef 353s [1] "warn" 353s 353s > ## Don't specify trace twice - surprising behavior might occur: 353s > ordinal:::getCtrlArgs(clmm.control(trace=1), list(trace=-1)) 353s $method 353s [1] "nlminb" 353s 353s $useMatrix 353s [1] FALSE 353s 353s $ctrl 353s $ctrl$trace 353s [1] 1 353s 353s $ctrl$maxIter 353s [1] 50 353s 353s $ctrl$gradTol 353s [1] 1e-04 353s 353s $ctrl$maxLineIter 353s [1] 50 353s 353s $ctrl$innerCtrl 353s [1] "warnOnly" 353s 353s 353s $optCtrl 353s $optCtrl$trace 353s [1] 1 353s 353s 353s $checkRanef 353s [1] "warn" 353s 353s > ordinal:::getCtrlArgs(clmm.control(trace=-1), list(trace=1)) 353s $method 353s [1] "nlminb" 353s 353s $useMatrix 353s [1] FALSE 353s 353s $ctrl 353s $ctrl$trace 353s [1] 1 353s 353s $ctrl$maxIter 353s [1] 50 353s 353s $ctrl$gradTol 353s [1] 1e-04 353s 353s $ctrl$maxLineIter 353s [1] 50 353s 353s $ctrl$innerCtrl 353s [1] "warnOnly" 353s 353s 353s $optCtrl 353s $optCtrl$trace 353s [1] 1 353s 353s 353s $checkRanef 353s [1] "warn" 353s 353s > 353s BEGIN TEST clmm.formula.R 353s 353s R version 4.4.3 (2025-02-28) -- "Trophy Case" 353s Copyright (C) 2025 The R Foundation for Statistical Computing 353s Platform: aarch64-unknown-linux-gnu 353s 353s R is free software and comes with ABSOLUTELY NO WARRANTY. 353s You are welcome to redistribute it under certain conditions. 353s Type 'license()' or 'licence()' for distribution details. 353s 353s R is a collaborative project with many contributors. 353s Type 'contributors()' for more information and 353s 'citation()' on how to cite R or R packages in publications. 353s 353s Type 'demo()' for some demos, 'help()' for on-line help, or 353s 'help.start()' for an HTML browser interface to help. 353s Type 'q()' to quit R. 353s 353s > library(ordinal) 354s > data(wine) 354s > 354s > ################################# 354s > ## Appropriate evaluation of formulas: 354s > 354s > ## These all work as intended with no warnings or errors: 354s > fm1 <- clmm(rating ~ contact + (1|judge), data=wine) 354s > fm1 354s Cumulative Link Mixed Model fitted with the Laplace approximation 354s 354s formula: rating ~ contact + (1 | judge) 354s data: wine 354s 354s link threshold nobs logLik AIC niter max.grad 354s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 354s 354s Random effects: 354s Groups Name Variance Std.Dev. 354s judge (Intercept) 0.4428 0.6654 354s Number of groups: judge 9 354s 354s Coefficients: 354s contactyes 354s 1.3 354s 354s Thresholds: 354s 1|2 2|3 3|4 4|5 354s -2.28331 0.04325 1.86062 3.20298 354s > fm1 <- clmm("rating ~ contact + (1|judge)", data=wine) 354s > fm1 354s Cumulative Link Mixed Model fitted with the Laplace approximation 354s 354s formula: rating ~ contact + (1 | judge) 354s data: wine 354s 354s link threshold nobs logLik AIC niter max.grad 354s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 354s 354s Random effects: 354s Groups Name Variance Std.Dev. 354s judge (Intercept) 0.4428 0.6654 354s Number of groups: judge 9 354s 354s Coefficients: 354s contactyes 354s 1.3 354s 354s Thresholds: 354s 1|2 2|3 3|4 4|5 354s -2.28331 0.04325 1.86062 3.20298 354s > fm1 <- clmm(as.formula("rating ~ contact + (1|judge)"), data=wine) 354s > fm1 354s Cumulative Link Mixed Model fitted with the Laplace approximation 354s 354s formula: rating ~ contact + (1 | judge) 354s data: wine 354s 354s link threshold nobs logLik AIC niter max.grad 354s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 354s 354s Random effects: 354s Groups Name Variance Std.Dev. 354s judge (Intercept) 0.4428 0.6654 354s Number of groups: judge 9 354s 354s Coefficients: 354s contactyes 354s 1.3 354s 354s Thresholds: 354s 1|2 2|3 3|4 4|5 354s -2.28331 0.04325 1.86062 3.20298 354s > fm1 <- clmm(as.formula(rating ~ contact + (1|judge)), data=wine) 354s > fm1 354s Cumulative Link Mixed Model fitted with the Laplace approximation 354s 354s formula: rating ~ contact + (1 | judge) 354s data: wine 354s 354s link threshold nobs logLik AIC niter max.grad 354s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 354s 354s Random effects: 354s Groups Name Variance Std.Dev. 354s judge (Intercept) 0.4428 0.6654 354s Number of groups: judge 9 354s 354s Coefficients: 354s contactyes 354s 1.3 354s 354s Thresholds: 354s 1|2 2|3 3|4 4|5 354s -2.28331 0.04325 1.86062 3.20298 354s > 354s > ################################# 354s > 354s > ### finding variables in the environment of the formula: 354s > makeform <- function() { 354s + f1 <- as.formula(rating ~ temp + contact + (1|judge)) 354s + rating <- wine$rating 354s + temp <- wine$temp 354s + contact <- wine$contact 354s + judge <- wine$judge 354s + f1 354s + } 354s > ## 'makeform' makes are formula object in the environment of the 354s > ## function makeform: 354s > f1 <- makeform() 354s > f1 # print 354s rating ~ temp + contact + (1 | judge) 354s 354s > class(f1) 354s [1] "formula" 354s > ## If we give the data, we can evaluate the model: 354s > fm1 <- clmm(f1, data=wine) 354s > ## We can also evaluate the model because the data are available in 354s > ## the environment associated with the formula: 354s > fm1 <- clmm(f1) 354s > ## For instance, the 'rating' variable is not found in the Global 354s > ## environment; we have to evaluate the 'name' of 'rating' in the 354s > ## appropriate environment: 354s > (try(rating, silent=TRUE)) 354s [1] "Error : object 'rating' not found\n" 354s attr(,"class") 354s [1] "try-error" 354s attr(,"condition") 354s 354s > eval(as.name("rating"), envir=environment(f1)) 354s [1] 2 3 3 4 4 4 5 5 1 2 1 3 2 3 5 4 2 3 3 2 5 5 4 4 3 2 3 2 3 2 5 3 2 3 4 3 3 3 354s [39] 3 3 3 2 3 2 2 4 5 4 1 1 2 2 2 3 2 3 2 2 2 3 3 3 3 4 1 2 3 2 3 2 4 4 354s Levels: 1 < 2 < 3 < 4 < 5 354s > ## If instead we generate the formula in the Global environment where 354s > ## the variables are not found, we cannot evaluate the model: 354s > f2 <- as.formula(rating ~ temp + contact + (1|judge)) 354s > (try(fm2 <- clmm(f2), silent=TRUE)) 354s [1] "Error in eval(predvars, data, env) : object 'rating' not found\n" 354s attr(,"class") 354s [1] "try-error" 354s attr(,"condition") 354s 354s > environment(f2) <- environment(f1) 354s > fm2 <- clmm(f2) 354s > 354s > ################################# 354s > ## Use of formula-objects 354s > f <- formula(rating ~ temp + contact + (1|judge)) 354s > m2 <- clmm(f, data = wine) 354s > summary(m2) 354s Cumulative Link Mixed Model fitted with the Laplace approximation 354s 354s formula: rating ~ temp + contact + (1 | judge) 354s data: wine 354s 354s link threshold nobs logLik AIC niter max.grad cond.H 354s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 2.8e+01 354s 354s Random effects: 354s Groups Name Variance Std.Dev. 354s judge (Intercept) 1.279 1.131 354s Number of groups: judge 9 354s 354s Coefficients: 354s Estimate Std. Error z value Pr(>|z|) 354s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 354s contactyes 1.8349 0.5125 3.580 0.000344 *** 354s --- 354s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 354s 354s Threshold coefficients: 354s Estimate Std. Error z value 354s 1|2 -1.6237 0.6824 -2.379 354s 2|3 1.5134 0.6038 2.507 354s 3|4 4.2285 0.8090 5.227 354s 4|5 6.0888 0.9725 6.261 354s > 354s > ################################# 354s > ## Other ways to construct formulas: 354s > set.seed(12345) 354s > y <- factor(sample(1:4,20,replace=TRUE)) 354s > x <- rnorm(20) 354s > b <- gl(5, 4, labels=letters[1:5]) 354s > data <- data.frame(y=y, x=x, b=b) 354s > rm(x, y, b) 354s > clmm(y ~ x + (1|b), data=data) 354s Cumulative Link Mixed Model fitted with the Laplace approximation 354s 354s formula: y ~ x + (1 | b) 354s data: data 354s 354s link threshold nobs logLik AIC niter max.grad 354s logit flexible 20 -25.37 60.74 334(288) 1.25e-07 354s 354s Random effects: 354s Groups Name Variance Std.Dev. 354s b (Intercept) 2.676e-09 5.173e-05 354s Number of groups: b 5 354s 354s Coefficients: 354s x 354s 0.2527 354s 354s Thresholds: 354s 1|2 2|3 3|4 354s -2.18234 0.06059 0.92746 354s > fit <- clmm(data$y ~ data$x + (1|data$b)) 354s > fit 354s Cumulative Link Mixed Model fitted with the Laplace approximation 354s 354s formula: data$y ~ data$x + (1 | data$b) 354s 354s link threshold nobs logLik AIC niter max.grad 354s logit flexible 20 -25.37 60.74 334(288) 1.25e-07 354s 354s Random effects: 354s Groups Name Variance Std.Dev. 354s data$b (Intercept) 2.676e-09 5.173e-05 354s Number of groups: data$b 5 354s 354s Coefficients: 354s data$x 354s 0.2527 354s 354s Thresholds: 354s 1|2 2|3 3|4 354s -2.18234 0.06059 0.92746 354s > fit <- clmm(data[, 1] ~ data[, 2] + (1|data[, 3])) 354s > fit 354s Cumulative Link Mixed Model fitted with the Laplace approximation 354s 354s formula: data[, 1] ~ data[, 2] + (1 | data[, 3]) 354s 354s link threshold nobs logLik AIC niter max.grad 354s logit flexible 20 -25.37 60.74 334(288) 1.25e-07 354s 354s Random effects: 354s Groups Name Variance Std.Dev. 354s data[, 3] (Intercept) 2.676e-09 5.173e-05 354s Number of groups: data[, 3] 5 354s 354s Coefficients: 354s data[, 2] 354s 0.2527 354s 354s Thresholds: 354s 1|2 2|3 3|4 354s -2.18234 0.06059 0.92746 354s > 354s > ################################# 354s > ## Evaluation within other functions: 354s > ## date: January 18th 2012. 354s > ## 354s > ## The problem was raised by Stefan Herzog (stefan.herzog@unibas.ch) 354s > ## January 12th 2012 in trying to make clmm work with glmulti. 354s > 354s > fun.clmm <- function(formula, data) 354s + ### This only works because clmm via eclmm.model.frame is careful to 354s + ### evaluate the 'formula' in the parent environment such it is not the 354s + ### character "formula" that is attempted evaluated. 354s + clmm(formula, data = data) 354s > 354s > fun2.clmm <- function(formula, data, weights, subset) { 354s + ### This should be the safe way to ensure evaluation of clmm in the 354s + ### right environment. 354s + mc <- match.call() 354s + mc[[1]] <- as.name("clmm") 354s + eval.parent(mc) 354s + } 354s > 354s > fun.clmm(rating ~ temp + contact + (1|judge), data=wine) ## works 354s Cumulative Link Mixed Model fitted with the Laplace approximation 354s 354s formula: rating ~ temp + contact + (1 | judge) 354s data: data 354s 354s link threshold nobs logLik AIC niter max.grad 354s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 354s 354s Random effects: 354s Groups Name Variance Std.Dev. 354s judge (Intercept) 1.279 1.131 354s Number of groups: judge 9 354s 354s Coefficients: 354s tempwarm contactyes 354s 3.063 1.835 354s 354s Thresholds: 354s 1|2 2|3 3|4 4|5 354s -1.624 1.513 4.229 6.089 354s > fun2.clmm(rating ~ temp + contact + (1|judge), data=wine) ## works 354s Cumulative Link Mixed Model fitted with the Laplace approximation 354s 354s formula: rating ~ temp + contact + (1 | judge) 354s data: wine 354s 354s link threshold nobs logLik AIC niter max.grad 354s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 354s 354s Random effects: 354s Groups Name Variance Std.Dev. 354s judge (Intercept) 1.279 1.131 354s Number of groups: judge 9 354s 354s Coefficients: 354s tempwarm contactyes 354s 3.063 1.835 354s 354s Thresholds: 354s 1|2 2|3 3|4 4|5 354s -1.624 1.513 4.229 6.089 354s > 354s > form1 <- "rating ~ temp + contact + (1|judge)" 354s > fun.clmm(form1, data=wine) ## works 354s Cumulative Link Mixed Model fitted with the Laplace approximation 354s 354s formula: rating ~ temp + contact + (1 | judge) 354s data: data 354s 354s link threshold nobs logLik AIC niter max.grad 354s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 354s 354s Random effects: 354s Groups Name Variance Std.Dev. 354s judge (Intercept) 1.279 1.131 354s Number of groups: judge 9 354s 354s Coefficients: 354s tempwarm contactyes 354s 3.063 1.835 354s 354s Thresholds: 354s 1|2 2|3 3|4 4|5 354s -1.624 1.513 4.229 6.089 354s > fun2.clmm(form1, data=wine) ## works 354s Cumulative Link Mixed Model fitted with the Laplace approximation 354s 354s formula: rating ~ temp + contact + (1 | judge) 354s data: wine 354s 354s link threshold nobs logLik AIC niter max.grad 354s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 354s 354s Random effects: 354s Groups Name Variance Std.Dev. 354s judge (Intercept) 1.279 1.131 354s Number of groups: judge 9 354s 354s Coefficients: 354s tempwarm contactyes 354s 3.063 1.835 354s 354s Thresholds: 354s 1|2 2|3 3|4 4|5 354s -1.624 1.513 4.229 6.089 354s > 354s > form2 <- formula(rating ~ temp + contact + (1|judge)) 354s > fun.clmm(form2, data=wine) ## works 354s Cumulative Link Mixed Model fitted with the Laplace approximation 354s 354s formula: rating ~ temp + contact + (1 | judge) 354s data: data 354s 354s link threshold nobs logLik AIC niter max.grad 354s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 354s 354s Random effects: 354s Groups Name Variance Std.Dev. 354s judge (Intercept) 1.279 1.131 354s Number of groups: judge 9 354s 354s Coefficients: 354s tempwarm contactyes 354s 3.063 1.835 354s 354s Thresholds: 354s 1|2 2|3 3|4 4|5 354s -1.624 1.513 4.229 6.089 354s > fun2.clmm(form2, data=wine) ## works 354s Cumulative Link Mixed Model fitted with the Laplace approximation 354s 354s formula: rating ~ temp + contact + (1 | judge) 354s data: wine 354s 354s link threshold nobs logLik AIC niter max.grad 354s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 354s 354s Random effects: 354s Groups Name Variance Std.Dev. 354s judge (Intercept) 1.279 1.131 354s Number of groups: judge 9 354s 354s Coefficients: 354s tempwarm contactyes 354s 3.063 1.835 354s 354s Thresholds: 354s 1|2 2|3 3|4 4|5 354s -1.624 1.513 4.229 6.089 354s > ## Notice that clmm is not able to get the name of the data (wine) 354s > ## correct when using fun.clmm. 354s > 354s > ################################# 354s > 354s > ## ## Example 2: using clmm function 354s > ## # 354s > ## ## Now I want to consider judge as a random effect to account for 354s > ## ## grouping structure of data 354s > ## mod2 <- clmm(rating ~ temp + contact + (1|judge), data=wine) 354s > ## 354s > ## ##Again, I started by using my own code to run all potential models: 354s > ## ## put names of all your variables in this vector: 354s > ## vl2 <- c("temp", "contact") 354s > ## ## generate list of possible combinations of variables: 354s > ## combos2 <- NULL 354s > ## for(i in 1:length(vl2)) { 354s > ## combos2 <- c(combos2, combn(vl2, i, simplify = F)) 354s > ## } 354s > ## ## create formulae and run models one by one, saving them as model1, 354s > ## ## model2 etc... 354s > ## for (i in 1:length(combos2)) { 354s > ## vs2 <- paste(combos2[[i]], collapse=" + ") 354s > ## f2 <- formula(paste("rating ~ ", vs2, "+(1|judge)", sep="")) 354s > ## print(f2) 354s > ## assign(paste("model", i, sep=""), clmm(f2, data=wine)) 354s > ## } 354s > ## summary(model1) # etc 354s > ## summary(model2) # etc 354s > ## summary(model3) # etc 354s > ## 354s > ## models <- vector("list", length(combos2)) 354s > ## for(i in 1:length(combos2)) { 354s > ## vs2 <- paste(combos2[[i]], collapse=" + ") 354s > ## f2 <- formula(paste("rating ~ ", vs2, "+(1|judge)", sep="")) 354s > ## print(f2) 354s > ## models[[i]] <- clmm(f2, data=wine) 354s > ## ## assign(paste("model", i, sep=""), clmm(f2, data=wine)) 354s > ## } 354s > ## 354s > ## ## Coefficients, AIC and BIC: 354s > ## lapply(models, function(m) coef(summary(m))) 354s > ## lapply(models, AIC) 354s > ## lapply(models, BIC) 354s > ## 354s > ## ## library(MuMIn) 354s > ## ## dd2 <- dredge(mod2) ## does not work 354s > ## ## ?dredge 354s > ## ## traceback() 354s > ## ## mod2$formula 354s > ## ## terms(as.formula(formula(mod2))) 354s > ## ## 354s > ## ## library(lme4) 354s > ## ## fmm1 <- lmer(response ~ temp + contact + (1|judge), data=wine) 354s > ## ## fmm1 354s > ## ## terms(as.formula(lme4:::formula(fmm1))) 354s > ## ## terms(as.formula(formula(fmm1))) 354s > 354s BEGIN TEST clmm.methods.R 354s 354s R version 4.4.3 (2025-02-28) -- "Trophy Case" 354s Copyright (C) 2025 The R Foundation for Statistical Computing 354s Platform: aarch64-unknown-linux-gnu 354s 354s R is free software and comes with ABSOLUTELY NO WARRANTY. 354s You are welcome to redistribute it under certain conditions. 354s Type 'license()' or 'licence()' for distribution details. 354s 354s R is a collaborative project with many contributors. 354s Type 'contributors()' for more information and 354s 'citation()' on how to cite R or R packages in publications. 354s 354s Type 'demo()' for some demos, 'help()' for on-line help, or 354s 'help.start()' for an HTML browser interface to help. 354s Type 'q()' to quit R. 354s 355s > library(ordinal) 355s > data(wine) 355s > 355s > ################################# 355s > ## model.matrix method for clmm-objects: 355s > fmm1 <- clmm(rating ~ contact + temp + (1|judge), data=wine) 356s > mm <- model.matrix(fmm1) 356s > stopifnot(inherits(mm, "matrix"), 356s + dim(mm) == c(72, 3)) 356s > 356s > ################################# 356s > ## anova.clmm works even if formula does not have an environment: 356s > fmm1 <- clmm(rating ~ temp * contact + (1|judge), data = wine) 356s > fmm2 <- clmm(rating ~ temp + contact + (1|judge), data = wine) 356s > environment(fmm1$formula) <- NULL 356s > environment(fmm2$formula) <- NULL 356s > anova(fmm1, fmm2) 356s Likelihood ratio tests of cumulative link models: 356s 356s formula: link: threshold: 356s fmm2 rating ~ temp + contact + (1 | judge) logit flexible 356s fmm1 rating ~ temp * contact + (1 | judge) logit flexible 356s 356s no.par AIC logLik LR.stat df Pr(>Chisq) 356s fmm2 7 177.13 -81.565 356s fmm1 8 179.07 -81.536 0.0589 1 0.8082 356s > 356s > 356s > ################################# 356s > ## Test that ranef, condVar and VarCorr work as they are supposed to whether or 356s > ## not nlme and lme4 are loaded: 356s > 356s > fm <- clmm(rating ~ temp + contact + (1|judge), data = wine) 356s > fm 356s Cumulative Link Mixed Model fitted with the Laplace approximation 356s 356s formula: rating ~ temp + contact + (1 | judge) 356s data: wine 356s 356s link threshold nobs logLik AIC niter max.grad 356s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 356s 356s Random effects: 356s Groups Name Variance Std.Dev. 356s judge (Intercept) 1.279 1.131 356s Number of groups: judge 9 356s 356s Coefficients: 356s tempwarm contactyes 356s 3.063 1.835 356s 356s Thresholds: 356s 1|2 2|3 3|4 4|5 356s -1.624 1.513 4.229 6.089 356s > ranef(fm) 356s $judge 356s (Intercept) 356s 1 1.6961783 356s 2 -0.5657831 356s 3 0.9688083 356s 4 -0.0595499 356s 5 0.2305101 356s 6 0.4770387 356s 7 -1.9109736 356s 8 -0.2729439 356s 9 -0.5546758 356s 356s > VarCorr(fm) 356s $judge 356s (Intercept) 356s (Intercept) 1.279461 356s attr(,"stddev") 356s (Intercept) 356s 1.131133 356s 356s > condVar(fm) 356s $judge 356s (Intercept) 356s 1 0.3067453 356s 2 0.3779358 356s 3 0.3545529 356s 4 0.3651870 356s 5 0.3566067 356s 6 0.3485475 356s 7 0.3435693 356s 8 0.3050453 356s 9 0.3183194 356s 356s > summary(fm) 356s Cumulative Link Mixed Model fitted with the Laplace approximation 356s 356s formula: rating ~ temp + contact + (1 | judge) 356s data: wine 356s 356s link threshold nobs logLik AIC niter max.grad cond.H 356s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 2.8e+01 356s 356s Random effects: 356s Groups Name Variance Std.Dev. 356s judge (Intercept) 1.279 1.131 356s Number of groups: judge 9 356s 356s Coefficients: 356s Estimate Std. Error z value Pr(>|z|) 356s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 356s contactyes 1.8349 0.5125 3.580 0.000344 *** 356s --- 356s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 356s 356s Threshold coefficients: 356s Estimate Std. Error z value 356s 1|2 -1.6237 0.6824 -2.379 356s 2|3 1.5134 0.6038 2.507 356s 3|4 4.2285 0.8090 5.227 356s 4|5 6.0888 0.9725 6.261 356s > 356s > library(nlme) 356s > ranef(fm) 356s $judge 356s (Intercept) 356s 1 1.6961783 356s 2 -0.5657831 356s 3 0.9688083 356s 4 -0.0595499 356s 5 0.2305101 356s 6 0.4770387 356s 7 -1.9109736 356s 8 -0.2729439 356s 9 -0.5546758 356s 356s > VarCorr(fm) 356s $judge 356s (Intercept) 356s (Intercept) 1.279461 356s attr(,"stddev") 356s (Intercept) 356s 1.131133 356s 356s > condVar(fm) 356s $judge 356s (Intercept) 356s 1 0.3067453 356s 2 0.3779358 356s 3 0.3545529 356s 4 0.3651870 356s 5 0.3566067 356s 6 0.3485475 356s 7 0.3435693 356s 8 0.3050453 356s 9 0.3183194Loading required package: Matrix 356s 356s 356s > library(lme4) 356s 356s Attaching package: ‘lme4’ 356s 356s The following object is masked from ‘package:nlme’: 356s 356s lmList 356s 356s > ranef(fm) 356s $judge 356s (Intercept) 356s 1 1.6961783 356s 2 -0.5657831 356s 3 0.9688083 356s 4 -0.0595499 356s 5 0.2305101 356s 6 0.4770387 356s 7 -1.9109736 356s 8 -0.2729439 356s 9 -0.5546758 356s 356s > VarCorr(fm) 356s $judge 356s (Intercept) 356s (Intercept) 1.279461 356s attr(,"stddev") 356s (Intercept) 356s 1.131133 356s 356s > condVar(fm) 356s $judge 356s (Intercept) 356s 1 0.3067453 356s 2 0.3779358 356s 3 0.3545529 356s 4 0.3651870 356s 5 0.3566067 356s 6 0.3485475 356s 7 0.3435693 356s 8 0.3050453 356s 9 0.3183194 356s 356s > fm1 <- lmer(Reaction ~ Days + (Days | Subject), data=sleepstudy) 356s > ranef(fm1) 356s $Subject 356s (Intercept) Days 356s 308 2.2585510 9.1989758 356s 309 -40.3987381 -8.6196806 356s 310 -38.9604090 -5.4488565 356s 330 23.6906196 -4.8143503 356s 331 22.2603126 -3.0699116 356s 332 9.0395679 -0.2721770 356s 333 16.8405086 -0.2236361 356s 334 -7.2326151 1.0745816 356s 335 -0.3336684 -10.7521652 356s 337 34.8904868 8.6282652 356s 349 -25.2102286 1.1734322 356s 350 -13.0700342 6.6142178 356s 351 4.5778642 -3.0152621 356s 352 20.8636782 3.5360011 356s 369 3.2754656 0.8722149 356s 370 -25.6129993 4.8224850 356s 371 0.8070461 -0.9881562 356s 372 12.3145921 1.2840221 356s 356s with conditional variances for “Subject” 356s > VarCorr(fm1) 356s Groups Name Std.Dev. Corr 356s Subject (Intercept) 24.7407 356s Days 5.9221 0.066 356s Residual 25.5918 356s > 356s > ranef(fm) 356s $judge 356s (Intercept) 356s 1 1.6961783 356s 2 -0.5657831 356s 3 0.9688083 356s 4 -0.0595499 356s 5 0.2305101 356s 6 0.4770387 356s 7 -1.9109736 356s 8 -0.2729439 356s 9 -0.5546758 356s 356s > VarCorr(fm) 356s $judge 356s (Intercept) 356s (Intercept) 1.279461 356s attr(,"stddev") 356s (Intercept) 356s 1.131133 356s 356s > condVar(fm) 356s $judge 356s (Intercept) 356s 1 0.3067453 356s 2 0.3779358 356s 3 0.3545529 356s 4 0.3651870 356s 5 0.3566067 356s 6 0.3485475 356s 7 0.3435693 356s 8 0.3050453 356s 9 0.3183194 356s 356s > summary(fm) 356s Cumulative Link Mixed Model fitted with the Laplace approximation 356s 356s formula: rating ~ temp + contact + (1 | judge) 356s data: wine 356s 356s link threshold nobs logLik AIC niter max.grad cond.H 356s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 2.8e+01 356s 356s Random effects: 356s Groups Name Variance Std.Dev. 356s judge (Intercept) 1.279 1.131 356s Number of groups: judge 9 356s 356s Coefficients: 356s Estimate Std. Error z value Pr(>|z|) 356s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 356s contactyes 1.8349 0.5125 3.580 0.000344 *** 356s --- 356s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 356s 356s Threshold coefficients: 356s Estimate Std. Error z value 356s 1|2 -1.6237 0.6824 -2.379 356s 2|3 1.5134 0.6038 2.507 356s 3|4 4.2285 0.8090 5.227 356s 4|5 6.0888 0.9725 6.261 356s > 356s BEGIN TEST confint.R 356s 356s R version 4.4.3 (2025-02-28) -- "Trophy Case" 356s Copyright (C) 2025 The R Foundation for Statistical Computing 356s Platform: aarch64-unknown-linux-gnu 356s 356s R is free software and comes with ABSOLUTELY NO WARRANTY. 356s You are welcome to redistribute it under certain conditions. 356s Type 'license()' or 'licence()' for distribution details. 356s 356s R is a collaborative project with many contributors. 356s Type 'contributors()' for more information and 356s 'citation()' on how to cite R or R packages in publications. 356s 356s Type 'demo()' for some demos, 'help()' for on-line help, or 356s 'help.start()' for an HTML browser interface to help. 356s Type 'q()' to quit R. 356s 356s > ################################# 356s > ## test profile and confint methods: 356s > library(ordinal) 357s > data(wine) 357s > fm1 <- clm(rating ~ contact + temp, data = wine) 357s > summary(fm1) 357s formula: rating ~ contact + temp 357s data: wine 357s 357s link threshold nobs logLik AIC niter max.grad cond.H 357s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 357s 357s Coefficients: 357s Estimate Std. Error z value Pr(>|z|) 357s contactyes 1.5278 0.4766 3.205 0.00135 ** 357s tempwarm 2.5031 0.5287 4.735 2.19e-06 *** 357s --- 357s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 357s 357s Threshold coefficients: 357s Estimate Std. Error z value 357s 1|2 -1.3444 0.5171 -2.600 357s 2|3 1.2508 0.4379 2.857 357s 3|4 3.4669 0.5978 5.800 357s 4|5 5.0064 0.7309 6.850 357s > 357s > ## profile.clm and confint.clm: 357s > pr1 <- profile(fm1) 357s > confint(pr1) 357s 2.5 % 97.5 % 357s contactyes 0.6158045 2.492424 357s tempwarm 1.5097839 3.595251 357s > pr1 <- profile(fm1, which.beta = 1:2) 357s > confint(pr1) 357s 2.5 % 97.5 % 357s contactyes 0.6158045 2.492424 357s tempwarm 1.5097839 3.595251 357s > pr1 <- profile(fm1, which.beta = 2:1) 357s > confint(pr1) 357s 2.5 % 97.5 % 357s tempwarm 1.5097839 3.595251 357s contactyes 0.6158045 2.492424 357s > pr1 <- profile(fm1, which.beta = 1) 357s > confint(pr1) 357s 2.5 % 97.5 % 357s contactyes 0.6158045 2.492424 357s > pr1 <- profile(fm1, which.beta = 2) 357s > confint(pr1) 357s 2.5 % 97.5 % 357s tempwarm 1.509784 3.595251 357s > pr1 <- try(profile(fm1, which.beta = 0), silent = TRUE) ## error 357s > pr1 <- try(profile(fm1, which.beta = "no.par"), silent = TRUE) ## error 357s > pr1 <- try(profile(fm1, which.beta = -1), silent = TRUE) ## error 357s > pr1 <- profile(fm1, which.beta = "tempwarm") 357s > confint(pr1) 357s 2.5 % 97.5 % 357s tempwarm 1.509784 3.595251 357s > pr1 <- profile(fm1, alpha = 0.1) 357s > confint(pr1) ## should give NA in this case? 357s 2.5 % 97.5 % 357s contactyes NA NA 357s tempwarm NA NA 357s > pr1 <- profile(fm1, max.steps = 9) 357s > pr1 <- profile(fm1, step.warn = 7) 358s > pr1 <- profile(fm1, nsteps = 6) 358s > pr1 <- profile(fm1, trace = 1) 358s 358s Parameter: contactyes down 358s 358s Parameter: contactyes up 358s 358s Parameter: tempwarm down 358s 358s Parameter: tempwarm up 358s > pr1 <- profile(fm1, control = list(gradTol = .1)) 358s > confint(pr1) ## not at all unreliable... 358s 2.5 % 97.5 % 358s contactyes 0.6158045 2.492424 358s tempwarm 1.5097839 3.595251 358s > 358s > ## single regression coef setting: 358s > fm2 <- clm(rating ~ contact, data = wine) 358s > summary(fm2) 358s formula: rating ~ contact 358s data: wine 358s 358s link threshold nobs logLik AIC niter max.grad cond.H 358s logit flexible 72 -99.96 209.91 5(0) 1.67e-07 1.7e+01 358s 358s Coefficients: 358s Estimate Std. Error z value Pr(>|z|) 358s contactyes 1.2070 0.4499 2.683 0.0073 ** 358s --- 358s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 358s 358s Threshold coefficients: 358s Estimate Std. Error z value 358s 1|2 -2.13933 0.48981 -4.368 358s 2|3 0.04257 0.32063 0.133 358s 3|4 1.71449 0.38637 4.437 358s 4|5 2.97875 0.50207 5.933 358s > pr2 <- profile(fm2) 358s > confint(pr2) 358s 2.5 % 97.5 % 358s contactyes 0.3403978 2.110952 358s > 358s > ## confint.clm: 358s > confint(fm1) 358s argument 'parm' ignored 358s 2.5 % 97.5 % 358s contactyes 0.6157925 2.492404 358s tempwarm 1.5097627 3.595225 358s > confint(fm1, 2) 358s 2.5 % 97.5 % 358s contactyes 0.6157925 2.492404 358s tempwarm 1.5097627 3.595225 358s > confint(fm1, 1) 358s argument 'parm' ignored 358s 2.5 % 97.5 % 358s contactyes 0.6157925 2.492404 358s tempwarm 1.5097627 3.595225 358s > confint(fm1, "tempwarm") 358s argument 'parm' ignored 358s 2.5 % 97.5 % 358s contactyes 0.6157925 2.492404 358s tempwarm 1.5097627 3.595225 358s > confint(fm1, type = "profile") 358s 2.5 % 97.5 % 358s contactyes 0.6157925 2.492404 358s tempwarm 1.5097627 3.595225 358s > confint(fm1, type = "Wald") 358s 2.5 % 97.5 % 358s 1|2 -2.3578848 -0.330882 358s 2|3 0.3925794 2.109038 358s 3|4 2.2952980 4.638476 358s 4|5 3.5738541 6.438954 358s contactyes 0.5936345 2.461961 358s tempwarm 1.4669081 3.539296 358s > confint(fm1, 2, type = "Wald") 358s 2.5 % 97.5 % 358s 1|2 -2.3578848 -0.330882 358s 2|3 0.3925794 2.109038 358s 3|4 2.2952980 4.638476 358s 4|5 3.5738541 6.438954 358s contactyes 0.5936345 2.461961 358s tempwarm 1.4669081 3.539296 358s > confint(fm1, level = 0.5) 358s argument 'parm' ignored 358s 25 % 75 % 358s contactyes 1.209254 1.852544 358s tempwarm 2.152051 2.865757 358s > confint(fm1, level = 1 - 1e-6) 358s 0 % 100 % 358s contactyes -0.7003630 4.091731 358s tempwarm 0.1351282 5.520007 358s > confint(fm1, level = 1 - 1e-10) ## extreme, but it works 358s Wait for profiling to be done... 358s 0 % 100 % 358s contactyes -1.4045009 5.059182 358s tempwarm -0.5753928 6.774556 358s > confint(fm1, trace = 1) 358s 358s Parameter: contactyes down 358s 358s Parameter: contactyes up 358s 358s Parameter: tempwarm down 358s 358s Parameter: tempwarm up 358s 2.5 % 97.5 % 358s contactyes 0.6157925 2.492404 358s tempwarm 1.5097627 3.595225 358s > 358s > ## plot.profile: 358s > pr1 <- profile(fm1, which.beta=1:2, alpha = 1e-3) 358s > par(mfrow = c(1,2)) 358s > plot(pr1) 358s > plot(pr1, 1) 358s > plot(pr1, "contactyes") 358s > plot(pr1, level = .97) 358s > plot(pr1, Log = TRUE) 358s > plot(pr1, relative = FALSE) 358s > plot(pr1, root = TRUE) 358s > plot(pr1, approx = TRUE) 358s > plot(pr1, n=10) 358s > plot(pr1, ylim = c(0,2)) 358s > plot(pr1, las = 1) 358s > plot(pr2) 358s > 358s > 358s BEGIN TEST nominal.test.R 358s 358s R version 4.4.3 (2025-02-28) -- "Trophy Case" 358s Copyright (C) 2025 The R Foundation for Statistical Computing 358s Platform: aarch64-unknown-linux-gnu 358s 358s R is free software and comes with ABSOLUTELY NO WARRANTY. 358s You are welcome to redistribute it under certain conditions. 358s Type 'license()' or 'licence()' for distribution details. 358s 358s R is a collaborative project with many contributors. 358s Type 'contributors()' for more information and 358s 'citation()' on how to cite R or R packages in publications. 358s 358s Type 'demo()' for some demos, 'help()' for on-line help, or 358s 'help.start()' for an HTML browser interface to help. 358s Type 'q()' to quit R. 358s 358s > library(ordinal) 359s > 359s > if(require(MASS)) { 359s + fm1 <- clm(Sat ~ Infl + Type + Cont, data=housing, weights=Freq) 359s + scale_test(fm1) 359s + nominal_test(fm1) 359s + 359s + fm2 <- update(fm1, scale=~Cont) 359s + scale_test(fm2) 359s + nominal_test(fm2) 359s + fm3 <- update(fm1, nominal=~ Cont) 359s + fm3$Theta 359s + anova(fm2, fm3) 359s + fm3$alpha.mat 359s + summary(fm3) 359s + } 359s Loading required package: MASS 359s formula: Sat ~ Infl + Type + Cont 359s nominal: ~Cont 359s data: housing 359s 359s link threshold nobs logLik AIC niter max.grad cond.H 359s logit flexible 1681 -1738.35 3494.70 4(0) 1.31e-07 6.3e+01 359s 359s Coefficients: (1 not defined because of singularities) 359s Estimate Std. Error z value Pr(>|z|) 359s InflMedium 0.5695 0.1048 5.436 5.45e-08 *** 359s InflHigh 1.2884 0.1271 10.137 < 2e-16 *** 359s TypeApartment -0.5706 0.1192 -4.788 1.68e-06 *** 359s TypeAtrium -0.3643 0.1552 -2.348 0.0189 * 359s TypeTerrace -1.0980 0.1516 -7.242 4.43e-13 *** 359s ContHigh NA NA NA NA 359s --- 359s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 359s 359s Threshold coefficients: 359s Estimate Std. Error z value 359s Low|Medium.(Intercept) -0.4494 0.1279 -3.515 359s Medium|High.(Intercept) 0.6480 0.1279 5.066 359s Low|Medium.ContHigh -0.4440 0.1095 -4.056 359s Medium|High.ContHigh -0.2861 0.1063 -2.691 359s > 359s > ################################# 359s > ### Testing nominal_test and scale_test: 359s > fm1 <- clm(rating ~ temp * contact, data=wine) 359s > ## names(fm1) 359s > fm2 <- clm(rating ~ temp * contact, data=wine, nominal=~contact) 359s > (an <- anova(fm1, fm2)) 359s Likelihood ratio tests of cumulative link models: 359s 359s formula: nominal: link: threshold: 359s fm1 rating ~ temp * contact ~1 logit flexible 359s fm2 rating ~ temp * contact ~contact logit flexible 359s 359s no.par AIC logLik LR.stat df Pr(>Chisq) 359s fm1 7 186.83 -86.416 359s fm2 10 192.17 -86.083 0.6669 3 0.881 359s > (nm <- nominal_test(fm1)) 359s Tests of nominal effects 359s 359s formula: rating ~ temp * contact 359s Df logLik AIC LRT Pr(>Chi) 359s -86.416 186.83 359s temp 3 -84.874 189.75 3.08352 0.3789 359s contact 3 -86.083 192.16 0.66691 0.8810 359s temp:contact 359s > stopifnot(isTRUE(all.equal(an[2, 6], nm["contact", 5]))) 359s > 359s > fm2 <- clm(rating ~ temp * contact, data=wine, scale=~contact) 359s > (an <- anova(fm1, fm2)) 359s Likelihood ratio tests of cumulative link models: 359s 359s formula: scale: link: threshold: 359s fm1 rating ~ temp * contact ~1 logit flexible 359s fm2 rating ~ temp * contact ~contact logit flexible 359s 359s no.par AIC logLik LR.stat df Pr(>Chisq) 359s fm1 7 186.83 -86.416 359s fm2 8 188.60 -86.300 0.2325 1 0.6297 359s > (sc <- scale_test(fm1)) 359s Tests of scale effects 359s 359s formula: rating ~ temp * contact 359s Df logLik AIC LRT Pr(>Chi) 359s -86.416 186.83 359s temp 1 -86.326 188.65 0.18061 0.6709 359s contact 1 -86.300 188.60 0.23252 0.6297 359s temp:contact 3 -86.259 192.52 0.31391 0.9574 359s > stopifnot(isTRUE(all.equal(an[2, 6], sc["contact", "Pr(>Chi)"]))) 359s > 359s > fm1 <- clm(rating ~ temp + contact, 359s + nominal=~temp + contact, data=wine) 359s Warning message: 359s (1) Hessian is numerically singular: parameters are not uniquely determined 359s In addition: Absolute convergence criterion was met, but relative criterion was not met 359s > fm1 359s formula: rating ~ temp + contact 359s nominal: ~temp + contact 359s data: wine 359s 359s link threshold nobs logLik AIC niter max.grad cond.H 359s logit flexible 72 -84.61 193.22 20(0) 4.36e-09 5.0e+10 359s 359s Coefficients: (2 not defined because of singularities) 359s tempwarm contactyes 359s NA NA 359s 359s Threshold coefficients: 359s 1|2 2|3 3|4 4|5 359s (Intercept) -1.226 1.033 3.946 24.553 359s tempwarm -21.118 -2.111 -2.940 -22.432 359s contactyes -1.659 -1.343 -1.693 -1.162 359s > try(nominal_test(fm1), silent=TRUE)[1] ## gives error OK 359s Df 359s 359s > scale_test(fm1) 359s 359s no additional terms to add to nominal 359s 360s Tests of scale effects 360s 360s formula: rating ~ temp + contact 360s nominal: ~temp + contact 360s Df logLik AIC LRT Pr(>Chi) 360s -84.611 193.22 360s temp 1 -84.604 195.21 0.0129568 0.9094 360s contact 1 -84.610 195.22 0.0012219 0.9721 360s > fm1 <- clm(rating ~ temp + contact, 360s + scale=~temp + contact, data=wine) 360s Warning messages: 360s 1: (1) Hessian is numerically singular: parameters are not uniquely determined 360s In addition: Absolute convergence criterion was met, but relative criterion was not met 360s 2: (1) Hessian is numerically singular: parameters are not uniquely determined 360s In addition: Absolute convergence criterion was met, but relative criterion was not met 360s > fm1 360s formula: rating ~ temp + contact 360s scale: ~temp + contact 360s data: wine 360s 360s link threshold nobs logLik AIC niter max.grad cond.H 360s logit flexible 72 -86.34 188.68 360s no relevant terms to add to scale 360s 360s 8(0) 7.40e-09 2.0e+02 360s 360s Coefficients: 360s tempwarm contactyes 360s 2.446 1.482 360s 360s log-scale coefficients: 360s tempwarm contactyes 360s 0.05008 -0.11418 360s 360s Threshold coefficients: 360s 1|2 2|3 3|4 4|5 360s -1.303 1.219 3.377 4.872 360s > try(scale_test(fm1), silent=TRUE)[1] ## gives error OK 360s Df 360s 360s > nominal_test(fm1) 360s Tests of nominal effects 360s 360s formula: rating ~ temp + contact 360s scale: ~temp + contact 360s Df logLik AIC LRT Pr(>Chi) 360s -86.342 188.69 360s temp 3 -84.851 191.70 2.98202 0.3944 360s contact 3 -86.008 194.02 0.66808 0.8807 360s > 360s > 360s > ## Using weights: 360s > set.seed(123454321) 360s > wt <- runif(nrow(wine)) 360s > fm1 <- clm(rating ~ temp * contact, data=wine, weigths=wt) 360s > nominal_test(fm1) 360s Tests of nominal effects 360s 360s formula: rating ~ temp * contact 360s Df logLik AIC LRT Pr(>Chi) 360s -86.416 186.83 360s temp 3 -84.874 189.75 3.08352 0.3789 360s contact 3 -86.083 192.16 0.66691 0.8810 360s temp:contact 360s > scale_test(fm1) 360s Tests of scale effects 360s 360s formula: rating ~ temp * contact 360s Df logLik AIC LRT Pr(>Chi) 360s -86.416 186.83 360s temp 1 -86.326 188.65 0.18061 0.6709 360s contact 1 -86.300 188.60 0.23252 0.6297 360s temp:contact 3 -86.259 192.52 0.31391 0.9574 360s > 360s > ## No nominal test for judge since that model is not identifiable: 360s > fm1 <- clm(rating ~ judge + temp + contact, data=wine) 360s > nominal_test(fm1) 360s Tests of nominal effects 360s 360s formula: rating ~ judge + temp + contact 360s Df logLik AIC LRT Pr(>Chi) 360s -70.921 169.84 360s judge 360s temp 3 -69.900 173.80 2.04253 0.5636 360s contact 3 -70.708 175.42 0.42612 0.9348 360s > scale_test(fm1) 360s Tests of scale effects 360s 360s formula: rating ~ judge + temp + contact 360s Df logLik AIC LRT Pr(>Chi) 360s -70.921 169.84 360s judge 8 -64.731 173.46 12.3790 0.1351 360s temp 1 -70.897 171.79 0.0474 0.8276 360s contact 1 -70.870 171.74 0.1018 0.7497 360s > fm1 <- clm(rating ~ judge + temp, nominal=~contact, data=wine) 360s > nominal_test(fm1) 360s Tests of nominal effects 360s 360s formula: rating ~ judge + temp 360s nominal: ~contact 360s Df logLik AIC LRT Pr(>Chi) 360s -70.708 175.42 360s judge 360s temp 3 -69.707 179.41 2.0015 0.5721 360s > summary(fm1) 360s formula: rating ~ judge + temp 360s nominal: ~contact 360s data: wine 360s 360s link threshold nobs logLik AIC niter max.grad cond.H 360s logit flexible 72 -70.71 175.42 6(0) 8.07e-08 9.9e+01 360s 360s Coefficients: 360s Estimate Std. Error z value Pr(>|z|) 360s judge2 -3.2395 1.0683 -3.032 0.00243 ** 360s judge3 -0.9556 0.9699 -0.985 0.32452 360s judge4 -2.4613 1.0321 -2.385 0.01709 * 360s judge5 -2.0248 1.0093 -2.006 0.04484 * 360s judge6 -1.6379 0.9770 -1.677 0.09364 . 360s judge7 -5.2222 1.1381 -4.589 4.46e-06 *** 360s judge8 -2.7648 0.9776 -2.828 0.00468 ** 360s judge9 -3.1751 1.0028 -3.166 0.00154 ** 360s tempwarm 3.3309 0.6174 5.395 6.87e-08 *** 360s --- 360s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 360s 360s Threshold coefficients: 360s Estimate Std. Error z value 360s 1|2.(Intercept) -4.1549 0.9897 -4.198 360s 2|3.(Intercept) -0.7354 0.7920 -0.928 360s 3|4.(Intercept) 2.3388 0.8909 2.625 360s 4|5.(Intercept) 3.8873 1.0352 3.755 360s 1|2.contactyes -2.0216 1.3072 -1.547 360s 2|3.contactyes -1.9865 0.6904 -2.877 360s 3|4.contactyes -2.1825 0.7774 -2.807 360s 4|5.contactyes -1.5077 1.0044 -1.501 360s > 360s > ## A continuous variable: 360s > set.seed(123454321) 360s > x <- rnorm(nrow(wine), sd=1) 360s > fm <- clm(rating ~ temp, nominal=~contact * x, data=wine) 360s Warning message: 360s (1) Hessian is numerically singular: parameters are not uniquely determined 360s In addition: Absolute convergence criterion was met, but relative criterion was not met 360s > nominal_test(fm) 360s Tests of nominal effects 360s 360s formula: rating ~ temp 360s nominal: ~contact * x 360s Df logLik AIC LRT Pr(>Chi) 360s -77.858 189.72 360s temp 3 -76.738 193.48 2.24 0.5241 360s > scale_test(fm) 360s Tests of scale effects 360s 360s formula: rating ~ temp 360s nominal: ~contact * x 360s Df logLik AIC LRT Pr(>Chi) 360s -77.858 189.72 360s temp 1 -77.684 191.37 0.34804 0.5552 360s > fm <- clm(rating ~ temp + x, nominal=~contact, data=wine) 360s Warning message: 360s (1) Hessian is numerically singular: parameters are not uniquely determined 360s In addition: Absolute convergence criterion was met, but relative criterion was not met 360s > nominal_test(fm) 360s Tests of nominal effects 360s 360s formula: rating ~ temp + x 360s nominal: ~contact 360s Df logLik AIC LRT Pr(>Chi) 360s -84.949 189.90 360s temp 3 -83.421 192.84 3.0560 0.3831 360s x 3 -84.333 194.67 1.2322 0.7453 360s > scale_test(fm) 360s Tests of scale effects 360s 360s formula: rating ~ temp + x 360s nominal: ~contact 360s Df logLik AIC LRT Pr(>Chi) 360s -84.949 189.90 360s temp 1 -84.737 191.47 0.42504 0.5144 360s x 1 -84.896 191.79 0.10781 0.7426 360s > ## poly: 360s > fm <- clm(rating ~ temp + poly(x, 2), nominal=~contact, data=wine) 360s > nominal_test(fm) 360s Tests of nominal effects 360s 360s formula: rating ~ temp + poly(x, 2) 360s nominal: ~contact 360s Df logLik AIC LRT Pr(>Chi) 360s -84.079 190.16 360s temp 3 -82.694 193.39 2.7693 0.4286 360s poly(x, 2) 6 -80.941 195.88 6.2762 0.3930 360s > scale_test(fm) 360s Tests of scale effects 360s 360s formula: rating ~ temp + poly(x, 2) 360s nominal: ~contact 360s Df logLik AIC LRT Pr(>Chi) 360s -84.079 190.16 360s temp 1 -84.020 192.04 0.11784 0.7314 360s poly(x, 2) 2 -83.314 192.63 1.53017 0.4653 360s > ## another combination: 360s > fm1 <- clm(SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ, 360s + scale=~PROD, 360s + nominal=~ DAY*GENDER, data=soup) 360s > fm1 360s formula: SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ 360s scale: ~PROD 360s nominal: ~DAY * GENDER 360s data: soup 360s 360s link threshold nobs logLik AIC niter max.grad cond.H 360s logit flexible 1847 -2657.84 5375.68 8(2) 3.50e-07 4.0e+03 360s 360s Coefficients: (1 not defined because of singularities) 360s PRODID2 PRODID3 PRODID4 PRODID5 360s 1.0780 1.5090 0.9482 1.4910 360s PRODID6 DAY2 SOUPTYPECanned SOUPTYPEDry-mix 360s 1.8174 NA -0.2337 0.1832 360s SOUPFREQ1-4/month SOUPFREQ<1/month 360s -0.0954 -0.1137 360s 360s log-scale coefficients: 360s PRODTest 360s 0.1427 360s 360s Threshold coefficients: 360s 1|2 2|3 3|4 4|5 5|6 360s (Intercept) -1.65979 -0.75912 -0.36903 0.02374 0.66929 360s DAY2 -0.22291 0.13711 0.16406 0.10279 0.23721 360s GENDERFemale 0.06531 0.06089 -0.01938 -0.13670 -0.01594 360s DAY2:GENDERFemale 0.36194 0.25429 0.25482 0.23375 0.05243 360s > nominal_test(fm1) 361s Tests of nominal effects 361s 361s formula: SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ 361s scale: ~PROD 361s nominal: ~DAY * GENDER 361s Df logLik AIC LRT Pr(>Chi) 361s -2657.8 5375.7 361s PRODID 20 -2644.7 5389.4 26.2387 0.1580707 361s SOUPTYPE 8 -2654.0 5384.1 7.5969 0.4738067 361s SOUPFREQ 8 -2644.6 5365.1 26.5587 0.0008423 *** 361s PROD 4 -2654.7 5377.5 6.2011 0.1846258 361s --- 361s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 361s > scale_test(fm1) 361s Tests of scale effects 361s 361s formula: SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ 361s scale: ~PROD 361s nominal: ~DAY * GENDER 361s Df logLik AIC LRT Pr(>Chi) 361s -2657.8 5375.7 361s PRODID 4 -2657.3 5382.5 1.1526 0.885842 361s DAY 1 -2655.9 5373.8 3.8544 0.049616 * 361s SOUPTYPE 2 -2657.6 5379.1 0.5416 0.762771 361s SOUPFREQ 2 -2652.7 5369.3 10.3447 0.005671 ** 361s --- 361s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 361s > 361s > ################################# 361s > 361s > 361s BEGIN TEST ranef.loading.R 361s 361s R version 4.4.3 (2025-02-28) -- "Trophy Case" 361s Copyright (C) 2025 The R Foundation for Statistical Computing 361s Platform: aarch64-unknown-linux-gnu 361s 361s R is free software and comes with ABSOLUTELY NO WARRANTY. 361s You are welcome to redistribute it under certain conditions. 361s Type 'license()' or 'licence()' for distribution details. 361s 361s R is a collaborative project with many contributors. 361s Type 'contributors()' for more information and 361s 'citation()' on how to cite R or R packages in publications. 361s 361s Type 'demo()' for some demos, 'help()' for on-line help, or 361s 'help.start()' for an HTML browser interface to help. 361s Type 'q()' to quit R. 361s 361s > # check that ranef and VarCorr work even after loading ordinal: 361s > library(lme4) 361s Loading required package: Matrix 362s > fm1 <- lmer(Reaction ~ Days + (Days | Subject), data=sleepstudy) 362s > ranef(fm1) 362s $Subject 362s (Intercept) Days 362s 308 2.2585510 9.1989758 362s 309 -40.3987381 -8.6196806 362s 310 -38.9604090 -5.4488565 362s 330 23.6906196 -4.8143503 363s 331 22.2603126 -3.0699116 363s 332 9.0395679 -0.2721770 363s 333 16.8405086 -0.2236361 363s 334 -7.2326151 1.0745816 363s 335 -0.3336684 -10.7521652 363s 337 34.8904868 8.6282652 363s 349 -25.2102286 1.1734322 363s 350 -13.0700342 6.6142178 363s 351 4.5778642 -3.0152621 363s 352 20.8636782 3.5360011 363s 369 3.2754656 0.8722149 363s 370 -25.6129993 4.8224850 363s 371 0.8070461 -0.9881562 363s 372 12.3145921 1.2840221 363s 363s with conditional variances for “Subject” 363s > VarCorr(fm1) 363s Groups Name Std.Dev. Corr 363s Subject (Intercept) 24.7407 363s Days 5.9221 0.066 363s Residual 25.5918 363s > library(ordinal) 363s > ranef(fm1) 363s $Subject 363s (Intercept) Days 363s 308 2.2585510 9.1989758 363s 309 -40.3987381 -8.6196806 363s 310 -38.9604090 -5.4488565 363s 330 23.6906196 -4.8143503 363s 331 22.2603126 -3.0699116 363s 332 9.0395679 -0.2721770 363s 333 16.8405086 -0.2236361 363s 334 -7.2326151 1.0745816 363s 335 -0.3336684 -10.7521652 363s 337 34.8904868 8.6282652 363s 349 -25.2102286 1.1734322 363s 350 -13.0700342 6.6142178 363s 351 4.5778642 -3.0152621 363s 352 20.8636782 3.5360011 363s 369 3.2754656 0.8722149 363s 370 -25.6129993 4.8224850 363s 371 0.8070461 -0.9881562 363s 372 12.3145921 1.2840221 363s 363s with conditional variances for “Subject” 363s > VarCorr(fm1) 363s Groups Name Std.Dev. Corr 363s Subject (Intercept) 24.7407 363s Days 5.9221 0.066 363s Residual 25.5918 363s > 363s BEGIN TEST test-all.R 363s 363s R version 4.4.3 (2025-02-28) -- "Trophy Case" 363s Copyright (C) 2025 The R Foundation for Statistical Computing 363s Platform: aarch64-unknown-linux-gnu 363s 363s R is free software and comes with ABSOLUTELY NO WARRANTY. 363s You are welcome to redistribute it under certain conditions. 363s Type 'license()' or 'licence()' for distribution details. 363s 363s R is a collaborative project with many contributors. 363s Type 'contributors()' for more information and 363s 'citation()' on how to cite R or R packages in publications. 363s 363s Type 'demo()' for some demos, 'help()' for on-line help, or 363s 'help.start()' for an HTML browser interface to help. 363s Type 'q()' to quit R. 363s 363s > 363s > if(require(testthat) && require(ordinal)) { 363s + test_check("ordinal") 363s + } 363s Loading required package: testthat 363s Loading required package: ordinal 370s [ FAIL 0 | WARN 0 | SKIP 0 | PASS 81 ] 370s > 370s BEGIN TEST test.clm.Theta.R 370s 370s R version 4.4.3 (2025-02-28) -- "Trophy Case" 370s Copyright (C) 2025 The R Foundation for Statistical Computing 370s Platform: aarch64-unknown-linux-gnu 370s 370s R is free software and comes with ABSOLUTELY NO WARRANTY. 370s You are welcome to redistribute it under certain conditions. 370s Type 'license()' or 'licence()' for distribution details. 370s 370s R is a collaborative project with many contributors. 370s Type 'contributors()' for more information and 370s 'citation()' on how to cite R or R packages in publications. 370s 370s Type 'demo()' for some demos, 'help()' for on-line help, or 370s 'help.start()' for an HTML browser interface to help. 370s Type 'q()' to quit R. 370s 370s > library(ordinal) 371s > 371s > ################################# 371s > ## 1 categorical variable in nominal: 371s > fm <- clm(rating ~ temp, nominal=~contact, data=wine) 371s > fm$Theta 371s contact 1|2 2|3 3|4 4|5 371s 1 no -1.323043 1.2464435 3.550044 4.660247 371s 2 yes -2.938103 -0.2651238 1.875288 3.609624 371s > fm$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -1.323043 1.246444 3.550044 4.660247 371s contactyes -1.615059 -1.511567 -1.674756 -1.050623 371s > ## Threshold effects: 371s > fm <- clm(rating ~ temp, nominal=~contact, data=wine, 371s + threshold="symmetric") 371s > fm$Theta 371s contact 1|2 2|3 3|4 4|5 371s 1 no -1.054279 1.083892 3.383980 5.522152 371s 2 yes -2.360683 -0.356889 1.753317 3.757111 371s > fm$alpha.mat 371s central.1 central.2 spacing.1 371s (Intercept) 1.083892 3.383980 2.1381713 371s contactyes -1.440781 -1.630663 -0.1343777 371s > fm <- clm(rating ~ temp, nominal=~contact, data=wine, 371s + threshold="equidistant") 371s > fm$Theta 371s contact 1|2 2|3 3|4 4|5 371s 1 no -1.089140 1.1176064 3.324353 5.531099 371s 2 yes -2.386361 -0.3365063 1.713348 3.763202 371s > fm$alpha.mat 371s threshold.1 spacing 371s (Intercept) -1.08914 2.2067465 371s contactyes -1.29722 -0.1568922 371s > ## Singular fit is still ok (with a warning, though) 371s > fm <- clm(rating ~ contact, nominal=~temp, data=wine) 371s > fm$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -1.265638 1.104045 3.765661 24.89643 371s tempwarm -21.095417 -2.153024 -2.873317 -22.55000 371s > fm$Theta 371s Warning message: 371s (1) Hessian is numerically singular: parameters are not uniquely determined 371s In addition: Absolute convergence criterion was met, but relative criterion was not met 371s temp 1|2 2|3 3|4 4|5 371s 1 cold -1.265638 1.104045 3.7656606 24.896432 371s 2 warm -22.361055 -1.048979 0.8923431 2.346436 371s > 371s > ################################# 371s > ## 1 continuous variable: 371s > set.seed(123) 371s > x <- rnorm(nrow(wine), sd=1) 371s > fm <- clm(rating ~ temp, nominal=~ x, data=wine) 371s > fm$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -1.93392115 0.4251062 2.4798775 3.9190335 371s x 0.09463825 0.3805713 0.4261607 0.3809099 371s > fm$Theta 371s 1|2 2|3 3|4 4|5 371s 1 -1.933921 0.4251062 2.479878 3.919034 371s > fm <- clm(rating ~ temp, nominal=~ poly(x, 2), data=wine) 371s > fm$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -1.9310988 0.4469436 2.517523 4.094448 371s poly(x, 2)1 0.8763914 3.2908002 3.471603 4.422045 371s poly(x, 2)2 -0.3826811 0.2518184 -2.064209 5.810095 371s > fm$Theta 371s 1|2 2|3 3|4 4|5 371s 1 -1.931099 0.4469436 2.517523 4.094448 371s > 371s > ################################# 371s > ## 1 categorical + 1 continuous variable: 371s > set.seed(123) 371s > x <- rnorm(nrow(wine), sd=1) 371s > fm <- clm(rating ~ temp, nominal=~contact + x, data=wine) 371s > fm$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -1.279484 1.2782515 3.612766 4.7496630 371s contactyes -1.770377 -1.6715296 -1.647335 -0.9575417 371s x 0.300792 0.5330593 0.351517 0.3320371 371s > fm$Theta 371s contact 1|2 2|3 3|4 4|5 371s 1 no -1.279484 1.2782515 3.612766 4.749663 371s 2 yes -3.049860 -0.3932781 1.965431 3.792121 371s > fm <- clm(rating ~ temp, nominal=~contact + x, data=wine, 371s + threshold="symmetric") 371s > fm$alpha.mat 371s central.1 central.2 spacing.1 371s (Intercept) 1.1195535 3.4384752 2.134429723 371s contactyes -1.5864032 -1.5904314 -0.007568099 371s x 0.5069573 0.3485632 0.137951085 371s > fm$Theta 371s contact 1|2 2|3 3|4 4|5 371s 1 no -1.014876 1.1195535 3.438475 5.572905 371s 2 yes -2.593711 -0.4668497 1.848044 3.974905 371s > ################################# 371s > ### NOTE: To get the by-threshold nominal effects of continuous terms 371s > ## use: 371s > with(fm, t(apply(alpha.mat, 1, function(th) tJac %*% th))) 371s [,1] [,2] [,3] [,4] 371s (Intercept) -1.0148763 1.1195535 3.4384752 5.5729049 371s contactyes -1.5788351 -1.5864032 -1.5904314 -1.5979995 371s x 0.3690062 0.5069573 0.3485632 0.4865143 371s > ################################# 371s > ## Interactions: 371s > fm <- clm(rating ~ temp, nominal=~contact:x, data=wine) 371s > fm$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -1.9577944 0.5997213 2.6863244 4.1510613 371s contactno:x 0.1127629 0.7818026 0.4423216 0.9364319 371s contactyes:x 0.2129232 -0.2720801 0.3848893 0.1730418 371s > fm$Theta 371s 1|2 2|3 3|4 4|5 371s 1 -1.957794 0.5997213 2.686324 4.151061 371s > fm <- clm(rating ~ temp, nominal=~contact+x+contact:x, data=wine) 371s > fm$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -1.3000385 1.4056290 3.8340494 5.195521 371s contactyes -2.2801110 -1.5685386 -1.7308097 -1.318630 371s x 0.1790630 0.8754972 0.5140440 1.061857 371s contactyes:x 0.7541913 -0.8829449 -0.2203363 -1.055090 371s > fm$Theta 371s contact 1|2 2|3 3|4 4|5 371s 1 no -1.300039 1.4056290 3.834049 5.195521 371s 2 yes -3.580150 -0.1629096 2.103240 3.876891 371s > fm <- clm(rating ~ temp, nominal=~contact*x, data=wine) 371s > fm$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -1.3000385 1.4056290 3.8340494 5.195521 371s contactyes -2.2801110 -1.5685386 -1.7308097 -1.318630 371s x 0.1790630 0.8754972 0.5140440 1.061857 371s contactyes:x 0.7541913 -0.8829449 -0.2203363 -1.055090 371s > fm$Theta 371s contact 1|2 2|3 3|4 4|5 371s 1 no -1.300039 1.4056290 3.834049 5.195521 371s 2 yes -3.580150 -0.1629096 2.103240 3.876891 371s > ## polynomial terms: 371s > fm <- clm(rating ~ temp, nominal=~contact + poly(x, 2), data=wine) 371s > fm$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -1.2704762 1.3058436 3.635351 4.984803 371s contactyes -1.7725959 -1.6863567 -1.668402 -1.045016 371s poly(x, 2)1 2.4660191 4.4257770 3.395876 4.572499 371s poly(x, 2)2 -0.5079931 -0.4326472 -2.815490 5.853814 371s > fm$Theta 371s contact 1|2 2|3 3|4 4|5 371s 1 no -1.270476 1.3058436 3.635351 4.984803 371s 2 yes -3.043072 -0.3805131 1.966949 3.939787 371s > ## logical variables: (treated like numeric variables) 371s > wine$Con <- as.character(wine$contact) == "yes" 371s > fm <- clm(rating ~ temp, nominal=~Con, data=wine) 371s > fm$Theta 371s 1|2 2|3 3|4 4|5 371s 1 -1.323043 1.246444 3.550044 4.660247 371s > fm$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -1.323043 1.246444 3.550044 4.660247 371s ConTRUE -1.615059 -1.511567 -1.674756 -1.050623 371s > wine$Con.num <- 1 * wine$Con 371s > fm <- clm(rating ~ temp, nominal=~Con.num, data=wine) 371s > fm$Theta 371s 1|2 2|3 3|4 4|5 371s 1 -1.323043 1.246444 3.550044 4.660247 371s > fm$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -1.323043 1.246444 3.550044 4.660247 371s Con.num -1.615059 -1.511567 -1.674756 -1.050623 371s > ################################# 371s > ## Two continuous variables: 371s > set.seed(321) 371s > y <- rnorm(nrow(wine), sd=1) 371s > fm1 <- clm(rating ~ temp, nominal=~y + x, data=wine) 371s > fm1$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -2.0361734 0.4221202 2.4970718 3.92796873 371s y 0.4687950 0.1396038 0.3125431 0.08012751 371s x 0.1283933 0.3903469 0.4322374 0.37584062 371s > fm1$Theta 371s 1|2 2|3 3|4 4|5 371s 1 -2.036173 0.4221202 2.497072 3.927969 371s > ## summary(fm1) 371s > 371s > ################################# 371s > ## 1 categorical + 2 continuous variables: 371s > fm1 <- clm(rating ~ temp, nominal=~y + contact + x, data=wine) 371s > fm1$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -1.3789903 1.2645381 3.5778844 4.76356985 371s y 0.4385042 0.1049073 0.2439721 -0.01655843 371s contactyes -1.7688345 -1.6608152 -1.5801690 -0.98076349 371s x 0.3414184 0.5436276 0.3683201 0.33263316 371s > fm1$Theta 371s contact 1|2 2|3 3|4 4|5 371s 1 no -1.378990 1.2645381 3.577884 4.763570 371s 2 yes -3.147825 -0.3962771 1.997715 3.782806 371s > 371s > fm1 <- clm(rating ~ temp, nominal=~contact + x + contact:x + y, 371s + data=wine) 371s > summary(fm1) 371s formula: rating ~ temp 371s nominal: ~contact + x + contact:x + y 371s data: wine 371s 371s link threshold nobs logLik AIC niter max.grad cond.H 371s logit flexible 72 -81.86 205.72 7(0) 6.30e-12 9.3e+01 371s 371s Coefficients: 371s Estimate Std. Error z value Pr(>|z|) 371s tempwarm 2.8541 0.6159 4.634 3.58e-06 *** 371s --- 371s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 371s 371s Threshold coefficients: 371s Estimate Std. Error z value 371s 1|2.(Intercept) -1.40166 0.63306 -2.214 371s 2|3.(Intercept) 1.38723 0.49672 2.793 371s 3|4.(Intercept) 3.78725 0.71352 5.308 371s 4|5.(Intercept) 5.19478 1.07162 4.848 371s 1|2.contactyes -2.25974 1.68593 -1.340 371s 2|3.contactyes -1.54343 0.62658 -2.463 371s 3|4.contactyes -1.65472 0.68161 -2.428 371s 4|5.contactyes -1.34417 1.10192 -1.220 371s 1|2.x 0.21217 0.60781 0.349 371s 2|3.x 0.88433 0.41592 2.126 371s 3|4.x 0.47072 0.57857 0.814 371s 4|5.x 0.98582 0.94345 1.045 371s 1|2.y 0.41959 0.59889 0.701 371s 2|3.y 0.08377 0.27912 0.300 371s 3|4.y 0.27724 0.33118 0.837 371s 4|5.y -0.03370 0.59652 -0.056 371s 1|2.contactyes:x 0.71850 1.19479 0.601 371s 2|3.contactyes:x -0.89167 0.68974 -1.293 371s 3|4.contactyes:x -0.10843 0.74237 -0.146 371s 4|5.contactyes:x -0.98243 1.06343 -0.924 371s > fm1$Theta 371s contact 1|2 2|3 3|4 4|5 371s 1 no -1.401661 1.3872281 3.787248 5.194782 371s 2 yes -3.661402 -0.1562067 2.132530 3.850615 371s > fm1$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -1.4016606 1.38722808 3.7872478 5.19478152 371s contactyes -2.2597419 -1.54343480 -1.6547177 -1.34416691 371s x 0.2121750 0.88432858 0.4707237 0.98581604 371s y 0.4195947 0.08377343 0.2772447 -0.03369796 371s contactyes:x 0.7184952 -0.89166532 -0.1084271 -0.98242663 371s > fm1 <- clm(rating ~ temp, nominal=~contact*x + y, data=wine) 371s > fm1$Theta 371s contact 1|2 2|3 3|4 4|5 371s 1 no -1.401661 1.3872281 3.787248 5.194782 371s 2 yes -3.661402 -0.1562067 2.132530 3.850615 371s > fm1$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -1.4016606 1.38722808 3.7872478 5.19478152 371s contactyes -2.2597419 -1.54343480 -1.6547177 -1.34416691 371s x 0.2121750 0.88432858 0.4707237 0.98581604 371s y 0.4195947 0.08377343 0.2772447 -0.03369796 371s contactyes:x 0.7184952 -0.89166532 -0.1084271 -0.98242663 371s > t(fm1$alpha.mat) 371s (Intercept) contactyes x y contactyes:x 371s 1|2 -1.401661 -2.259742 0.2121750 0.41959467 0.7184952 371s 2|3 1.387228 -1.543435 0.8843286 0.08377343 -0.8916653 371s 3|4 3.787248 -1.654718 0.4707237 0.27724473 -0.1084271 371s 4|5 5.194782 -1.344167 0.9858160 -0.03369796 -0.9824266 371s > fm1 371s formula: rating ~ temp 371s nominal: ~contact * x + y 371s data: wine 371s 371s link threshold nobs logLik AIC niter max.grad cond.H 371s logit flexible 72 -81.86 205.72 7(0) 6.30e-12 9.3e+01 371s 371s Coefficients: 371s tempwarm 371s 2.854 371s 371s Threshold coefficients: 371s 1|2 2|3 3|4 4|5 371s (Intercept) -1.40166 1.38723 3.78725 5.19478 371s contactyes -2.25974 -1.54343 -1.65472 -1.34417 371s x 0.21217 0.88433 0.47072 0.98582 371s y 0.41959 0.08377 0.27724 -0.03370 371s contactyes:x 0.71850 -0.89167 -0.10843 -0.98243 371s > 371s > ################################# 371s > ## ordered factors (behaves like numerical variables): 371s > data(soup, package="ordinal") 371s > fm2 <- clm(SURENESS ~ 1, nominal=~PRODID + DAY, data=soup) 371s > fm2$Theta 371s PRODID DAY 1|2 2|3 3|4 4|5 5|6 371s 1 1 1 -1.541481 -0.5738506 -0.21399538 0.04222703 0.75684062 371s 2 2 1 -2.260759 -1.5442697 -1.21890789 -0.91689299 -0.24659733 371s 3 3 1 -2.662588 -1.8500284 -1.67612929 -1.15745279 -0.65265582 371s 4 4 1 -2.230317 -1.3875834 -1.10527201 -0.70760465 -0.16454916 371s 5 5 1 -2.291960 -1.8870049 -1.51852627 -1.32708454 -0.64222204 371s 6 6 1 -2.765844 -2.1222058 -1.93080891 -1.76177831 -0.87239437 371s 7 1 2 -1.497366 -0.2765643 0.08617449 0.27652240 0.97863135 371s 8 2 2 -2.216645 -1.2469835 -0.91873802 -0.68259762 -0.02480661 371s 9 3 2 -2.618473 -1.5527421 -1.37595942 -0.92315742 -0.43086509 371s 10 4 2 -2.186203 -1.0902972 -0.80510215 -0.47330927 0.05724157 371s 11 5 2 -2.247845 -1.5897187 -1.21835640 -1.09278917 -0.42043131 371s 12 6 2 -2.721729 -1.8249196 -1.63063905 -1.52748294 -0.65060365 371s > fm2$alpha.mat 371s 1|2 2|3 3|4 4|5 5|6 371s (Intercept) -1.54148084 -0.5738506 -0.2139954 0.04222703 0.7568406 371s PRODID2 -0.71927809 -0.9704192 -1.0049125 -0.95912001 -1.0034380 371s PRODID3 -1.12110698 -1.2761778 -1.4621339 -1.19967981 -1.4094964 371s PRODID4 -0.68883656 -0.8137329 -0.8912766 -0.74983167 -0.9213898 371s PRODID5 -0.75047874 -1.3131544 -1.3045309 -1.36931157 -1.3990627 371s PRODID6 -1.22436292 -1.5483553 -1.7168135 -1.80400534 -1.6292350 371s DAY2 0.04411439 0.2972862 0.3001699 0.23429537 0.2217907 371s > prodid <- factor(soup$PRODID, ordered=TRUE) 371s > fm2 <- clm(SURENESS ~ 1, nominal=~prodid + DAY, data=soup) 371s > fm2$alpha.mat 371s 1|2 2|3 3|4 4|5 5|6 371s (Intercept) -2.29215806 -1.5608238 -1.2772733 -0.9714310 -0.3035963 371s prodid.L -0.69121817 -0.9929406 -1.0651956 -1.1714141 -1.0571728 371s prodid.Q 0.28234300 0.3165731 0.3424949 0.1207237 0.3905959 371s prodid.C -0.56889235 -0.5360906 -0.6536897 -0.5924148 -0.5462885 371s prodid^4 -0.08220340 0.2121409 0.0953785 0.2423256 0.1732012 371s prodid^5 0.20500444 0.3017272 0.3458281 0.2989342 0.3294562 371s DAY2 0.04411439 0.2972862 0.3001699 0.2342954 0.2217907 371s > fm2$Theta 371s DAY 1|2 2|3 3|4 4|5 5|6 371s 1 1 -2.292158 -1.560824 -1.2772733 -0.9714310 -0.30359635 371s 2 2 -2.248044 -1.263538 -0.9771034 -0.7371357 -0.08180562 371s > fm2 <- clm(SURENESS ~ 1, nominal=~prodid, data=soup) 371s > fm2$alpha.mat 371s 1|2 2|3 3|4 4|5 5|6 371s (Intercept) -2.2615449 -1.4231189 -1.13844940 -0.8610163 -0.20025662 371s prodid.L -0.6802192 -1.0171675 -1.08713192 -1.1713363 -1.05578526 371s prodid.Q 0.2551357 0.3521163 0.37511177 0.1651463 0.43182970 371s prodid.C -0.6064464 -0.5635065 -0.68182671 -0.6050149 -0.55490977 371s prodid^4 -0.1115795 0.1036958 -0.01443457 0.1577696 0.09355651 371s prodid^5 0.2349647 0.4222560 0.46856405 0.3867234 0.41280490 371s > fm2$Theta 371s 1|2 2|3 3|4 4|5 5|6 371s 1 -2.261545 -1.423119 -1.138449 -0.8610163 -0.2002566 371s > ################################# 371s > ## Aliased Coefficients: 371s > ## 371s > ## Example where the interaction in the nominal effects is aliased (by 371s > ## design). Here the two Theta matrices coincide. The alpha.mat 371s > ## matrices are similar except one has an extra row with NAs: 371s > soup2 <- soup 371s > levels(soup2$DAY) 371s [1] "1" "2" 371s > levels(soup2$GENDER) 371s [1] "Male" "Female" 371s > xx <- with(soup2, DAY == "2" & GENDER == "Female") 371s > ## Model with additive nominal effects: 371s > fm8 <- clm(SURENESS ~ PRODID, nominal= ~ DAY + GENDER, data=soup2, subset=!xx) 371s > fm8$alpha.mat 371s 1|2 2|3 3|4 4|5 5|6 371s (Intercept) -1.5296912 -0.68765358 -0.3255117394 0.03773041 0.629325973 371s DAY2 -0.2553049 0.08584421 0.1101987830 0.05149732 0.168514829 371s GENDERFemale 0.0790841 0.07464904 -0.0001589362 -0.11045608 -0.005418789 371s > fm8$Theta 371s DAY GENDER 1|2 2|3 3|4 4|5 5|6 371s 1 1 Male -1.529691 -0.6876536 -0.3255117 0.03773041 0.6293260 371s 2 2 Male -1.784996 -0.6018094 -0.2153130 0.08922773 0.7978408 371s 3 1 Female -1.450607 -0.6130045 -0.3256707 -0.07272568 0.6239072 371s 4 2 Female -1.705912 -0.5271603 -0.2154719 -0.02122835 0.7924220 371s > ## Model with non-additive, but aliased nominal effects: 371s > fm9 <- clm(SURENESS ~ PRODID, nominal= ~ DAY * GENDER, data=soup2, subset=!xx) 371s > fm9$alpha.mat 371s 1|2 2|3 3|4 4|5 5|6 371s (Intercept) -1.5296912 -0.68765358 -0.3255117394 0.03773041 0.629325973 371s DAY2 -0.2553049 0.08584421 0.1101987830 0.05149732 0.168514829 371s GENDERFemale 0.0790841 0.07464904 -0.0001589362 -0.11045608 -0.005418789 371s DAY2:GENDERFemale NA NA NA NA NA 371s > fm9$Theta 371s DAY GENDER 1|2 2|3 3|4 4|5 5|6 371s 1 1 Male -1.529691 -0.6876536 -0.3255117 0.03773041 0.6293260 371s 2 2 Male -1.784996 -0.6018094 -0.2153130 0.08922773 0.7978408 371s 3 1 Female -1.450607 -0.6130045 -0.3256707 -0.07272568 0.6239072 371s 4 2 Female -1.705912 -0.5271603 -0.2154719 -0.02122835 0.7924220 371s > 371s > stopEqual <- function(x, y, ca=FALSE) 371s + stopifnot(isTRUE(all.equal(x, y, check.attributes=ca))) 371s > 371s > stopEqual(fm8$alpha.mat, fm9$alpha.mat[1:3, ]) 371s > stopEqual(fm8$Theta, fm9$Theta) 371s > stopEqual(logLik(fm8), logLik(fm9)) 371s > 371s > ################################# 371s > ## Weights: 371s > set.seed(12345) 371s > wts <- runif(nrow(soup)) 371s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE + DAY, data=soup, weights=wts) 371s > fm2$Theta 371s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 371s 1 Self-made 1 -1.957136 -1.2051740 -0.8829317 -0.6651699 -0.03270025 371s 2 Canned 1 -1.665918 -0.9408556 -0.6818962 -0.4277315 0.14356406 371s 3 Dry-mix 1 -2.180024 -1.2221288 -1.1502087 -0.8113657 -0.24840514 371s 4 Self-made 2 -1.988269 -0.9456030 -0.5614139 -0.3852570 0.23978932 371s 5 Canned 2 -1.697051 -0.6812846 -0.3603783 -0.1478186 0.41605363 371s 6 Dry-mix 2 -2.211157 -0.9625577 -0.8286909 -0.5314528 0.02408443 371s > 371s > ## Offset (correctly gives and error) 371s > fm2 <- try(clm(SURENESS ~ 1, nominal=~SOUPTYPE + DAY + offset(wts), 371s + data=soup), silent=TRUE) 371s > stopifnot(inherits(fm2, "try-error")) 371s > 371s > ################################# 371s > ### Other (misc) examples: 371s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE + DAY, data=soup) 371s > fm2$Theta 371s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 371s 1 Self-made 1 -2.040111 -1.2615146 -0.9302684 -0.6740629 -0.05003069 371s 2 Canned 1 -1.816274 -1.0347697 -0.7305192 -0.4563265 0.15972072 371s 3 Dry-mix 1 -2.313198 -1.3029029 -1.1328903 -0.8076982 -0.23529457 371s 4 Self-made 2 -1.956698 -0.9371883 -0.5968669 -0.4131354 0.21403949 371s 5 Canned 2 -1.732861 -0.7104435 -0.3971177 -0.1953990 0.42379090 371s 6 Dry-mix 2 -2.229785 -0.9785767 -0.7994888 -0.5467707 0.02877561 371s > fm2 371s formula: SURENESS ~ 1 371s nominal: ~SOUPTYPE + DAY 371s data: soup 371s 371s link threshold nobs logLik AIC niter max.grad cond.H 371s logit flexible 1847 -2758.02 5556.03 6(2) 1.74e-11 8.7e+02 371s 371s Threshold coefficients: 371s 1|2 2|3 3|4 4|5 5|6 371s (Intercept) -2.04011 -1.26151 -0.93027 -0.67406 -0.05003 371s SOUPTYPECanned 0.22384 0.22674 0.19975 0.21774 0.20975 371s SOUPTYPEDry-mix -0.27309 -0.04139 -0.20262 -0.13364 -0.18526 371s DAY2 0.08341 0.32433 0.33340 0.26093 0.26407 371s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE * DAY, data=soup) 371s > fm2$Theta 371s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 371s 1 Self-made 1 -2.062794 -1.3083328 -0.9935434 -0.7187896 -0.05107493 371s 2 Canned 1 -1.757074 -0.9398212 -0.6286087 -0.3721287 0.15415068 371s 3 Dry-mix 1 -2.369525 -1.3618033 -1.1700713 -0.8661663 -0.23795864 371s 4 Self-made 2 -1.945910 -0.9005649 -0.5459555 -0.3731219 0.21392690 371s 5 Canned 2 -1.775759 -0.7985077 -0.4924765 -0.2776317 0.43428555 371s 6 Dry-mix 2 -2.182299 -0.9257695 -0.7649729 -0.4964369 0.02702867 371s > fm2 371s formula: SURENESS ~ 1 371s nominal: ~SOUPTYPE * DAY 371s data: soup 371s 371s link threshold nobs logLik AIC niter max.grad cond.H 371s logit flexible 1847 -2755.60 5571.21 6(2) 1.75e-11 4.9e+03 371s 371s Threshold coefficients: 371s 1|2 2|3 3|4 4|5 5|6 371s (Intercept) -2.063e+00 -1.308e+00 -9.935e-01 -7.188e-01 -5.107e-02 371s SOUPTYPECanned 3.057e-01 3.685e-01 3.649e-01 3.467e-01 2.052e-01 371s SOUPTYPEDry-mix -3.067e-01 -5.347e-02 -1.765e-01 -1.474e-01 -1.869e-01 371s DAY2 1.169e-01 4.078e-01 4.476e-01 3.457e-01 2.650e-01 371s SOUPTYPECanned:DAY2 -1.356e-01 -2.665e-01 -3.115e-01 -2.512e-01 1.513e-02 371s SOUPTYPEDry-mix:DAY2 7.034e-02 2.827e-02 -4.249e-02 2.406e-02 -1.452e-05 371s > fm2$alpha.mat 371s 1|2 2|3 3|4 4|5 371s (Intercept) -2.06279431 -1.30833282 -0.99354336 -0.71878961 371s SOUPTYPECanned 0.30572040 0.36851159 0.36493470 0.34666092 371s SOUPTYPEDry-mix -0.30673027 -0.05347052 -0.17652789 -0.14737673 371s DAY2 0.11688416 0.40776793 0.44758789 0.34566775 371s SOUPTYPECanned:DAY2 -0.13556938 -0.26645440 -0.31145572 -0.25117080 371s SOUPTYPEDry-mix:DAY2 0.07034149 0.02826594 -0.04248955 0.02406171 371s 5|6 371s (Intercept) -5.107493e-02 371s SOUPTYPECanned 2.052256e-01 371s SOUPTYPEDry-mix -1.868837e-01 371s DAY2 2.650018e-01 371s SOUPTYPECanned:DAY2 1.513304e-02 371s SOUPTYPEDry-mix:DAY2 -1.451666e-05 371s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE * DAY, data=soup, 371s + threshold="symmetric") 371s > fm2$Theta 371s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 371s 1 Self-made 1 -2.023473 -1.3261580 -1.0328445 -0.7395310 -0.04221610 371s 2 Canned 1 -1.650803 -1.0121961 -0.7301243 -0.4480525 0.19055466 371s 3 Dry-mix 1 -2.214507 -1.4643357 -1.2132431 -0.9621504 -0.21197912 371s 4 Self-made 2 -1.757994 -1.0009894 -0.7422397 -0.4834900 0.27351461 371s 5 Canned 2 -1.673970 -0.8581393 -0.5997040 -0.3412687 0.47456211 371s 6 Dry-mix 2 -1.899340 -1.1167968 -0.9013722 -0.6859476 0.09659551 371s > fm2$alpha.mat 371s central spacing.1 spacing.2 371s (Intercept) -1.03284450 0.293313471 0.99062841 371s SOUPTYPECanned 0.30272022 -0.011241697 -0.06994946 371s SOUPTYPEDry-mix -0.18039855 -0.042220836 0.01063552 371s DAY2 0.29060480 -0.034563797 0.02512591 371s SOUPTYPECanned:DAY2 -0.16018453 0.010927306 0.12846128 371s SOUPTYPEDry-mix:DAY2 0.02126607 -0.001104241 -0.02842214 371s > 371s Warning message: 371s an intercept is needed and assumed in 'nominal' 371s > ################################# 371s > ### Check correctness of Theta matrix when intercept is removed in 371s > ### nominal formula: 371s > ### December 25th 2014, RHBC 371s > fm1 <- clm(rating ~ temp, nominal=~contact-1, data=wine) 371s > fm2 <- clm(rating ~ temp, nominal=~contact, data=wine) 371s > stopifnot(isTRUE(all.equal(fm1$Theta, fm2$Theta))) 371s > stopifnot(isTRUE(all.equal(fm1$logLik, fm2$logLik))) 371s > wine2 <- wine 371s > wine2$contact <- relevel(wine2$contact, "yes") 371s > fm3 <- clm(rating ~ temp, nominal=~contact, data=wine2) 371s > stopifnot(isTRUE(all.equal(coef(fm1, na.rm=TRUE), coef(fm3)))) 371s > ################################# 371s > 371s > 371s BEGIN TEST test.clm.convergence.R 371s 371s R version 4.4.3 (2025-02-28) -- "Trophy Case" 371s Copyright (C) 2025 The R Foundation for Statistical Computing 371s Platform: aarch64-unknown-linux-gnu 371s 371s R is free software and comes with ABSOLUTELY NO WARRANTY. 371s You are welcome to redistribute it under certain conditions. 371s Type 'license()' or 'licence()' for distribution details. 371s 371s R is a collaborative project with many contributors. 371s Type 'contributors()' for more information and 371s 'citation()' on how to cite R or R packages in publications. 371s 371s Type 'demo()' for some demos, 'help()' for on-line help, or 371s 'help.start()' for an HTML browser interface to help. 371s Type 'q()' to quit R. 371s 372s > library(ordinal) 372s > 372s > 372s > ## Testing that errors in chol() are caught soon enough: 372s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 372s > wine2 <- subset(wine, subset=(!1:nrow(wine) %in% cy)) 372s > wine2[c(9, 15, 46), "rating"] <- NA 372s > fm1 <- clm(rating ~ temp, scale=~contact, nominal=~contact, 372s + data=wine2) 372s > fm1 <- try(clm(rating ~ temp, scale=~contact, nominal=~contact, 372s + data=wine2, control=list(gradTol=1e-12)), silent=TRUE) 372s Warning message: 372s (1) Hessian is numerically singular: parameters are not uniquely determined 372s In addition: Absolute convergence criterion was met, but relative criterion was not met 372s Warning message: 372s (1) Hessian is numerically singular: parameters are not uniquely determined 372s In addition: Absolute convergence criterion was met> fm2 <- try(clm(rating ~ temp, scale=~contact, nominal=~contact, 372s + data=wine2, control=list(gradTol=1e-15)), silent=TRUE) 372s , but relative criterion was not met 373s > ## These gave errors in version 2014.11-12. 373s > stopifnot(!inherits(fm1, "try-error")) 373s > stopifnot(!inherits(fm2, "try-error")) 373s > summary(fm1) 373s Warning message: 373s (-1) Model failed to converge with max|grad| = 3.74003e-09 (tol = 1e-15) 373s In addition: step factor reduced below minimum 373s formula: rating ~ temp 373s scale: ~contact 373s nominal: ~contact 373s data: wine2 373s 373s link threshold nobs logLik AIC niter max.grad cond.H 373s logit flexible 51 -60.44 140.87 62(38) 7.12e-14 1.5e+17 373s 373s Coefficients: 373s Estimate Std. Error z value Pr(>|z|) 373s tempwarm 2.306 NA NA NA 373s 373s log-scale coefficients: 373s Estimate Std. Error z value Pr(>|z|) 373s contactyes -0.07128 NA NA NA 373s 373s Threshold coefficients: 373s Estimate Std. Error z value 373s 1|2.(Intercept) -1.354 NA NA 373s 2|3.(Intercept) 1.092 NA NA 373s 3|4.(Intercept) 3.469 NA NA 373s 4|5.(Intercept) 5.066 NA NA 373s 1|2.contactyes -30.565 NA NA 373s 2|3.contactyes -1.425 NA NA 373s 3|4.contactyes -1.808 NA NA 373s 4|5.contactyes -1.870 NA NA 373s (3 observations deleted due to missingness) 373s > summary(fm2) 373s formula: rating ~ temp 373s scale: ~contact 373s nominal: ~contact 373s data: wine2 373s 373s link threshold nobs logLik AIC niter max.grad cond.H 373s logit flexible 51 -60.44 140.87 92(76) 3.74e-09 1.2e+16 373s 373s Coefficients: 373s Estimate Std. Error z value Pr(>|z|) 373s tempwarm 2.3060 0.7713 2.99 0.00279 ** 373s --- 373s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 373s 373s log-scale coefficients: 373s Estimate Std. Error z value Pr(>|z|) 373s contactyes -7.137e-02 1.635e+04 0 1 373s 373s Threshold coefficients: 373s Estimate Std. Error z value 373s 1|2.(Intercept) -1.354e+00 5.707e-01 -2.373 373s 2|3.(Intercept) 1.092e+00 5.251e-01 2.080 373s 3|4.(Intercept) 3.469e+00 7.982e-01 4.346 373s 4|5.(Intercept) 5.066e+00 1.193e+00 4.246 373s 1|2.contactyes -3.917e+01 2.138e+09 0.000 373s 2|3.contactyes -1.425e+00 4.314e+04 0.000 373s 3|4.contactyes -1.808e+00 1.055e+04 0.000 373s 4|5.contactyes -1.870e+00 1.455e+04 0.000 373s (3 observations deleted due to missingness) 373s > 373s > ## Error in convergence.clm() due to bad evaluation of model 373s > ## environment with update(object, doFit=FALSE): 373s > wine3 <- wine 373s > set.seed(1234) 373s > wts <- runif(nrow(wine3), 0, 2) 373s > fm3 <- clm(rating ~ temp + contact, data=wine3, 373s + weights=wts) 373s > c0 <- convergence(fm3) 373s > set.seed(1234) 373s > fm3 <- clm(rating ~ temp + contact, data=wine3, 373s + weights=runif(nrow(wine3), 0, 2)) 373s > c1 <- convergence(fm3) 373s > c0$info$logLik.Error 373s [1] "<1e-10" 373s > c1$info$logLik.Error 373s [1] "<1e-10" 373s > all.equal(c0$info$logLik.Error, c1$info$logLik.Error) 373s [1] TRUE 373s > ## In version 2014.11-14: 373s > ## > wine3 <- wine 373s > ## > set.seed(1234) 373s > ## > wts <- runif(nrow(wine3), 0, 2) 373s > ## > fm3 <- clm(rating ~ temp + contact, data=wine3, 373s > ## + weights=wts) 373s > ## > c0 <- convergence(fm3) 373s > ## > set.seed(1234) 373s > ## > fm3 <- clm(rating ~ temp + contact, data=wine3, 373s > ## + weights=runif(nrow(wine3), 0, 2)) 373s > ## > c1 <- convergence(fm3) 373s > ## > c0$info$logLik.Error 373s > ## [1] "<1e-10" 373s > ## > c1$info$logLik.Error 373s > ## [1] "4.80e+00" 373s > ## > all.equal(c0$info$logLik.Error, c1$info$logLik.Error) 373s > ## [1] "1 string mismatch" 373s > stopifnot(c0$info$logLik.Error == 373s + c1$info$logLik.Error) 373s > 373s BEGIN TEST test.clm.flex.link.R 373s 373s R version 4.4.3 (2025-02-28) -- "Trophy Case" 373s Copyright (C) 2025 The R Foundation for Statistical Computing 373s Platform: aarch64-unknown-linux-gnu 373s 373s R is free software and comes with ABSOLUTELY NO WARRANTY. 373s You are welcome to redistribute it under certain conditions. 373s Type 'license()' or 'licence()' for distribution details. 373s 373s R is a collaborative project with many contributors. 373s Type 'contributors()' for more information and 373s 'citation()' on how to cite R or R packages in publications. 373s 373s Type 'demo()' for some demos, 'help()' for on-line help, or 373s 'help.start()' for an HTML browser interface to help. 373s Type 'q()' to quit R. 373s 373s > # test.clm.flex.link.R 373s > 373s > library(ordinal) 374s > 374s > fm <- clm(rating ~ contact + temp, data=wine, link="log-gamma") 374s Changing to 'nlminb' optimizer for flexible link function 374s > fm 374s formula: rating ~ contact + temp 374s data: wine 374s 374s link threshold nobs logLik AIC niter max.grad cond.H 374s log-gamma flexible 72 -85.72 185.44 27(179) 9.91e-05 5.9e+01 374s 374s Coefficients: 374s contactyes tempwarm 374s 0.8614 1.5072 374s 374s Link coefficient: 374s Warning message: 374s (-1) Model failed to converge with max|grad| = 9.9099e-05 (tol = 1e-06) 374s lambda 374s 0.1615 374s 374s Threshold coefficients: 374s 1|2 2|3 3|4 4|5 374s -0.8798 0.6678 1.9807 2.8593 374s > summary(fm) 374s formula: rating ~ contact + temp 374s data: wine 374s 374s link threshold nobs logLik AIC niter max.grad cond.H 374s log-gamma flexible 72 -85.72 185.44 27(179) 9.91e-05 5.9e+01 374s 374s Coefficients: 374s Estimate Std. Error z value Pr(>|z|) 374s contactyes 0.8614 0.2675 3.220 0.00128 ** 374s tempwarm 1.5072 0.2947 5.114 3.16e-07 *** 374s --- 374s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 374s 374s Link coefficients: 374s Estimate Std. Error z value Pr(>|z|) 374s lambda 0.1615 0.5752 0.281 0.779 374s 374s Threshold coefficients: 374s Estimate Std. Error z value 374s 1|2 -0.8798 0.5003 -1.759 374s 2|3 0.6678 0.3450 1.936 374s 3|4 1.9807 0.3826 5.177 374s 4|5 2.8593 0.4656 6.141 374s > vcov(fm) 374s 1|2 2|3 3|4 4|5 contactyes 374s 1|2 0.25029667 0.12858124 0.11888120 0.14341730 0.03339111 374s 2|3 0.12858124 0.11899385 0.10688715 0.12363922 0.04117758 374s 3|4 0.11888120 0.10688715 0.14635447 0.15493865 0.05320442 374s 4|5 0.14341730 0.12363922 0.15493865 0.21676904 0.06051103 374s contactyes 0.03339111 0.04117758 0.05320442 0.06051103 0.07156735 374s tempwarm 0.00707258 0.03006561 0.05390802 0.06549176 0.01159715 374s lambda -0.23173315 -0.13979171 -0.12509774 -0.15581154 -0.01157951 374s tempwarm lambda 374s 1|2 0.00707258 -0.23173315 374s 2|3 0.03006561 -0.13979171 374s 3|4 0.05390802 -0.12509774 374s 4|5 0.06549176 -0.15581154 374s contactyes 0.01159715 -0.01157951 374s tempwarm 0.08687099 0.01970691 374s lambda 0.01970691 0.33082448 374s > logLik(fm) 374s 'log Lik.' -85.72141 (df=7) 374s > extractAIC(fm) 374s [1] 7.0000 185.4428 374s > fm2 <- update(fm, link="probit") 374s Profile intervals not available for models with flexible link function: 374s reporting Wald intervals instead 374s > anova(fm, fm2) 374s Likelihood ratio tests of cumulative link models: 374s 374s formula: link: threshold: 374s fm2 rating ~ contact + temp probit flexible 374s fm rating ~ contact + temp log-gamma flexible 374s 374s no.par AIC logLik LR.stat df Pr(>Chisq) 374s fm2 6 183.52 -85.761 374s fm 7 185.44 -85.721 0.0795 1 0.778 374s > head(model.matrix(fm)$X) 374s (Intercept) contactyes tempwarm 374s 1 1 0 0 374s 2 1 0 0 374s 3 1 1 0 374s 4 1 1 0 374s 5 1 0 1 374s 6 1 0 1 374s > head(model.frame(fm)) 374s rating contact temp 374s 1 2 no cold 374s 2 3 no cold 374s 3 3 yes cold 374s 4 4 yes cold 374s 5 4 no warm 374s 6 4 no warm 374s > coef(fm) 374s 1|2 2|3 3|4 4|5 contactyes tempwarm lambda 374s -0.8797774 0.6678307 1.9806826 2.8593125 0.8614400 1.5071959 0.1614741 374s > coef(summary(fm)) 374s Estimate Std. Error z value Pr(>|z|) 374s 1|2 -0.8797774 0.5002966 -1.7585116 7.866049e-02 374s 2|3 0.6678307 0.3449548 1.9359945 5.286838e-02 374s 3|4 1.9806826 0.3825630 5.1774020 2.249971e-07 374s 4|5 2.8593125 0.4655846 6.1413379 8.182930e-10 374s contactyes 0.8614400 0.2675208 3.2200868 1.281518e-03 374s tempwarm 1.5071959 0.2947388 5.1136658 3.159661e-07 374s lambda 0.1614741 0.5751734 0.2807398 7.789100e-01 374s > nobs(fm) 374s [1] 72 374s > terms(fm) 374s rating ~ contact + temp 374s attr(,"variables") 374s list(rating, contact, temp) 374s attr(,"factors") 374s contact temp 374s rating 0 0 374s contact 1 0 374s temp 0 1 374s attr(,"term.labels") 374s [1] "contact" "temp" 374s attr(,"order") 374s [1] 1 1 374s attr(,"intercept") 374s [1] 1 374s attr(,"response") 374s [1] 1 374s attr(,".Environment") 374s 374s attr(,"predvars") 374s list(rating, contact, temp) 374s attr(,"dataClasses") 374s rating contact temp 374s "ordered" "factor" "factor" 374s > # profile(fm) # not implemented 374s > confint(fm) 374s 2.5 % 97.5 % 374s 1|2 -1.860340647 0.1007859 374s 2|3 -0.008268392 1.3439298 374s 3|4 1.230872843 2.7304924 374s 4|5 1.946783401 3.7718416 374s contactyes 0.337108995 1.3857711 374s tempwarm 0.929518433 2.0848735 374s lambda -0.965845152 1.2887933 374s > 374s > predict(fm, se=TRUE, interval = TRUE) 374s $fit 374s [1] 0.55792544 0.21565445 0.44140778 0.09846706 0.22428321 0.22428321 374s [7] 0.29090567 0.29090567 0.21042288 0.55792544 0.05388914 0.44140778 374s [13] 0.20737472 0.48129483 0.29090567 0.33832254 0.55792544 0.21565445 374s [19] 0.44140778 0.39099052 0.07269587 0.07269587 0.33832254 0.33832254 374s [25] 0.21565445 0.55792544 0.44140778 0.39099052 0.48129483 0.20737472 374s [31] 0.29090567 0.31272339 0.55792544 0.21565445 0.09846706 0.44140778 374s [37] 0.48129483 0.48129483 0.31272339 0.31272339 0.21565445 0.55792544 374s [43] 0.44140778 0.39099052 0.20737472 0.22428321 0.29090567 0.33832254 374s [49] 0.21042288 0.21042288 0.39099052 0.39099052 0.20737472 0.48129483 374s [55] 0.05636253 0.31272339 0.55792544 0.55792544 0.39099052 0.44140778 374s [61] 0.48129483 0.48129483 0.31272339 0.33832254 0.21042288 0.55792544 374s [67] 0.44140778 0.39099052 0.48129483 0.20737472 0.33832254 0.33832254 374s 374s $se.fit 374s [1] 0.09164058 0.09494135 0.08777656 0.05464347 0.08112461 0.08112461 374s [7] 0.13494788 0.13494788 0.13693811 0.09164058 0.04809909 0.08777656 374s [13] 0.09512593 0.07373113 0.13494788 0.08236628 0.09164058 0.09494135 374s [19] 0.08777656 0.09756681 0.06362571 0.06362571 0.08236628 0.08236628 374s [25] 0.09494135 0.09164058 0.08777656 0.09756681 0.07373113 0.09512593 374s [31] 0.13494788 0.09451059 0.09164058 0.09494135 0.05464347 0.08777656 374s [37] 0.07373113 0.07373113 0.09451059 0.09451059 0.09494135 0.09164058 374s [43] 0.08777656 0.09756681 0.09512593 0.08112461 0.13494788 0.08236628 374s [49] 0.13693811 0.13693811 0.09756681 0.09756681 0.09512593 0.07373113 374s [55] 0.03866211 0.09451059 0.09164058 0.09164058 0.09756681 0.08777656 374s [61] 0.07373113 0.07373113 0.09451059 0.08236628 0.13693811 0.09164058 374s [67] 0.08777656 0.09756681 0.07373113 0.09512593 0.08236628 0.08236628 374s 374s $lwr 374s [1] 0.378604421 0.083839589 0.282278454 0.031650565 0.103885179 0.103885179 374s [7] 0.102183449 0.102183449 0.050316476 0.378604421 0.008885132 0.282278454 374s [13] 0.077621510 0.342154616 0.102183449 0.199101468 0.378604421 0.083839589 374s [19] 0.282278454 0.223352983 0.012177666 0.012177666 0.199101468 0.199101468 374s [25] 0.083839589 0.378604421 0.282278454 0.223352983 0.342154616 0.077621510 374s [31] 0.102183449 0.161206608 0.378604421 0.083839589 0.031650565 0.282278454 374s [37] 0.342154616 0.342154616 0.161206608 0.161206608 0.083839589 0.378604421 374s [43] 0.282278454 0.223352983 0.077621510 0.103885179 0.102183449 0.199101468 374s [49] 0.050316476 0.050316476 0.223352983 0.223352983 0.077621510 0.342154616 374s [55] 0.014165414 0.161206608 0.378604421 0.378604421 0.223352983 0.282278454 374s [61] 0.342154616 0.342154616 0.161206608 0.199101468 0.050316476 0.378604421 374s [67] 0.282278454 0.223352983 0.342154616 0.077621510 0.199101468 0.199101468 374s 374s $upr 374s [1] 0.7233159 0.4523801 0.6135565 0.2673887 0.4189772 0.4189772 0.5965756 374s [8] 0.5965756 0.5727401 0.7233159 0.2657272 0.6135565 0.4485489 0.6233979 374s [15] 0.5965756 0.5125880 0.7233159 0.4523801 0.6135565 0.5890239 0.3326787 374s [22] 0.3326787 0.5125880 0.5125880 0.4523801 0.7233159 0.6135565 0.5890239 374s [29] 0.6233979 0.4485489 0.5965756 0.5186019 0.7233159 0.4523801 0.2673887 374s [36] 0.6135565 0.6233979 0.6233979 0.5186019 0.5186019 0.4523801 0.7233159 374s [43] 0.6135565 0.5890239 0.4485489 0.4189772 0.5965756 0.5125880 0.5727401 374s [50] 0.5727401 0.5890239 0.5890239 0.4485489 0.6233979 0.1988990 0.5186019 374s [57] 0.7233159 0.7233159 0.5890239 0.6135565 0.6233979 0.6233979 0.5186019 374s [64] 0.5125880 0.5727401 0.7233159 0.6135565 0.5890239 0.6233979 0.4485489 374s [71] 0.5125880 0.5125880 374s 374s > predict(fm, type="class") 374s $fit 374s [1] 2 2 3 3 3 3 4 4 2 2 3 3 3 3 4 4 2 2 3 3 3 3 4 4 2 2 3 3 3 3 4 4 2 2 3 3 3 3 374s [39] 4 4 2 2 3 3 3 3 4 4 2 2 3 3 3 3 4 4 2 2 3 3 3 3 4 4 2 2 3 3 3 3 4 4 374s Levels: 1 2 3 4 5 374s 374s > newData <- expand.grid(temp = c("cold", "warm"), 374s + contact = c("no", "yes")) 374s > 374s > ## Predicted probabilities in all five response categories for each of 374s > ## the four cases in newData: 374s > predict(fm, newdata=newData, type="prob") 374s $fit 374s 1 2 3 4 5 374s 1 0.210422883 0.55792544 0.2156544 0.01517801 0.0008192111 374s 2 0.014351371 0.20737472 0.4812948 0.22428321 0.0726958744 374s 3 0.053889141 0.39099052 0.4414078 0.09846706 0.0152454933 374s 4 0.001685878 0.05636253 0.3127234 0.33832254 0.2909056651 374s 374s > predict(fm, newdata=newData, type="class") 374s $fit 374s [1] 2 3 3 4 374s Levels: 1 2 3 4 5 374s 374s > 374s > predict(fm, newdata=newData, type="prob", se.fit = TRUE, interval = TRUE) 374s $fit 374s 1 2 3 4 5 374s 1 0.210422883 0.55792544 0.2156544 0.01517801 0.0008192111 374s 2 0.014351371 0.20737472 0.4812948 0.22428321 0.0726958744 374s 3 0.053889141 0.39099052 0.4414078 0.09846706 0.0152454933 374s 4 0.001685878 0.05636253 0.3127234 0.33832254 0.2909056651 374s 374s $se.fit 374s 1 2 3 4 5 374s 1 0.136938110 0.09164058 0.09494135 0.01696529 0.002047363 374s 2 0.016247015 0.09512593 0.07373113 0.08112461 0.063625711 374s 3 0.048099092 0.09756681 0.08777656 0.05464347 0.019268560 374s 4 0.002046575 0.03866211 0.09451059 0.08236628 0.134947885 374s 374s $lwr 374s 1 2 3 4 5 374s 1 0.050316476 0.37860442 0.08383959 0.001663553 6.091052e-06 374s 2 0.001530524 0.07762151 0.34215462 0.103885179 1.217767e-02 374s 3 0.008885132 0.22335298 0.28227845 0.031650565 1.249665e-03 374s 4 0.000155750 0.01416541 0.16120661 0.199101468 1.021834e-01 374s 374s $upr 374s 1 2 3 4 5 374s 1 0.57274013 0.7233159 0.4523801 0.1247616 0.09939055 374s 2 0.12150065 0.4485489 0.6233979 0.4189772 0.33267865 374s 3 0.26572719 0.5890239 0.6135565 0.2673887 0.16075952 374s 4 0.01797808 0.1988990 0.5186019 0.5125880 0.59657563 374s 374s > 374s > 374s > ## Aranda-Ordaz link: 374s > fm <- clm(rating ~ contact + temp, data=wine, link="Aranda-Ordaz") 374s Changing to 'nlminb' optimizer for flexible link function 374s > fm 374s formula: rating ~ contact + temp 374s data: wine 374s 374s Warning message: 374s (-1) Model failed to converge with max|grad| = 1.63026e-05 (tol = 1e-06) 374s link threshold nobs logLik AIC niter max.grad cond.H 374s Aranda-Ordaz flexible 72 -86.34 186.68 31(219) 1.63e-05 3.9e+02 374s 374s Coefficients: 374s contactyes tempwarm 374s 1.193 2.076 374s 374s Link coefficient: 374s lambda 374s 0.4994 374s 374s Threshold coefficients: 374s 1|2 2|3 3|4 4|5 374s -1.5284 0.7669 2.6021 3.7962 374s > summary(fm) 374s formula: rating ~ contact + temp 374s data: wine 374s 374s link threshold nobs logLik AIC niter max.grad cond.H 374s Aranda-Ordaz flexible 72 -86.34 186.68 31(219) 1.63e-05 3.9e+02 374s 374s Coefficients: 374s Estimate Std. Error z value Pr(>|z|) 374s contactyes 1.1927 0.6526 1.828 0.0676 . 374s tempwarm 2.0758 0.8196 2.533 0.0113 * 374s --- 374s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 374s 374s Link coefficients: 374s Estimate Std. Error z value Pr(>|z|) 374s lambda 0.4994 0.7840 0.637 0.524 374s 374s Threshold coefficients: 374s Estimate Std. Error z value 374s 1|2 -1.5284 0.5775 -2.647 374s 2|3 0.7669 0.8234 0.931 374s 3|4 2.6021 1.4335 1.815 374s 4|5 3.7962 1.9674 1.930 374s > vcov(fm) 374s 1|2 2|3 3|4 4|5 contactyes tempwarm 374s 1|2 0.3335060 0.2983830 0.4851477 0.6557866 0.2132243 0.2586679 374s 2|3 0.2983830 0.6780278 1.1261329 1.5330564 0.4699069 0.5953101 374s 3|4 0.4851477 1.1261329 2.0550132 2.7755716 0.8214403 1.0831428 374s 4|5 0.6557866 1.5330564 2.7755716 3.8705158 1.1194941 1.4831343 374s contactyes 0.2132243 0.4699069 0.8214403 1.1194941 0.4259333 0.3965112 374s tempwarm 0.2586679 0.5953101 1.0831428 1.4831343 0.3965112 0.6717720 374s lambda 0.2424389 0.5895693 1.0675177 1.4810302 0.4153797 0.5471765 374s lambda 374s 1|2 0.2424389 374s 2|3 0.5895693 374s 3|4 1.0675177 374s 4|5 1.4810302 374s contactyes 0.4153797 374s tempwarm 0.5471765 374s lambda 0.6146953 374s > logLik(fm) 374s 'log Lik.' -86.34171 (df=7) 374s > extractAIC(fm) 374s [1] 7.0000 186.6834 374s > fm2 <- update(fm, link="logit") 374s > anova(fm, fm2) 374s Likelihood ratio tests of cumulative link models: 374s 374s formula: link: threshold: 374s fm2 rating ~ contact + temp logit flexible 374s fm rating ~ contact + temp Aranda-Ordaz flexible 374s 374s no.par AIC logLik LR.stat df Pr(>Chisq) 374s fm2 6 184.98 -86.492 374s fm 7 186.68 -86.342 0.3004 1 0.5836 374s > head(model.matrix(fm)$X) 374s (Intercept) contactyes tempwarm 374s 1 1 0 0 374s 2 1 0 0 374s 3 1 1 0 374s 4 1 1 0 374s 5 1 0 1 374s 6 1 0 1 374s > head(model.frame(fm)) 374s rating contact temp 374s 1 2 no cold 374s 2 3 no cold 374s 3 3 yes cold 374s 4 4 yes cold 374s 5 4 no warm 374s 6 4 no warm 374s > coef(fm) 374s 1|2 2|3 3|4 4|5 contactyes tempwarm lambda 374s -1.5283885 0.7668892 2.6021281 3.7962200 1.1927244 2.0757936 0.4994415 374s > coef(summary(fm)) 374s Estimate Std. Error z value Pr(>|z|) 374s 1|2 -1.5283885 0.5774998 -2.6465611 0.008131482 374s 2|3 0.7668892 0.8234244 0.9313413 0.351677025 374s 3|4 2.6021281 1.4335317 1.8151869 0.069495186 374s 4|5 3.7962200 1.9673627 1.9295985 0.053656609 374s contactyes 1.1927244 0.6526357 1.8275501 0.067617099 374s tempwarm 2.0757936 0.8196170 2.5326386 0.011320761 374s lambda 0.4994415 0.7840251 0.6370223 0.524110286 374s > nobs(fm) 374s [1] 72 374s > terms(fm) 374s rating ~ contact + temp 374s attr(,"variables") 374s list(rating, contact, temp) 374s attr(,"factors") 374s contact temp 374s rating 0 0 374s contact 1 0 374s temp 0 1 374s attr(,"term.labels") 374s [1] "contact" "temp" 374s attr(,"order") 374s [1] 1 1 374s attr(,"intercept") 374s [1] 1 374s attr(,"response") 374s [1] 1 374s attr(,".Environment") 374s 374s attr(,"predvars") 374s list(rating, contact, temp) 374s attr(,"dataClasses") 374s rating contact temp 374s "ordered" "factor" "factor" 374s > # profile(fm) # not implemented 374s > confint(fm) 374s 2.5 % 97.5 % 374s 1|2 -2.66026726 -0.3965097 374s 2|3 -0.84699302 2.3807714 374s 3|4 -0.20754249 5.4117986 374s 4|5 -0.05973999 7.6521799 374s contactyes -0.08641802 2.4718668 374s tempwarm 0.46937382 3.6822133 374s lambda -1.03721941 2.0361024 374s > 374s > predict(fm, se=TRUE, interval = TRUE) 374s Profile intervals not available for models with flexible link function: 374s reporting Wald intervals instead 374s Changing to 'nlminb' optimizer for flexible link function 374s $fit 374s [1] 0.58209325 0.21518056 0.46054754 0.09103825 0.22383779 0.22383779 374s [7] 0.29286866 0.29286866 0.18610435 0.58209325 0.06269201 0.46054754 374s [13] 0.19716614 0.48293297 0.29286866 0.34021081 0.58209325 0.21518056 374s [19] 0.46054754 0.36913993 0.06939859 0.06939859 0.34021081 0.34021081 374s [25] 0.21518056 0.58209325 0.46054754 0.36913993 0.48293297 0.19716614 374s [31] 0.29286866 0.28974275 0.58209325 0.21518056 0.09103825 0.46054754 374s [37] 0.48293297 0.48293297 0.28974275 0.28974275 0.21518056 0.58209325 374s [43] 0.46054754 0.36913993 0.19716614 0.22383779 0.29286866 0.34021081 374s [49] 0.18610435 0.18610435 0.36913993 0.36913993 0.19716614 0.48293297 374s [55] 0.06897335 0.28974275 0.58209325 0.58209325 0.36913993 0.46054754 374s [61] 0.48293297 0.48293297 0.28974275 0.34021081 0.18610435 0.58209325 374s [67] 0.46054754 0.36913993 0.48293297 0.19716614 0.34021081 0.34021081 374s 374s $se.fit 374s [1] 0.14151187 0.09458704 0.10284384 0.06173010 0.06089158 0.06089158 374s [7] 0.17401323 0.17401323 0.08458282 0.14151187 0.03342713 0.10284384 374s [13] 0.06151480 0.16022480 0.17401323 0.14317221 0.14151187 0.09458704 374s [19] 0.10284384 0.09671235 0.16165494 0.16165494 0.14317221 0.14317221 374s [25] 0.09458704 0.14151187 0.10284384 0.09671235 0.16022480 0.06151480 374s [31] 0.17401323 0.08680263 0.14151187 0.09458704 0.06173010 0.10284384 374s [37] 0.16022480 0.16022480 0.08680263 0.08680263 0.09458704 0.14151187 374s [43] 0.10284384 0.09671235 0.06151480 0.06089158 0.17401323 0.14317221 374s [49] 0.08458282 0.08458282 0.09671235 0.09671235 0.06151480 0.16022480 374s [55] 0.03861752 0.08680263 0.14151187 0.14151187 0.09671235 0.10284384 374s [61] 0.16022480 0.16022480 0.08680263 0.14317221 0.08458282 0.14151187 374s [67] 0.10284384 0.09671235 0.16022480 0.06151480 0.14317221 0.14317221 374s 374s $lwr 374s [1] 0.3081470903 0.0838051147 0.2749859871 0.0226847128 0.1267084215 374s [6] 0.1267084215 0.0738941549 0.0738941549 0.0710944694 0.3081470903 374s [11] 0.0214631497 0.2749859871 0.1028661816 0.2098384782 0.0738941549 374s [16] 0.1287024770 0.3081470903 0.0838051147 0.2749859871 0.2058910205 374s [21] 0.0005517244 0.0005517244 0.1287024770 0.1287024770 0.0838051147 374s [26] 0.3081470903 0.2749859871 0.2058910205 0.2098384782 0.1028661816 374s [31] 0.0738941549 0.1514410899 0.3081470903 0.0838051147 0.0226847128 374s [36] 0.2749859871 0.2098384782 0.2098384782 0.1514410899 0.1514410899 374s [41] 0.0838051147 0.3081470903 0.2749859871 0.2058910205 0.1028661816 374s [46] 0.1267084215 0.0738941549 0.1287024770 0.0710944694 0.0710944694 374s [51] 0.2058910205 0.2058910205 0.1028661816 0.2098384782 0.0222866429 374s [56] 0.1514410899 0.3081470903 0.3081470903 0.2058910205 0.2749859871 374s [61] 0.2098384782 0.2098384782 0.1514410899 0.1287024770 0.0710944694 374s [66] 0.3081470903 0.2749859871 0.2058910205 0.2098384782 0.1028661816 374s [71] 0.1287024770 0.1287024770 374s 374s $upr 374s [1] 0.8132915 0.4511024 0.6577298 0.3017605 0.3643579 0.3643579 0.6825186 374s [8] 0.6825186 0.4058732 0.8132915 0.1694071 0.6577298 0.3446983 0.7666176 374s [15] 0.6825186 0.6428534 0.8132915 0.4511024 0.6577298 0.5690698 0.9097003 374s [22] 0.9097003 0.6428534 0.6428534 0.4511024 0.8132915 0.6577298 0.5690698 374s [29] 0.7666176 0.3446983 0.6825186 0.4825259 0.8132915 0.4511024 0.3017605 374s [36] 0.6577298 0.7666176 0.7666176 0.4825259 0.4825259 0.4511024 0.8132915 374s [43] 0.6577298 0.5690698 0.3446983 0.3643579 0.6825186 0.6428534 0.4058732 374s [50] 0.4058732 0.5690698 0.5690698 0.3446983 0.7666176 0.1940499 0.4825259 374s [57] 0.8132915 0.8132915 0.5690698 0.6577298 0.7666176 0.7666176 0.4825259 374s [64] 0.6428534 0.4058732 0.8132915 0.6577298 0.5690698 0.7666176 0.3446983 374s [71] 0.6428534 0.6428534 374s 374s > predict(fm, type="class") 374s $fit 374s [1] 2 2 3 3 3 3 4 4 2 2 3 3 3 3 4 4 2 2 3 3 3 3 4 4 2 2 3 3 3 3 4 4 2 2 3 3 3 3 374s [39] 4 4 2 2 3 3 3 3 4 4 2 2 3 3 3 3 4 4 2 2 3 3 3 3 4 4 2 2 3 3 3 3 4 4 374s Levels: 1 2 3 4 5 374s 374s > newData <- expand.grid(temp = c("cold", "warm"), 374s + contact = c("no", "yes")) 374s > 374s > ## Predicted probabilities in all five response categories for each of 374s > ## the four cases in newData: 374s > predict(fm, newdata=newData, type="prob") 374s $fit 374s 1 2 3 4 5 374s 1 0.186104347 0.58209325 0.2151806 0.01478353 0.001838315 374s 2 0.026664518 0.19716614 0.4829330 0.22383779 0.069398588 374s 3 0.062692012 0.36913993 0.4605475 0.09103825 0.016582262 374s 4 0.008204432 0.06897335 0.2897428 0.34021081 0.292868655 374s 374s > predict(fm, newdata=newData, type="class") 374s $fit 374s [1] 2 3 3 4 374s Levels: 1 2 3 4 5 374s 374s > 374s > predict(fm, newdata=newData, type="prob", se.fit = TRUE, interval = TRUE) 374s $fit 374s 1 2 3 4 5 374s 1 0.186104347 0.58209325 0.2151806 0.01478353 0.001838315 374s 2 0.026664518 0.19716614 0.4829330 0.22383779 0.069398588 374s 3 0.062692012 0.36913993 0.4605475 0.09103825 0.016582262 374s 4 0.008204432 0.06897335 0.2897428 0.34021081 0.292868655 374s 374s $se.fit 374s 1 2 3 4 5 374s 1 0.084582817 0.14151187 0.09458704 0.05105462 0.04225890 374s 2 0.018013146 0.06151480 0.16022480 0.06089158 0.16165494 374s 3 0.033427133 0.09671235 0.10284384 0.06173010 0.09203687 374s 4 0.009189041 0.03861752 0.08680263 0.14317221 0.17401323 374s 374s $lwr 374s 1 2 3 4 5 374s 1 0.0710944694 0.30814709 0.08380511 1.557841e-05 4.590853e-23 374s 2 0.0069799027 0.10286618 0.20983848 1.267084e-01 5.517244e-04 374s 3 0.0214631497 0.20589102 0.27498599 2.268471e-02 2.647288e-07 374s 4 0.0009036362 0.02228664 0.15144109 1.287025e-01 7.389415e-02 374s 374s $upr 374s 1 2 3 4 5 374s 1 0.40587324 0.8132915 0.4511024 0.9352884 1.0000000 374s 2 0.09647027 0.3446983 0.7666176 0.3643579 0.9097003 374s 3 0.16940714 0.5690698 0.6577298 0.3017605 0.9990698 374s 4 0.07033824 0.1940499 0.4825259 0.6428534 0.6825186 374s 374s > 374s > ######################################################################## 374s > ### Models with scale + flex link (or cauchit link) 374s > ######################################################################## 374s > 374s > fm <- clm(SURENESS ~ PRODID, scale=~PROD, data = soup, link="Aranda-Ordaz") 374s > summary(fm) 374s formula: SURENESS ~ PRODID 374s scale: ~PROD 374s data: soup 374s 374s link threshold nobs logLik AIC niter max.grad cond.H 374s Aranda-Ordaz flexible 1847 -2674.65 5373.30 57(719) 3.74e-04 9.0e+03 374s 374s Coefficients: 374s Estimate Std. Error z value Pr(>|z|) 374s PRODID2 1.3604 0.4137 3.289 0.001007 ** 374s PRODID3 2.2066 0.6659 3.314 0.000921 *** 374s PRODID4 1.2553 0.4086 3.072 0.002124 ** 374s PRODID5 1.9820 0.5886 3.367 0.000759 *** 374s PRODID6 2.4715 0.7713 3.204 0.001355 ** 374s --- 374s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 374s 374s log-scale coefficients: 374s Warning message: 374s (-1) Model failed to converge with max|grad| = 0.000374096 (tol = 1e-06) 374s Estimate Std. Error z value Pr(>|z|) 374s PRODTest 0.2807 0.1553 1.808 0.0706 . 374s --- 374s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 374s 374s Link coefficients: 374s Estimate Std. Error z value Pr(>|z|) 374s lambda 2.063 1.136 1.816 0.0693 . 374s --- 374s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 374s 374s Threshold coefficients: 374s Estimate Std. Error z value 374s 1|2 -1.3927 0.1491 -9.344 374s 2|3 -0.1449 0.3533 -0.410 374s 3|4 0.3051 0.4699 0.649 374s 4|5 0.6733 0.5802 1.160 374s 5|6 1.7210 0.9594 1.794 374s > 374s > fm <- clm(SURENESS ~ PRODID, scale=~PROD, data = soup, link="log-gamma") 374s Changing to 'nlminb' optimizer for flexible link function 376s Warning message: 376s (-1) Model failed to converge with max|grad| = 0.00334059 (tol = 1e-06) 376s > summary(fm) 376s formula: SURENESS ~ PRODID 376s scale: ~PROD 376s data: soup 376s 376s link threshold nobs logLik AIC niter max.grad cond.H 376s log-gamma flexible 1847 -2676.84 5377.68 90(1050) 3.34e-03 8.9e+03 376s 376s Coefficients: 376s Estimate Std. Error z value Pr(>|z|) 376s PRODID2 0.62877 0.09223 6.818 9.26e-12 *** 376s PRODID3 1.02758 0.13449 7.640 2.16e-14 *** 376s PRODID4 0.59157 0.11435 5.173 2.30e-07 *** 376s PRODID5 0.91937 0.12977 7.085 1.39e-12 *** 376s PRODID6 1.13202 0.13927 8.128 4.35e-16 *** 376s --- 376s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 376s 376s log-scale coefficients: 376s Estimate Std. Error z value Pr(>|z|) 376s PRODTest 0.09065 0.18402 0.493 0.622 376s 376s Link coefficients: 376s Estimate Std. Error z value Pr(>|z|) 376s lambda 0.475 0.703 0.676 0.499 376s 376s Threshold coefficients: 376s Estimate Std. Error z value 376s 1|2 -1.15651 0.45764 -2.527 376s 2|3 -0.47330 0.29569 -1.601 376s 3|4 -0.24746 0.26538 -0.932 376s 4|5 -0.07225 0.24982 -0.289 376s 5|6 0.37912 0.24130 1.571 376s > 376s > fm <- clm(SURENESS ~ PRODID, scale=~PROD, data = soup, link="cauchit") 376s > summary(fm) 376s formula: SURENESS ~ PRODID 376s scale: ~PROD 376s data: soup 376s 376s link threshold nobs logLik AIC niter max.grad cond.H 376s cauchit flexible 1847 -2679.34 5380.67 11(1) 3.10e-07 3.0e+02 376s 376s Coefficients: 376s Estimate Std. Error z value Pr(>|z|) 376s PRODID2 0.70550 0.09611 7.341 2.12e-13 *** 376s PRODID3 1.06186 0.13882 7.649 2.02e-14 *** 376s PRODID4 0.66876 0.11911 5.614 1.97e-08 *** 376s PRODID5 1.01135 0.13277 7.617 2.59e-14 *** 376s PRODID6 1.12784 0.14159 7.966 1.64e-15 *** 376s --- 376s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 376s 376s log-scale coefficients: 376s Estimate Std. Error z value Pr(>|z|) 376s PRODTest -0.20801 0.09524 -2.184 0.029 * 376s --- 376s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 376s 376s Threshold coefficients: 376s Estimate Std. Error z value 376s 1|2 -1.70920 0.14977 -11.412 376s 2|3 -0.36737 0.06302 -5.830 376s 3|4 -0.06736 0.05734 -1.175 376s 4|5 0.14657 0.05708 2.568 376s 5|6 0.67063 0.07072 9.483 376s > 376s > ######################################################################## 376s > ### clm.fit 376s > ######################################################################## 376s > 376s > ## Example with log-gamma: 376s > fm1 <- clm(rating ~ contact + temp, data=wine, link="log-gamma") 376s Changing to 'nlminb' optimizer for flexible link function 376s Warning message: 376s (-1) Model failed to converge with max|grad| = 9.9099e-05 (tol = 1e-06) 376s > summary(fm1) 376s formula: rating ~ contact + temp 376s data: wine 376s 376s link threshold nobs logLik AIC niter max.grad cond.H 376s log-gamma flexible 72 -85.72 185.44 27(179) 9.91e-05 5.9e+01 376s 376s Coefficients: 376s Estimate Std. Error z value Pr(>|z|) 376s contactyes 0.8614 0.2675 3.220 0.00128 ** 376s tempwarm 1.5072 0.2947 5.114 3.16e-07 *** 376s --- 376s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 376s 376s Link coefficients: 376s Estimate Std. Error z value Pr(>|z|) 376s lambda 0.1615 0.5752 0.281 0.779 376s 376s Threshold coefficients: 376s Estimate Std. Error z value 376s 1|2 -0.8798 0.5003 -1.759 376s 2|3 0.6678 0.3450 1.936 376s 3|4 1.9807 0.3826 5.177 376s 4|5 2.8593 0.4656 6.141 376s > ## get the model frame containing y and X: 376s > mf1 <- update(fm1, method="design") 376s > names(mf1) 376s [1] "y" "y.levels" "X" "offset" "terms" "contrasts" 376s [7] "xlevels" "weights" "doFit" "control" "link" "threshold" 376s [13] "start" "formulas" 376s > res <- clm.fit(mf1$y, mf1$X, link="log-gamma") ## invoking the factor method 376s > coef(res) 376s 1|2 2|3 3|4 4|5 Changing to 'nlminb' optimizer for flexible link function 376s Warning message: 376s (-1) Model failed to converge with max|grad| = 9.9099e-05 (tol = 1e-06) 376s contactyes tempwarm lambda 376s -0.8797774 0.6678307 1.9806826 2.8593125 0.8614400 1.5071959 0.1614741 376s > stopifnot(all.equal(coef(res), coef(fm1))) 376s > 376s > ## Example with Aranda-Ordaz: 376s > fm1 <- clm(rating ~ contact + temp, data=wine, link="Aranda-Ordaz") 376s Changing to 'nlminb' optimizer for flexible link function 376s > mf1 <- update(fm1, method="design") 376s Warning message: 376s (-1) Model failed to converge with max|grad| = 1.63026e-05 (tol = 1e-06) 376s > res <- clm.fit(mf1$y, mf1$X, link="Aranda") ## invoking the factor method 376s Changing to 'nlminb' optimizer for flexible link function 376s > stopifnot(all.equal(coef(res), coef(fm1))) 376s > 376s > 376s Warning message: 376s (-1) Model failed to converge with max|grad| = 1.63026e-05 (tol = 1e-06) 376s BEGIN TEST test.clm.model.matrix.R 376s 376s R version 4.4.3 (2025-02-28) -- "Trophy Case" 376s Copyright (C) 2025 The R Foundation for Statistical Computing 376s Platform: aarch64-unknown-linux-gnu 376s 376s R is free software and comes with ABSOLUTELY NO WARRANTY. 376s You are welcome to redistribute it under certain conditions. 376s Type 'license()' or 'licence()' for distribution details. 376s 376s R is a collaborative project with many contributors. 376s Type 'contributors()' for more information and 376s 'citation()' on how to cite R or R packages in publications. 376s 376s Type 'demo()' for some demos, 'help()' for on-line help, or 376s 'help.start()' for an HTML browser interface to help. 376s Type 'q()' to quit R. 376s 377s > library(ordinal) 377s > ## source("test.clm.model.matrix.R") 377s > 377s > ## library(devtools) 377s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 377s > ## clean_dll(pkg = r2path) 377s > ## load_all(r2path) 377s > 377s > ## Check that get_clmDesign works in standard setting: 377s > fm1 <- clm(rating ~ temp, scale=~contact, nominal=~contact, data=wine) 377s > contr <- c(fm1$contrasts, fm1$S.contrasts, fm1$nom.contrasts) 377s > XX <- ordinal:::get_clmDesign(fm1$model, terms(fm1, "all"), contrasts=contr) 377s > XX2 <- update(fm1, method="design") 377s > (keep <- intersect(names(XX), names(XX2))) 377s [1] "y" "y.levels" "X" "offset" 377s [5] "terms" "contrasts" "xlevels" "weights" 377s [9] "S" "S.terms" "S.off" "S.contrasts" 377s [13] "S.xlevels" "NOM" "nom.terms" "nom.contrasts" 377s [17] "nom.xlevels" 377s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 377s + XX[keep], XX2[keep])) 377s y y.levels X offset terms 377s TRUE TRUE TRUE TRUE TRUE 377s contrasts xlevels weights S S.terms 377s TRUE TRUE TRUE TRUE TRUE 377s S.off S.contrasts S.xlevels NOM nom.terms 377s TRUE TRUE TRUE TRUE TRUE 377s nom.contrasts nom.xlevels 377s TRUE TRUE 377s > stopifnot(all(test)) 377s > 377s > ## Check that get_clmDesign works with singular fit and NAs: 377s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 377s > wine2 <- subset(wine, subset=(!1:nrow(wine) %in% cy)) 377s > wine2[c(9, 15, 46), "rating"] <- NA 377s > fm1 <- clm(rating ~ temp, scale=~contact, nominal=~contact, 377s + data=wine2) 378s > contr <- c(fm1$contrasts, fm1$S.contrasts, fm1$nom.contrasts) 378s > XX <- ordinal:::get_clmDesign(fm1$model, terms(fm1, "all"), contrasts=contr) 378s > XX2 <- update(fm1, method="design") 378s > (keep <- intersect(names(XX), names(XX2))) 378s [1] "y" "y.levels" "X" "offset" 378s [5] "terms" "contrasts" "xlevels" "na.action" 378s [9] "weights" "S" "S.terms" "S.off" 378s [13] "S.contrasts" "S.xlevels" "NOM" "nom.terms" 378s [17] "nom.contrasts" "nom.xlevels" 378s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 378s + XX[keep], XX2[keep])) 378s y y.levels X offset terms 378s TRUE TRUE TRUE TRUE TRUE 378s contrasts xlevels na.action weights S 378s TRUE TRUE TRUE TRUE TRUE 378s S.terms S.off S.contrasts S.xlevels NOM 378s TRUE TRUE TRUE TRUE TRUE 378s nom.terms nom.contrasts nom.xlevels 378s TRUE TRUE TRUE 378s > stopifnot(all(test)) 378s > 378s > ## In this situation update and get_clmRho give the same results: 378s > wine2 <- wine 378s > fm1 <- clm(rating ~ temp + contact, data=wine2) ## OK 378s > rho1 <- ordinal:::get_clmRho.clm(fm1) 378s > Warning message: 378s (1) Hessian is numerically singular: parameters are not uniquely determined 378s In addition: Absolute convergence criterion was met, but relative criterion was not met 378s l1 <- as.list(rho1) 378s > l2 <- as.list(update(fm1, doFit=FALSE)) 378s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 378s + l1, l2[names(l1)])) 378s nlambda link gfun dfun pfun par clm.hess clm.grad 378s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 378s clm.nll wts fitted has.scale sigma k Soff S 378s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 378s n.psi o2 o1 B2 B1 378s TRUE TRUE TRUE TRUE TRUE 378s > stopifnot(all(test)) 378s > ## If we modify the data (or other subset, weights, formulae, etc.) 378s > ## used in the model call, the results from update no longer correspond 378s > ## to the elements of the fitted model object. get_clmRho gets it 378s > ## right on the other hand: 378s > wine2[10:13, "rating"] <- NA 378s > l3 <- as.list(ordinal:::get_clmRho.clm(fm1)) 378s > l4 <- as.list(update(fm1, doFit=FALSE)) 378s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 378s + l1, l3)) 378s nlambda link gfun dfun pfun par clm.hess clm.grad 378s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 378s clm.nll wts fitted has.scale sigma k Soff S 378s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 378s n.psi o2 o1 B2 B1 378s TRUE TRUE TRUE TRUE TRUE 378s > stopifnot(all(test)) ## same 378s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 378s + l3, l4[names(l3)])) 378s nlambda link gfun dfun pfun par clm.hess clm.grad 378s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 378s clm.nll wts fitted has.scale sigma k Soff S 378s TRUE FALSE FALSE TRUE FALSE TRUE FALSE TRUE 378s n.psi o2 o1 B2 B1 378s TRUE FALSE FALSE FALSE FALSE 378s > stopifnot(sum(!test) == 8) ## not all the same anymore! 378s > ## In conclusion l1, l2, and l3 are identical. l4 is different. 378s > 378s > ################################# 378s > ## Test that checkContrasts give appropriate warnings: 378s > contr <- c(temp="contr.sum", contact="contr.sum") 378s > fm1 <- clm(rating ~ temp + contact, scale=~contact, data=wine) ## OK 378s > fm1 <- clm(rating ~ temp + contact, scale=~contact, data=wine, 378s + contrasts=contr) ## OK 378s > fm1 <- clm(rating ~ temp, scale=~contact, data=wine, 378s + contrasts=contr) ## OK 378s Warning messages: 378s 1: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 378s non-list contrasts argument ignored 378s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 378s non-list contrasts argument ignored 378s > ## These should give warnings: 378s > fm1 <- clm(rating ~ temp, contrasts=c(contact="contr.sum"), data=wine) 378s Warning messages: 378s 1: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 378s non-list contrasts argument ignored 378s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 378s non-list contrasts argument ignored 378s Warning messages: 378s > fm1 <- clm(rating ~ temp, contrasts=contr, data=wine) 378s > fm1 <- clm(rating ~ 1, scale=~contact, contrasts=c(temp="contr.sum"), 378s + data=wine) 378s 1: variable 'contact' is absent: its contrasts will be ignored 378s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 378s non-list contrasts argument ignored 378s Warning messages: 378s 1: variable 'contact' is absent: its contrasts will be ignored 378s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 378s non-list contrasts argument ignored 378s > fm1 <- clm(rating ~ 1, scale=~contact, contrasts=list(temp="contr.sum"), 378s + data=wine) 378s Warning messages: 378s 1: variable 'temp' is absent: its contrasts will be ignored 378s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 378s non-list contrasts argument ignored 378s 3: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 378s non-list contrasts argument ignored 378s > 378s > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 378s Warning message: 378s variable 'temp' is absent: its contrasts will be ignored 378s > ordinal:::checkContrasts(fm0$S.terms, fm0$contrasts) 378s > ordinal:::checkContrasts(fm0$S.terms, fm0$S.contrasts) 378s > ordinal:::checkContrasts(fm0$terms, fm0$contrasts) 378s > ordinal:::checkContrasts(fm0$terms, fm0$S.contrasts) 378s > 378s Warning message: 378s variable 'temp' is absent: its contrasts will be ignored 378s > ################################# 378s > ## Check that clm and model.matrix respects contrast settings: 378s > options("contrasts" = c("contr.treatment", "contr.poly")) 378s > fm0 <- clm(rating ~ temp + contact, data=wine) 378s > options("contrasts" = c("contr.sum", "contr.poly")) 378s > fm1 <- clm(rating ~ temp + contact, data=wine) 378s > stopifnot(all(model.matrix(fm0)$X[, 2] %in% c(0, 1))) 378s > stopifnot(all(model.matrix(fm1)$X[, 2] %in% c(1, -1))) 378s > 378s > ################################# 378s > ## Check that model.matrix results do not depend on global contrast 378s > ## setting: 378s > options("contrasts" = c("contr.sum", "contr.poly")) 378s > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 378s > MM <- model.matrix(fm0) 378s > options("contrasts" = c("contr.treatment", "contr.poly")) 378s > MM2 <- model.matrix(fm0) 378s > for(x in MM) print(head(x)) 378s (Intercept) temp1 contact1 378s 1 1 1 1 378s 2 1 1 1 378s 3 1 1 -1 378s 4 1 1 -1 378s 5 1 -1 1 378s 6 1 -1 1 378s (Intercept) contact1 378s 1 1 1 378s 2 1 1 378s 3 1 -1 378s 4 1 -1 378s 5 1 1 378s 6 1 1 378s > for(x in MM2) print(head(x)) 378s (Intercept) temp1 contact1 378s 1 1 1 1 378s 2 1 1 1 378s 3 1 1 -1 378s 4 1 1 -1 378s 5 1 -1 1 378s 6 1 -1 1 378s (Intercept) contact1 378s 1 1 1 378s 2 1 1 378s 3 1 -1 378s 4 1 -1 378s 5 1 1 378s 6 1 1 378s > stopifnot(all(mapply(all.equal, MM, MM2))) 378s > 378s > ################################# 378s > ## This gave a warning before getContrasts was implemented: 378s > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 378s > MM <- model.matrix(fm0) 378s > ## > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 378s > ## > MM <- model.matrix(fm0) 378s > ## Warning message: 378s > ## In model.matrix.default(res$S.terms, data = fullmf, contrasts.arg = getContrasts(res$S.terms, : 378s > ## variable 'temp' is absent, its contrast will be ignored 378s > for(x in MM) print(head(x)) 378s (Intercept) tempwarm contactyes 378s 1 1 0 0 378s 2 1 0 0 378s 3 1 0 1 378s 4 1 0 1 378s 5 1 1 0 378s 6 1 1 0 378s (Intercept) contactyes 378s 1 1 0 378s 2 1 0 378s 3 1 1 378s 4 1 1 378s 5 1 0 378s 6 1 0 378s > 378s > 378s BEGIN TEST test.clm.predict.R 378s 378s R version 4.4.3 (2025-02-28) -- "Trophy Case" 378s Copyright (C) 2025 The R Foundation for Statistical Computing 378s Platform: aarch64-unknown-linux-gnu 378s 378s R is free software and comes with ABSOLUTELY NO WARRANTY. 378s You are welcome to redistribute it under certain conditions. 378s Type 'license()' or 'licence()' for distribution details. 378s 378s R is a collaborative project with many contributors. 378s Type 'contributors()' for more information and 378s 'citation()' on how to cite R or R packages in publications. 378s 378s Type 'demo()' for some demos, 'help()' for on-line help, or 378s 'help.start()' for an HTML browser interface to help. 378s Type 'q()' to quit R. 378s 378s > library(ordinal) 379s > ## source("test.clm.predict.R") 379s > 379s > ## library(devtools) 379s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 379s > ## clean_dll(pkg = r2path) 379s > ## load_all(r2path) 379s > 379s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 379s > options("contrasts" = c("contr.treatment", "contr.poly")) 379s > getOption("contrasts") 379s [1] "contr.treatment" "contr.poly" 379s > 379s > ## Example model 379s > 379s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine) 379s > summary(wine1.clm) 379s formula: rating ~ temp * contact 379s data: wine 379s subset: -cy 379s 379s link threshold nobs logLik AIC niter max.grad cond.H 379s logit flexible 54 -65.47 142.93 6(0) 2.80e-12 2.9e+01 379s 379s Coefficients: (1 not defined because of singularities) 379s Estimate Std. Error z value Pr(>|z|) 379s tempwarm 2.2892 0.7192 3.183 0.00146 ** 379s contactyes 1.6505 0.6698 2.464 0.01374 * 379s tempwarm:contactyes NA NA NA NA 379s --- 379s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 379s 379s Threshold coefficients: 379s Estimate Std. Error z value 379s 1|2 -1.3971 0.5728 -2.439 379s 2|3 1.1349 0.5262 2.157 379s 3|4 3.3351 0.6987 4.774 379s 4|5 4.7924 0.7996 5.994 379s > names(wine1.clm) 379s [1] "aliased" "alpha" "beta" "call" 379s [5] "coefficients" "cond.H" "contrasts" "control" 379s [9] "convergence" "df.residual" "edf" "fitted.values" 379s [13] "formula" "formulas" "gradient" "Hessian" 379s [17] "info" "link" "logLik" "maxGradient" 379s [21] "message" "model" "n" "niter" 379s [25] "nobs" "start" "terms" "Theta" 379s [29] "threshold" "tJac" "vcov" "xlevels" 379s [33] "y" "y.levels" 379s > 379s > wine.clm <- clm(rating~temp*contact, data=wine) 379s > summary(wine.clm) 379s formula: rating ~ temp * contact 379s data: wine 379s 379s link threshold nobs logLik AIC niter max.grad cond.H 379s logit flexible 72 -86.42 186.83 6(0) 5.22e-12 5.1e+01 379s 379s Coefficients: 379s Estimate Std. Error z value Pr(>|z|) 379s tempwarm 2.3212 0.7009 3.311 0.000928 *** 379s contactyes 1.3475 0.6604 2.041 0.041300 * 379s tempwarm:contactyes 0.3595 0.9238 0.389 0.697129 379s --- 379s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 379s 379s Threshold coefficients: 379s Estimate Std. Error z value 379s 1|2 -1.4113 0.5454 -2.588 379s 2|3 1.1436 0.5097 2.244 379s 3|4 3.3771 0.6382 5.292 379s 4|5 4.9420 0.7509 6.581 379s > names(wine.clm) 379s [1] "aliased" "alpha" "beta" "call" 379s [5] "coefficients" "cond.H" "contrasts" "control" 379s [9] "convergence" "df.residual" "edf" "fitted.values" 379s [13] "formula" "formulas" "gradient" "Hessian" 379s [17] "info" "link" "logLik" "maxGradient" 379s [21] "message" "model" "n" "niter" 379s [25] "nobs" "start" "terms" "Theta" 379s [29] "threshold" "tJac" "vcov" "xlevels" 379s [33] "y" "y.levels" 379s > ## Make sure the same elements are present with a rank deficient model 379s > ## fit: 379s > stopifnot(all(names(wine1.clm) == names(wine.clm))) 379s > 379s > ## With treatment contrasts: 379s > options("contrasts" = c("contr.treatment", "contr.poly")) 379s > wine.clm <- clm(rating~temp*contact, data=wine) 379s > coef(summary(wine.clm)) 379s Estimate Std. Error z value Pr(>|z|) 379s 1|2 -1.4112620 0.5453532 -2.5877943 9.659266e-03 379s 2|3 1.1435537 0.5096555 2.2437776 2.484671e-02 379s 3|4 3.3770825 0.6381617 5.2918913 1.210578e-07 379s 4|5 4.9419823 0.7509113 6.5813133 4.663108e-11 379s tempwarm 2.3211843 0.7009479 3.3114931 9.279953e-04 379s contactyes 1.3474604 0.6603557 2.0405072 4.129984e-02 379s tempwarm:contactyes 0.3595489 0.9238188 0.3891985 6.971293e-01 379s > head(model.matrix(wine.clm)$X) 379s (Intercept) tempwarm contactyes tempwarm:contactyes 379s 1 1 0 0 0 379s 2 1 0 0 0 379s 3 1 0 1 0 379s 4 1 0 1 0 379s 5 1 1 0 0 379s 6 1 1 0 0 379s > wine.clm$contrasts 379s $temp 379s [1] "contr.treatment" 379s 379s $contact 379s [1] "contr.treatment" 379s 379s > head(pred1 <- predict(wine.clm)$fit) 379s [1] 0.56229641 0.20864908 0.43467309 0.08938852 0.19028226 0.19028226 379s > 379s > ## With sum contrasts: 379s > options("contrasts" = c("contr.sum", "contr.poly")) 379s > wine.clm <- clm(rating~temp*contact, data=wine) 379s > coef(summary(wine.clm)) 379s Estimate Std. Error z value Pr(>|z|) 379s 1|2 -3.33547153 0.5253364 -6.3492103 2.164231e-10 379s 2|3 -0.78065590 0.2945538 -2.6503003 8.042025e-03 379s 3|4 1.45287292 0.3367529 4.3143590 1.600667e-05 379s 4|5 3.01777269 0.4813097 6.2699186 3.612370e-10 379s temp1 -1.25047935 0.2641023 -4.7348292 2.192396e-06 379s contact1 -0.76361743 0.2380971 -3.2071683 1.340485e-03 379s temp1:contact1 0.08988722 0.2309547 0.3891985 6.971293e-01 379s > head(model.matrix(wine.clm)$X) 379s (Intercept) temp1 contact1 temp1:contact1 379s 1 1 1 1 1 379s 2 1 1 1 1 379s 3 1 1 -1 -1 379s 4 1 1 -1 -1 379s 5 1 -1 1 -1 379s 6 1 -1 1 -1 379s > wine.clm$contrasts 379s $temp 379s [1] "contr.sum" 379s 379s $contact 379s [1] "contr.sum" 379s 379s > head(pred2 <- predict(wine.clm)$fit) 379s [1] 0.56229641 0.20864908 0.43467309 0.08938852 0.19028226 0.19028226 379s > 379s > ## Mixture of sum and treatment contrasts: 379s > options("contrasts" = c("contr.treatment", "contr.poly")) 379s > wine.clm <- clm(rating~temp*contact, data=wine, 379s + contrasts=list(temp="contr.sum")) 379s > coef(summary(wine.clm)) 379s Estimate Std. Error z value Pr(>|z|) 379s 1|2 -2.57185410 0.5227165 -4.92016984 8.646915e-07 379s 2|3 -0.01703847 0.3611634 -0.04717662 9.623725e-01 379s 3|4 2.21649036 0.4529312 4.89365773 9.897892e-07 379s 4|5 3.78139013 0.5957919 6.34683010 2.197966e-10 379s temp1 -1.16059213 0.3504740 -3.31149309 9.279953e-04 379s contactyes 1.52723487 0.4761942 3.20716830 1.340485e-03 379s temp1:contactyes -0.17977444 0.4619094 -0.38919847 6.971293e-01 379s > head(model.matrix(wine.clm)$X) 379s (Intercept) temp1 contactyes temp1:contactyes 379s 1 1 1 0 0 379s 2 1 1 0 0 379s 3 1 1 1 1 379s 4 1 1 1 1 379s 5 1 -1 0 0 379s 6 1 -1 0 0 379s > wine.clm$contrasts 379s $temp 379s [1] "contr.sum" 379s 379s $contact 379s [1] "contr.treatment" 379s 379s > head(pred3 <- predict(wine.clm)$fit) 379s [1] 0.56229641 0.20864908 0.43467309 0.08938852 0.19028226 0.19028226 379s > 379s > stopifnot(isTRUE(all.equal(pred1, pred2))) 379s > stopifnot(isTRUE(all.equal(pred1, pred3))) 379s > 379s > ################################# 379s > ### Now for a rank deficient fit: 379s > ################################# 379s > 379s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 379s > options("contrasts" = c("contr.treatment", "contr.poly")) 379s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine) 379s > coef(summary(wine1.clm)) 379s Estimate Std. Error z value Pr(>|z|) 379s 1|2 -1.397134 0.5727918 -2.439164 1.472127e-02 379s 2|3 1.134907 0.5261653 2.156940 3.101038e-02 379s 3|4 3.335090 0.6986647 4.773521 1.810331e-06 379s 4|5 4.792428 0.7995580 5.993846 2.049352e-09 379s tempwarm 2.289221 0.7191705 3.183140 1.456870e-03 379s contactyes 1.650538 0.6698484 2.464047 1.373782e-02 379s tempwarm:contactyes NA NA NA NA 379s > attributes(model.matrix(wine1.clm)$X)$contrasts 379s $temp 379s [1] "contr.treatment" 379s 379s $contact 379s [1] "contr.treatment" 379s 379s > wine1.clm$contrasts 379s $temp 379s [1] "contr.treatment" 379s 379s $contact 379s [1] "contr.treatment" 379s 379s > head(pred4 <- predict(wine1.clm)$fit) 379s [1] 0.5584719 0.2088699 0.1843854 0.1843854 0.2988733 0.2988733 379s > 379s > options("contrasts" = c("contr.sum", "contr.poly")) 379s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine) 379s > attributes(model.matrix(wine1.clm)$X)$contrasts 379s $temp 379s [1] "contr.sum" 379s 379s $contact 379s [1] "contr.sum" 379s 379s > options("contrasts" = c("contr.treatment", "contr.poly")) 379s > attributes(model.matrix(wine1.clm)$X)$contrasts 379s $temp 379s [1] "contr.sum" 379s 379s $contact 379s [1] "contr.sum" 379s 379s > ## Notice that the contrasts change in the attributes of the fit!!! 379s > coef(summary(wine1.clm)) 379s Estimate Std. Error z value Pr(>|z|) 379s 1|2 -3.3670128 0.6149672 -5.475110 4.372411e-08 379s 2|3 -0.8349725 0.4231096 -1.973419 4.844787e-02 379s 3|4 1.3652108 0.4310181 3.167409 1.538037e-03 379s 4|5 2.8225483 0.5190089 5.438343 5.377826e-08 379s temp1 -1.1446104 0.3595853 -3.183140 1.456870e-03 379s contact1 -0.8252689 0.3349242 -2.464047 1.373782e-02 379s temp1:contact1 NA NA NA NA 379s > wine1.clm$contrasts 379s $temp 379s [1] "contr.sum" 379s 379s $contact 379s [1] "contr.sum" 379s 379s > head(pred5 <- predict(wine1.clm)$fit) 379s [1] 0.5584719 0.2088699 0.1843854 0.1843854 0.2988733 0.2988733 379s > 379s > head(cbind(pred4, pred5)) 379s pred4 pred5 379s [1,] 0.5584719 0.5584719 379s [2,] 0.2088699 0.2088699 379s [3,] 0.1843854 0.1843854 379s [4,] 0.1843854 0.1843854 379s [5,] 0.2988733 0.2988733 379s [6,] 0.2988733 0.2988733 379s > stopifnot(isTRUE(all.equal(pred4, pred5))) 379s > 379s > options("contrasts" = c("contr.treatment", "contr.poly")) 379s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine, 379s + contrasts=list(temp="contr.sum")) 379s > coef(summary(wine1.clm)) 379s Estimate Std. Error z value Pr(>|z|) 379s 1|2 -2.54174387 0.5792622 -4.38789851 1.144512e-05 379s 2|3 -0.00970353 0.3737929 -0.02595964 9.792895e-01 379s 3|4 2.19047975 0.4965589 4.41131906 1.027428e-05 379s 4|5 3.64781729 0.6257007 5.82997171 5.543677e-09 379s temp1 -1.14461036 0.3595853 -3.18314035 1.456870e-03 379s contactyes 1.65053789 0.6698484 2.46404685 1.373782e-02 379s temp1:contactyes NA NA NA NA 379s > head(model.matrix(wine1.clm)$X) 379s (Intercept) temp1 contactyes temp1:contactyes 379s 1 1 1 0 0 379s 2 1 1 0 0 379s 5 1 -1 0 0 379s 6 1 -1 0 0 379s 7 1 -1 1 -1 379s 8 1 -1 1 -1 379s > attributes(model.matrix(wine1.clm)$X)$contrasts 379s $temp 379s [1] "contr.sum" 379s 379s $contact 379s [1] "contr.treatment" 379s 379s > wine1.clm$contrasts 379s $temp 379s [1] "contr.sum" 379s 379s $contact 379s [1] "contr.treatment" 379s 379s > head(pred6 <- predict(wine1.clm)$fit) 379s [1] 0.5584719 0.2088699 0.1843854 0.1843854 0.2988733 0.2988733 379s > 379s > head(cbind(pred4, pred5, pred6)) 379s pred4 pred5 pred6 379s [1,] 0.5584719 0.5584719 0.5584719 379s [2,] 0.2088699 0.2088699 0.2088699 379s [3,] 0.1843854 0.1843854 0.1843854 379s [4,] 0.1843854 0.1843854 0.1843854 379s [5,] 0.2988733 0.2988733 0.2988733 379s [6,] 0.2988733 0.2988733 0.2988733 379s > stopifnot(isTRUE(all.equal(pred4, pred6))) 379s > ################################################################## 379s > 379s > ## Compare equality of fitted values for models with different contrasts: 379s > options("contrasts" = c("contr.treatment", "contr.poly")) 379s > fm1 <- clm(rating ~ temp + contact, data=wine) 379s > fitted(fm1) 379s [1] 0.57064970 0.19229094 0.44305990 0.09582084 0.20049402 0.20049402 379s [7] 0.27378469 0.27378469 0.20679013 0.57064970 0.05354601 0.44305990 379s [13] 0.20141572 0.50157554 0.27378469 0.36359581 0.57064970 0.19229094 379s [19] 0.44305990 0.37764614 0.07562701 0.07562701 0.36359581 0.36359581 379s [25] 0.19229094 0.57064970 0.44305990 0.37764614 0.50157554 0.20141572 379s [31] 0.27378469 0.30420994 0.57064970 0.19229094 0.09582084 0.44305990 379s [37] 0.50157554 0.50157554 0.30420994 0.30420994 0.19229094 0.57064970 379s [43] 0.44305990 0.37764614 0.20141572 0.20049402 0.27378469 0.36359581 379s [49] 0.20679013 0.20679013 0.37764614 0.37764614 0.20141572 0.50157554 379s [55] 0.05380128 0.30420994 0.57064970 0.57064970 0.37764614 0.44305990 379s [61] 0.50157554 0.50157554 0.30420994 0.36359581 0.20679013 0.57064970 379s [67] 0.44305990 0.37764614 0.50157554 0.20141572 0.36359581 0.36359581 379s > options("contrasts" = c("contr.sum", "contr.poly")) 379s > fm2 <- clm(rating ~ temp + contact, data=wine) 379s > fitted(fm2) 379s [1] 0.57064970 0.19229094 0.44305990 0.09582084 0.20049402 0.20049402 379s [7] 0.27378469 0.27378469 0.20679013 0.57064970 0.05354601 0.44305990 379s [13] 0.20141572 0.50157554 0.27378469 0.36359581 0.57064970 0.19229094 379s [19] 0.44305990 0.37764614 0.07562701 0.07562701 0.36359581 0.36359581 379s [25] 0.19229094 0.57064970 0.44305990 0.37764614 0.50157554 0.20141572 379s [31] 0.27378469 0.30420994 0.57064970 0.19229094 0.09582084 0.44305990 379s [37] 0.50157554 0.50157554 0.30420994 0.30420994 0.19229094 0.57064970 379s [43] 0.44305990 0.37764614 0.20141572 0.20049402 0.27378469 0.36359581 379s [49] 0.20679013 0.20679013 0.37764614 0.37764614 0.20141572 0.50157554 379s [55] 0.05380128 0.30420994 0.57064970 0.57064970 0.37764614 0.44305990 379s [61] 0.50157554 0.50157554 0.30420994 0.36359581 0.20679013 0.57064970 379s [67] 0.44305990 0.37764614 0.50157554 0.20141572 0.36359581 0.36359581 379s > options("contrasts" = c("contr.treatment", "contr.poly")) 379s > fm3 <- clm(rating ~ temp + contact, data=wine, 379s + contrasts=list(contact="contr.sum")) 379s > fitted(fm3) 379s [1] 0.57064970 0.19229094 0.44305990 0.09582084 0.20049402 0.20049402 379s [7] 0.27378469 0.27378469 0.20679013 0.57064970 0.05354601 0.44305990 379s [13] 0.20141572 0.50157554 0.27378469 0.36359581 0.57064970 0.19229094 379s [19] 0.44305990 0.37764614 0.07562701 0.07562701 0.36359581 0.36359581 379s [25] 0.19229094 0.57064970 0.44305990 0.37764614 0.50157554 0.20141572 379s [31] 0.27378469 0.30420994 0.57064970 0.19229094 0.09582084 0.44305990 379s [37] 0.50157554 0.50157554 0.30420994 0.30420994 0.19229094 0.57064970 379s [43] 0.44305990 0.37764614 0.20141572 0.20049402 0.27378469 0.36359581 379s [49] 0.20679013 0.20679013 0.37764614 0.37764614 0.20141572 0.50157554 379s [55] 0.05380128 0.30420994 0.57064970 0.57064970 0.37764614 0.44305990 379s [61] 0.50157554 0.50157554 0.30420994 0.36359581 0.20679013 0.57064970 379s [67] 0.44305990 0.37764614 0.50157554 0.20141572 0.36359581 0.36359581 379s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm2)))) 379s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm3)))) 379s > 379s > ################################################################## 379s > ## Compare equality of fitted values for models with different 379s > ## contrasts in face of aliased coefficients: 379s > options("contrasts" = c("contr.treatment", "contr.poly")) 379s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 379s > Wine <- subset(wine, subset=!(temp == "cold" & contact == "yes")) 379s > fm1 <- clm(rating ~ temp + contact, data=Wine) 379s > options("contrasts" = c("contr.sum", "contr.poly")) 379s > fm2 <- clm(rating ~ temp + contact, data=Wine) 379s > options("contrasts" = c("contr.treatment", "contr.poly")) 379s > fm3 <- clm(rating ~ temp + contact, data=Wine, 379s + contrasts=list(contact="contr.sum")) 379s > 379s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm2)))) 379s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm3)))) 379s > stopifnot(isTRUE(all.equal(predict(fm1)$fit, predict(fm2)$fit))) 379s > stopifnot(isTRUE(all.equal(predict(fm1)$fit, predict(fm3)$fit))) 379s > 379s > ################################# 379s > ## Does this also happen if the wine data has changed? 379s > options("contrasts" = c("contr.treatment", "contr.poly")) 379s > Wine <- subset(wine, subset=!(temp == "cold" & contact == "yes")) 379s > fm1 <- clm(rating ~ temp + contact, data=Wine) 379s > fit1 <- fitted(fm1) 379s > pred1 <- predict(fm1)$fit 379s > Wine <- wine 379s > pred2 <- predict(fm1)$fit 379s > stopifnot(isTRUE(all.equal(fit1, pred1))) 379s > stopifnot(isTRUE(all.equal(fit1, pred2))) 379s > 379s > ## What if weights, say, is an expression? 379s > ## Notice that updating the model object changes it: 379s > set.seed(123) 379s > fm1 <- clm(rating ~ temp + contact, data=wine, 379s + weights=runif(nrow(wine), .5, 1.5)) 379s > fm2 <- update(fm1) 379s > stopifnot(isTRUE(all.equal(fitted(fm1), predict(fm1)$fit))) 379s > stopifnot(!isTRUE(all.equal(fitted(fm1), fitted(fm2)))) 379s > 379s > ################################# 379s > ## Test equality of fits and predictions of models with: 379s > ## 'x + I(x^2)' and 'poly(x, 2)': 379s > ## December 25th 2014, RHBC. 379s > data(wine) 379s > set.seed(1) 379s > x <- rnorm(nrow(wine), sd=2) + as.numeric(wine$rating) 379s > range(x) 379s [1] -1.429400 7.803236 379s > 379s > ## Comparison of 'x + I(x^2)' and 'poly(x, 2)': 379s > fm3 <- clm(rating ~ temp + x + I(x^2), data=wine) 379s > fm4 <- clm(rating ~ temp + poly(x, 2), data=wine) 379s > ## Same model fits, but different parameterizations: 379s > stopifnot( 379s + !isTRUE(all.equal(coef(fm3), coef(fm4), check.names=FALSE)) 379s + ) 379s > stopifnot(isTRUE(all.equal(logLik(fm3), logLik(fm4)))) 379s > newData <- expand.grid(temp = levels(wine$temp), 379s + x=seq(-1, 7, 3)) 379s > predict(fm3, newdata=newData)$fit 379s 1 2 3 4 5 379s 1 0.206057293 0.56152859 0.2029812 0.0245885 0.004844463 379s 2 0.036289668 0.28766182 0.5031703 0.1404155 0.032462707 379s 3 0.147105364 0.53988789 0.2693657 0.0363691 0.007271946 379s 4 0.024413857 0.21711772 0.5192073 0.1912002 0.048060899 379s 5 0.035397238 0.28292433 0.5050762 0.1433185 0.033283705 379s 6 0.005296054 0.05815716 0.3400568 0.4047024 0.191787585 379s > predict(fm4, newdata=newData)$fit 379s 1 2 3 4 5 379s 1 0.206057293 0.56152859 0.2029812 0.0245885 0.004844463 379s 2 0.036289668 0.28766182 0.5031703 0.1404155 0.032462707 379s 3 0.147105364 0.53988789 0.2693657 0.0363691 0.007271946 379s 4 0.024413857 0.21711772 0.5192073 0.1912002 0.048060899 379s 5 0.035397238 0.28292433 0.5050762 0.1433185 0.033283705 379s 6 0.005296054 0.05815716 0.3400568 0.4047024 0.191787585 379s > stopifnot(isTRUE(all.equal(fitted(fm3), fitted(fm4)))) 379s > stopifnot(isTRUE( 379s + all.equal(predict(fm3, newdata=newData)$fit, 379s + predict(fm4, newdata=newData)$fit))) 379s > ################################# 379s > 379s BEGIN TEST test.clm.profile.R 379s 379s R version 4.4.3 (2025-02-28) -- "Trophy Case" 379s Copyright (C) 2025 The R Foundation for Statistical Computing 379s Platform: aarch64-unknown-linux-gnu 379s 379s R is free software and comes with ABSOLUTELY NO WARRANTY. 379s You are welcome to redistribute it under certain conditions. 379s Type 'license()' or 'licence()' for distribution details. 379s 379s R is a collaborative project with many contributors. 379s Type 'contributors()' for more information and 379s 'citation()' on how to cite R or R packages in publications. 379s 379s Type 'demo()' for some demos, 'help()' for on-line help, or 379s 'help.start()' for an HTML browser interface to help. 379s Type 'q()' to quit R. 379s 379s > library(ordinal) 380s > 380s > ## Testing that the profile remains the same - that the model object 380s > ## is not 'distorted' by update(object/fitted, doFit=FALSE) 380s > set.seed(1234) 380s > wts <- runif(nrow(wine), 0, 2) 380s > fm3 <- clm(rating ~ temp + contact, data=wine, 380s + weights=wts) 380s > pr <- profile(fm3) 380s > 380s > set.seed(1234) 380s > fm3 <- clm(rating ~ temp + contact, data=wine, 380s + weights=runif(nrow(wine), 0, 2)) 380s > pr3 <- profile(fm3) 380s > ## > set.seed(1234) 380s > ## > fm3 <- clm(rating ~ temp + contact, data=wine, 380s > ## + weights=runif(nrow(wine), 0, 2)) 380s > ## > pr3 <- profile(fm3) 380s > ## Warning messages: 380s > ## 1: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 380s > ## profile may be unreliable for tempwarm because only 1 380s > ## steps were taken down 380s > ## 2: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 380s > ## profile may be unreliable for tempwarm because only 1 380s > ## steps were taken up 380s > ## 3: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 380s > ## profile may be unreliable for contactyes because only 1 380s > ## steps were taken down 380s > ## 4: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 380s > ## profile may be unreliable for contactyes because only 1 380s > ## steps were taken up 380s > ## 380s > stopifnot(isTRUE(all.equal(pr, pr3, check.attributes=FALSE))) 380s > stopifnot( 380s + isTRUE(all.equal(pr$tempwarm[, "lroot"], pr3$tempwarm[, "lroot"])), 380s + isTRUE(all.equal(pr$contactyes[, "lroot"], pr3$contactyes[, "lroot"]))) 380s > 380s BEGIN TEST test.clm.single.anova.R 380s 380s R version 4.4.3 (2025-02-28) -- "Trophy Case" 380s Copyright (C) 2025 The R Foundation for Statistical Computing 380s Platform: aarch64-unknown-linux-gnu 380s 380s R is free software and comes with ABSOLUTELY NO WARRANTY. 380s You are welcome to redistribute it under certain conditions. 380s Type 'license()' or 'licence()' for distribution details. 380s 380s R is a collaborative project with many contributors. 380s Type 'contributors()' for more information and 380s 'citation()' on how to cite R or R packages in publications. 380s 380s Type 'demo()' for some demos, 'help()' for on-line help, or 380s 'help.start()' for an HTML browser interface to help. 380s Type 'q()' to quit R. 380s 380s > # test.clm.single.anova.R 380s > 380s > library(ordinal) 381s > 381s > # WRE says "using if(requireNamespace("pkgname")) is preferred, if possible." 381s > # even in tests: 381s > assertError <- function(expr, ...) 381s + if(requireNamespace("tools")) tools::assertError(expr, ...) else invisible() 381s > assertWarning <- function(expr, ...) 381s + if(requireNamespace("tools")) tools::assertWarning(expr, ...) else invisible() 381s > 381s > fm <- clm(rating ~ temp * contact, scale=~contact, data=wine) 381s > 381s > anova(fm, type="I") 381s Type I Analysis of Deviance Table with Wald chi-square tests 381s 381s Df Chisq Pr(>Chisq) 381s temp 1 17.1046 3.538e-05 *** 381s contact 1 9.1574 0.002477 ** 381s temp:contact 1 0.1097 0.740512 381s --- 381s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 381s > anova(fm, type="II") 381s Type II Analysis of Deviance Table with Wald chi-square tests 381s 381s Df Chisq Pr(>Chisq) 381s temp 1 17.1046 3.538e-05 *** 381s contact 1 9.1574 0.002477 ** 381s temp:contact 1 0.1097 0.740512 381s --- 381s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 381s > anova(fm, type="III") 381s Type III Analysis of Deviance Table with Wald chi-square tests 381s 381s Df Chisq Pr(>Chisq) 381s temp 1 9.5681 0.00198 ** 381s contact 1 4.1830 0.04083 * 381s temp:contact 1 0.1097 0.74051 381s --- 381s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 381s > anova(fm, type=1) 381s Type I Analysis of Deviance Table with Wald chi-square tests 381s 381s Df Chisq Pr(>Chisq) 381s temp 1 17.1046 3.538e-05 *** 381s contact 1 9.1574 0.002477 ** 381s temp:contact 1 0.1097 0.740512 381s --- 381s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 381s > anova(fm, type=2) 381s Type II Analysis of Deviance Table with Wald chi-square tests 381s 381s Df Chisq Pr(>Chisq) 381s temp 1 17.1046 3.538e-05 *** 381s contact 1 9.1574 0.002477 ** 381s temp:contact 1 0.1097 0.740512 381s --- 381s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 381s > anova(fm, type=3) 381s Type III Analysis of Deviance Table with Wald chi-square tests 381s 381s Df Chisq Pr(>Chisq) 381s temp 1 9.5681 0.00198 ** 381s contact 1 4.1830 0.04083 * 381s temp:contact 1 0.1097 0.74051 381s --- 381s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 381s > anova(fm, type="1") 381s Type I Analysis of Deviance Table with Wald chi-square tests 381s 381s Df Chisq Pr(>Chisq) 381s temp 1 17.1046 3.538e-05 *** 381s contact 1 9.1574 0.002477 ** 381s temp:contact 1 0.1097 0.740512 381s --- 381s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 381s > anova(fm, type="2") 381s Type II Analysis of Deviance Table with Wald chi-square tests 381s 381s Df Chisq Pr(>Chisq) 381s temp 1 17.1046 3.538e-05 *** 381s contact 1 9.1574 0.002477 ** 381s temp:contact 1 0.1097 0.740512 381s --- 381s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 381s > anova(fm, type="3") 381s Type III Analysis of Deviance Table with Wald chi-square tests 381s 381s Df Chisq Pr(>Chisq) 381s temp 1 9.5681 0.00198 ** 381s contact 1 4.1830 0.04083 * 381s temp:contact 1 0.1097 0.74051 381s --- 381s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 381s > anova(fm, type="marginal") 381s Marginal Analysis of Deviance Table with Wald chi-square tests 381s 381s Df Chisq Pr(>Chisq) 381s temp 1 9.5681 0.00198 ** 381s contact 1 4.1830 0.04083 * 381s temp:contact 1 0.1097 0.74051 381s --- 381s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 381s > 381s > # Nominal effects: 381s > fm <- clm(rating ~ temp, nominal=~contact, data=wine) 381s > anova(fm) 381s Type I Analysis of Deviance Table with Wald chi-square tests 381s 381s Df Chisq Pr(>Chisq) 381s temp 1 22.166 2.501e-06 *** 381s --- 381s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 381s > 381s > # Flexible links: 381s > fm1 <- clm(rating ~ temp + contact, link="log-gamma", data=wine) 381s Changing to 'nlminb' optimizer for flexible link function 381s > anova(fm1, type=1) 381s Warning message: 381s (-1) Model failed to converge with max|grad| = 9.92664e-05 (tol = 1e-06) 381s Type I Analysis of Deviance Table with Wald chi-square tests 381s 381s Df Chisq Pr(>Chisq) 381s temp 1 26.150 3.16e-07 *** 381s contact 1 10.369 0.001282 ** 381s --- 381s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 381s > anova(fm1, type=2) 381s Type II Analysis of Deviance Table with Wald chi-square tests 381s 381s Df Chisq Pr(>Chisq) 381s temp 1 26.150 3.16e-07 *** 381s contact 1 10.369 0.001282 ** 381s --- 381s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 381s > anova(fm1, type=3) 381s Type III Analysis of Deviance Table with Wald chi-square tests 381s 381s Df Chisq Pr(>Chisq) 381s temp 1 26.150 3.16e-07 *** 381s contact 1 10.369 0.001282 ** 381s --- 381s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 381s > 381s > # Equivalence of tests irrespective of contrasts: 381s > fm1 <- clm(SURENESS ~ PRODID * SOUPFREQ, data=soup) 381s > # summary(fm1) 381s > (an1 <- anova(fm1, type=3)) 381s Type III Analysis of Deviance Table with Wald chi-square tests 381s 381s Df Chisq Pr(>Chisq) 381s PRODID 5 72.5901 2.959e-14 *** 381s SOUPFREQ 2 1.8132 0.4039 381s PRODID:SOUPFREQ 10 8.5837 0.5720 381s --- 381s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 381s > fm2 <- clm(SURENESS ~ PRODID * SOUPFREQ, data=soup, 381s + contrasts = list(SOUPFREQ = "contr.sum", PRODID = "contr.SAS")) 381s > # summary(fm2) 381s > anova(fm1, fm2) 381s Likelihood ratio tests of cumulative link models: 381s 382s formula: link: threshold: 382s fm1 SURENESS ~ PRODID * SOUPFREQ logit flexible 382s fm2 SURENESS ~ PRODID * SOUPFREQ logit flexible 382s 382s no.par AIC logLik LR.stat df Pr(>Chisq) 382s fm1 22 5388 -2672 382s fm2 22 5388 -2672 0 0 382s > (an2 <- anova(fm2, type=3)) 382s Type III Analysis of Deviance Table with Wald chi-square tests 382s 382s Df Chisq Pr(>Chisq) 382s PRODID 5 72.5901 2.959e-14 *** 382s SOUPFREQ 2 1.8132 0.4039 382s PRODID:SOUPFREQ 10 8.5837 0.5720 382s --- 382s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 382s > stopifnot( 382s + isTRUE(all.equal(an1, an2, check.attributes=FALSE)) 382s + ) 382s > 382s > 382s > # Aliased coefficients: 382s > fm1 <- clm(SURENESS ~ PRODID * DAY, data=soup) 382s > anova(fm1, type=1) 382s Type I Analysis of Deviance Table with Wald chi-square tests 382s 382s Df Chisq Pr(>Chisq) 382s PRODID 5 185.2017 < 2e-16 *** 382s DAY 1 4.1131 0.04255 * 382s PRODID:DAY 4 5.1186 0.27534 382s --- 382s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 382s > anova(fm1, type=2) 382s Type II Analysis of Deviance Table with Wald chi-square tests 382s 382s Df Chisq Pr(>Chisq) 382s PRODID 5 181.5967 < 2e-16 *** 382s DAY 1 4.1131 0.04255 * 382s PRODID:DAY 4 5.1186 0.27534 382s --- 382s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 382s > anova(fm1, type=3) 382s Type III Analysis of Deviance Table with Wald chi-square tests 382s 382s Df Chisq Pr(>Chisq) 382s PRODID 5 76.3722 4.81e-15 *** 382s DAY 1 10.1485 0.001444 ** 382s PRODID:DAY 4 5.1186 0.275344 382s --- 382s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 382s > 382s > # Aliased term (due to nominal effects): 382s > fm <- clm(rating ~ temp * contact, nominal=~contact, data=wine) 382s Missing cells for: PRODID3:DAY2. 382s Interpret type III hypotheses with care. 382s > anova(fm, type=1) 382s Type I Analysis of Deviance Table with Wald chi-square tests 382s 382s Df Chisq Pr(>Chisq) 382s temp 1 22.066 2.634e-06 *** 382s contact 382s temp:contact 1 0.250 0.6171 382s --- 382s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 382s > anova(fm, type=2) 382s Type II Analysis of Deviance Table with Wald chi-square tests 382s 382s Df Chisq Pr(>Chisq) 382s temp 1 22.066 2.634e-06 *** 382s contact 382s temp:contact 1 0.250 0.6171 382s --- 382s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 382s > anova(fm, type=3) 382s Type III Analysis of Deviance Table with Wald chi-square tests 382s 382s Df Chisq Pr(>Chisq) 382s temp 1 9.6335 0.001911 ** 382s contact 382s temp:contact 1 0.2500 0.617071 382s --- 382s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 382s > 382s > # model with all NA in vcov(object): 382s > fm <- clm(rating ~ temp * contact, nominal=~contact, scale=~contact, data=wine) 382s > assertError(anova(fm, type=1)) # error 382s Warning message: 382s (1) Hessian is numerically singular: parameters are not uniquely determined 382s In addition: Absolute and relative convergence criteria were met 382s Loading required namespace: tools 382s > assertError(anova(fm, type=2)) # error 382s > assertError(anova(fm, type=3)) # error 382s > all(is.na(vcov(fm))) 382s [1] TRUE 382s > 382s BEGIN TEST test.general.R 382s 382s R version 4.4.3 (2025-02-28) -- "Trophy Case" 382s Copyright (C) 2025 The R Foundation for Statistical Computing 382s Platform: aarch64-unknown-linux-gnu 382s 382s R is free software and comes with ABSOLUTELY NO WARRANTY. 382s You are welcome to redistribute it under certain conditions. 382s Type 'license()' or 'licence()' for distribution details. 382s 382s R is a collaborative project with many contributors. 382s Type 'contributors()' for more information and 382s 'citation()' on how to cite R or R packages in publications. 382s 382s Type 'demo()' for some demos, 'help()' for on-line help, or 382s 'help.start()' for an HTML browser interface to help. 382s Type 'q()' to quit R. 382s 382s > 382s > txt <- citation("ordinal") 382s > stopifnot(as.logical(grep("year", txt))) 382s > 382s BEGIN TEST test.makeThresholds.R 382s 382s R version 4.4.3 (2025-02-28) -- "Trophy Case" 382s Copyright (C) 2025 The R Foundation for Statistical Computing 382s Platform: aarch64-unknown-linux-gnu 382s 382s R is free software and comes with ABSOLUTELY NO WARRANTY. 382s You are welcome to redistribute it under certain conditions. 382s Type 'license()' or 'licence()' for distribution details. 382s 382s R is a collaborative project with many contributors. 382s Type 'contributors()' for more information and 382s 'citation()' on how to cite R or R packages in publications. 382s 382s Type 'demo()' for some demos, 'help()' for on-line help, or 382s 'help.start()' for an HTML browser interface to help. 382s Type 'q()' to quit R. 382s 382s > # test.makeThresholds.R 382s > 382s > library(ordinal) 383s > 383s > # Prvious bug which is now fixed: 383s > res <- ordinal:::makeThresholds(letters[1:3], "symmetric") 383s > stopifnot(length(res$alpha.names) == res$nalpha) 383s > # length(res$alpha.names) used to be 4 383s > 383s > # Real data example: 383s > wine <- within(wine, { 383s + rating_comb3b <- rating 383s + levels(rating_comb3b) <- c("1-2", "1-2", "3", "4-5", "4-5") 383s + }) 383s > wine$rating_comb3b[1] <- "4-5" # Need to remove the zero here to avoid inf MLE 383s > ftable(rating_comb3b ~ temp + contact, data=wine) 383s rating_comb3b 1-2 3 4-5 383s temp contact 383s cold no 12 5 1 383s yes 8 8 2 383s warm no 5 8 5 383s yes 1 5 12 383s > 383s > fm.comb3_c <- clm(rating_comb3b ~ contact, #scale=~contact, 383s + threshold = "symmetric", data=wine) # no error 383s > 383s BEGIN TEST test.sign.R 383s 383s R version 4.4.3 (2025-02-28) -- "Trophy Case" 383s Copyright (C) 2025 The R Foundation for Statistical Computing 383s Platform: aarch64-unknown-linux-gnu 383s 383s R is free software and comes with ABSOLUTELY NO WARRANTY. 383s You are welcome to redistribute it under certain conditions. 383s Type 'license()' or 'licence()' for distribution details. 383s 383s R is a collaborative project with many contributors. 383s Type 'contributors()' for more information and 383s 'citation()' on how to cite R or R packages in publications. 383s 383s Type 'demo()' for some demos, 'help()' for on-line help, or 383s 'help.start()' for an HTML browser interface to help. 383s Type 'q()' to quit R. 383s 383s > # test.sign.R 383s > 383s > # Test the use of sign.location and sign.nominal in clm.control(): 383s > 383s > library(ordinal) 384s > 384s > fm1 <- clm(rating ~ temp + contact, data=wine) 384s > fm2 <- clm(rating ~ temp + contact, data=wine, 384s + sign.location="positive") 384s > # dput(names(fm1)) 384s > keep <- c("aliased", "alpha", "cond.H", 384s + "contrasts", "convergence", "df.residual", "edf", 384s + "fitted.values", "formula", "formulas", "gradient", 384s + "info", "link", "logLik", "maxGradient", "message", "model", 384s + "n", "niter", "nobs", "start", "terms", "Theta", "threshold", 384s + "tJac", "xlevels", "y", "y.levels") 384s > check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1[keep], fm2[keep]) 384s > stopifnot(all(check)) 384s > stopifnot(isTRUE(all.equal( 384s + fm1$beta, - fm2$beta 384s + ))) 384s > 384s > fm1 <- clm(rating ~ temp, nominal=~ contact, data=wine) 384s > fm2 <- clm(rating ~ temp, nominal=~ contact, data=wine, 384s + sign.nominal="negative") 384s > keep <- c("aliased", "beta", "cond.H", 384s + "contrasts", "convergence", "df.residual", "edf", 384s + "fitted.values", "formula", "formulas", "gradient", 384s + "info", "link", "logLik", "maxGradient", "message", "model", 384s + "n", "niter", "nobs", "start", "terms", "Theta", "threshold", 384s + "tJac", "xlevels", "y", "y.levels") 384s > # check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1, fm2) 384s > check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1[keep], fm2[keep]) 384s > stopifnot(all(check)) 384s > stopifnot(isTRUE(all.equal( 384s + fm1$alpha[5:8], -fm2$alpha[5:8] 384s + ))) 384s > 384s > 384s > fm1 <- clm(rating ~ temp, nominal=~ contact, data=wine) 384s > fm2 <- clm(rating ~ temp, nominal=~ contact, data=wine, 384s + sign.nominal="negative", sign.location="positive") 384s > keep <- c("aliased", "cond.H", 384s + "contrasts", "convergence", "df.residual", "edf", 384s + "fitted.values", "formula", "formulas", "gradient", 384s + "info", "link", "logLik", "maxGradient", "message", "model", 384s + "n", "niter", "nobs", "start", "terms", "Theta", "threshold", 384s + "tJac", "xlevels", "y", "y.levels") 384s > # check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1, fm2) 384s > check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1[keep], fm2[keep]) 384s > stopifnot(all(check)) 384s > stopifnot( 384s + isTRUE(all.equal(fm1$alpha[5:8], -fm2$alpha[5:8])), 384s + isTRUE(all.equal(fm1$beta, -fm2$beta)) 384s + ) 384s > 384s > # Check predict method: 384s > newData <- with(wine, expand.grid(temp=levels(temp), contact=levels(contact))) 384s > (p1 <- predict(fm1, newdata=newData)) 384s $fit 384s 1 2 3 4 5 384s 1 0.210312404 0.56637121 0.1953950 0.0185460 0.009375394 384s 2 0.020998377 0.19781391 0.5182972 0.1577343 0.105156202 384s 3 0.050301839 0.38380275 0.4329644 0.1065821 0.026348960 384s 4 0.004247588 0.05393811 0.2862121 0.4040930 0.251509196 384s 384s > (p2 <- predict(fm2, newdata=newData)) 384s $fit 384s 1 2 3 4 5 384s 1 0.210312404 0.56637121 0.1953950 0.0185460 0.009375394 384s 2 0.020998377 0.19781391 0.5182972 0.1577343 0.105156202 384s 3 0.050301839 0.38380275 0.4329644 0.1065821 0.026348960 384s 4 0.004247588 0.05393811 0.2862121 0.4040930 0.251509196 384s 384s > stopifnot(isTRUE(all.equal(p1, p2))) 384s > 384s > stopifnot(isTRUE( 384s + all.equal(predict(fm1, newdata=wine, se=TRUE, interval=TRUE), 384s + predict(fm2, newdata=wine, se=TRUE, interval=TRUE)) 384s + )) 384s > 384s > # Check profile and confint methods: 384s > confint.default(fm1) 384s 2.5 % 97.5 % 384s 1|2.(Intercept) -2.4250844 -0.2210024 384s 2|3.(Intercept) 0.3158056 2.1770814 384s 3|4.(Intercept) 2.2642614 4.8358258 384s 4|5.(Intercept) 2.9738888 6.3466053 384s 1|2.contactyes -3.8921464 0.6620280 384s 2|3.contactyes -2.6692032 -0.3539315 384s 3|4.contactyes -2.9464535 -0.4030579 384s 4|5.contactyes -2.8077520 0.7065061 384s tempwarm 1.4703720 3.5677176 384s > confint.default(fm2) 384s 2.5 % 97.5 % 384s 1|2.(Intercept) -2.4250844 -0.2210024 384s 2|3.(Intercept) 0.3158056 2.1770814 384s 3|4.(Intercept) 2.2642614 4.8358258 384s 4|5.(Intercept) 2.9738888 6.3466053 384s 1|2.contactyes -0.6620280 3.8921464 384s 2|3.contactyes 0.3539315 2.6692032 384s 3|4.contactyes 0.4030579 2.9464535 384s 4|5.contactyes -0.7065061 2.8077520 384s tempwarm -3.5677176 -1.4703720 384s > 384s > stopifnot( 384s + isTRUE(all.equal(confint(fm1), -confint(fm2)[, 2:1, drop=FALSE], 384s + check.attributes=FALSE)) 384s + ) 384s > 384s > fm1 <- clm(rating ~ temp + contact, data=wine) 384s > fm2 <- clm(rating ~ temp + contact, data=wine, 384s + sign.location="positive") 384s > pr1 <- profile(fm1) 384s > pr2 <- profile(fm2) 384s > stopifnot( 384s + isTRUE(all.equal(confint(fm1), - confint(fm2)[, 2:1], check.attributes=FALSE)) 384s + ) 384s > 384s > 384s BEGIN TEST test0weights.R 384s 384s R version 4.4.3 (2025-02-28) -- "Trophy Case" 384s Copyright (C) 2025 The R Foundation for Statistical Computing 384s Platform: aarch64-unknown-linux-gnu 384s 384s R is free software and comes with ABSOLUTELY NO WARRANTY. 384s You are welcome to redistribute it under certain conditions. 384s Type 'license()' or 'licence()' for distribution details. 384s 384s R is a collaborative project with many contributors. 384s Type 'contributors()' for more information and 384s 'citation()' on how to cite R or R packages in publications. 384s 384s Type 'demo()' for some demos, 'help()' for on-line help, or 384s 'help.start()' for an HTML browser interface to help. 384s Type 'q()' to quit R. 384s 384s > library(ordinal) 385s > options(contrasts = c("contr.treatment", "contr.poly")) 385s > ## library(devtools) 385s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 385s > ## clean_dll(pkg = r2path) 385s > ## load_all(r2path) 385s > 385s > ## one zero weight: 385s > data(wine, package="ordinal") 385s > wts <- rep(1, nrow(wine)) 385s > wine$rating 385s [1] 2 3 3 4 4 4 5 5 1 2 1 3 2 3 5 4 2 3 3 2 5 5 4 4 3 2 3 2 3 2 5 3 2 3 4 3 3 3 385s [39] 3 3 3 2 3 2 2 4 5 4 1 1 2 2 2 3 2 3 2 2 2 3 3 3 3 4 1 2 3 2 3 2 4 4 385s Levels: 1 < 2 < 3 < 4 < 5 385s > wts[1] <- 0 385s > fm1 <- clm(rating ~ contact + temp, data=wine, weights=wts) 385s > fm1 385s formula: rating ~ contact + temp 385s data: wine 385s 385s link threshold nobs logLik AIC niter max.grad cond.H 385s logit flexible 71 -85.92 183.84 6(0) 3.44e-12 2.7e+01 385s 385s Coefficients: 385s contactyes tempwarm 385s 1.511 2.482 385s 385s Threshold coefficients: 385s 1|2 2|3 3|4 4|5 385s -1.295 1.220 3.437 4.975 385s > fm1$n ## 72 385s [1] 72 385s > fm1$nobs ## 71 385s [1] 71 385s > confint(fm1) 385s 2.5 % 97.5 % 385s contactyes 0.5951066 2.478924 385s tempwarm 1.4856829 3.577621 385s > plot(profile(fm1)) 386s > plot(slice(fm1), 5) 386s > convergence(fm1) 386s nobs logLik niter max.grad cond.H logLik.Error 386s 71 -85.92 6(0) 3.44e-12 2.7e+01 <1e-10 386s 386s Estimate Std.Err Gradient Error Cor.Dec Sig.Dig 386s 1|2 -1.295 0.5220 7.57e-13 7.84e-14 12 13 386s 2|3 1.220 0.4436 2.65e-12 -1.27e-13 12 13 386s 3|4 3.437 0.6014 -3.44e-12 -7.18e-13 11 12 386s 4|5 4.975 0.7341 -5.44e-14 -7.00e-13 11 12 386s contactyes 1.511 0.4785 1.54e-13 -1.96e-13 12 13 386s tempwarm 2.482 0.5303 -4.01e-13 -4.94e-13 12 13 386s 386s Eigen values of Hessian: 386s 21.7419 18.5476 10.4115 5.2426 4.0755 0.8013 386s 386s Convergence message from clm: 386s (0) successful convergence 386s In addition: Absolute and relative convergence criteria were met 386s 386s > drop1(fm1, test="Chi") 386s Single term deletions 386s 386s Model: 386s rating ~ contact + temp 386s Df AIC LRT Pr(>Chi) 386s 183.84 386s contact 1 192.54 10.698 0.001072 ** 386s temp 1 208.07 26.234 3.024e-07 *** 386s --- 386s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 386s > add1(fm1, scope=~.^2, test="Chi") 386s Single term additions 386s 386s Model: 386s rating ~ contact + temp 386s Df AIC LRT Pr(>Chi) 386s 183.84 386s contact:temp 1 185.66 0.18256 0.6692 386s > ## clm_anova(fm1) 386s > pred <- predict(fm1, newdata=wine) ## OK 386s > step.fm1 <- step(fm1, trace=0) 386s > fitted(fm1) 386s [1] 0.19683278 0.44514183 0.09677403 0.20147980 0.20147980 0.27261558 386s [7] 0.27261558 0.21497073 0.55705124 0.05699435 0.44514183 0.19814731 386s [13] 0.50160837 0.27261558 0.36288756 0.55705124 0.19683278 0.44514183 386s [19] 0.37073110 0.07640020 0.07640020 0.36288756 0.36288756 0.19683278 386s [25] 0.55705124 0.44514183 0.37073110 0.50160837 0.19814731 0.27261558 386s [31] 0.30572865 0.55705124 0.19683278 0.09677403 0.44514183 0.50160837 386s [37] 0.50160837 0.30572865 0.30572865 0.19683278 0.55705124 0.44514183 386s [43] 0.37073110 0.19814731 0.20147980 0.27261558 0.36288756 0.21497073 386s [49] 0.21497073 0.37073110 0.37073110 0.19814731 0.50160837 0.05374460 386s [55] 0.30572865 0.55705124 0.55705124 0.37073110 0.44514183 0.50160837 386s [61] 0.50160837 0.30572865 0.36288756 0.21497073 0.55705124 0.44514183 386s [67] 0.37073110 0.50160837 0.19814731 0.36288756 0.36288756 386s > dim(model.matrix(fm1)$X) 386s [1] 72 3 386s > dim(model.matrix(fm1, "B")$B1) 386s [1] 71 6 386s > mf <- update(fm1, method="model.frame") 386s > str(mf) 386s 'data.frame': 72 obs. of 4 variables: 386s $ rating : Ord.factor w/ 5 levels "1"<"2"<"3"<"4"<..: 2 3 3 4 4 4 5 5 1 2 ... 386s $ contact : Factor w/ 2 levels "no","yes": 1 1 2 2 1 1 2 2 1 1 ... 386s $ temp : Factor w/ 2 levels "cold","warm": 1 1 1 1 2 2 2 2 1 1 ... 386s $ (weights): num 0 1 1 1 1 1 1 1 1 1 ... 386s - attr(*, "terms")=Classes 'terms', 'formula' language rating ~ contact + temp 386s .. ..- attr(*, "variables")= language list(rating, contact, temp) 386s .. ..- attr(*, "factors")= int [1:3, 1:2] 0 1 0 0 0 1 386s .. .. ..- attr(*, "dimnames")=List of 2 386s .. .. .. ..$ : chr [1:3] "rating" "contact" "temp" 386s .. .. .. ..$ : chr [1:2] "contact" "temp" 386s .. ..- attr(*, "term.labels")= chr [1:2] "contact" "temp" 386s .. ..- attr(*, "order")= int [1:2] 1 1 386s .. ..- attr(*, "intercept")= int 1 386s .. ..- attr(*, "response")= int 1 386s .. ..- attr(*, ".Environment")= 386s .. ..- attr(*, "predvars")= language list(rating, contact, temp) 386s .. ..- attr(*, "dataClasses")= Named chr [1:4] "ordered" "factor" "factor" "numeric" 386s .. .. ..- attr(*, "names")= chr [1:4] "rating" "contact" "temp" "(weights)" 386s > wts <- mf$wts 386s > dim(model.matrix(fm1)$X[wts > 0, , drop=FALSE]) 386s [1] 0 3 386s > 386s > fm1b <- clm(rating ~ temp, scale=~contact, data=wine, weights=wts) 386s > summary(fm1b) 386s formula: rating ~ temp 386s scale: ~contact 386s data: wine 386s 386s link threshold nobs logLik AIC niter max.grad cond.H 386s logit flexible 72 -91.92 195.83 8(0) 1.57e-09 5.6e+01 386s 386s Coefficients: 386s Estimate Std. Error z value Pr(>|z|) 386s tempwarm 2.1690 0.5527 3.924 8.69e-05 *** 386s --- 386s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 386s 386s log-scale coefficients: 386s Estimate Std. Error z value Pr(>|z|) 386s contactyes -0.1222 0.2775 -0.44 0.66 386s 386s Threshold coefficients: 386s Estimate Std. Error z value 386s 1|2 -1.8957 0.4756 -3.986 386s 2|3 0.3668 0.3442 1.066 386s 3|4 2.2483 0.5932 3.790 386s 4|5 3.5393 0.8336 4.246 386s > pr <- profile(fm1b) 386s > confint(pr) 386s 2.5 % 97.5 % 386s tempwarm 1.2122036 3.4033767 386s sca.contactyes -0.6721766 0.4156449 386s > plot(pr, 1) 386s > fm1c <- clm(rating ~ temp, nominal=~contact, data=wine, weights=wts) 386s > summary(fm1c) 386s formula: rating ~ temp 386s nominal: ~contact 386s data: wine 386s 386s link threshold nobs logLik AIC niter max.grad cond.H 386s logit flexible 72 -86.21 190.42 6(0) 1.64e-10 4.8e+01 386s 386s Coefficients: 386s Estimate Std. Error z value Pr(>|z|) 386s tempwarm 2.519 0.535 4.708 2.5e-06 *** 386s --- 386s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 386s 386s Threshold coefficients: 386s Estimate Std. Error z value 386s 1|2.(Intercept) -1.3230 0.5623 -2.353 386s 2|3.(Intercept) 1.2464 0.4748 2.625 386s 3|4.(Intercept) 3.5500 0.6560 5.411 386s 4|5.(Intercept) 4.6602 0.8604 5.416 386s 1|2.contactyes -1.6151 1.1618 -1.390 386s 2|3.contactyes -1.5116 0.5906 -2.559 386s 3|4.contactyes -1.6748 0.6488 -2.581 386s 4|5.contactyes -1.0506 0.8965 -1.172 386s > pr <- profile(fm1c) 386s > confint(pr) 386s 2.5 % 97.5 % 386s tempwarm 1.516862 3.629098 386s > plot(pr, 1) 386s > 386s > ## nominal.test(fm1) 386s > ## scale.test(fm1) 386s > 386s > ## zero out an entire response category: 386s > wts2 <- 1 * with(wine, rating != "2") 386s > fm2 <- clm(rating ~ contact + temp, data=wine, weights=wts2) 386s > fm2 386s formula: rating ~ contact + temp 386s data: wine 386s 386s link threshold nobs logLik AIC niter max.grad cond.H 386s logit flexible 50 -46.76 103.52 7(0) 3.55e-13 4.2e+01 386s 386s Coefficients: 386s contactyes tempwarm 386s 1.593 3.062 386s 386s Threshold coefficients: 386s 1|3 3|4 4|5 386s -0.5173 3.6238 5.3657 386s > fm2$n ## 72 386s [1] 72 386s > fm2$nobs ## 50 386s [1] 50 386s > ## Dimension of X and B1, B2 differ: 386s > dim(model.matrix(fm2)$X) 386s [1] 72 3 386s > dim(model.matrix(fm2, "B")$B1) 386s [1] 50 5 386s > ## Cannot directly evaluate predictions on the original data: 386s > try(predict(fm2, newdata=wine), silent=TRUE)[1] 386s [1] "Error in predict.clm(fm2, newdata = wine) : \n response factor 'rating' has new levels\n" 386s > confint(fm2) 386s 2.5 % 97.5 % 386s contactyes 0.4216272 2.876550 386s tempwarm 1.5970977 5.026527 386s > profile(fm2) 386s $contactyes 386s lroot par.vals.1|3 par.vals.3|4 par.vals.4|5 par.vals.contactyes 386s 1 3.4747852 -1.448538968 2.255543944 3.804439509 -0.447374822 386s 2 3.0276372 -1.308493024 2.407453551 3.967827135 -0.192380808 386s 3 2.5822211 -1.174976592 2.565043880 4.140537415 0.062613207 386s 4 2.1395315 -1.048101582 2.728199207 4.322490592 0.317607222 386s 5 1.7005507 -0.927983229 2.896810974 4.513576014 0.572601236 386s 6 1.2662317 -0.814738724 3.070776301 4.713647671 0.827595251 386s 7 0.8374817 -0.708483160 3.249996208 4.922519451 1.082589265 386s 8 0.4151468 -0.609322477 3.434373593 5.139960291 1.337583280 386s 9 0.0000000 -0.517343412 3.623810880 5.365689290 1.592577294 386s 10 -0.4072702 -0.432600941 3.818207180 5.599370818 1.847571309 386s 11 -0.8060673 -0.355104205 4.017454848 5.840609731 2.102565323 386s 12 -1.1958918 -0.284802472 4.221435388 6.088946911 2.357559338 386s 13 -1.5763436 -0.221573075 4.430015019 6.343855637 2.612553352 386s 14 -1.9471215 -0.165213368 4.643040370 6.604739566 2.867547367 386s 15 -2.3080198 -0.115438462 4.860335061 6.870933284 3.122541381 386s 16 -2.6589228 -0.071885700 5.081697900 7.141706504 3.377535396 386s 17 -2.9997972 -0.034125762 5.306903276 7.416272839 3.632529410 386s 18 -3.3306833 -0.001679093 5.535703885 7.693803770 3.887523425 386s par.vals.tempwarm 386s 1 2.840981986 386s 2 2.848907417 386s 3 2.863086150 386s 4 2.883227511 386s 5 2.909025226 386s 6 2.940155181 386s 7 2.976272850 386s 8 3.017010511 386s 9 3.061974244 386s 10 3.110740675 386s 11 3.162853507 386s 12 3.217819929 386s 13 3.275107380 386s 14 3.334141312 386s 15 3.394304942 386s 16 3.454942107 386s 17 3.515364293 386s 18 3.574862708 386s 386s $tempwarm 386s lroot par.vals.1|3 par.vals.3|4 par.vals.4|5 par.vals.contactyes 386s 1 3.4300164 -1.3083735 1.7272573 3.1899360 1.3296606 386s 2 2.8813858 -1.1550431 1.9737448 3.4740817 1.3627908 386s 3 2.3491188 -1.0148529 2.2280703 3.7683888 1.3992293 386s 4 1.8354355 -0.8881411 2.4904988 4.0722937 1.4379639 386s 5 1.3422735 -0.7751174 2.7612331 4.3850175 1.4778669 386s 6 0.8712358 -0.6758159 3.0403898 4.7055883 1.5177348 386s 7 0.4235444 -0.5900448 3.3279674 5.0328829 1.5563515 386s 8 0.0000000 -0.5173434 3.6238109 5.3656893 1.5925773 386s 9 -0.3990485 -0.4569595 3.9275814 5.7027863 1.6254526 386s 10 -0.7737184 -0.4078590 4.2387443 6.0430310 1.6542958 386s 11 -1.1245809 -0.3687765 4.5565843 6.3854348 1.6787668 386s 12 -1.4526173 -0.3383014 4.8802522 6.7292117 1.6988730 386s 13 -1.7591420 -0.3149843 5.2088333 7.0737893 1.7149136 386s 14 -2.0457031 -0.2974396 5.5414220 7.4187857 1.7273842 386s 15 -2.3139760 -0.2844232 5.8771833 7.7639689 1.7368704 386s 16 -2.5656664 -0.2748765 6.2153929 8.1092106 1.7439599 386s 17 -2.8024328 -0.2679376 6.5554528 8.4544482 1.7491850 386s 18 -3.0258332 -0.2629290 6.8968876 8.7996559 1.7529951 386s 19 -3.2372944 -0.2593326 7.2393314 9.1448275 1.7557514 386s 20 -3.4380992 -0.2567600 7.5825083 9.4899654 1.7577335 386s par.vals.tempwarm 386s 1 0.6468007 386s 2 0.9918255 386s 3 1.3368503 386s 4 1.6818751 386s 5 2.0268999 386s 6 2.3719247 386s 7 2.7169495 386s 8 3.0619742 386s 9 3.4069990 386s 10 3.7520238 386s 11 4.0970486 386s 12 4.4420734 386s 13 4.7870982 386s 14 5.1321230 386s 15 5.4771478 386s 16 5.8221726 386s 17 6.1671974 386s 18 6.5122222 386s 19 6.8572470 386s 20 7.2022718 386s 386s attr(,"original.fit") 386s formula: rating ~ contact + temp 386s data: wine 386s 386s link threshold nobs logLik AIC niter max.grad cond.H 386s logit flexible 50 -46.76 103.52 7(0) 3.55e-13 4.2e+01 386s 386s Coefficients: 386s contactyes tempwarm 386s 1.593 3.062 386s 386s Threshold coefficients: 386s 1|3 3|4 4|5 386s -0.5173 3.6238 5.3657 386s attr(,"class") 386s [1] "profile.clm" 386s > plot(slice(fm2), 5) 386s > step.fm2 <- step(fm2, trace=0) 386s > fitted(fm2) 386s [1] 0.60053892 0.77590129 0.09349820 0.27230685 0.27230685 0.32934749 386s [7] 0.32934749 0.37347364 0.10813631 0.77590129 0.60973967 0.32934749 386s [13] 0.40771198 0.60053892 0.77590129 0.09081575 0.09081575 0.40771198 386s [19] 0.40771198 0.60053892 0.77590129 0.60973967 0.32934749 0.25729874 386s [25] 0.60053892 0.09349820 0.77590129 0.60973967 0.60973967 0.25729874 386s [31] 0.25729874 0.60053892 0.77590129 0.27230685 0.32934749 0.40771198 386s [37] 0.37347364 0.37347364 0.60973967 0.25729874 0.77590129 0.60973967 386s [43] 0.60973967 0.25729874 0.40771198 0.37347364 0.77590129 0.60973967 386s [49] 0.40771198 0.40771198 386s > ## Scale and nominal effects: 386s > fm2b <- clm(rating ~ temp, scale=~contact, data=wine, weights=wts2) 386s > summary(fm2b) 386s formula: rating ~ temp 386s scale: ~contact 386s data: wine 386s 386s link threshold nobs logLik AIC niter max.grad cond.H 386s logit flexible 50 -50.35 110.71 9(0) 2.51e-08 1.2e+02 386s 386s Coefficients: 386s Estimate Std. Error z value Pr(>|z|) 386s tempwarm 2.667 1.059 2.519 0.0118 * 386s --- 386s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 386s 386s log-scale coefficients: 386s Estimate Std. Error z value Pr(>|z|) 386s contactyes -0.09812 0.38836 -0.253 0.801 386s 386s Threshold coefficients: 386s Estimate Std. Error z value 386s 1|3 -1.2009 0.5033 -2.386 386s 3|4 2.3219 1.0427 2.227 386s 4|5 3.7986 1.3876 2.738 386s > pr <- profile(fm2b) 386s > confint(pr) 386s 2.5 % 97.5 % 386s tempwarm 1.1319929 6.0851931 386s sca.contactyes -0.8403892 0.7190847 386s > plot(pr, 1) 386s > fm2c <- clm(rating ~ temp, nominal=~contact, data=wine, weights=wts2) 386s > summary(fm2c) 386s formula: rating ~ temp 386s nominal: ~contact 386s data: wine 386s 386s link threshold nobs logLik AIC niter max.grad cond.H 386s logit flexible 50 -46.36 106.72 7(0) 1.22e-12 4.8e+01 386s 386s Coefficients: 386s Estimate Std. Error z value Pr(>|z|) 386s tempwarm 3.1100 0.8529 3.646 0.000266 *** 386s --- 386s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 386s 386s Threshold coefficients: 386s Estimate Std. Error z value 386s 1|3.(Intercept) -0.4250 0.6381 -0.666 386s 3|4.(Intercept) 3.6911 0.9505 3.883 386s 4|5.(Intercept) 4.8968 1.1001 4.451 386s 1|3.contactyes -1.8993 1.2128 -1.566 386s 3|4.contactyes -1.7003 0.7432 -2.288 386s 4|5.contactyes -0.9153 0.9243 -0.990 386s > pr <- profile(fm2c) 386s > confint(pr) 386s 2.5 % 97.5 % 386s tempwarm 1.623761 5.102185 386s > plot(pr, 1) 386s > pred <- predict(fm2c, newdata=wine[!names(wine) %in% "rating"]) 386s > pred <- predict(fm2b, newdata=wine[!names(wine) %in% "rating"]) 386s > 386s > ## nominal.test(fm2) 386s > ## scale.test(fm2) 386s > 386s > ## Different data sets (error): 386s > try(anova(fm1, fm2), silent=TRUE)[1] ## OK 386s [1] "Error in anova.clm(fm1, fm2) : \n models were not all fitted to the same dataset\n" 386s > 386s > ## Test clm.fit: 386s > wts2 <- 1 * with(wine, rating != "2") 386s > mf2 <- update(fm2, method="design") 386s > fm3 <- with(mf2, clm.fit(y, X, weights=wts)) 386s > 386s > ################################# 386s > 386s BEGIN TEST testAnova.clm2.R 386s 386s R version 4.4.3 (2025-02-28) -- "Trophy Case" 386s Copyright (C) 2025 The R Foundation for Statistical Computing 386s Platform: aarch64-unknown-linux-gnu 386s 386s R is free software and comes with ABSOLUTELY NO WARRANTY. 386s You are welcome to redistribute it under certain conditions. 386s Type 'license()' or 'licence()' for distribution details. 386s 386s R is a collaborative project with many contributors. 386s Type 'contributors()' for more information and 386s 'citation()' on how to cite R or R packages in publications. 386s 386s Type 'demo()' for some demos, 'help()' for on-line help, or 386s 'help.start()' for an HTML browser interface to help. 386s Type 'q()' to quit R. 386s 386s > library(ordinal) 387s > options(contrasts = c("contr.treatment", "contr.poly")) 387s > 387s > ## More manageable data set: 387s > (tab26 <- with(soup, table("Product" = PROD, "Response" = SURENESS))) 387s Response 387s Product 1 2 3 4 5 6 387s Ref 132 161 65 41 121 219 387s Test 96 99 50 57 156 650 387s > dimnames(tab26)[[2]] <- c("Sure", "Not Sure", "Guess", "Guess", "Not Sure", "Sure") 387s > dat26 <- expand.grid(sureness = as.factor(1:6), prod = c("Ref", "Test")) 387s > dat26$wghts <- c(t(tab26)) 387s > m1 <- clm(sureness ~ prod, scale = ~prod, data = dat26, 387s + weights = wghts, link = "logit") 387s > 387s > ## anova 387s > m2 <- update(m1, scale = ~1) 387s > anova(m1, m2) 387s Likelihood ratio tests of cumulative link models: 387s 387s formula: scale: link: threshold: 387s m2 sureness ~ prod ~1 logit flexible 387s m1 sureness ~ prod ~prod logit flexible 387s 387s no.par AIC logLik LR.stat df Pr(>Chisq) 387s m2 6 5392.7 -2690.3 387s m1 7 5389.5 -2687.7 5.1749 1 0.02292 * 387s --- 387s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 387s > mN1 <- clm(sureness ~ 1, nominal = ~prod, data = dat26, 387s + link = "logit") 387s > anova(m1, mN1) 387s Likelihood ratio tests of cumulative link models: 387s 387s formula: nominal: scale: link: threshold: 387s m1 sureness ~ prod ~1 ~prod logit flexible 387s mN1 sureness ~ 1 ~prod ~1 logit flexible 387s 387s no.par AIC logLik LR.stat df Pr(>Chisq) 387s m1 7 5389.489 -2687.745 387s mN1 10 63.002 -21.501 5332.5 3 < 2.2e-16 *** 387s --- 387s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 387s > anova(m1, m2, mN1) 387s Likelihood ratio tests of cumulative link models: 387s 387s formula: nominal: scale: link: threshold: 387s m2 sureness ~ prod ~1 ~1 logit flexible 387s m1 sureness ~ prod ~1 ~prod logit flexible 387s mN1 sureness ~ 1 ~prod ~1 logit flexible 387s 387s no.par AIC logLik LR.stat df Pr(>Chisq) 387s m2 6 5392.664 -2690.332 387s m1 7 5389.489 -2687.745 5.1749 1 0.02292 * 387s mN1 10 63.002 -21.501 5332.4869 3 < 2e-16 *** 387s --- 387s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 387s > 387s > ## dropterm 387s > if(require(MASS)) { 387s + dropterm(m1, test = "Chi") 387s + mB1 <- clm(SURENESS ~ PROD + GENDER + SOUPTYPE, 387s + scale = ~ COLD, data = soup, link = "probit") 387s + dropterm(mB1, test = "Chi") # or 387s + 387s + ## addterm 387s + addterm(mB1, scope = ~.^2, test = "Chi") 387s + ## addterm(mB1, scope = ~ . + AGEGROUP + SOUPFREQ, 387s + ## test = "Chi", which = "location") 387s + ## addterm(mB1, scope = ~ . + GENDER + SOUPTYPE, 387s + ## test = "Chi", which = "scale") 387s + 387s + ## Fit model from polr example: 387s + ## data(housing, package = "MASS") 387s + 387s + fm1 <- clm(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) 387s + ## addterm(fm1, ~ Infl + Type + Cont, test= "Chisq", which = "scale") 387s + dropterm(fm1, test = "Chisq") 387s + fm2 <- update(fm1, scale =~ Cont) 387s + fm3 <- update(fm1, formula =~.-Cont, nominal =~ Cont) 387s + anova(fm1, fm2, fm3) 387s + } 387s Loading required package: MASS 387s Likelihood ratio tests of cumulative link models: 387s 387s formula: nominal: scale: link: threshold: 387s fm1 Sat ~ Infl + Type + Cont ~1 ~1 logit flexible 387s fm2 Sat ~ Infl + Type + Cont ~1 ~Cont logit flexible 387s fm3 Sat ~ Infl + Type ~Cont ~1 logit flexible 387s 387s no.par AIC logLik LR.stat df Pr(>Chisq) 387s fm1 8 3495.1 -1739.6 387s fm2 9 3491.5 -1736.7 5.6559 1 0.0174 * 387s fm3 9 3494.7 -1738.4 -3.2113 0 387s --- 387s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 387s > 387s > 387s BEGIN TEST testCLM.R 388s 388s R version 4.4.3 (2025-02-28) -- "Trophy Case" 388s Copyright (C) 2025 The R Foundation for Statistical Computing 388s Platform: aarch64-unknown-linux-gnu 388s 388s R is free software and comes with ABSOLUTELY NO WARRANTY. 388s You are welcome to redistribute it under certain conditions. 388s Type 'license()' or 'licence()' for distribution details. 388s 388s R is a collaborative project with many contributors. 388s Type 'contributors()' for more information and 388s 'citation()' on how to cite R or R packages in publications. 388s 388s Type 'demo()' for some demos, 'help()' for on-line help, or 388s 'help.start()' for an HTML browser interface to help. 388s Type 'q()' to quit R. 388s 388s > library(ordinal) 388s > options(contrasts = c("contr.treatment", "contr.poly")) 388s > ## library(devtools) 388s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 388s > ## clean_dll(pkg = r2path) 388s > ## load_all(r2path) 388s > 388s > ## More manageable data set: 388s > data(soup, package="ordinal") 388s > (tab26 <- with(soup, table("Product" = PROD, "Response" = SURENESS))) 388s Response 388s Product 1 2 3 4 5 6 388s Ref 132 161 65 41 121 219 388s Test 96 99 50 57 156 650 388s > dimnames(tab26)[[2]] <- c("Sure", "Not Sure", "Guess", "Guess", "Not Sure", "Sure") 388s > dat26 <- expand.grid(sureness = as.factor(1:6), prod = c("Ref", "Test")) 388s > dat26$wghts <- c(t(tab26)) 388s > m1 <- clm(sureness ~ prod, scale = ~prod, data = dat26, 388s + weights = wghts, link = "logit") 389s > ## print, summary, vcov, logLik, AIC: 389s > m1 389s formula: sureness ~ prod 389s scale: ~prod 389s data: dat26 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 389s 389s Coefficients: 389s prodTest 389s 1.296 389s 389s log-scale coefficients: 389s prodTest 389s 0.148 389s 389s Threshold coefficients: 389s 1|2 2|3 3|4 4|5 5|6 389s -1.4913 -0.4522 -0.1072 0.1634 0.8829 389s > summary(m1) 389s formula: sureness ~ prod 389s scale: ~prod 389s data: dat26 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s prodTest 1.296 0.119 10.89 <2e-16 *** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s prodTest 0.1480 0.0651 2.273 0.023 * 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.49126 0.09215 -16.183 389s 2|3 -0.45218 0.07182 -6.296 389s 3|4 -0.10721 0.06995 -1.533 389s 4|5 0.16337 0.07025 2.325 389s 5|6 0.88291 0.07957 11.096 389s > vcov(m1) 389s 1|2 2|3 3|4 4|5 5|6 389s 1|2 0.0084917417 0.0046258673 0.0038492096 0.003316006 0.002036170 389s 2|3 0.0046258673 0.0051586967 0.0044974099 0.004099300 0.003352323 389s 3|4 0.0038492096 0.0044974099 0.0048935739 0.004528181 0.003948048 389s 4|5 0.0033160059 0.0040993002 0.0045281811 0.004935721 0.004489054 389s 5|6 0.0020361699 0.0033523229 0.0039480481 0.004489054 0.006331523 389s prodTest 0.0009111749 0.0031074167 0.0039832831 0.004738959 0.007064828 389s prodTest -0.0024312129 -0.0007825923 -0.0001820514 0.000338977 0.001989991 389s prodTest prodTest 389s 1|2 0.0009111749 -0.0024312129 389s 2|3 0.0031074167 -0.0007825923 389s 3|4 0.0039832831 -0.0001820514 389s 4|5 0.0047389591 0.0003389770 389s 5|6 0.0070648284 0.0019899912 389s prodTest 0.0141687135 0.0045752922 389s prodTest 0.0045752922 0.0042385585 389s > 389s > logLik(m1) 389s 'log Lik.' -2687.745 (df=7) 389s > ll.m1 <- structure(-2687.74456343981, df = 7L, nobs = 1847, 389s + class = "logLik") 389s > stopifnot(all.equal(logLik(m1), ll.m1)) 389s > 389s > AIC(m1) 389s [1] 5389.489 389s > 389s > coef(m1) 389s 1|2 2|3 3|4 4|5 5|6 prodTest prodTest 389s -1.4912570 -0.4521846 -0.1072083 0.1633653 0.8829135 1.2958776 0.1479862 389s > cm1 <- c(-1.49125702755587, -0.45218462707814, -0.107208315524318, 0.163365282774162, 389s + 0.88291347877514, 1.29587762626394, 0.147986162902775) 389s > stopifnot(all.equal(as.vector(coef(m1)), cm1)) 389s > 389s > coef(summary(m1)) 389s Estimate Std. Error z value Pr(>|z|) 389s 1|2 -1.4912570 0.09215065 -16.182817 6.667319e-59 389s 2|3 -0.4521846 0.07182407 -6.295726 3.059652e-10 389s 3|4 -0.1072083 0.06995408 -1.532553 1.253861e-01 389s 4|5 0.1633653 0.07025469 2.325329 2.005437e-02 389s 5|6 0.8829135 0.07957087 11.095938 1.312749e-28 389s prodTest 1.2958776 0.11903241 10.886763 1.332938e-27 389s prodTest 0.1479862 0.06510421 2.273066 2.302222e-02 389s > csm1 <- structure(c(-1.49125702755587, -0.45218462707814, -0.107208315524318, 389s + 0.163365282774162, 0.88291347877514, 1.29587762626394, 0.147986162902775, 389s + 0.0921506468161812, 0.0718240681909781, 0.069954084652323, 0.0702546879687391, 389s + 0.0795708692869622, 0.119032405993894, 0.065104213008022, -16.1828167145758, 389s + -6.2957256316336, -1.53255261729392, 2.32532927691394, 11.0959385851501, 389s + 10.8867632762999, 2.27306584421104, 6.66732036748908e-59, 3.05965144996025e-10, 389s + 0.125386123756898, 0.0200543599621069, 1.31274723412040e-28, 389s + 1.33293711602276e-27, 0.0230222123418036), .Dim = c(7L, 4L), .Dimnames = list( 389s + c("1|2", "2|3", "3|4", "4|5", "5|6", "prodTest", "prodTest" 389s + ), c("Estimate", "Std. Error", "z value", "Pr(>|z|)"))) 389s > stopifnot(all.equal(coef(summary(m1)), csm1)) 389s > 389s > ## link functions: 389s > m2 <- update(m1, link = "probit") 389s > m3 <- update(m1, link = "cloglog") 389s > 389s > m4 <- update(m1, link = "loglog") 389s > m5 <- update(m1, link = "cauchit", start = coef(m1)) 389s > ## m6 <- update(m1, link = "Aranda-Ordaz", lambda = 1) 389s > ## m7 <- update(m1, link = "Aranda-Ordaz") 389s > ## m8 <- update(m1, link = "log-gamma", lambda = 1) 389s > ## m9 <- update(m1, link = "log-gamma") 389s > ## nominal effects: 389s > mN1 <- clm(sureness ~ 1, nominal = ~ prod, data = dat26, 389s + weights = wghts) 389s > anova(m1, mN1) 389s Likelihood ratio tests of cumulative link models: 389s 389s formula: nominal: scale: link: threshold: 389s m1 sureness ~ prod ~1 ~prod logit flexible 389s mN1 sureness ~ 1 ~prod ~1 logit flexible 389s 389s no.par AIC logLik LR.stat df Pr(>Chisq) 389s m1 7 5389.5 -2687.7 389s mN1 10 5390.1 -2685.1 5.3755 3 0.1463 389s > ## optimizer / method: 389s > update(m1, scale = ~ 1, method = "Newton") 389s formula: sureness ~ prod 389s scale: ~1 389s data: dat26 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1847 -2690.33 5392.66 6(1) 3.21e-12 1.1e+02 389s 389s Coefficients: 389s prodTest 389s 1.144 389s 389s Threshold coefficients: 389s 1|2 2|3 3|4 4|5 5|6 389s -1.4050 -0.4247 -0.1013 0.1508 0.8126 389s > update(m1, scale = ~ 1, method = "ucminf") 389s formula: sureness ~ prod 389s scale: ~1 389s data: dat26 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1847 -2690.33 5392.66 19(0) 1.26e-08 1.1e+02 389s 389s Coefficients: 389s prodTest 389s 1.144 389s 389s Threshold coefficients: 389s 1|2 2|3 3|4 4|5 5|6 389s -1.4050 -0.4247 -0.1013 0.1508 0.8126 389s > update(m1, scale = ~ 1, method = "nlminb") 389s formula: sureness ~ prod 389s scale: ~1 389s data: dat26 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1847 -2690.33 5392.66 56(43) 4.13e-03 1.1e+02 389s 389s Coefficients: 389s prodTest 389s 1.144 389s 389s Threshold coefficients: 389s 1|2 2|3 3|4 4|5 5|6 389s -1.4050 -0.4247 -0.1013 0.1508 0.8126 389s > update(m1, scale = ~ 1, method = "optim") 389s Warning message: 389s (-1) Model failed to converge with max|grad| = 0.00413248 (tol = 1e-06) 389s formula: sureness ~ prod 389s scale: ~1 389s data: dat26 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1847 -2690.33 5392.66 44(12) 4.73e-03 1.1e+02 389s 389s Coefficients: 389s prodTest 389s 1.144 389s 389s Threshold coefficients: 389s 1|2 2|3 3|4 4|5 5|6 389s -1.4050 -0.4247 -0.1013 0.1508 0.8126 389s > update(m1, scale = ~ 1, method = "model.frame") 389s sureness prod (weights) 389s 1 1 Ref 132 389s 2 2 Ref 161 389s 3 3 Ref 65 389s 4 4 Ref 41 389s 5 5 Ref 121 389s 6 6 Ref 219 389s 7 1 Test 96 389s 8 2 Test 99 389s 9 3 Test 50 389s 10 4 Test 57 389s 11 5 Test 156 389s 12 6 Test 650 389s Warning message: 389s (-1) Model failed to converge with max|grad| = 0.00472568 (tol = 1e-06) 389s > update(m1, ~.-prod, scale = ~ 1, 389s + nominal = ~ prod, method = "model.frame") 389s sureness prod (weights) 389s 1 1 Ref 132 389s 2 2 Ref 161 389s 3 3 Ref 65 389s 4 4 Ref 41 389s 5 5 Ref 121 389s 6 6 Ref 219 389s 7 1 Test 96 389s 8 2 Test 99 389s 9 3 Test 50 389s 10 4 Test 57 389s 11 5 Test 156 389s 12 6 Test 650 389s > ## threshold functions 389s > mT1 <- update(m1, threshold = "symmetric") 389s > mT2 <- update(m1, threshold = "equidistant") 389s > anova(m1, mT1, mT2) 389s Likelihood ratio tests of cumulative link models: 389s 389s formula: scale: link: threshold: 389s mT2 sureness ~ prod ~prod logit equidistant 389s mT1 sureness ~ prod ~prod logit symmetric 389s m1 sureness ~ prod ~prod logit flexible 389s 389s no.par AIC logLik LR.stat df Pr(>Chisq) 389s mT2 4 5585.6 -2788.8 389s mT1 5 5407.8 -2698.9 179.806 1 < 2.2e-16 *** 389s m1 7 5389.5 -2687.7 22.271 2 1.459e-05 *** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s > 389s > ## Extend example from polr in package MASS: 389s > ## Fit model from polr example: 389s > if(require(MASS)) { 389s + fm1 <- clm(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) 389s + fm1 389s + summary(fm1) 389s + ## With probit link: 389s + summary(update(fm1, link = "probit")) 389s + ## Allow scale to depend on Cont-variable 389s + summary(fm2 <- update(fm1, scale =~ Cont)) 389s + summary(fm3 <- update(fm1, location =~.-Cont, nominal =~ Cont)) 389s + summary(fm4 <- update(fm2, location =~.-Cont, nominal =~ Cont)) 389s + anova(fm1, fm2, fm3, fm4) 389s + ## which seems to improve the fit 389s + } 389s Loading required package: MASS 389s Likelihood ratio tests of cumulative link models: 389s 389s formula: nominal: scale: link: threshold: 389s fm1 Sat ~ Infl + Type + Cont ~1 ~1 logit flexible 389s fm2 Sat ~ Infl + Type + Cont ~1 ~Cont logit flexible 389s fm3 Sat ~ Infl + Type + Cont ~Cont ~1 logit flexible 389s fm4 Sat ~ Infl + Type + Cont ~Cont ~Cont logit flexible 389s 389s no.par AIC logLik LR.stat df Pr(>Chisq) 389s fm1 8 3495.1 -1739.6 389s fm2 9 3491.5 -1736.7 5.6559 1 0.01740 * 389s fm3 9 3494.7 -1738.4 -3.2113 0 389s fm4 10 3492.5 -1736.2 4.2190 1 0.03997 * 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s > 389s > ################################# 389s > ## Better handling of ill-defined variance-covariance matrix of the 389s > ## parameters in summary methods for clm and clmm objects: 389s > dat26.2 <- data.frame(sureness = as.factor(1:12), 389s + prod = rep(c("One", "Two", "Three"),each=4)) 389s > fm1 <- clm(sureness ~ prod, ~prod, data = dat26.2) 389s > fm1 389s formula: sureness ~ prod 389s scale: ~prod 389s data: dat26.2 389s 389s Warning message: 389s (1) Hessian is numerically singular: parameters are not uniquely determined 389s In addition: Absolute convergence criterion was met, but relative criterion was not met 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 12 -16.64 63.27 33(14) 6.18e-07 2.0e+12 389s 389s Coefficients: 389s prodThree prodTwo 389s 90.72 46.65 389s 389s log-scale coefficients: 389s prodThree prodTwo 389s -0.11719 -0.09167 389s 389s Threshold coefficients: 389s 1|2 2|3 3|4 4|5 5|6 6|7 7|8 389s -1.099e+00 8.725e-16 1.099e+00 2.441e+01 4.564e+01 4.665e+01 4.765e+01 389s 8|9 9|10 10|11 11|12 389s 6.888e+01 8.975e+01 9.072e+01 9.170e+01 389s > summary(fm1) 389s formula: sureness ~ prod 389s scale: ~prod 389s data: dat26.2 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 12 -16.64 63.27 33(14) 6.18e-07 2.0e+12 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s prodThree 90.72 NA NA NA 389s prodTwo 46.65 NA NA NA 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s prodThree -0.11719 NA NA NA 389s prodTwo -0.09167 NA NA NA 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.099e+00 NA NA 389s 2|3 8.725e-16 NA NA 389s 3|4 1.099e+00 NA NA 389s 4|5 2.441e+01 NA NA 389s 5|6 4.564e+01 NA NA 389s 6|7 4.665e+01 NA NA 389s 7|8 4.765e+01 NA NA 389s 8|9 6.888e+01 NA NA 389s 9|10 8.975e+01 NA NA 389s 10|11 9.072e+01 NA NA 389s 11|12 9.170e+01 NA NA 389s > summary(fm1, corr = 1) 389s formula: sureness ~ prod 389s scale: ~prod 389s data: dat26.2 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 12 -16.64 63.27 33(14) 6.18e-07 2.0e+12 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s prodThree 90.72 NA NA NA 389s prodTwo 46.65 NA NA NA 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s prodThree -0.11719 NA NA NA 389s prodTwo -0.09167 NA NA NA 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.099e+00 NA NA 389s 2|3 8.725e-16 NA NA 389s 3|4 1.099e+00 NA NA 389s 4|5 2.441e+01 NA NA 389s 5|6 4.564e+01 NA NA 389s 6|7 4.665e+01 NA NA 389s 7|8 4.765e+01 NA NA 389s 8|9 6.888e+01 NA NA 389s 9|10 8.975e+01 NA NA 389s 10|11 9.072e+01 NA NA 389s 11|12 9.170e+01 NA NA 389s Warning message: 389s In summary.clm(fm1, corr = 1) :> ## fm1$Hessian 389s > ## sl1 <- slice(fm1, 13) 389s > ## fitted(fm1) 389s > ## convergence(fm1) 389s > ## eigen(fm1$Hessian)$values 389s > ## sqrt(diag(solve(fm1$Hessian))) 389s > ## sqrt(diag(ginv(fm1$Hessian))) 389s > 389s > ################################# 389s > ## Missing values: 389s > ## Bug-report from Jonathan Williams 389s > ## , 18 March 2010 12:42 389s > data(soup, package = "ordinal") 389s > soup$SURENESS[10] <- NA 389s Correlation matrix is unavailable 389s > c1a <- clm(ordered(SURENESS)~PROD, data=soup); summary(c1a) 389s formula: ordered(SURENESS) ~ PROD 389s data: soup 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1846 -2688.71 5389.43 6(1) 2.87e-12 1.1e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 1.14251 0.08931 12.79 <2e-16 *** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.40460 0.08174 -17.184 389s 2|3 -0.42733 0.06965 -6.135 389s 3|4 -0.10357 0.06884 -1.505 389s 4|5 0.14862 0.06898 2.155 389s 5|6 0.81063 0.07185 11.282 389s (1 observation deleted due to missingness) 389s > c2a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup) 389s > summary(c2a) 389s formula: ordered(SURENESS) ~ PROD 389s scale: ~PROD 389s data: soup 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1846 -2686.16 5386.32 8(1) 4.81e-07 1.0e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 1.293 0.119 10.87 <2e-16 *** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 0.14711 0.06514 2.258 0.0239 * 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.49041 0.09219 -16.166 389s 2|3 -0.45478 0.07189 -6.326 389s 3|4 -0.10961 0.07000 -1.566 389s 4|5 0.16104 0.07029 2.291 389s 5|6 0.88052 0.07959 11.064 389s (1 observation deleted due to missingness) 389s > c3a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup) 389s > summary(c3a) 389s formula: ordered(SURENESS) ~ 1 389s scale: ~PROD 389s data: soup 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1846 -2769.95 5551.91 10(1) 9.20e-13 6.9e+01 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest -0.15478 0.06683 -2.316 0.0206 * 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.85565 0.08111 -22.878 389s 2|3 -0.98626 0.05260 -18.752 389s 3|4 -0.70743 0.04676 -15.129 389s 4|5 -0.49243 0.04393 -11.208 389s 5|6 0.06504 0.04653 1.398 389s (1 observation deleted due to missingness) 389s > data(soup, package = "ordinal") 389s > soup$PROD[1] <- NA 389s > c1a <- clm(ordered(SURENESS)~PROD, data=soup) 389s > summary(c1a) 389s formula: ordered(SURENESS) ~ PROD 389s data: soup 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1846 -2689.15 5390.30 6(1) 2.85e-12 1.1e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 1.14774 0.08932 12.85 <2e-16 *** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.40278 0.08171 -17.167 389s 2|3 -0.42216 0.06962 -6.064 389s 3|4 -0.09849 0.06882 -1.431 389s 4|5 0.15373 0.06898 2.229 389s 5|6 0.81613 0.07188 11.353 389s (1 observation deleted due to missingness) 389s > c2a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup) 389s > summary(c2a) 389s formula: ordered(SURENESS) ~ PROD 389s scale: ~PROD 389s data: soup 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1846 -2686.51 5387.03 8(1) 5.41e-07 1.0e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 1.3009 0.1192 10.91 <2e-16 *** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 0.1494 0.0651 2.295 0.0217 * 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.48982 0.09217 -16.163 389s 2|3 -0.44981 0.07186 -6.260 389s 3|4 -0.10441 0.07000 -1.492 389s 4|5 0.16655 0.07031 2.369 389s 5|6 0.88740 0.07969 11.136 389s (1 observation deleted due to missingness) 389s > c3a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup) 389s > summary(c3a) 389s formula: ordered(SURENESS) ~ 1 389s scale: ~PROD 389s data: soup 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1846 -2771.22 5554.43 10(1) 7.39e-13 6.9e+01 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest -0.15330 0.06689 -2.292 0.0219 * 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.85700 0.08108 -22.903 389s 2|3 -0.98437 0.05252 -18.742 389s 3|4 -0.70562 0.04673 -15.100 389s 4|5 -0.49061 0.04395 -11.163 389s 5|6 0.06723 0.04667 1.441 389s (1 observation deleted due to missingness) 389s > soup$SURENESS[10] <- NA 389s > c1a <- clm(ordered(SURENESS)~PROD, data=soup) 389s > summary(c1a) 389s formula: ordered(SURENESS) ~ PROD 389s data: soup 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1845 -2687.53 5387.07 6(1) 2.82e-12 1.1e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 1.14581 0.08934 12.82 <2e-16 *** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.40237 0.08175 -17.155 389s 2|3 -0.42475 0.06968 -6.096 389s 3|4 -0.10080 0.06887 -1.464 389s 4|5 0.15158 0.06902 2.196 389s 5|6 0.81421 0.07191 11.322 389s (2 observations deleted due to missingness) 389s > c2a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup) 389s > summary(c2a) 389s formula: ordered(SURENESS) ~ PROD 389s scale: ~PROD 389s data: soup 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1845 -2684.93 5383.86 8(1) 5.12e-07 1.0e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 1.2979 0.1192 10.89 <2e-16 *** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 0.14853 0.06514 2.28 0.0226 * 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.48896 0.09222 -16.147 389s 2|3 -0.45241 0.07192 -6.290 389s 3|4 -0.10681 0.07004 -1.525 389s 4|5 0.16422 0.07034 2.335 389s 5|6 0.88500 0.07970 11.104 389s (2 observations deleted due to missingness) 389s > c3a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup) 389s > summary(c3a) 389s formula: ordered(SURENESS) ~ 1 389s scale: ~PROD 389s data: soup 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1845 -2769.23 5550.46 10(1) 1.07e-12 6.9e+01 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest -0.15410 0.06688 -2.304 0.0212 * 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.85563 0.08111 -22.877 389s 2|3 -0.98586 0.05259 -18.745 389s 3|4 -0.70689 0.04676 -15.116 389s 4|5 -0.49176 0.04395 -11.188 389s 5|6 0.06616 0.04661 1.419 389s (2 observations deleted due to missingness) 389s > 389s > ## na.actions: 389s > c4a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 389s + na.action=na.omit) 389s > summary(c4a) 389s formula: ordered(SURENESS) ~ PROD 389s scale: ~PROD 389s data: soup 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1845 -2684.93 5383.86 8(1) 5.12e-07 1.0e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 1.2979 0.1192 10.89 <2e-16 *** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 0.14853 0.06514 2.28 0.0226 * 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.48896 0.09222 -16.147 389s 2|3 -0.45241 0.07192 -6.290 389s 3|4 -0.10681 0.07004 -1.525 389s 4|5 0.16422 0.07034 2.335 389s 5|6 0.88500 0.07970 11.104 389s (2 observations deleted due to missingness) 389s > 389s > tC1 <- try(clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 389s + na.action=na.fail), silent = TRUE) 389s > stopifnot(inherits(tC1, "try-error")) 389s > 389s > c4a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 389s + na.action=na.exclude) 389s > summary(c4a) 389s formula: ordered(SURENESS) ~ PROD 389s scale: ~PROD 389s data: soup 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1845 -2684.93 5383.86 8(1) 5.12e-07 1.0e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 1.2979 0.1192 10.89 <2e-16 *** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 0.14853 0.06514 2.28 0.0226 * 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.48896 0.09222 -16.147 389s 2|3 -0.45241 0.07192 -6.290 389s 3|4 -0.10681 0.07004 -1.525 389s 4|5 0.16422 0.07034 2.335 389s 5|6 0.88500 0.07970 11.104 389s (2 observations deleted due to missingness) 389s > 389s > tC2 <- try(clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 389s + na.action=na.pass), silent = TRUE) 389s > stopifnot(inherits(tC2, "try-error")) 389s > 389s > ## Subset: 389s > data(soup, package="ordinal") 389s > c4a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 389s + subset = 1:100) 389s > c4a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup, 389s + subset = 1:100) 389s > c4a <- clm(ordered(SURENESS)~PROD, data=soup, 389s + subset = 1:100) 389s > c4a <- clm(ordered(SURENESS)~1, data=soup, 389s + subset = 1:100) 389s > 389s > ## Offset: 389s > data(soup, package = "ordinal") 389s > set.seed(290980) 389s > offs <- runif(nrow(soup)) 389s > c4a <- clm(ordered(SURENESS)~PROD + offset(offs), 389s + scale = ~PROD, data=soup, subset = 1:100) 389s > summary(c4a) 389s formula: ordered(SURENESS) ~ PROD + offset(offs) 389s scale: ~PROD 389s data: soup 389s subset: 1:100 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 100 -139.58 293.17 9(2) 1.41e-07 2.0e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 2.4410 0.7091 3.443 0.000576 *** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 0.5105 0.2671 1.911 0.056 . 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.0470 0.4019 -2.605 389s 2|3 0.4213 0.3106 1.356 389s 3|4 0.5488 0.3106 1.767 389s 4|5 0.9217 0.3162 2.915 389s 5|6 2.0775 0.4062 5.114 389s > 389s > c4a <- clm(ordered(SURENESS)~PROD + offset(offs), 389s + scale = ~PROD + offset(offs), data=soup, subset = 1:100) 389s > summary(c4a) 389s formula: ordered(SURENESS) ~ PROD + offset(offs) 389s scale: ~PROD + offset(offs) 389s data: soup 389s subset: 1:100 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 100 -143.12 300.24 9(2) 5.32e-09 1.9e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 3.344 1.020 3.277 0.00105 ** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 0.4412 0.2753 1.603 0.109 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -2.09797 0.62565 -3.353 389s 2|3 0.06671 0.46874 0.142 389s 3|4 0.25559 0.46525 0.549 389s 4|5 0.80178 0.46743 1.715 389s 5|6 2.46041 0.59193 4.157 389s > 389s > off2 <- offs 389s > c4a <- clm(ordered(SURENESS)~PROD + offset(offs), 389s + scale = ~PROD + offset(off2), data=soup, subset = 1:100) 389s > summary(c4a) 389s formula: ordered(SURENESS) ~ PROD + offset(offs) 389s scale: ~PROD + offset(off2) 389s data: soup 389s subset: 1:100 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 100 -143.12 300.24 9(2) 5.32e-09 1.9e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 3.344 1.020 3.277 0.00105 ** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 0.4412 0.2753 1.603 0.109 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -2.09797 0.62565 -3.353 389s 2|3 0.06671 0.46874 0.142 389s 3|4 0.25559 0.46525 0.549 389s 4|5 0.80178 0.46743 1.715 389s 5|6 2.46041 0.59193 4.157 389s > 389s > c4a <- clm(ordered(SURENESS)~PROD, 389s + scale = ~PROD + offset(offs), data=soup, subset = 1:100) 389s > summary(c4a) 389s formula: ordered(SURENESS) ~ PROD 389s scale: ~PROD + offset(offs) 389s data: soup 389s subset: 1:100 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 100 -142.15 298.31 10(2) 7.69e-10 1.8e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 3.283 1.016 3.231 0.00123 ** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 0.4263 0.2801 1.522 0.128 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -2.4698 0.6308 -3.915 389s 2|3 -0.2916 0.4668 -0.625 389s 3|4 -0.1005 0.4628 -0.217 389s 4|5 0.4484 0.4638 0.967 389s 5|6 2.1036 0.5864 3.587 389s > 389s > ## data as matrix: 389s > dat26M <- as.matrix(dat26) 389s > m1 <- clm(sureness ~ prod, scale = ~prod, data = dat26, 389s + weights = wghts, link = "logit") 389s > summary(m1) 389s formula: sureness ~ prod 389s scale: ~prod 389s data: dat26 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s prodTest 1.296 0.119 10.89 <2e-16 *** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s prodTest 0.1480 0.0651 2.273 0.023 * 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.49126 0.09215 -16.183 389s 2|3 -0.45218 0.07182 -6.296 389s 3|4 -0.10721 0.06995 -1.533 389s 4|5 0.16337 0.07025 2.325 389s 5|6 0.88291 0.07957 11.096 389s > 389s > ## data in enclosing environment: 389s > attach(soup) 389s > m1 <- clm(SURENESS ~ PROD, scale = ~PROD) 389s > summary(m1) 389s formula: SURENESS ~ PROD 389s scale: ~PROD 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 1.296 0.119 10.89 <2e-16 *** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s PRODTest 0.1480 0.0651 2.273 0.023 * 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -1.49126 0.09215 -16.183 389s 2|3 -0.45218 0.07182 -6.296 389s 3|4 -0.10721 0.06995 -1.533 389s 4|5 0.16337 0.07025 2.325 389s 5|6 0.88291 0.07957 11.096 389s > detach(soup) 389s > 389s > ################################################################## 389s > ### Parameter estimates were not correct with large scale effects due 389s > ### to end cut-points being \pm 100. This is not enough for 389s > ### location-scale model, but seems to be for location only models. 389s > ### Bug report from Ioannis Kosmidis : 389s > 389s > ### A 2x3 contigency table that will give a large estimated value of 389s > ### zeta 389s > x <- rep(0:1, each = 3) 389s > response <- factor(rep(c(1, 2, 3), times = 2)) 389s > freq <- c(1, 11, 1, 13, 1, 14) 389s > totals <- rep(tapply(freq, x, sum), each = 3) 389s > Dat <- data.frame(response, x, freq) 389s > 389s > ### Fitting a cumulative link model with dispersion effects 389s > modClm <- clm(response ~ x, scale = ~ x, weights = freq, data = Dat, 389s + control = clm.control(grtol = 1e-10, convTol = 1e-10)) 389s > summary(modClm) 389s formula: response ~ x 389s scale: ~x 389s data: Dat 389s 389s link threshold nobs logLik AIC niter max.grad cond.H 389s logit flexible 41 -29.98 67.96 10(3) 9.23e-10 2.4e+02 389s 389s Coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s x 2.485 13.168 0.189 0.85 389s 389s log-scale coefficients: 389s Estimate Std. Error z value Pr(>|z|) 389s x 3.548 1.023 3.468 0.000524 *** 389s --- 389s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 389s 389s Threshold coefficients: 389s Estimate Std. Error z value 389s 1|2 -2.485 1.041 -2.387 389s 2|3 2.485 1.041 2.387 389s > ### The maximized log-likelihood for this saturated model should be 389s > sum(freq*log(freq/totals)) 389s [1] -29.97808 389s > # > sum(freq*log(freq/totals)) 389s > # [1] -29.97808 389s > ### but apparently clm fails to maximixe the log-likelihood 389s > modClm$logLik 389s [1] -29.97808 389s > # > modClm$logLik 389s > # [1] -30.44452 389s > stopifnot(isTRUE(all.equal(sum(freq*log(freq/totals)), modClm$logLik))) 389s > 389s > ### The estimates reported by clm are 389s > coef(modClm) 389s 1|2 2|3 x x 389s -2.484907 2.484907 2.484907 3.547588 389s > coef.res <- structure(c(-2.48490664104217, 2.48490665578163, 389s + 2.48490659188594, 389s + 3.54758796387530), .Names = c("1|2", "2|3", 389s + "x", "x")) 389s > stopifnot(isTRUE(all.equal(coef.res, coef(modClm)))) 389s > # > modClm$coefficients 389s > # 1|2 2|3 x x 389s > # -2.297718 2.297038 1.239023 2.834285 389s > ### while they should be (from my own software) 389s > # 1|2 2|3 x disp.x 389s > #-2.484907 2.484907 2.484907 3.547588 389s > convergence(modClm) 389s nobs logLik niter max.grad cond.H logLik.Error 389s 41 -29.98 10(3) 9.23e-10 2.4e+02 <1e-10 389s 389s Estimate Std.Err Gradient Error Cor.Dec Sig.Dig 389s 1|2 -2.485 1.041 3.50e-10 5.32e-10 8 9 389s 2|3 2.485 1.041 -1.60e-10 -5.32e-10 8 9 389s x 2.485 13.168 -1.90e-10 -3.54e-08 7 8 389s x 3.548 1.023 -9.23e-10 -1.55e-09 8 9 389s 389s Eigen values of Hessian: 389s 1.374792 0.855786 0.785151 0.005766 389s 389s Convergence message from clm: 389s (0) successful convergence 389s In addition: Absolute and relative convergence criteria were met 389s 389s > 389s > ################################################################## 389s > 390s autopkgtest [11:28:59]: test run-unit-test: -----------------------] 390s autopkgtest [11:29:00]: test run-unit-test: - - - - - - - - - - results - - - - - - - - - - 390s run-unit-test PASS 390s autopkgtest [11:29:00]: test pkg-r-autopkgtest: preparing testbed 601s autopkgtest [11:32:31]: testbed dpkg architecture: arm64 601s autopkgtest [11:32:31]: testbed apt version: 2.9.33 601s autopkgtest [11:32:31]: @@@@@@@@@@@@@@@@@@@@ test bed setup 602s autopkgtest [11:32:32]: testbed release detected to be: plucky 602s autopkgtest [11:32:32]: updating testbed package index (apt update) 603s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [126 kB] 603s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 603s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 603s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 603s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.8 kB] 603s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [46.2 kB] 603s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [410 kB] 604s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 Packages [78.2 kB] 604s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 c-n-f Metadata [1888 B] 604s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted arm64 c-n-f Metadata [116 B] 604s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 Packages [353 kB] 604s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 c-n-f Metadata [15.7 kB] 604s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse arm64 Packages [4948 B] 604s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse arm64 c-n-f Metadata [572 B] 605s Fetched 1052 kB in 2s (541 kB/s) 606s Reading package lists... 606s + lsb_release --codename --short 606s + RELEASE=plucky 606s + cat 606s + [ plucky != trusty ] 606s + DEBIAN_FRONTEND=noninteractive eatmydata apt-get -y --allow-downgrades -o Dpkg::Options::=--force-confnew dist-upgrade 606s Reading package lists... 607s Building dependency tree... 607s Reading state information... 607s Calculating upgrade... 607s Calculating upgrade... 608s The following packages will be upgraded: 608s python3-jinja2 strace 608s 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 608s Need to get 608 kB of archives. 608s After this operation, 11.3 kB of additional disk space will be used. 608s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 strace arm64 6.13+ds-1ubuntu1 [499 kB] 609s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-jinja2 all 3.1.5-2ubuntu1 [109 kB] 609s Fetched 608 kB in 1s (580 kB/s) 610s (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 ... 117701 files and directories currently installed.) 610s Preparing to unpack .../strace_6.13+ds-1ubuntu1_arm64.deb ... 610s Unpacking strace (6.13+ds-1ubuntu1) over (6.11-0ubuntu1) ... 610s Preparing to unpack .../python3-jinja2_3.1.5-2ubuntu1_all.deb ... 610s Unpacking python3-jinja2 (3.1.5-2ubuntu1) over (3.1.5-2) ... 610s Setting up python3-jinja2 (3.1.5-2ubuntu1) ... 610s Setting up strace (6.13+ds-1ubuntu1) ... 610s Processing triggers for man-db (2.13.0-1) ... 611s + rm /etc/apt/preferences.d/force-downgrade-to-release.pref 611s + /usr/lib/apt/apt-helper analyze-pattern ?true 611s + uname -r 611s + sed s/\./\\./g 611s + running_kernel_pattern=^linux-.*6\.14\.0-10-generic.* 611s + apt list ?obsolete+ + tail -n+2 611s grep -v ^linux-.*6\.14\.0-10-generic.* 611s 611s + cut -d/ -f1 611s + obsolete_pkgs=linux-headers-6.11.0-8-generic 611s linux-headers-6.11.0-8 611s linux-image-6.11.0-8-generic 611s linux-modules-6.11.0-8-generic 611s linux-tools-6.11.0-8-generic 611s linux-tools-6.11.0-8 611s + DEBIAN_FRONTEND=noninteractive eatmydata apt-get -y purge --autoremove linux-headers-6.11.0-8-generic linux-headers-6.11.0-8Reading package lists... 611s Building dependency tree... linux-image-6.11.0-8-generic linux-modules-6.11.0-8-generic linux-tools-6.11.0-8-generic linux-tools-6.11.0-8 612s 612s Reading state information... 612s Solving dependencies... 612s The following packages will be REMOVED: 612s libnsl2* libpython3.12-minimal* libpython3.12-stdlib* libpython3.12t64* 612s libunwind8* linux-headers-6.11.0-8* linux-headers-6.11.0-8-generic* 612s linux-image-6.11.0-8-generic* linux-modules-6.11.0-8-generic* 612s linux-tools-6.11.0-8* linux-tools-6.11.0-8-generic* 613s 0 upgraded, 0 newly installed, 11 to remove and 5 not upgraded. 613s After this operation, 267 MB disk space will be freed. 613s (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 ... 117701 files and directories currently installed.) 613s Removing linux-tools-6.11.0-8-generic (6.11.0-8.8) ... 613s Removing linux-tools-6.11.0-8 (6.11.0-8.8) ... 613s Removing libpython3.12t64:arm64 (3.12.9-1) ... 613s Removing libpython3.12-stdlib:arm64 (3.12.9-1) ... 613s Removing libnsl2:arm64 (1.3.0-3build3) ... 613s Removing libpython3.12-minimal:arm64 (3.12.9-1) ... 613s Removing libunwind8:arm64 (1.6.2-3.1) ... 613s Removing linux-headers-6.11.0-8-generic (6.11.0-8.8) ... 613s Removing linux-headers-6.11.0-8 (6.11.0-8.8) ... 615s Removing linux-image-6.11.0-8-generic (6.11.0-8.8) ... 615s I: /boot/vmlinuz.old is now a symlink to vmlinuz-6.14.0-10-generic 615s I: /boot/initrd.img.old is now a symlink to initrd.img-6.14.0-10-generic 615s /etc/kernel/postrm.d/initramfs-tools: 615s update-initramfs: Deleting /boot/initrd.img-6.11.0-8-generic 616s /etc/kernel/postrm.d/zz-flash-kernel: 616s flash-kernel: Kernel 6.11.0-8-generic has been removed. 616s flash-kernel: A higher version (6.14.0-10-generic) is still installed, no reflashing required. 616s /etc/kernel/postrm.d/zz-update-grub: 616s Sourcing file `/etc/default/grub' 616s Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg' 616s Generating grub configuration file ... 616s Found linux image: /boot/vmlinuz-6.14.0-10-generic 616s Found initrd image: /boot/initrd.img-6.14.0-10-generic 616s Warning: os-prober will not be executed to detect other bootable partitions. 616s Systems on them will not be added to the GRUB boot configuration. 616s Check GRUB_DISABLE_OS_PROBER documentation entry. 616s Adding boot menu entry for UEFI Firmware Settings ... 616s done 617s Removing linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 617s Processing triggers for libc-bin (2.41-1ubuntu1) ... 617s (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 ... 81650 files and directories currently installed.) 617s Purging configuration files for linux-image-6.11.0-8-generic (6.11.0-8.8) ... 617s Purging configuration files for libpython3.12-minimal:arm64 (3.12.9-1) ... 617s Purging configuration files for linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 617s + grep -q trusty /etc/lsb-release 617s + [ ! -d /usr/share/doc/unattended-upgrades ] 617s + [ ! -d /usr/share/doc/lxd ] 617s + [ ! -d /usr/share/doc/lxd-client ] 617s + [ ! -d /usr/share/doc/snapd ] 617s + type iptables 617s + cat 617s + chmod 755 /etc/rc.local 617s + . /etc/rc.local 617s + iptables -w -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu 617s + iptables -A OUTPUT -d 10.255.255.1/32 -p tcp -j DROP 617s + iptables -A OUTPUT -d 10.255.255.2/32 -p tcp -j DROP 617s + uname -m 617s + [ aarch64 = ppc64le ] 617s + [ -d /run/systemd/system ] 617s + systemd-detect-virt --quiet --vm 617s + mkdir -p /etc/systemd/system/systemd-random-seed.service.d/ 617s + cat 617s + grep -q lz4 /etc/initramfs-tools/initramfs.conf 617s + echo COMPRESS=lz4 617s autopkgtest [11:32:47]: upgrading testbed (apt dist-upgrade and autopurge) 617s Reading package lists... 618s Building dependency tree... 618s Reading state information... 618s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 618s Starting 2 pkgProblemResolver with broken count: 0 618s Done 619s Entering ResolveByKeep 619s 620s Calculating upgrade... 620s The following packages will be upgraded: 620s libc-bin libc-dev-bin libc6 libc6-dev locales 620s 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 620s Need to get 9530 kB of archives. 620s After this operation, 0 B of additional disk space will be used. 620s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc6-dev arm64 2.41-1ubuntu2 [1750 kB] 622s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc-dev-bin arm64 2.41-1ubuntu2 [24.0 kB] 622s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc6 arm64 2.41-1ubuntu2 [2910 kB] 626s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libc-bin arm64 2.41-1ubuntu2 [600 kB] 626s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 locales all 2.41-1ubuntu2 [4246 kB] 632s Preconfiguring packages ... 632s Fetched 9530 kB in 11s (851 kB/s) 632s (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 ... 81647 files and directories currently installed.) 632s Preparing to unpack .../libc6-dev_2.41-1ubuntu2_arm64.deb ... 632s Unpacking libc6-dev:arm64 (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 632s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu2_arm64.deb ... 632s Unpacking libc-dev-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 632s Preparing to unpack .../libc6_2.41-1ubuntu2_arm64.deb ... 632s Unpacking libc6:arm64 (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 633s Setting up libc6:arm64 (2.41-1ubuntu2) ... 633s (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 ... 81647 files and directories currently installed.) 633s Preparing to unpack .../libc-bin_2.41-1ubuntu2_arm64.deb ... 633s Unpacking libc-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 633s Setting up libc-bin (2.41-1ubuntu2) ... 633s (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 ... 81647 files and directories currently installed.) 633s Preparing to unpack .../locales_2.41-1ubuntu2_all.deb ... 633s Unpacking locales (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 633s Setting up locales (2.41-1ubuntu2) ... 634s Generating locales (this might take a while)... 636s en_US.UTF-8... done 636s Generation complete. 636s Setting up libc-dev-bin (2.41-1ubuntu2) ... 636s Setting up libc6-dev:arm64 (2.41-1ubuntu2) ... 636s Processing triggers for man-db (2.13.0-1) ... 637s Processing triggers for systemd (257.3-1ubuntu3) ... 638s Reading package lists... 638s Building dependency tree... 638s Reading state information... 639s Starting pkgProblemResolver with broken count: 0 639s Starting 2 pkgProblemResolver with broken count: 0 639s Done 639s Solving dependencies... 640s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 640s autopkgtest [11:33:10]: rebooting testbed after setup commands that affected boot 667s Reading package lists... 667s Building dependency tree... 667s Reading state information... 668s Starting pkgProblemResolver with broken count: 0 668s Starting 2 pkgProblemResolver with broken count: 0 668s Done 669s The following NEW packages will be installed: 669s build-essential cpp cpp-14 cpp-14-aarch64-linux-gnu cpp-aarch64-linux-gnu 669s dctrl-tools fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-mono 669s g++ g++-14 g++-14-aarch64-linux-gnu g++-aarch64-linux-gnu gcc gcc-14 669s gcc-14-aarch64-linux-gnu gcc-aarch64-linux-gnu gfortran gfortran-14 669s gfortran-14-aarch64-linux-gnu gfortran-aarch64-linux-gnu icu-devtools 669s libasan8 libblas-dev libblas3 libbz2-dev libcairo2 libcc1-0 libdatrie1 669s libdeflate-dev libdeflate0 libfontconfig1 libgcc-14-dev libgfortran-14-dev 669s libgfortran5 libgomp1 libgraphite2-3 libharfbuzz0b libhwasan0 libice6 669s libicu-dev libisl23 libitm1 libjbig0 libjpeg-dev libjpeg-turbo8 669s libjpeg-turbo8-dev libjpeg8 libjpeg8-dev liblapack-dev liblapack3 liblerc4 669s liblsan0 liblzma-dev libmpc3 libncurses-dev libnlopt0 libpango-1.0-0 669s libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils libpaper2 libpcre2-16-0 669s libpcre2-32-0 libpcre2-dev libpcre2-posix3 libpixman-1-0 libpkgconf3 669s libpng-dev libreadline-dev libsharpyuv0 libsm6 libstdc++-14-dev libtcl8.6 669s libthai-data libthai0 libtiff6 libtirpc-dev libtk8.6 libtsan2 libubsan1 669s libwebp7 libxcb-render0 libxcb-shm0 libxft2 libxrender1 libxss1 libxt6t64 669s littler pkg-r-autopkgtest pkgconf pkgconf-bin r-base-core r-base-dev 669s r-cran-boot r-cran-brio r-cran-callr r-cran-cli r-cran-crayon r-cran-desc 669s r-cran-diffobj r-cran-digest r-cran-evaluate r-cran-fs r-cran-glue 669s r-cran-jsonlite r-cran-lattice r-cran-lifecycle r-cran-littler r-cran-lme4 669s r-cran-magrittr r-cran-mass r-cran-matrix r-cran-minqa r-cran-nlme 669s r-cran-nloptr r-cran-nnet r-cran-numderiv r-cran-ordinal r-cran-pkgbuild 669s r-cran-pkgkitten r-cran-pkgload r-cran-praise r-cran-processx r-cran-ps 669s r-cran-r6 r-cran-rbibutils r-cran-rcpp r-cran-rcppeigen r-cran-rdpack 669s r-cran-reformulas r-cran-rlang r-cran-rprojroot r-cran-statmod 669s r-cran-testthat r-cran-ucminf r-cran-waldo r-cran-withr r-cran-xtable unzip 669s x11-common xdg-utils zip zlib1g-dev 669s 0 upgraded, 145 newly installed, 0 to remove and 0 not upgraded. 669s Need to get 163 MB of archives. 669s After this operation, 481 MB of additional disk space will be used. 669s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 libisl23 arm64 0.27-1 [676 kB] 670s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 libmpc3 arm64 1.3.1-1build2 [56.8 kB] 670s Get:3 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu3 [10.6 MB] 681s Get:4 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp-14 arm64 14.2.0-17ubuntu3 [1028 B] 681s Get:5 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [5558 B] 681s Get:6 http://ftpmaster.internal/ubuntu plucky/main arm64 cpp arm64 4:14.2.0-1ubuntu1 [22.4 kB] 681s Get:7 http://ftpmaster.internal/ubuntu plucky/main arm64 libcc1-0 arm64 15-20250222-0ubuntu1 [44.2 kB] 681s Get:8 http://ftpmaster.internal/ubuntu plucky/main arm64 libgomp1 arm64 15-20250222-0ubuntu1 [146 kB] 682s Get:9 http://ftpmaster.internal/ubuntu plucky/main arm64 libitm1 arm64 15-20250222-0ubuntu1 [28.0 kB] 682s Get:10 http://ftpmaster.internal/ubuntu plucky/main arm64 libasan8 arm64 15-20250222-0ubuntu1 [2924 kB] 685s Get:11 http://ftpmaster.internal/ubuntu plucky/main arm64 liblsan0 arm64 15-20250222-0ubuntu1 [1319 kB] 686s Get:12 http://ftpmaster.internal/ubuntu plucky/main arm64 libtsan2 arm64 15-20250222-0ubuntu1 [2694 kB] 689s Get:13 http://ftpmaster.internal/ubuntu plucky/main arm64 libubsan1 arm64 15-20250222-0ubuntu1 [1178 kB] 691s Get:14 http://ftpmaster.internal/ubuntu plucky/main arm64 libhwasan0 arm64 15-20250222-0ubuntu1 [1642 kB] 693s Get:15 http://ftpmaster.internal/ubuntu plucky/main arm64 libgcc-14-dev arm64 14.2.0-17ubuntu3 [2593 kB] 696s Get:16 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu3 [20.9 MB] 720s Get:17 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc-14 arm64 14.2.0-17ubuntu3 [526 kB] 721s Get:18 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [1200 B] 721s Get:19 http://ftpmaster.internal/ubuntu plucky/main arm64 gcc arm64 4:14.2.0-1ubuntu1 [4998 B] 721s Get:20 http://ftpmaster.internal/ubuntu plucky/main arm64 libstdc++-14-dev arm64 14.2.0-17ubuntu3 [2499 kB] 724s Get:21 http://ftpmaster.internal/ubuntu plucky/main arm64 g++-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu3 [12.1 MB] 738s Get:22 http://ftpmaster.internal/ubuntu plucky/main arm64 g++-14 arm64 14.2.0-17ubuntu3 [21.8 kB] 738s Get:23 http://ftpmaster.internal/ubuntu plucky/main arm64 g++-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [956 B] 738s Get:24 http://ftpmaster.internal/ubuntu plucky/main arm64 g++ arm64 4:14.2.0-1ubuntu1 [1080 B] 738s Get:25 http://ftpmaster.internal/ubuntu plucky/main arm64 build-essential arm64 12.10ubuntu1 [4932 B] 738s Get:26 http://ftpmaster.internal/ubuntu plucky/main arm64 dctrl-tools arm64 2.24-3build3 [103 kB] 738s Get:27 http://ftpmaster.internal/ubuntu plucky/main arm64 fonts-dejavu-mono all 2.37-8 [502 kB] 739s Get:28 http://ftpmaster.internal/ubuntu plucky/main arm64 fonts-dejavu-core all 2.37-8 [835 kB] 740s Get:29 http://ftpmaster.internal/ubuntu plucky/main arm64 fontconfig-config arm64 2.15.0-2ubuntu1 [37.5 kB] 740s Get:30 http://ftpmaster.internal/ubuntu plucky/main arm64 libfontconfig1 arm64 2.15.0-2ubuntu1 [144 kB] 740s Get:31 http://ftpmaster.internal/ubuntu plucky/main arm64 fontconfig arm64 2.15.0-2ubuntu1 [191 kB] 740s Get:32 http://ftpmaster.internal/ubuntu plucky/main arm64 libgfortran5 arm64 15-20250222-0ubuntu1 [444 kB] 741s Get:33 http://ftpmaster.internal/ubuntu plucky/main arm64 libgfortran-14-dev arm64 14.2.0-17ubuntu3 [498 kB] 741s Get:34 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran-14-aarch64-linux-gnu arm64 14.2.0-17ubuntu3 [11.4 MB] 753s Get:35 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran-14 arm64 14.2.0-17ubuntu3 [13.6 kB] 753s Get:36 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran-aarch64-linux-gnu arm64 4:14.2.0-1ubuntu1 [1022 B] 753s Get:37 http://ftpmaster.internal/ubuntu plucky/main arm64 gfortran arm64 4:14.2.0-1ubuntu1 [1166 B] 753s Get:38 http://ftpmaster.internal/ubuntu plucky/main arm64 icu-devtools arm64 76.1-1ubuntu2 [213 kB] 754s Get:39 http://ftpmaster.internal/ubuntu plucky/main arm64 libblas3 arm64 3.12.1-2 [161 kB] 754s Get:40 http://ftpmaster.internal/ubuntu plucky/main arm64 libblas-dev arm64 3.12.1-2 [126 kB] 754s Get:41 http://ftpmaster.internal/ubuntu plucky/main arm64 libbz2-dev arm64 1.0.8-6 [36.1 kB] 754s Get:42 http://ftpmaster.internal/ubuntu plucky/main arm64 libpixman-1-0 arm64 0.44.0-3 [197 kB] 754s Get:43 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-render0 arm64 1.17.0-2 [16.6 kB] 754s Get:44 http://ftpmaster.internal/ubuntu plucky/main arm64 libxcb-shm0 arm64 1.17.0-2 [5884 B] 754s Get:45 http://ftpmaster.internal/ubuntu plucky/main arm64 libxrender1 arm64 1:0.9.10-1.1build1 [18.8 kB] 754s Get:46 http://ftpmaster.internal/ubuntu plucky/main arm64 libcairo2 arm64 1.18.2-2 [560 kB] 756s Get:47 http://ftpmaster.internal/ubuntu plucky/main arm64 libdatrie1 arm64 0.2.13-3build1 [19.2 kB] 756s Get:48 http://ftpmaster.internal/ubuntu plucky/main arm64 libdeflate0 arm64 1.23-1 [46.2 kB] 756s Get:49 http://ftpmaster.internal/ubuntu plucky/main arm64 libdeflate-dev arm64 1.23-1 [53.7 kB] 756s Get:50 http://ftpmaster.internal/ubuntu plucky/main arm64 libgraphite2-3 arm64 1.3.14-2ubuntu1 [70.6 kB] 756s Get:51 http://ftpmaster.internal/ubuntu plucky/main arm64 libharfbuzz0b arm64 10.2.0-1 [490 kB] 756s Get:52 http://ftpmaster.internal/ubuntu plucky/main arm64 x11-common all 1:7.7+23ubuntu3 [21.7 kB] 756s Get:53 http://ftpmaster.internal/ubuntu plucky/main arm64 libice6 arm64 2:1.1.1-1 [42.3 kB] 756s Get:54 http://ftpmaster.internal/ubuntu plucky/main arm64 libicu-dev arm64 76.1-1ubuntu2 [12.2 MB] 768s Get:55 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg-turbo8 arm64 2.1.5-3ubuntu2 [165 kB] 768s Get:56 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg-turbo8-dev arm64 2.1.5-3ubuntu2 [306 kB] 769s Get:57 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg8 arm64 8c-2ubuntu11 [2148 B] 769s Get:58 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg8-dev arm64 8c-2ubuntu11 [1484 B] 769s Get:59 http://ftpmaster.internal/ubuntu plucky/main arm64 libjpeg-dev arm64 8c-2ubuntu11 [1482 B] 769s Get:60 http://ftpmaster.internal/ubuntu plucky/main arm64 liblapack3 arm64 3.12.1-2 [2307 kB] 771s Get:61 http://ftpmaster.internal/ubuntu plucky/main arm64 liblapack-dev arm64 3.12.1-2 [4439 kB] 776s Get:62 http://ftpmaster.internal/ubuntu plucky/main arm64 liblerc4 arm64 4.0.0+ds-5ubuntu1 [167 kB] 776s Get:63 http://ftpmaster.internal/ubuntu plucky/main arm64 libncurses-dev arm64 6.5+20250216-2 [389 kB] 776s Get:64 http://ftpmaster.internal/ubuntu plucky/main arm64 libthai-data all 0.1.29-2build1 [158 kB] 776s Get:65 http://ftpmaster.internal/ubuntu plucky/main arm64 libthai0 arm64 0.1.29-2build1 [18.2 kB] 776s Get:66 http://ftpmaster.internal/ubuntu plucky/main arm64 libpango-1.0-0 arm64 1.56.1-1 [238 kB] 777s Get:67 http://ftpmaster.internal/ubuntu plucky/main arm64 libpangoft2-1.0-0 arm64 1.56.1-1 [49.6 kB] 777s Get:68 http://ftpmaster.internal/ubuntu plucky/main arm64 libpangocairo-1.0-0 arm64 1.56.1-1 [27.6 kB] 777s Get:69 http://ftpmaster.internal/ubuntu plucky/main arm64 libpaper2 arm64 2.2.5-0.3 [17.3 kB] 777s Get:70 http://ftpmaster.internal/ubuntu plucky/main arm64 libpaper-utils arm64 2.2.5-0.3 [15.4 kB] 777s Get:71 http://ftpmaster.internal/ubuntu plucky/main arm64 libpcre2-16-0 arm64 10.45-1 [222 kB] 777s Get:72 http://ftpmaster.internal/ubuntu plucky/main arm64 libpcre2-32-0 arm64 10.45-1 [210 kB] 777s Get:73 http://ftpmaster.internal/ubuntu plucky/main arm64 libpcre2-posix3 arm64 10.45-1 [7084 B] 777s Get:74 http://ftpmaster.internal/ubuntu plucky/main arm64 libpcre2-dev arm64 10.45-1 [768 kB] 778s Get:75 http://ftpmaster.internal/ubuntu plucky/main arm64 libpkgconf3 arm64 1.8.1-4 [31.4 kB] 778s Get:76 http://ftpmaster.internal/ubuntu plucky/main arm64 zlib1g-dev arm64 1:1.3.dfsg+really1.3.1-1ubuntu1 [894 kB] 779s Get:77 http://ftpmaster.internal/ubuntu plucky/main arm64 libpng-dev arm64 1.6.47-1 [269 kB] 779s Get:78 http://ftpmaster.internal/ubuntu plucky/main arm64 libreadline-dev arm64 8.2-6 [179 kB] 779s Get:79 http://ftpmaster.internal/ubuntu plucky/main arm64 libsharpyuv0 arm64 1.5.0-0.1 [16.9 kB] 779s Get:80 http://ftpmaster.internal/ubuntu plucky/main arm64 libsm6 arm64 2:1.2.4-1 [16.4 kB] 779s Get:81 http://ftpmaster.internal/ubuntu plucky/main arm64 libtcl8.6 arm64 8.6.16+dfsg-1 [987 kB] 780s Get:82 http://ftpmaster.internal/ubuntu plucky/main arm64 libjbig0 arm64 2.1-6.1ubuntu2 [29.3 kB] 780s Get:83 http://ftpmaster.internal/ubuntu plucky/main arm64 libwebp7 arm64 1.5.0-0.1 [194 kB] 780s Get:84 http://ftpmaster.internal/ubuntu plucky/main arm64 libtiff6 arm64 4.5.1+git230720-4ubuntu4 [193 kB] 781s Get:85 http://ftpmaster.internal/ubuntu plucky/main arm64 libxft2 arm64 2.3.6-1build1 [44.1 kB] 781s Get:86 http://ftpmaster.internal/ubuntu plucky/main arm64 libxss1 arm64 1:1.2.3-1build3 [7244 B] 781s Get:87 http://ftpmaster.internal/ubuntu plucky/main arm64 libtk8.6 arm64 8.6.16-1 [776 kB] 781s Get:88 http://ftpmaster.internal/ubuntu plucky/main arm64 libxt6t64 arm64 1:1.2.1-1.2build1 [168 kB] 782s Get:89 http://ftpmaster.internal/ubuntu plucky/main arm64 zip arm64 3.0-14ubuntu2 [173 kB] 782s Get:90 http://ftpmaster.internal/ubuntu plucky/main arm64 unzip arm64 6.0-28ubuntu6 [178 kB] 782s Get:91 http://ftpmaster.internal/ubuntu plucky/main arm64 xdg-utils all 1.2.1-2ubuntu1 [66.0 kB] 782s Get:92 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-base-core arm64 4.4.3-1 [28.4 MB] 807s Get:93 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-littler arm64 0.3.20-2 [96.1 kB] 807s Get:94 http://ftpmaster.internal/ubuntu plucky/universe arm64 littler all 0.3.20-2 [2554 B] 807s Get:95 http://ftpmaster.internal/ubuntu plucky/main arm64 liblzma-dev arm64 5.6.4-1 [180 kB] 807s Get:96 http://ftpmaster.internal/ubuntu plucky/main arm64 pkgconf-bin arm64 1.8.1-4 [20.9 kB] 807s Get:97 http://ftpmaster.internal/ubuntu plucky/main arm64 pkgconf arm64 1.8.1-4 [16.7 kB] 807s Get:98 http://ftpmaster.internal/ubuntu plucky/main arm64 libtirpc-dev arm64 1.3.4+ds-1.3 [201 kB] 808s Get:99 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-base-dev all 4.4.3-1 [4176 B] 808s Get:100 http://ftpmaster.internal/ubuntu plucky/universe arm64 pkg-r-autopkgtest all 20231212ubuntu1 [6448 B] 808s Get:101 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-boot all 1.3-31-1 [635 kB] 808s Get:102 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-brio arm64 1.1.5-1 [39.1 kB] 808s Get:103 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-ps arm64 1.9.0-1 [407 kB] 809s Get:104 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-r6 all 2.6.1-1 [101 kB] 809s Get:105 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-processx arm64 3.8.6-1 [363 kB] 809s Get:106 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-callr all 3.7.6-1 [458 kB] 810s Get:107 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-cli arm64 3.6.4-1 [1374 kB] 811s Get:108 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-crayon all 1.5.3-1 [165 kB] 811s Get:109 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-desc all 1.4.3-1 [359 kB] 811s Get:110 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-diffobj arm64 0.3.5-1 [1116 kB] 812s Get:111 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-digest arm64 0.6.37-1 [200 kB] 813s Get:112 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-evaluate all 1.0.3-1 [114 kB] 813s Get:113 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-fs arm64 1.6.5+dfsg-1 [244 kB] 813s Get:114 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-glue arm64 1.8.0-1 [163 kB] 813s Get:115 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-jsonlite arm64 1.9.1+dfsg-1 [445 kB] 813s Get:116 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-lattice arm64 0.22-6-1 [1363 kB] 814s Get:117 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-rlang arm64 1.1.5-1 [1707 kB] 816s Get:118 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-lifecycle all 1.0.4+dfsg-1 [110 kB] 816s Get:119 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-matrix arm64 1.7-3-1 [4045 kB] 819s Get:120 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-mass arm64 7.3-64-1 [1110 kB] 820s Get:121 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-nlme arm64 3.1.167-1 [2311 kB] 821s Get:122 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-pkgkitten all 0.2.4-1 [27.2 kB] 821s Get:123 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-rcpp arm64 1.0.14-1 [1978 kB] 823s Get:124 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-minqa arm64 1.2.8-1 [112 kB] 823s Get:125 http://ftpmaster.internal/ubuntu plucky/universe arm64 libnlopt0 arm64 2.7.1-6ubuntu3 [179 kB] 823s Get:126 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-nloptr arm64 2.1.1-1 [251 kB] 823s Get:127 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-rbibutils arm64 2.3-1 [1016 kB] 824s Get:128 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-rdpack all 2.6.2-1syncable1 [756 kB] 825s Get:129 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-reformulas all 0.4.0-1 [91.5 kB] 825s Get:130 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-rcppeigen arm64 0.3.4.0.2-1 [1422 kB] 826s Get:131 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-statmod arm64 1.5.0-1 [294 kB] 826s Get:132 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-lme4 arm64 1.1-36-1 [4108 kB] 828s Get:133 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-magrittr arm64 2.0.3-1 [154 kB] 829s Get:134 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-nnet arm64 7.3-20-1 [113 kB] 829s Get:135 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-numderiv all 2016.8-1.1-3 [115 kB] 829s Get:136 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-ucminf arm64 1.2.2-1 [35.8 kB] 829s Get:137 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-ordinal arm64 2023.12-4.1-1 [1268 kB] 830s Get:138 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-pkgbuild all 1.4.6-1 [213 kB] 830s Get:139 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-rprojroot all 2.0.4-2 [125 kB] 830s Get:140 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-withr all 3.0.2+dfsg-1 [214 kB] 830s Get:141 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-pkgload all 1.4.0-1 [247 kB] 830s Get:142 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-praise all 1.0.0-4build1 [20.3 kB] 830s Get:143 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-waldo all 0.6.1-2 [150 kB] 830s Get:144 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-testthat arm64 3.2.3-1 [1644 kB] 832s Get:145 http://ftpmaster.internal/ubuntu plucky/universe arm64 r-cran-xtable all 1:1.8-4-2 [689 kB] 833s Preconfiguring packages ... 833s Fetched 163 MB in 2min 43s (1002 kB/s) 833s Selecting previously unselected package libisl23:arm64. 833s (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 ... 81647 files and directories currently installed.) 833s Preparing to unpack .../000-libisl23_0.27-1_arm64.deb ... 833s Unpacking libisl23:arm64 (0.27-1) ... 833s Selecting previously unselected package libmpc3:arm64. 833s Preparing to unpack .../001-libmpc3_1.3.1-1build2_arm64.deb ... 833s Unpacking libmpc3:arm64 (1.3.1-1build2) ... 833s Selecting previously unselected package cpp-14-aarch64-linux-gnu. 833s Preparing to unpack .../002-cpp-14-aarch64-linux-gnu_14.2.0-17ubuntu3_arm64.deb ... 833s Unpacking cpp-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 833s Selecting previously unselected package cpp-14. 833s Preparing to unpack .../003-cpp-14_14.2.0-17ubuntu3_arm64.deb ... 833s Unpacking cpp-14 (14.2.0-17ubuntu3) ... 834s Selecting previously unselected package cpp-aarch64-linux-gnu. 834s Preparing to unpack .../004-cpp-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 834s Unpacking cpp-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 834s Selecting previously unselected package cpp. 834s Preparing to unpack .../005-cpp_4%3a14.2.0-1ubuntu1_arm64.deb ... 834s Unpacking cpp (4:14.2.0-1ubuntu1) ... 834s Selecting previously unselected package libcc1-0:arm64. 834s Preparing to unpack .../006-libcc1-0_15-20250222-0ubuntu1_arm64.deb ... 834s Unpacking libcc1-0:arm64 (15-20250222-0ubuntu1) ... 834s Selecting previously unselected package libgomp1:arm64. 834s Preparing to unpack .../007-libgomp1_15-20250222-0ubuntu1_arm64.deb ... 834s Unpacking libgomp1:arm64 (15-20250222-0ubuntu1) ... 834s Selecting previously unselected package libitm1:arm64. 834s Preparing to unpack .../008-libitm1_15-20250222-0ubuntu1_arm64.deb ... 834s Unpacking libitm1:arm64 (15-20250222-0ubuntu1) ... 834s Selecting previously unselected package libasan8:arm64. 834s Preparing to unpack .../009-libasan8_15-20250222-0ubuntu1_arm64.deb ... 834s Unpacking libasan8:arm64 (15-20250222-0ubuntu1) ... 834s Selecting previously unselected package liblsan0:arm64. 834s Preparing to unpack .../010-liblsan0_15-20250222-0ubuntu1_arm64.deb ... 834s Unpacking liblsan0:arm64 (15-20250222-0ubuntu1) ... 834s Selecting previously unselected package libtsan2:arm64. 834s Preparing to unpack .../011-libtsan2_15-20250222-0ubuntu1_arm64.deb ... 834s Unpacking libtsan2:arm64 (15-20250222-0ubuntu1) ... 834s Selecting previously unselected package libubsan1:arm64. 834s Preparing to unpack .../012-libubsan1_15-20250222-0ubuntu1_arm64.deb ... 834s Unpacking libubsan1:arm64 (15-20250222-0ubuntu1) ... 834s Selecting previously unselected package libhwasan0:arm64. 834s Preparing to unpack .../013-libhwasan0_15-20250222-0ubuntu1_arm64.deb ... 834s Unpacking libhwasan0:arm64 (15-20250222-0ubuntu1) ... 834s Selecting previously unselected package libgcc-14-dev:arm64. 834s Preparing to unpack .../014-libgcc-14-dev_14.2.0-17ubuntu3_arm64.deb ... 834s Unpacking libgcc-14-dev:arm64 (14.2.0-17ubuntu3) ... 834s Selecting previously unselected package gcc-14-aarch64-linux-gnu. 834s Preparing to unpack .../015-gcc-14-aarch64-linux-gnu_14.2.0-17ubuntu3_arm64.deb ... 834s Unpacking gcc-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 835s Selecting previously unselected package gcc-14. 835s Preparing to unpack .../016-gcc-14_14.2.0-17ubuntu3_arm64.deb ... 835s Unpacking gcc-14 (14.2.0-17ubuntu3) ... 835s Selecting previously unselected package gcc-aarch64-linux-gnu. 835s Preparing to unpack .../017-gcc-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 835s Unpacking gcc-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 835s Selecting previously unselected package gcc. 835s Preparing to unpack .../018-gcc_4%3a14.2.0-1ubuntu1_arm64.deb ... 835s Unpacking gcc (4:14.2.0-1ubuntu1) ... 835s Selecting previously unselected package libstdc++-14-dev:arm64. 835s Preparing to unpack .../019-libstdc++-14-dev_14.2.0-17ubuntu3_arm64.deb ... 835s Unpacking libstdc++-14-dev:arm64 (14.2.0-17ubuntu3) ... 835s Selecting previously unselected package g++-14-aarch64-linux-gnu. 835s Preparing to unpack .../020-g++-14-aarch64-linux-gnu_14.2.0-17ubuntu3_arm64.deb ... 835s Unpacking g++-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 835s Selecting previously unselected package g++-14. 835s Preparing to unpack .../021-g++-14_14.2.0-17ubuntu3_arm64.deb ... 835s Unpacking g++-14 (14.2.0-17ubuntu3) ... 835s Selecting previously unselected package g++-aarch64-linux-gnu. 835s Preparing to unpack .../022-g++-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 835s Unpacking g++-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 836s Selecting previously unselected package g++. 836s Preparing to unpack .../023-g++_4%3a14.2.0-1ubuntu1_arm64.deb ... 836s Unpacking g++ (4:14.2.0-1ubuntu1) ... 836s Selecting previously unselected package build-essential. 836s Preparing to unpack .../024-build-essential_12.10ubuntu1_arm64.deb ... 836s Unpacking build-essential (12.10ubuntu1) ... 836s Selecting previously unselected package dctrl-tools. 836s Preparing to unpack .../025-dctrl-tools_2.24-3build3_arm64.deb ... 836s Unpacking dctrl-tools (2.24-3build3) ... 836s Selecting previously unselected package fonts-dejavu-mono. 836s Preparing to unpack .../026-fonts-dejavu-mono_2.37-8_all.deb ... 836s Unpacking fonts-dejavu-mono (2.37-8) ... 836s Selecting previously unselected package fonts-dejavu-core. 836s Preparing to unpack .../027-fonts-dejavu-core_2.37-8_all.deb ... 836s Unpacking fonts-dejavu-core (2.37-8) ... 836s Selecting previously unselected package fontconfig-config. 836s Preparing to unpack .../028-fontconfig-config_2.15.0-2ubuntu1_arm64.deb ... 836s Unpacking fontconfig-config (2.15.0-2ubuntu1) ... 836s Selecting previously unselected package libfontconfig1:arm64. 836s Preparing to unpack .../029-libfontconfig1_2.15.0-2ubuntu1_arm64.deb ... 836s Unpacking libfontconfig1:arm64 (2.15.0-2ubuntu1) ... 836s Selecting previously unselected package fontconfig. 836s Preparing to unpack .../030-fontconfig_2.15.0-2ubuntu1_arm64.deb ... 836s Unpacking fontconfig (2.15.0-2ubuntu1) ... 836s Selecting previously unselected package libgfortran5:arm64. 836s Preparing to unpack .../031-libgfortran5_15-20250222-0ubuntu1_arm64.deb ... 836s Unpacking libgfortran5:arm64 (15-20250222-0ubuntu1) ... 836s Selecting previously unselected package libgfortran-14-dev:arm64. 836s Preparing to unpack .../032-libgfortran-14-dev_14.2.0-17ubuntu3_arm64.deb ... 836s Unpacking libgfortran-14-dev:arm64 (14.2.0-17ubuntu3) ... 836s Selecting previously unselected package gfortran-14-aarch64-linux-gnu. 836s Preparing to unpack .../033-gfortran-14-aarch64-linux-gnu_14.2.0-17ubuntu3_arm64.deb ... 836s Unpacking gfortran-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 837s Selecting previously unselected package gfortran-14. 837s Preparing to unpack .../034-gfortran-14_14.2.0-17ubuntu3_arm64.deb ... 837s Unpacking gfortran-14 (14.2.0-17ubuntu3) ... 837s Selecting previously unselected package gfortran-aarch64-linux-gnu. 837s Preparing to unpack .../035-gfortran-aarch64-linux-gnu_4%3a14.2.0-1ubuntu1_arm64.deb ... 837s Unpacking gfortran-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 837s Selecting previously unselected package gfortran. 837s Preparing to unpack .../036-gfortran_4%3a14.2.0-1ubuntu1_arm64.deb ... 837s Unpacking gfortran (4:14.2.0-1ubuntu1) ... 837s Selecting previously unselected package icu-devtools. 837s Preparing to unpack .../037-icu-devtools_76.1-1ubuntu2_arm64.deb ... 837s Unpacking icu-devtools (76.1-1ubuntu2) ... 837s Selecting previously unselected package libblas3:arm64. 837s Preparing to unpack .../038-libblas3_3.12.1-2_arm64.deb ... 837s Unpacking libblas3:arm64 (3.12.1-2) ... 837s Selecting previously unselected package libblas-dev:arm64. 837s Preparing to unpack .../039-libblas-dev_3.12.1-2_arm64.deb ... 837s Unpacking libblas-dev:arm64 (3.12.1-2) ... 837s Selecting previously unselected package libbz2-dev:arm64. 837s Preparing to unpack .../040-libbz2-dev_1.0.8-6_arm64.deb ... 837s Unpacking libbz2-dev:arm64 (1.0.8-6) ... 837s Selecting previously unselected package libpixman-1-0:arm64. 837s Preparing to unpack .../041-libpixman-1-0_0.44.0-3_arm64.deb ... 837s Unpacking libpixman-1-0:arm64 (0.44.0-3) ... 837s Selecting previously unselected package libxcb-render0:arm64. 837s Preparing to unpack .../042-libxcb-render0_1.17.0-2_arm64.deb ... 837s Unpacking libxcb-render0:arm64 (1.17.0-2) ... 837s Selecting previously unselected package libxcb-shm0:arm64. 837s Preparing to unpack .../043-libxcb-shm0_1.17.0-2_arm64.deb ... 837s Unpacking libxcb-shm0:arm64 (1.17.0-2) ... 837s Selecting previously unselected package libxrender1:arm64. 837s Preparing to unpack .../044-libxrender1_1%3a0.9.10-1.1build1_arm64.deb ... 837s Unpacking libxrender1:arm64 (1:0.9.10-1.1build1) ... 837s Selecting previously unselected package libcairo2:arm64. 837s Preparing to unpack .../045-libcairo2_1.18.2-2_arm64.deb ... 837s Unpacking libcairo2:arm64 (1.18.2-2) ... 837s Selecting previously unselected package libdatrie1:arm64. 837s Preparing to unpack .../046-libdatrie1_0.2.13-3build1_arm64.deb ... 837s Unpacking libdatrie1:arm64 (0.2.13-3build1) ... 837s Selecting previously unselected package libdeflate0:arm64. 837s Preparing to unpack .../047-libdeflate0_1.23-1_arm64.deb ... 837s Unpacking libdeflate0:arm64 (1.23-1) ... 837s Selecting previously unselected package libdeflate-dev:arm64. 837s Preparing to unpack .../048-libdeflate-dev_1.23-1_arm64.deb ... 837s Unpacking libdeflate-dev:arm64 (1.23-1) ... 837s Selecting previously unselected package libgraphite2-3:arm64. 838s Preparing to unpack .../049-libgraphite2-3_1.3.14-2ubuntu1_arm64.deb ... 838s Unpacking libgraphite2-3:arm64 (1.3.14-2ubuntu1) ... 838s Selecting previously unselected package libharfbuzz0b:arm64. 838s Preparing to unpack .../050-libharfbuzz0b_10.2.0-1_arm64.deb ... 838s Unpacking libharfbuzz0b:arm64 (10.2.0-1) ... 838s Selecting previously unselected package x11-common. 838s Preparing to unpack .../051-x11-common_1%3a7.7+23ubuntu3_all.deb ... 838s Unpacking x11-common (1:7.7+23ubuntu3) ... 838s Selecting previously unselected package libice6:arm64. 838s Preparing to unpack .../052-libice6_2%3a1.1.1-1_arm64.deb ... 838s Unpacking libice6:arm64 (2:1.1.1-1) ... 838s Selecting previously unselected package libicu-dev:arm64. 838s Preparing to unpack .../053-libicu-dev_76.1-1ubuntu2_arm64.deb ... 838s Unpacking libicu-dev:arm64 (76.1-1ubuntu2) ... 838s Selecting previously unselected package libjpeg-turbo8:arm64. 838s Preparing to unpack .../054-libjpeg-turbo8_2.1.5-3ubuntu2_arm64.deb ... 838s Unpacking libjpeg-turbo8:arm64 (2.1.5-3ubuntu2) ... 838s Selecting previously unselected package libjpeg-turbo8-dev:arm64. 838s Preparing to unpack .../055-libjpeg-turbo8-dev_2.1.5-3ubuntu2_arm64.deb ... 838s Unpacking libjpeg-turbo8-dev:arm64 (2.1.5-3ubuntu2) ... 838s Selecting previously unselected package libjpeg8:arm64. 838s Preparing to unpack .../056-libjpeg8_8c-2ubuntu11_arm64.deb ... 838s Unpacking libjpeg8:arm64 (8c-2ubuntu11) ... 838s Selecting previously unselected package libjpeg8-dev:arm64. 838s Preparing to unpack .../057-libjpeg8-dev_8c-2ubuntu11_arm64.deb ... 838s Unpacking libjpeg8-dev:arm64 (8c-2ubuntu11) ... 838s Selecting previously unselected package libjpeg-dev:arm64. 838s Preparing to unpack .../058-libjpeg-dev_8c-2ubuntu11_arm64.deb ... 838s Unpacking libjpeg-dev:arm64 (8c-2ubuntu11) ... 838s Selecting previously unselected package liblapack3:arm64. 838s Preparing to unpack .../059-liblapack3_3.12.1-2_arm64.deb ... 838s Unpacking liblapack3:arm64 (3.12.1-2) ... 838s Selecting previously unselected package liblapack-dev:arm64. 838s Preparing to unpack .../060-liblapack-dev_3.12.1-2_arm64.deb ... 838s Unpacking liblapack-dev:arm64 (3.12.1-2) ... 839s Selecting previously unselected package liblerc4:arm64. 839s Preparing to unpack .../061-liblerc4_4.0.0+ds-5ubuntu1_arm64.deb ... 839s Unpacking liblerc4:arm64 (4.0.0+ds-5ubuntu1) ... 839s Selecting previously unselected package libncurses-dev:arm64. 839s Preparing to unpack .../062-libncurses-dev_6.5+20250216-2_arm64.deb ... 839s Unpacking libncurses-dev:arm64 (6.5+20250216-2) ... 839s Selecting previously unselected package libthai-data. 839s Preparing to unpack .../063-libthai-data_0.1.29-2build1_all.deb ... 839s Unpacking libthai-data (0.1.29-2build1) ... 839s Selecting previously unselected package libthai0:arm64. 839s Preparing to unpack .../064-libthai0_0.1.29-2build1_arm64.deb ... 839s Unpacking libthai0:arm64 (0.1.29-2build1) ... 839s Selecting previously unselected package libpango-1.0-0:arm64. 839s Preparing to unpack .../065-libpango-1.0-0_1.56.1-1_arm64.deb ... 839s Unpacking libpango-1.0-0:arm64 (1.56.1-1) ... 839s Selecting previously unselected package libpangoft2-1.0-0:arm64. 839s Preparing to unpack .../066-libpangoft2-1.0-0_1.56.1-1_arm64.deb ... 839s Unpacking libpangoft2-1.0-0:arm64 (1.56.1-1) ... 839s Selecting previously unselected package libpangocairo-1.0-0:arm64. 839s Preparing to unpack .../067-libpangocairo-1.0-0_1.56.1-1_arm64.deb ... 839s Unpacking libpangocairo-1.0-0:arm64 (1.56.1-1) ... 839s Selecting previously unselected package libpaper2:arm64. 839s Preparing to unpack .../068-libpaper2_2.2.5-0.3_arm64.deb ... 839s Unpacking libpaper2:arm64 (2.2.5-0.3) ... 839s Selecting previously unselected package libpaper-utils. 839s Preparing to unpack .../069-libpaper-utils_2.2.5-0.3_arm64.deb ... 839s Unpacking libpaper-utils (2.2.5-0.3) ... 839s Selecting previously unselected package libpcre2-16-0:arm64. 839s Preparing to unpack .../070-libpcre2-16-0_10.45-1_arm64.deb ... 839s Unpacking libpcre2-16-0:arm64 (10.45-1) ... 839s Selecting previously unselected package libpcre2-32-0:arm64. 839s Preparing to unpack .../071-libpcre2-32-0_10.45-1_arm64.deb ... 839s Unpacking libpcre2-32-0:arm64 (10.45-1) ... 839s Selecting previously unselected package libpcre2-posix3:arm64. 839s Preparing to unpack .../072-libpcre2-posix3_10.45-1_arm64.deb ... 839s Unpacking libpcre2-posix3:arm64 (10.45-1) ... 839s Selecting previously unselected package libpcre2-dev:arm64. 839s Preparing to unpack .../073-libpcre2-dev_10.45-1_arm64.deb ... 839s Unpacking libpcre2-dev:arm64 (10.45-1) ... 839s Selecting previously unselected package libpkgconf3:arm64. 839s Preparing to unpack .../074-libpkgconf3_1.8.1-4_arm64.deb ... 839s Unpacking libpkgconf3:arm64 (1.8.1-4) ... 839s Selecting previously unselected package zlib1g-dev:arm64. 839s Preparing to unpack .../075-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_arm64.deb ... 839s Unpacking zlib1g-dev:arm64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 840s Selecting previously unselected package libpng-dev:arm64. 840s Preparing to unpack .../076-libpng-dev_1.6.47-1_arm64.deb ... 840s Unpacking libpng-dev:arm64 (1.6.47-1) ... 840s Selecting previously unselected package libreadline-dev:arm64. 840s Preparing to unpack .../077-libreadline-dev_8.2-6_arm64.deb ... 840s Unpacking libreadline-dev:arm64 (8.2-6) ... 840s Selecting previously unselected package libsharpyuv0:arm64. 840s Preparing to unpack .../078-libsharpyuv0_1.5.0-0.1_arm64.deb ... 840s Unpacking libsharpyuv0:arm64 (1.5.0-0.1) ... 840s Selecting previously unselected package libsm6:arm64. 840s Preparing to unpack .../079-libsm6_2%3a1.2.4-1_arm64.deb ... 840s Unpacking libsm6:arm64 (2:1.2.4-1) ... 840s Selecting previously unselected package libtcl8.6:arm64. 840s Preparing to unpack .../080-libtcl8.6_8.6.16+dfsg-1_arm64.deb ... 840s Unpacking libtcl8.6:arm64 (8.6.16+dfsg-1) ... 840s Selecting previously unselected package libjbig0:arm64. 840s Preparing to unpack .../081-libjbig0_2.1-6.1ubuntu2_arm64.deb ... 840s Unpacking libjbig0:arm64 (2.1-6.1ubuntu2) ... 840s Selecting previously unselected package libwebp7:arm64. 840s Preparing to unpack .../082-libwebp7_1.5.0-0.1_arm64.deb ... 840s Unpacking libwebp7:arm64 (1.5.0-0.1) ... 840s Selecting previously unselected package libtiff6:arm64. 840s Preparing to unpack .../083-libtiff6_4.5.1+git230720-4ubuntu4_arm64.deb ... 840s Unpacking libtiff6:arm64 (4.5.1+git230720-4ubuntu4) ... 840s Selecting previously unselected package libxft2:arm64. 840s Preparing to unpack .../084-libxft2_2.3.6-1build1_arm64.deb ... 840s Unpacking libxft2:arm64 (2.3.6-1build1) ... 840s Selecting previously unselected package libxss1:arm64. 840s Preparing to unpack .../085-libxss1_1%3a1.2.3-1build3_arm64.deb ... 840s Unpacking libxss1:arm64 (1:1.2.3-1build3) ... 840s Selecting previously unselected package libtk8.6:arm64. 840s Preparing to unpack .../086-libtk8.6_8.6.16-1_arm64.deb ... 840s Unpacking libtk8.6:arm64 (8.6.16-1) ... 840s Selecting previously unselected package libxt6t64:arm64. 840s Preparing to unpack .../087-libxt6t64_1%3a1.2.1-1.2build1_arm64.deb ... 840s Unpacking libxt6t64:arm64 (1:1.2.1-1.2build1) ... 840s Selecting previously unselected package zip. 840s Preparing to unpack .../088-zip_3.0-14ubuntu2_arm64.deb ... 840s Unpacking zip (3.0-14ubuntu2) ... 840s Selecting previously unselected package unzip. 840s Preparing to unpack .../089-unzip_6.0-28ubuntu6_arm64.deb ... 840s Unpacking unzip (6.0-28ubuntu6) ... 840s Selecting previously unselected package xdg-utils. 841s Preparing to unpack .../090-xdg-utils_1.2.1-2ubuntu1_all.deb ... 841s Unpacking xdg-utils (1.2.1-2ubuntu1) ... 841s Selecting previously unselected package r-base-core. 841s Preparing to unpack .../091-r-base-core_4.4.3-1_arm64.deb ... 841s Unpacking r-base-core (4.4.3-1) ... 841s Selecting previously unselected package r-cran-littler. 841s Preparing to unpack .../092-r-cran-littler_0.3.20-2_arm64.deb ... 841s Unpacking r-cran-littler (0.3.20-2) ... 841s Selecting previously unselected package littler. 841s Preparing to unpack .../093-littler_0.3.20-2_all.deb ... 841s Unpacking littler (0.3.20-2) ... 841s Selecting previously unselected package liblzma-dev:arm64. 841s Preparing to unpack .../094-liblzma-dev_5.6.4-1_arm64.deb ... 841s Unpacking liblzma-dev:arm64 (5.6.4-1) ... 841s Selecting previously unselected package pkgconf-bin. 841s Preparing to unpack .../095-pkgconf-bin_1.8.1-4_arm64.deb ... 841s Unpacking pkgconf-bin (1.8.1-4) ... 841s Selecting previously unselected package pkgconf:arm64. 841s Preparing to unpack .../096-pkgconf_1.8.1-4_arm64.deb ... 841s Unpacking pkgconf:arm64 (1.8.1-4) ... 841s Selecting previously unselected package libtirpc-dev:arm64. 841s Preparing to unpack .../097-libtirpc-dev_1.3.4+ds-1.3_arm64.deb ... 841s Unpacking libtirpc-dev:arm64 (1.3.4+ds-1.3) ... 841s Selecting previously unselected package r-base-dev. 841s Preparing to unpack .../098-r-base-dev_4.4.3-1_all.deb ... 841s Unpacking r-base-dev (4.4.3-1) ... 841s Selecting previously unselected package pkg-r-autopkgtest. 841s Preparing to unpack .../099-pkg-r-autopkgtest_20231212ubuntu1_all.deb ... 841s Unpacking pkg-r-autopkgtest (20231212ubuntu1) ... 841s Selecting previously unselected package r-cran-boot. 841s Preparing to unpack .../100-r-cran-boot_1.3-31-1_all.deb ... 841s Unpacking r-cran-boot (1.3-31-1) ... 841s Selecting previously unselected package r-cran-brio. 841s Preparing to unpack .../101-r-cran-brio_1.1.5-1_arm64.deb ... 841s Unpacking r-cran-brio (1.1.5-1) ... 841s Selecting previously unselected package r-cran-ps. 841s Preparing to unpack .../102-r-cran-ps_1.9.0-1_arm64.deb ... 841s Unpacking r-cran-ps (1.9.0-1) ... 841s Selecting previously unselected package r-cran-r6. 841s Preparing to unpack .../103-r-cran-r6_2.6.1-1_all.deb ... 841s Unpacking r-cran-r6 (2.6.1-1) ... 841s Selecting previously unselected package r-cran-processx. 842s Preparing to unpack .../104-r-cran-processx_3.8.6-1_arm64.deb ... 842s Unpacking r-cran-processx (3.8.6-1) ... 842s Selecting previously unselected package r-cran-callr. 842s Preparing to unpack .../105-r-cran-callr_3.7.6-1_all.deb ... 842s Unpacking r-cran-callr (3.7.6-1) ... 842s Selecting previously unselected package r-cran-cli. 842s Preparing to unpack .../106-r-cran-cli_3.6.4-1_arm64.deb ... 842s Unpacking r-cran-cli (3.6.4-1) ... 842s Selecting previously unselected package r-cran-crayon. 842s Preparing to unpack .../107-r-cran-crayon_1.5.3-1_all.deb ... 842s Unpacking r-cran-crayon (1.5.3-1) ... 842s Selecting previously unselected package r-cran-desc. 842s Preparing to unpack .../108-r-cran-desc_1.4.3-1_all.deb ... 842s Unpacking r-cran-desc (1.4.3-1) ... 842s Selecting previously unselected package r-cran-diffobj. 842s Preparing to unpack .../109-r-cran-diffobj_0.3.5-1_arm64.deb ... 842s Unpacking r-cran-diffobj (0.3.5-1) ... 842s Selecting previously unselected package r-cran-digest. 842s Preparing to unpack .../110-r-cran-digest_0.6.37-1_arm64.deb ... 842s Unpacking r-cran-digest (0.6.37-1) ... 842s Selecting previously unselected package r-cran-evaluate. 842s Preparing to unpack .../111-r-cran-evaluate_1.0.3-1_all.deb ... 842s Unpacking r-cran-evaluate (1.0.3-1) ... 842s Selecting previously unselected package r-cran-fs. 842s Preparing to unpack .../112-r-cran-fs_1.6.5+dfsg-1_arm64.deb ... 842s Unpacking r-cran-fs (1.6.5+dfsg-1) ... 842s Selecting previously unselected package r-cran-glue. 842s Preparing to unpack .../113-r-cran-glue_1.8.0-1_arm64.deb ... 842s Unpacking r-cran-glue (1.8.0-1) ... 842s Selecting previously unselected package r-cran-jsonlite. 842s Preparing to unpack .../114-r-cran-jsonlite_1.9.1+dfsg-1_arm64.deb ... 842s Unpacking r-cran-jsonlite (1.9.1+dfsg-1) ... 842s Selecting previously unselected package r-cran-lattice. 842s Preparing to unpack .../115-r-cran-lattice_0.22-6-1_arm64.deb ... 842s Unpacking r-cran-lattice (0.22-6-1) ... 842s Selecting previously unselected package r-cran-rlang. 842s Preparing to unpack .../116-r-cran-rlang_1.1.5-1_arm64.deb ... 842s Unpacking r-cran-rlang (1.1.5-1) ... 842s Selecting previously unselected package r-cran-lifecycle. 842s Preparing to unpack .../117-r-cran-lifecycle_1.0.4+dfsg-1_all.deb ... 842s Unpacking r-cran-lifecycle (1.0.4+dfsg-1) ... 842s Selecting previously unselected package r-cran-matrix. 842s Preparing to unpack .../118-r-cran-matrix_1.7-3-1_arm64.deb ... 842s Unpacking r-cran-matrix (1.7-3-1) ... 842s Selecting previously unselected package r-cran-mass. 843s Preparing to unpack .../119-r-cran-mass_7.3-64-1_arm64.deb ... 843s Unpacking r-cran-mass (7.3-64-1) ... 843s Selecting previously unselected package r-cran-nlme. 843s Preparing to unpack .../120-r-cran-nlme_3.1.167-1_arm64.deb ... 843s Unpacking r-cran-nlme (3.1.167-1) ... 843s Selecting previously unselected package r-cran-pkgkitten. 843s Preparing to unpack .../121-r-cran-pkgkitten_0.2.4-1_all.deb ... 843s Unpacking r-cran-pkgkitten (0.2.4-1) ... 843s Selecting previously unselected package r-cran-rcpp. 843s Preparing to unpack .../122-r-cran-rcpp_1.0.14-1_arm64.deb ... 843s Unpacking r-cran-rcpp (1.0.14-1) ... 843s Selecting previously unselected package r-cran-minqa. 843s Preparing to unpack .../123-r-cran-minqa_1.2.8-1_arm64.deb ... 843s Unpacking r-cran-minqa (1.2.8-1) ... 843s Selecting previously unselected package libnlopt0:arm64. 843s Preparing to unpack .../124-libnlopt0_2.7.1-6ubuntu3_arm64.deb ... 843s Unpacking libnlopt0:arm64 (2.7.1-6ubuntu3) ... 843s Selecting previously unselected package r-cran-nloptr. 843s Preparing to unpack .../125-r-cran-nloptr_2.1.1-1_arm64.deb ... 843s Unpacking r-cran-nloptr (2.1.1-1) ... 843s Selecting previously unselected package r-cran-rbibutils. 843s Preparing to unpack .../126-r-cran-rbibutils_2.3-1_arm64.deb ... 843s Unpacking r-cran-rbibutils (2.3-1) ... 843s Selecting previously unselected package r-cran-rdpack. 843s Preparing to unpack .../127-r-cran-rdpack_2.6.2-1syncable1_all.deb ... 843s Unpacking r-cran-rdpack (2.6.2-1syncable1) ... 843s Selecting previously unselected package r-cran-reformulas. 843s Preparing to unpack .../128-r-cran-reformulas_0.4.0-1_all.deb ... 843s Unpacking r-cran-reformulas (0.4.0-1) ... 843s Selecting previously unselected package r-cran-rcppeigen. 843s Preparing to unpack .../129-r-cran-rcppeigen_0.3.4.0.2-1_arm64.deb ... 843s Unpacking r-cran-rcppeigen (0.3.4.0.2-1) ... 843s Selecting previously unselected package r-cran-statmod. 843s Preparing to unpack .../130-r-cran-statmod_1.5.0-1_arm64.deb ... 843s Unpacking r-cran-statmod (1.5.0-1) ... 843s Selecting previously unselected package r-cran-lme4. 843s Preparing to unpack .../131-r-cran-lme4_1.1-36-1_arm64.deb ... 843s Unpacking r-cran-lme4 (1.1-36-1) ... 844s Selecting previously unselected package r-cran-magrittr. 844s Preparing to unpack .../132-r-cran-magrittr_2.0.3-1_arm64.deb ... 844s Unpacking r-cran-magrittr (2.0.3-1) ... 844s Selecting previously unselected package r-cran-nnet. 844s Preparing to unpack .../133-r-cran-nnet_7.3-20-1_arm64.deb ... 844s Unpacking r-cran-nnet (7.3-20-1) ... 844s Selecting previously unselected package r-cran-numderiv. 844s Preparing to unpack .../134-r-cran-numderiv_2016.8-1.1-3_all.deb ... 844s Unpacking r-cran-numderiv (2016.8-1.1-3) ... 844s Selecting previously unselected package r-cran-ucminf. 844s Preparing to unpack .../135-r-cran-ucminf_1.2.2-1_arm64.deb ... 844s Unpacking r-cran-ucminf (1.2.2-1) ... 844s Selecting previously unselected package r-cran-ordinal. 844s Preparing to unpack .../136-r-cran-ordinal_2023.12-4.1-1_arm64.deb ... 844s Unpacking r-cran-ordinal (2023.12-4.1-1) ... 844s Selecting previously unselected package r-cran-pkgbuild. 844s Preparing to unpack .../137-r-cran-pkgbuild_1.4.6-1_all.deb ... 844s Unpacking r-cran-pkgbuild (1.4.6-1) ... 844s Selecting previously unselected package r-cran-rprojroot. 844s Preparing to unpack .../138-r-cran-rprojroot_2.0.4-2_all.deb ... 844s Unpacking r-cran-rprojroot (2.0.4-2) ... 844s Selecting previously unselected package r-cran-withr. 844s Preparing to unpack .../139-r-cran-withr_3.0.2+dfsg-1_all.deb ... 844s Unpacking r-cran-withr (3.0.2+dfsg-1) ... 844s Selecting previously unselected package r-cran-pkgload. 844s Preparing to unpack .../140-r-cran-pkgload_1.4.0-1_all.deb ... 844s Unpacking r-cran-pkgload (1.4.0-1) ... 844s Selecting previously unselected package r-cran-praise. 844s Preparing to unpack .../141-r-cran-praise_1.0.0-4build1_all.deb ... 844s Unpacking r-cran-praise (1.0.0-4build1) ... 844s Selecting previously unselected package r-cran-waldo. 844s Preparing to unpack .../142-r-cran-waldo_0.6.1-2_all.deb ... 844s Unpacking r-cran-waldo (0.6.1-2) ... 844s Selecting previously unselected package r-cran-testthat. 844s Preparing to unpack .../143-r-cran-testthat_3.2.3-1_arm64.deb ... 844s Unpacking r-cran-testthat (3.2.3-1) ... 844s Selecting previously unselected package r-cran-xtable. 844s Preparing to unpack .../144-r-cran-xtable_1%3a1.8-4-2_all.deb ... 844s Unpacking r-cran-xtable (1:1.8-4-2) ... 844s Setting up libgraphite2-3:arm64 (1.3.14-2ubuntu1) ... 844s Setting up libpixman-1-0:arm64 (0.44.0-3) ... 844s Setting up libsharpyuv0:arm64 (1.5.0-0.1) ... 844s Setting up libncurses-dev:arm64 (6.5+20250216-2) ... 844s Setting up liblerc4:arm64 (4.0.0+ds-5ubuntu1) ... 844s Setting up libxrender1:arm64 (1:0.9.10-1.1build1) ... 844s Setting up libdatrie1:arm64 (0.2.13-3build1) ... 844s Setting up libxcb-render0:arm64 (1.17.0-2) ... 844s Setting up unzip (6.0-28ubuntu6) ... 844s Setting up x11-common (1:7.7+23ubuntu3) ... 845s Setting up libdeflate0:arm64 (1.23-1) ... 845s Setting up libnlopt0:arm64 (2.7.1-6ubuntu3) ... 845s Setting up libxcb-shm0:arm64 (1.17.0-2) ... 845s Setting up libreadline-dev:arm64 (8.2-6) ... 845s Setting up libgomp1:arm64 (15-20250222-0ubuntu1) ... 845s Setting up libjbig0:arm64 (2.1-6.1ubuntu2) ... 845s Setting up libpcre2-16-0:arm64 (10.45-1) ... 845s Setting up zip (3.0-14ubuntu2) ... 845s Setting up libpcre2-32-0:arm64 (10.45-1) ... 845s Setting up libblas3:arm64 (3.12.1-2) ... 845s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/aarch64-linux-gnu/libblas.so.3 (libblas.so.3-aarch64-linux-gnu) in auto mode 845s Setting up libtirpc-dev:arm64 (1.3.4+ds-1.3) ... 845s Setting up libpkgconf3:arm64 (1.8.1-4) ... 845s Setting up fonts-dejavu-mono (2.37-8) ... 845s Setting up libmpc3:arm64 (1.3.1-1build2) ... 845s Setting up libtcl8.6:arm64 (8.6.16+dfsg-1) ... 845s Setting up icu-devtools (76.1-1ubuntu2) ... 845s Setting up fonts-dejavu-core (2.37-8) ... 845s Setting up pkgconf-bin (1.8.1-4) ... 845s Setting up libjpeg-turbo8:arm64 (2.1.5-3ubuntu2) ... 845s Setting up libgfortran5:arm64 (15-20250222-0ubuntu1) ... 845s Setting up libwebp7:arm64 (1.5.0-0.1) ... 845s Setting up liblzma-dev:arm64 (5.6.4-1) ... 845s Setting up libubsan1:arm64 (15-20250222-0ubuntu1) ... 845s Setting up zlib1g-dev:arm64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 845s Setting up libpcre2-posix3:arm64 (10.45-1) ... 845s Setting up libhwasan0:arm64 (15-20250222-0ubuntu1) ... 845s Setting up libasan8:arm64 (15-20250222-0ubuntu1) ... 845s Setting up libharfbuzz0b:arm64 (10.2.0-1) ... 845s Setting up libthai-data (0.1.29-2build1) ... 845s Setting up libxss1:arm64 (1:1.2.3-1build3) ... 845s Setting up libpaper2:arm64 (2.2.5-0.3) ... 845s Setting up libtsan2:arm64 (15-20250222-0ubuntu1) ... 845s Setting up libisl23:arm64 (0.27-1) ... 845s Setting up libdeflate-dev:arm64 (1.23-1) ... 845s Setting up libicu-dev:arm64 (76.1-1ubuntu2) ... 845s Setting up xdg-utils (1.2.1-2ubuntu1) ... 845s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 845s Setting up libcc1-0:arm64 (15-20250222-0ubuntu1) ... 845s Setting up liblsan0:arm64 (15-20250222-0ubuntu1) ... 845s Setting up libblas-dev:arm64 (3.12.1-2) ... 845s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so to provide /usr/lib/aarch64-linux-gnu/libblas.so (libblas.so-aarch64-linux-gnu) in auto mode 845s Setting up dctrl-tools (2.24-3build3) ... 845s Setting up libitm1:arm64 (15-20250222-0ubuntu1) ... 845s Setting up libbz2-dev:arm64 (1.0.8-6) ... 845s Setting up libjpeg8:arm64 (8c-2ubuntu11) ... 845s Setting up libice6:arm64 (2:1.1.1-1) ... 845s Setting up libjpeg-turbo8-dev:arm64 (2.1.5-3ubuntu2) ... 845s Setting up liblapack3:arm64 (3.12.1-2) ... 845s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/aarch64-linux-gnu/liblapack.so.3 (liblapack.so.3-aarch64-linux-gnu) in auto mode 845s Setting up libpcre2-dev:arm64 (10.45-1) ... 845s Setting up fontconfig-config (2.15.0-2ubuntu1) ... 845s Setting up libpng-dev:arm64 (1.6.47-1) ... 845s Setting up libpaper-utils (2.2.5-0.3) ... 845s Setting up pkgconf:arm64 (1.8.1-4) ... 845s Setting up libthai0:arm64 (0.1.29-2build1) ... 845s Setting up liblapack-dev:arm64 (3.12.1-2) ... 845s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so to provide /usr/lib/aarch64-linux-gnu/liblapack.so (liblapack.so-aarch64-linux-gnu) in auto mode 845s Setting up cpp-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 845s Setting up libtiff6:arm64 (4.5.1+git230720-4ubuntu4) ... 845s Setting up libfontconfig1:arm64 (2.15.0-2ubuntu1) ... 845s Setting up libgcc-14-dev:arm64 (14.2.0-17ubuntu3) ... 845s Setting up libjpeg8-dev:arm64 (8c-2ubuntu11) ... 845s Setting up libstdc++-14-dev:arm64 (14.2.0-17ubuntu3) ... 845s Setting up libsm6:arm64 (2:1.2.4-1) ... 845s Setting up libgfortran-14-dev:arm64 (14.2.0-17ubuntu3) ... 845s Setting up fontconfig (2.15.0-2ubuntu1) ... 847s Regenerating fonts cache... done. 847s Setting up libxft2:arm64 (2.3.6-1build1) ... 847s Setting up libtk8.6:arm64 (8.6.16-1) ... 847s Setting up libpango-1.0-0:arm64 (1.56.1-1) ... 848s Setting up libjpeg-dev:arm64 (8c-2ubuntu11) ... 848s Setting up libcairo2:arm64 (1.18.2-2) ... 848s Setting up cpp-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 848s Setting up libxt6t64:arm64 (1:1.2.1-1.2build1) ... 848s Setting up cpp-14 (14.2.0-17ubuntu3) ... 848s Setting up cpp (4:14.2.0-1ubuntu1) ... 848s Setting up gcc-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 848s Setting up libpangoft2-1.0-0:arm64 (1.56.1-1) ... 848s Setting up libpangocairo-1.0-0:arm64 (1.56.1-1) ... 848s Setting up gcc-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 848s Setting up g++-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 848s Setting up gcc-14 (14.2.0-17ubuntu3) ... 848s Setting up r-base-core (4.4.3-1) ... 848s Creating config file /etc/R/Renviron with new version 848s Setting up r-cran-crayon (1.5.3-1) ... 848s Setting up r-cran-lattice (0.22-6-1) ... 848s Setting up r-cran-ps (1.9.0-1) ... 848s Setting up r-cran-nlme (3.1.167-1) ... 848s Setting up gfortran-14-aarch64-linux-gnu (14.2.0-17ubuntu3) ... 848s Setting up r-cran-statmod (1.5.0-1) ... 848s Setting up g++-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 848s Setting up r-cran-nnet (7.3-20-1) ... 848s Setting up gfortran-aarch64-linux-gnu (4:14.2.0-1ubuntu1) ... 848s Setting up g++-14 (14.2.0-17ubuntu3) ... 848s Setting up r-cran-r6 (2.6.1-1) ... 848s Setting up r-cran-pkgkitten (0.2.4-1) ... 848s Setting up gfortran-14 (14.2.0-17ubuntu3) ... 848s Setting up r-cran-numderiv (2016.8-1.1-3) ... 848s Setting up r-cran-magrittr (2.0.3-1) ... 848s Setting up r-cran-littler (0.3.20-2) ... 848s Setting up r-cran-fs (1.6.5+dfsg-1) ... 848s Setting up r-cran-rcpp (1.0.14-1) ... 848s Setting up r-cran-brio (1.1.5-1) ... 848s Setting up r-cran-nloptr (2.1.1-1) ... 848s Setting up r-cran-boot (1.3-31-1) ... 848s Setting up r-cran-diffobj (0.3.5-1) ... 848s Setting up r-cran-rlang (1.1.5-1) ... 848s Setting up littler (0.3.20-2) ... 848s Setting up r-cran-withr (3.0.2+dfsg-1) ... 848s Setting up r-cran-processx (3.8.6-1) ... 848s Setting up r-cran-praise (1.0.0-4build1) ... 848s Setting up r-cran-digest (0.6.37-1) ... 848s Setting up r-cran-evaluate (1.0.3-1) ... 848s Setting up r-cran-mass (7.3-64-1) ... 848s Setting up r-cran-glue (1.8.0-1) ... 848s Setting up r-cran-xtable (1:1.8-4-2) ... 848s Setting up r-cran-cli (3.6.4-1) ... 848s Setting up r-cran-rbibutils (2.3-1) ... 848s Setting up r-cran-lifecycle (1.0.4+dfsg-1) ... 848s Setting up r-cran-rprojroot (2.0.4-2) ... 848s Setting up gcc (4:14.2.0-1ubuntu1) ... 848s Setting up r-cran-jsonlite (1.9.1+dfsg-1) ... 848s Setting up r-cran-ucminf (1.2.2-1) ... 848s Setting up r-cran-waldo (0.6.1-2) ... 848s Setting up r-cran-matrix (1.7-3-1) ... 848s Setting up g++ (4:14.2.0-1ubuntu1) ... 848s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 848s Setting up build-essential (12.10ubuntu1) ... 848s Setting up r-cran-rcppeigen (0.3.4.0.2-1) ... 848s Setting up r-cran-minqa (1.2.8-1) ... 848s Setting up r-cran-callr (3.7.6-1) ... 848s Setting up r-cran-ordinal (2023.12-4.1-1) ... 848s Setting up r-cran-desc (1.4.3-1) ... 848s Setting up r-cran-rdpack (2.6.2-1syncable1) ... 848s Setting up gfortran (4:14.2.0-1ubuntu1) ... 848s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 848s 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 848s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 848s 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 848s Setting up r-cran-pkgbuild (1.4.6-1) ... 848s Setting up r-cran-reformulas (0.4.0-1) ... 848s Setting up r-cran-pkgload (1.4.0-1) ... 848s Setting up r-base-dev (4.4.3-1) ... 848s Setting up r-cran-lme4 (1.1-36-1) ... 848s Setting up r-cran-testthat (3.2.3-1) ... 848s Setting up pkg-r-autopkgtest (20231212ubuntu1) ... 848s Processing triggers for libc-bin (2.41-1ubuntu2) ... 848s Processing triggers for man-db (2.13.0-1) ... 850s Processing triggers for install-info (7.1.1-1) ... 853s autopkgtest [11:36:43]: test pkg-r-autopkgtest: /usr/share/dh-r/pkg-r-autopkgtest 853s autopkgtest [11:36:43]: test pkg-r-autopkgtest: [----------------------- 853s Test: Try to load the R library ordinal 854s 854s R version 4.4.3 (2025-02-28) -- "Trophy Case" 854s Copyright (C) 2025 The R Foundation for Statistical Computing 854s Platform: aarch64-unknown-linux-gnu 854s 854s R is free software and comes with ABSOLUTELY NO WARRANTY. 854s You are welcome to redistribute it under certain conditions. 854s Type 'license()' or 'licence()' for distribution details. 854s 854s R is a collaborative project with many contributors. 854s Type 'contributors()' for more information and 854s 'citation()' on how to cite R or R packages in publications. 854s 854s Type 'demo()' for some demos, 'help()' for on-line help, or 854s 'help.start()' for an HTML browser interface to help. 854s Type 'q()' to quit R. 854s 854s > library('ordinal') 855s > 855s > 855s autopkgtest [11:36:45]: test pkg-r-autopkgtest: -----------------------] 855s Other tests are currently unsupported! 855s They will be progressively added. 856s autopkgtest [11:36:46]: test pkg-r-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 856s pkg-r-autopkgtest PASS 856s autopkgtest [11:36:46]: @@@@@@@@@@@@@@@@@@@@ summary 856s run-unit-test PASS 856s pkg-r-autopkgtest PASS 874s nova [W] Using flock in prodstack6-arm64 874s Creating nova instance adt-plucky-arm64-r-cran-ordinal-20250315-112229-juju-7f2275-prod-proposed-migration-environment-15-8b0fe3b7-0b65-4701-9902-d67b0f92d31a from image adt/ubuntu-plucky-arm64-server-20250315.img (UUID bd6e766c-b51f-4b53-86d6-23aa4d18f524)... 874s nova [W] Timed out waiting for 651ead51-7436-4994-ab2f-c0055a47d18c to get deleted. 874s nova [W] Using flock in prodstack6-arm64 874s Creating nova instance adt-plucky-arm64-r-cran-ordinal-20250315-112229-juju-7f2275-prod-proposed-migration-environment-15-8b0fe3b7-0b65-4701-9902-d67b0f92d31a from image adt/ubuntu-plucky-arm64-server-20250315.img (UUID bd6e766c-b51f-4b53-86d6-23aa4d18f524)... 874s nova [W] Timed out waiting for 557ed92e-d5c7-4c87-92cb-abaf2cbfa973 to get deleted.