0s autopkgtest [02:28:18]: starting date and time: 2025-05-03 02:28:18+0000 0s autopkgtest [02:28:18]: git checkout: 9986aa8c Merge branch 'skia/fix_network_interface' into 'ubuntu/production' 0s autopkgtest [02:28:18]: host juju-7f2275-prod-proposed-migration-environment-9; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.p0_0r6wt/out --timeout-copy=6000 --setup-commands 'ln -s /dev/null /etc/systemd/system/bluetooth.service; printf "http_proxy=http://squid.internal:3128\nhttps_proxy=http://squid.internal:3128\nno_proxy=127.0.0.1,127.0.1.1,localhost,localdomain,internal,login.ubuntu.com,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com\n" >> /etc/environment' --apt-pocket=proposed=src:nlme --apt-upgrade r-cran-ordinal --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=nlme/3.1.168-1 -- lxd -r lxd-armhf-10.145.243.39 lxd-armhf-10.145.243.39:autopkgtest/ubuntu/questing/armhf 21s autopkgtest [02:28:39]: testbed dpkg architecture: armhf 22s autopkgtest [02:28:40]: testbed apt version: 3.0.0 26s autopkgtest [02:28:44]: @@@@@@@@@@@@@@@@@@@@ test bed setup 28s autopkgtest [02:28:46]: testbed release detected to be: None 35s autopkgtest [02:28:53]: updating testbed package index (apt update) 37s Get:1 http://ftpmaster.internal/ubuntu questing-proposed InRelease [110 kB] 37s Get:2 http://ftpmaster.internal/ubuntu questing InRelease [110 kB] 37s Get:3 http://ftpmaster.internal/ubuntu questing-updates InRelease [110 kB] 37s Get:4 http://ftpmaster.internal/ubuntu questing-security InRelease [110 kB] 38s Get:5 http://ftpmaster.internal/ubuntu questing-proposed/main Sources [168 kB] 38s Get:6 http://ftpmaster.internal/ubuntu questing-proposed/universe Sources [1920 kB] 38s Get:7 http://ftpmaster.internal/ubuntu questing-proposed/multiverse Sources [43.3 kB] 38s Get:8 http://ftpmaster.internal/ubuntu questing-proposed/main armhf Packages [204 kB] 38s Get:9 http://ftpmaster.internal/ubuntu questing-proposed/universe armhf Packages [1378 kB] 39s Get:10 http://ftpmaster.internal/ubuntu questing-proposed/multiverse armhf Packages [12.5 kB] 39s Get:11 http://ftpmaster.internal/ubuntu questing/main Sources [1395 kB] 39s Get:12 http://ftpmaster.internal/ubuntu questing/multiverse Sources [299 kB] 39s Get:13 http://ftpmaster.internal/ubuntu questing/universe Sources [21.1 MB] 41s Get:14 http://ftpmaster.internal/ubuntu questing/main armhf Packages [1358 kB] 41s Get:15 http://ftpmaster.internal/ubuntu questing/universe armhf Packages [14.9 MB] 41s Get:16 http://ftpmaster.internal/ubuntu questing/multiverse armhf Packages [173 kB] 44s Fetched 43.3 MB in 7s (5831 kB/s) 46s Reading package lists... 52s autopkgtest [02:29:10]: upgrading testbed (apt dist-upgrade and autopurge) 53s Reading package lists... 54s Building dependency tree... 54s Reading state information... 54s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 54s Starting 2 pkgProblemResolver with broken count: 0 54s Done 55s Entering ResolveByKeep 56s 56s Calculating upgrade... 56s The following packages will be upgraded: 56s base-files distro-info-data dpkg dpkg-dev ed fwupd htop libdpkg-perl 56s libftdi1-2 libfwupd3 libnpth0t64 libnvme1t64 libsensors-config libsensors5 56s liburcu8t64 motd-news-config nano ubuntu-pro-client ubuntu-pro-client-l10n 56s usb.ids 57s 20 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 57s Need to get 5431 kB of archives. 57s After this operation, 3722 kB disk space will be freed. 57s Get:1 http://ftpmaster.internal/ubuntu questing/main armhf motd-news-config all 13.7ubuntu1 [5260 B] 57s Get:2 http://ftpmaster.internal/ubuntu questing/main armhf base-files armhf 13.7ubuntu1 [75.4 kB] 57s Get:3 http://ftpmaster.internal/ubuntu questing/main armhf dpkg armhf 1.22.18ubuntu3 [1254 kB] 57s Get:4 http://ftpmaster.internal/ubuntu questing/main armhf libnpth0t64 armhf 1.8-3 [7716 B] 57s Get:5 http://ftpmaster.internal/ubuntu questing/main armhf distro-info-data all 0.64 [6664 B] 57s Get:6 http://ftpmaster.internal/ubuntu questing/main armhf ubuntu-pro-client-l10n armhf 35.1ubuntu0 [19.7 kB] 57s Get:7 http://ftpmaster.internal/ubuntu questing/main armhf ubuntu-pro-client armhf 35.1ubuntu0 [258 kB] 57s Get:8 http://ftpmaster.internal/ubuntu questing/main armhf ed armhf 1.21.1-1 [53.0 kB] 57s Get:9 http://ftpmaster.internal/ubuntu questing/main armhf libsensors-config all 1:3.6.2-2 [6756 B] 57s Get:10 http://ftpmaster.internal/ubuntu questing/main armhf libsensors5 armhf 1:3.6.2-2 [26.8 kB] 57s Get:11 http://ftpmaster.internal/ubuntu questing/main armhf liburcu8t64 armhf 0.15.2-2 [57.3 kB] 57s Get:12 http://ftpmaster.internal/ubuntu questing/main armhf nano armhf 8.4-1 [278 kB] 57s Get:13 http://ftpmaster.internal/ubuntu questing/main armhf usb.ids all 2025.04.01-1 [223 kB] 57s Get:14 http://ftpmaster.internal/ubuntu questing/main armhf dpkg-dev all 1.22.18ubuntu3 [1089 kB] 57s Get:15 http://ftpmaster.internal/ubuntu questing/main armhf libdpkg-perl all 1.22.18ubuntu3 [281 kB] 57s Get:16 http://ftpmaster.internal/ubuntu questing/main armhf fwupd armhf 2.0.8-3 [1414 kB] 57s Get:17 http://ftpmaster.internal/ubuntu questing/main armhf libfwupd3 armhf 2.0.8-3 [126 kB] 57s Get:18 http://ftpmaster.internal/ubuntu questing/main armhf htop armhf 3.4.1-4 [147 kB] 57s Get:19 http://ftpmaster.internal/ubuntu questing/main armhf libftdi1-2 armhf 1.5-10 [27.8 kB] 57s Get:20 http://ftpmaster.internal/ubuntu questing/main armhf libnvme1t64 armhf 1.13-2 [74.3 kB] 58s Fetched 5431 kB in 1s (6616 kB/s) 58s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 63953 files and directories currently installed.) 58s Preparing to unpack .../motd-news-config_13.7ubuntu1_all.deb ... 58s Unpacking motd-news-config (13.7ubuntu1) over (13.6ubuntu2) ... 58s Preparing to unpack .../base-files_13.7ubuntu1_armhf.deb ... 58s Unpacking base-files (13.7ubuntu1) over (13.6ubuntu2) ... 58s Setting up base-files (13.7ubuntu1) ... 58s Installing new version of config file /etc/issue ... 58s Installing new version of config file /etc/issue.net ... 58s Installing new version of config file /etc/lsb-release ... 59s motd-news.service is a disabled or a static unit not running, not starting it. 59s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 63953 files and directories currently installed.) 59s Preparing to unpack .../dpkg_1.22.18ubuntu3_armhf.deb ... 59s Unpacking dpkg (1.22.18ubuntu3) over (1.22.18ubuntu2) ... 59s Setting up dpkg (1.22.18ubuntu3) ... 59s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 63953 files and directories currently installed.) 59s Preparing to unpack .../libnpth0t64_1.8-3_armhf.deb ... 59s Unpacking libnpth0t64:armhf (1.8-3) over (1.8-2) ... 59s Setting up libnpth0t64:armhf (1.8-3) ... 59s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 63953 files and directories currently installed.) 59s Preparing to unpack .../00-distro-info-data_0.64_all.deb ... 59s Unpacking distro-info-data (0.64) over (0.63) ... 59s Preparing to unpack .../01-ubuntu-pro-client-l10n_35.1ubuntu0_armhf.deb ... 59s Unpacking ubuntu-pro-client-l10n (35.1ubuntu0) over (35) ... 60s Preparing to unpack .../02-ubuntu-pro-client_35.1ubuntu0_armhf.deb ... 60s Unpacking ubuntu-pro-client (35.1ubuntu0) over (35) ... 60s Preparing to unpack .../03-ed_1.21.1-1_armhf.deb ... 60s Unpacking ed (1.21.1-1) over (1.21-1) ... 60s Preparing to unpack .../04-libsensors-config_1%3a3.6.2-2_all.deb ... 60s Unpacking libsensors-config (1:3.6.2-2) over (1:3.6.0-10) ... 60s Preparing to unpack .../05-libsensors5_1%3a3.6.2-2_armhf.deb ... 60s Unpacking libsensors5:armhf (1:3.6.2-2) over (1:3.6.0-10) ... 60s Preparing to unpack .../06-liburcu8t64_0.15.2-2_armhf.deb ... 60s Unpacking liburcu8t64:armhf (0.15.2-2) over (0.15.1-1) ... 60s Preparing to unpack .../07-nano_8.4-1_armhf.deb ... 60s Unpacking nano (8.4-1) over (8.3-1) ... 60s Preparing to unpack .../08-usb.ids_2025.04.01-1_all.deb ... 60s Unpacking usb.ids (2025.04.01-1) over (2025.01.14-1) ... 60s Preparing to unpack .../09-dpkg-dev_1.22.18ubuntu3_all.deb ... 60s Unpacking dpkg-dev (1.22.18ubuntu3) over (1.22.18ubuntu2) ... 60s Preparing to unpack .../10-libdpkg-perl_1.22.18ubuntu3_all.deb ... 60s Unpacking libdpkg-perl (1.22.18ubuntu3) over (1.22.18ubuntu2) ... 60s Preparing to unpack .../11-fwupd_2.0.8-3_armhf.deb ... 60s Unpacking fwupd (2.0.8-3) over (2.0.7-1) ... 60s dpkg: warning: unable to delete old directory '/etc/grub.d': Directory not empty 60s Preparing to unpack .../12-libfwupd3_2.0.8-3_armhf.deb ... 60s Unpacking libfwupd3:armhf (2.0.8-3) over (2.0.7-1) ... 60s Preparing to unpack .../13-htop_3.4.1-4_armhf.deb ... 60s Unpacking htop (3.4.1-4) over (3.4.0-2) ... 61s Preparing to unpack .../14-libftdi1-2_1.5-10_armhf.deb ... 61s Unpacking libftdi1-2:armhf (1.5-10) over (1.5-8build1) ... 61s Preparing to unpack .../15-libnvme1t64_1.13-2_armhf.deb ... 61s Unpacking libnvme1t64 (1.13-2) over (1.11.1-2) ... 61s Setting up motd-news-config (13.7ubuntu1) ... 61s Setting up liburcu8t64:armhf (0.15.2-2) ... 61s Setting up distro-info-data (0.64) ... 61s Setting up htop (3.4.1-4) ... 61s Setting up libsensors-config (1:3.6.2-2) ... 61s Installing new version of config file /etc/sensors3.conf ... 61s Setting up libfwupd3:armhf (2.0.8-3) ... 61s Setting up libftdi1-2:armhf (1.5-10) ... 61s Setting up libnvme1t64 (1.13-2) ... 61s Setting up ed (1.21.1-1) ... 61s Setting up usb.ids (2025.04.01-1) ... 61s Setting up libsensors5:armhf (1:3.6.2-2) ... 61s Setting up libdpkg-perl (1.22.18ubuntu3) ... 61s Setting up nano (8.4-1) ... 61s Installing new version of config file /etc/nanorc ... 61s Setting up ubuntu-pro-client (35.1ubuntu0) ... 61s apparmor_parser: Unable to replace "ubuntu_pro_apt_news". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 61s 61s apparmor_parser: Unable to replace "apt_methods". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 61s 61s apparmor_parser: Unable to replace "ubuntu_pro_esm_cache". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 61s 62s Setting up fwupd (2.0.8-3) ... 63s fwupd-refresh.service is a disabled or a static unit not running, not starting it. 63s fwupd.service is a disabled or a static unit not running, not starting it. 63s Setting up ubuntu-pro-client-l10n (35.1ubuntu0) ... 63s Setting up dpkg-dev (1.22.18ubuntu3) ... 63s Processing triggers for dbus (1.16.2-2ubuntu1) ... 63s Processing triggers for install-info (7.1.1-1) ... 63s Processing triggers for libc-bin (2.41-6ubuntu1) ... 63s Processing triggers for man-db (2.13.0-1) ... 65s Processing triggers for plymouth-theme-ubuntu-text (24.004.60-2ubuntu7) ... 65s Processing triggers for initramfs-tools (0.147ubuntu1) ... 67s Reading package lists... 67s Building dependency tree... 67s Reading state information... 68s Starting pkgProblemResolver with broken count: 0 68s Starting 2 pkgProblemResolver with broken count: 0 68s Done 68s Solving dependencies... 69s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 71s autopkgtest [02:29:29]: rebooting testbed after setup commands that affected boot 110s autopkgtest [02:30:08]: testbed running kernel: Linux 6.8.0-58-generic #60~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 28 14:48:37 UTC 2 134s autopkgtest [02:30:32]: @@@@@@@@@@@@@@@@@@@@ apt-source r-cran-ordinal 144s Get:1 http://ftpmaster.internal/ubuntu questing/universe r-cran-ordinal 2023.12-4.1-1 (dsc) [2258 B] 144s Get:2 http://ftpmaster.internal/ubuntu questing/universe r-cran-ordinal 2023.12-4.1-1 (tar) [804 kB] 144s Get:3 http://ftpmaster.internal/ubuntu questing/universe r-cran-ordinal 2023.12-4.1-1 (diff) [3132 B] 144s gpgv: Signature made Wed Oct 9 23:44:36 2024 UTC 144s gpgv: using RSA key 73471499CC60ED9EEE805946C5BD6C8F2295D502 144s gpgv: issuer "plessy@debian.org" 144s gpgv: Can't check signature: No public key 144s dpkg-source: warning: cannot verify inline signature for ./r-cran-ordinal_2023.12-4.1-1.dsc: no acceptable signature found 144s autopkgtest [02:30:42]: testing package r-cran-ordinal version 2023.12-4.1-1 147s autopkgtest [02:30:45]: build not needed 150s autopkgtest [02:30:48]: test run-unit-test: preparing testbed 151s Reading package lists... 152s Building dependency tree... 152s Reading state information... 152s Starting pkgProblemResolver with broken count: 0 152s Starting 2 pkgProblemResolver with broken count: 0 152s Done 153s The following NEW packages will be installed: 153s fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-mono libblas3 153s libcairo2 libdatrie1 libdeflate0 libfontconfig1 libfreetype6 libgfortran5 153s libgomp1 libgraphite2-3 libharfbuzz0b libice6 libjbig0 libjpeg-turbo8 153s libjpeg8 liblapack3 liblerc4 libnlopt0 libpango-1.0-0 libpangocairo-1.0-0 153s libpangoft2-1.0-0 libpaper-utils libpaper2 libpixman-1-0 libsharpyuv0 libsm6 153s libtcl8.6 libthai-data libthai0 libtiff6 libtk8.6 libwebp7 libxcb-render0 153s libxcb-shm0 libxft2 libxrender1 libxss1 libxt6t64 littler r-base-core 153s r-cran-boot r-cran-brio r-cran-callr r-cran-cli r-cran-crayon r-cran-desc 153s r-cran-diffobj r-cran-digest r-cran-evaluate r-cran-fs r-cran-glue 153s r-cran-jsonlite r-cran-lattice r-cran-lifecycle r-cran-littler r-cran-lme4 153s r-cran-magrittr r-cran-mass r-cran-matrix r-cran-minqa r-cran-nlme 153s r-cran-nloptr r-cran-nnet r-cran-numderiv r-cran-ordinal r-cran-pkgbuild 153s r-cran-pkgkitten r-cran-pkgload r-cran-praise r-cran-processx r-cran-ps 153s r-cran-r6 r-cran-rbibutils r-cran-rcpp r-cran-rcppeigen r-cran-rdpack 153s r-cran-reformulas r-cran-rlang r-cran-rprojroot r-cran-statmod 153s r-cran-testthat r-cran-ucminf r-cran-waldo r-cran-withr r-cran-xtable unzip 153s x11-common xdg-utils zip 153s 0 upgraded, 92 newly installed, 0 to remove and 0 not upgraded. 153s Need to get 69.4 MB of archives. 153s After this operation, 135 MB of additional disk space will be used. 153s Get:1 http://ftpmaster.internal/ubuntu questing/main armhf libfreetype6 armhf 2.13.3+dfsg-1 [330 kB] 154s Get:2 http://ftpmaster.internal/ubuntu questing/main armhf fonts-dejavu-mono all 2.37-8 [502 kB] 154s Get:3 http://ftpmaster.internal/ubuntu questing/main armhf fonts-dejavu-core all 2.37-8 [835 kB] 154s Get:4 http://ftpmaster.internal/ubuntu questing/main armhf fontconfig-config armhf 2.15.0-2.2ubuntu1 [37.9 kB] 154s Get:5 http://ftpmaster.internal/ubuntu questing/main armhf libfontconfig1 armhf 2.15.0-2.2ubuntu1 [114 kB] 154s Get:6 http://ftpmaster.internal/ubuntu questing/main armhf fontconfig armhf 2.15.0-2.2ubuntu1 [190 kB] 154s Get:7 http://ftpmaster.internal/ubuntu questing/main armhf libblas3 armhf 3.12.1-2 [132 kB] 154s Get:8 http://ftpmaster.internal/ubuntu questing/main armhf libpixman-1-0 armhf 0.44.0-3 [183 kB] 154s Get:9 http://ftpmaster.internal/ubuntu questing/main armhf libxcb-render0 armhf 1.17.0-2 [15.3 kB] 154s Get:10 http://ftpmaster.internal/ubuntu questing/main armhf libxcb-shm0 armhf 1.17.0-2 [5774 B] 154s Get:11 http://ftpmaster.internal/ubuntu questing/main armhf libxrender1 armhf 1:0.9.10-1.1build1 [16.0 kB] 154s Get:12 http://ftpmaster.internal/ubuntu questing/main armhf libcairo2 armhf 1.18.4-1 [483 kB] 154s Get:13 http://ftpmaster.internal/ubuntu questing/main armhf libdatrie1 armhf 0.2.13-3build1 [15.7 kB] 154s Get:14 http://ftpmaster.internal/ubuntu questing/main armhf libdeflate0 armhf 1.23-1 [38.5 kB] 154s Get:15 http://ftpmaster.internal/ubuntu questing/main armhf libgfortran5 armhf 15-20250404-0ubuntu1 [331 kB] 154s Get:16 http://ftpmaster.internal/ubuntu questing/main armhf libgomp1 armhf 15-20250404-0ubuntu1 [128 kB] 154s Get:17 http://ftpmaster.internal/ubuntu questing/main armhf libgraphite2-3 armhf 1.3.14-2ubuntu1 [64.8 kB] 154s Get:18 http://ftpmaster.internal/ubuntu questing/main armhf libharfbuzz0b armhf 10.2.0-1 [464 kB] 154s Get:19 http://ftpmaster.internal/ubuntu questing/main armhf x11-common all 1:7.7+23ubuntu4 [21.8 kB] 154s Get:20 http://ftpmaster.internal/ubuntu questing/main armhf libice6 armhf 2:1.1.1-1 [36.5 kB] 154s Get:21 http://ftpmaster.internal/ubuntu questing/main armhf libjpeg-turbo8 armhf 2.1.5-3ubuntu2 [127 kB] 154s Get:22 http://ftpmaster.internal/ubuntu questing/main armhf libjpeg8 armhf 8c-2ubuntu11 [2148 B] 154s Get:23 http://ftpmaster.internal/ubuntu questing/main armhf liblapack3 armhf 3.12.1-2 [2091 kB] 154s Get:24 http://ftpmaster.internal/ubuntu questing/main armhf liblerc4 armhf 4.0.0+ds-5ubuntu1 [160 kB] 154s Get:25 http://ftpmaster.internal/ubuntu questing/main armhf libthai-data all 0.1.29-2build1 [158 kB] 154s Get:26 http://ftpmaster.internal/ubuntu questing/main armhf libthai0 armhf 0.1.29-2build1 [15.2 kB] 154s Get:27 http://ftpmaster.internal/ubuntu questing/main armhf libpango-1.0-0 armhf 1.56.3-1 [216 kB] 154s Get:28 http://ftpmaster.internal/ubuntu questing/main armhf libpangoft2-1.0-0 armhf 1.56.3-1 [44.1 kB] 154s Get:29 http://ftpmaster.internal/ubuntu questing/main armhf libpangocairo-1.0-0 armhf 1.56.3-1 [25.0 kB] 154s Get:30 http://ftpmaster.internal/ubuntu questing/main armhf libpaper2 armhf 2.2.5-0.3 [16.3 kB] 154s Get:31 http://ftpmaster.internal/ubuntu questing/main armhf libpaper-utils armhf 2.2.5-0.3 [14.2 kB] 154s Get:32 http://ftpmaster.internal/ubuntu questing/main armhf libsharpyuv0 armhf 1.5.0-0.1 [16.4 kB] 154s Get:33 http://ftpmaster.internal/ubuntu questing/main armhf libsm6 armhf 2:1.2.4-1 [15.1 kB] 154s Get:34 http://ftpmaster.internal/ubuntu questing/main armhf libtcl8.6 armhf 8.6.16+dfsg-1 [909 kB] 154s Get:35 http://ftpmaster.internal/ubuntu questing/main armhf libjbig0 armhf 2.1-6.1ubuntu2 [24.9 kB] 154s Get:36 http://ftpmaster.internal/ubuntu questing/main armhf libwebp7 armhf 1.5.0-0.1 [188 kB] 154s Get:37 http://ftpmaster.internal/ubuntu questing/main armhf libtiff6 armhf 4.7.0-3ubuntu1 [184 kB] 154s Get:38 http://ftpmaster.internal/ubuntu questing/main armhf libxft2 armhf 2.3.6-1build1 [37.4 kB] 154s Get:39 http://ftpmaster.internal/ubuntu questing/main armhf libxss1 armhf 1:1.2.3-1build3 [6500 B] 154s Get:40 http://ftpmaster.internal/ubuntu questing/main armhf libtk8.6 armhf 8.6.16-1 [686 kB] 154s Get:41 http://ftpmaster.internal/ubuntu questing/main armhf libxt6t64 armhf 1:1.2.1-1.2build1 [145 kB] 154s Get:42 http://ftpmaster.internal/ubuntu questing/main armhf zip armhf 3.0-14ubuntu2 [164 kB] 154s Get:43 http://ftpmaster.internal/ubuntu questing/main armhf unzip armhf 6.0-28ubuntu6 [167 kB] 154s Get:44 http://ftpmaster.internal/ubuntu questing/main armhf xdg-utils all 1.2.1-2ubuntu1 [66.0 kB] 154s Get:45 http://ftpmaster.internal/ubuntu questing/universe armhf r-base-core armhf 4.4.3-1 [28.2 MB] 155s Get:46 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-littler armhf 0.3.20-2 [90.9 kB] 155s Get:47 http://ftpmaster.internal/ubuntu questing/universe armhf littler all 0.3.20-2 [2554 B] 155s Get:48 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-boot all 1.3-31-1 [635 kB] 155s Get:49 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-brio armhf 1.1.5-1 [37.9 kB] 155s Get:50 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-ps armhf 1.9.0-1 [403 kB] 155s Get:51 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-r6 all 2.6.1-1 [101 kB] 155s Get:52 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-processx armhf 3.8.6-1 [359 kB] 155s Get:53 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-callr all 3.7.6-1 [458 kB] 155s Get:54 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-cli armhf 3.6.4-1 [1377 kB] 155s Get:55 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-crayon all 1.5.3-1 [165 kB] 155s Get:56 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-desc all 1.4.3-1 [359 kB] 155s Get:57 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-diffobj armhf 0.3.5-1 [1115 kB] 155s Get:58 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-digest armhf 0.6.37-1 [207 kB] 155s Get:59 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-evaluate all 1.0.3-1 [114 kB] 155s Get:60 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-fs armhf 1.6.5+dfsg-1 [242 kB] 155s Get:61 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-glue armhf 1.8.0-1 [162 kB] 156s Get:62 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-jsonlite armhf 1.9.1+dfsg-1 [440 kB] 156s Get:63 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-lattice armhf 0.22-6-1 [1363 kB] 156s Get:64 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-rlang armhf 1.1.5-1 [1701 kB] 156s Get:65 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-lifecycle all 1.0.4+dfsg-1 [110 kB] 156s Get:66 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-matrix armhf 1.7-3-1 [4039 kB] 156s Get:67 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-mass armhf 7.3-65-1 [1108 kB] 156s Get:68 http://ftpmaster.internal/ubuntu questing-proposed/universe armhf r-cran-nlme armhf 3.1.168-1 [2304 kB] 156s Get:69 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-pkgkitten all 0.2.4-1 [27.2 kB] 156s Get:70 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-rcpp armhf 1.0.14-1 [1976 kB] 156s Get:71 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-minqa armhf 1.2.8-1 [108 kB] 156s Get:72 http://ftpmaster.internal/ubuntu questing/universe armhf libnlopt0 armhf 2.7.1-6ubuntu3 [154 kB] 156s Get:73 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-nloptr armhf 2.2.1-1 [250 kB] 156s Get:74 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-rbibutils armhf 2.3-1 [943 kB] 156s Get:75 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-rdpack all 2.6.3-1 [636 kB] 156s Get:76 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-reformulas all 0.4.0-1 [91.5 kB] 156s Get:77 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-rcppeigen armhf 0.3.4.0.2-1 [1402 kB] 156s Get:78 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-statmod armhf 1.5.0-1 [294 kB] 156s Get:79 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-lme4 armhf 1.1-36-1 [4108 kB] 156s Get:80 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-magrittr armhf 2.0.3-1 [154 kB] 156s Get:81 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-nnet armhf 7.3-20-1 [111 kB] 156s Get:82 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-numderiv all 2016.8-1.1-3 [115 kB] 156s Get:83 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-ucminf armhf 1.2.2-1 [34.5 kB] 156s Get:84 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-ordinal armhf 2023.12-4.1-1 [1265 kB] 156s Get:85 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-pkgbuild all 1.4.6-1 [213 kB] 156s Get:86 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-rprojroot all 2.0.4-2 [125 kB] 156s Get:87 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-withr all 3.0.2+dfsg-1 [214 kB] 156s Get:88 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-pkgload all 1.4.0-1 [247 kB] 156s Get:89 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-praise all 1.0.0-4build1 [20.3 kB] 156s Get:90 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-waldo all 0.6.1-2 [150 kB] 156s Get:91 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-testthat armhf 3.2.3-1 [1633 kB] 156s Get:92 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-xtable all 1:1.8-4-2 [689 kB] 157s Preconfiguring packages ... 157s Fetched 69.4 MB in 4s (18.4 MB/s) 157s Selecting previously unselected package libfreetype6:armhf. 158s (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 ... 63951 files and directories currently installed.) 158s Preparing to unpack .../00-libfreetype6_2.13.3+dfsg-1_armhf.deb ... 158s Unpacking libfreetype6:armhf (2.13.3+dfsg-1) ... 158s Selecting previously unselected package fonts-dejavu-mono. 158s Preparing to unpack .../01-fonts-dejavu-mono_2.37-8_all.deb ... 158s Unpacking fonts-dejavu-mono (2.37-8) ... 158s Selecting previously unselected package fonts-dejavu-core. 158s Preparing to unpack .../02-fonts-dejavu-core_2.37-8_all.deb ... 158s Unpacking fonts-dejavu-core (2.37-8) ... 158s Selecting previously unselected package fontconfig-config. 158s Preparing to unpack .../03-fontconfig-config_2.15.0-2.2ubuntu1_armhf.deb ... 158s Unpacking fontconfig-config (2.15.0-2.2ubuntu1) ... 158s Selecting previously unselected package libfontconfig1:armhf. 158s Preparing to unpack .../04-libfontconfig1_2.15.0-2.2ubuntu1_armhf.deb ... 158s Unpacking libfontconfig1:armhf (2.15.0-2.2ubuntu1) ... 158s Selecting previously unselected package fontconfig. 158s Preparing to unpack .../05-fontconfig_2.15.0-2.2ubuntu1_armhf.deb ... 158s Unpacking fontconfig (2.15.0-2.2ubuntu1) ... 158s Selecting previously unselected package libblas3:armhf. 158s Preparing to unpack .../06-libblas3_3.12.1-2_armhf.deb ... 158s Unpacking libblas3:armhf (3.12.1-2) ... 158s Selecting previously unselected package libpixman-1-0:armhf. 158s Preparing to unpack .../07-libpixman-1-0_0.44.0-3_armhf.deb ... 158s Unpacking libpixman-1-0:armhf (0.44.0-3) ... 158s Selecting previously unselected package libxcb-render0:armhf. 158s Preparing to unpack .../08-libxcb-render0_1.17.0-2_armhf.deb ... 158s Unpacking libxcb-render0:armhf (1.17.0-2) ... 158s Selecting previously unselected package libxcb-shm0:armhf. 158s Preparing to unpack .../09-libxcb-shm0_1.17.0-2_armhf.deb ... 158s Unpacking libxcb-shm0:armhf (1.17.0-2) ... 158s Selecting previously unselected package libxrender1:armhf. 158s Preparing to unpack .../10-libxrender1_1%3a0.9.10-1.1build1_armhf.deb ... 158s Unpacking libxrender1:armhf (1:0.9.10-1.1build1) ... 158s Selecting previously unselected package libcairo2:armhf. 158s Preparing to unpack .../11-libcairo2_1.18.4-1_armhf.deb ... 158s Unpacking libcairo2:armhf (1.18.4-1) ... 158s Selecting previously unselected package libdatrie1:armhf. 158s Preparing to unpack .../12-libdatrie1_0.2.13-3build1_armhf.deb ... 158s Unpacking libdatrie1:armhf (0.2.13-3build1) ... 158s Selecting previously unselected package libdeflate0:armhf. 158s Preparing to unpack .../13-libdeflate0_1.23-1_armhf.deb ... 158s Unpacking libdeflate0:armhf (1.23-1) ... 158s Selecting previously unselected package libgfortran5:armhf. 158s Preparing to unpack .../14-libgfortran5_15-20250404-0ubuntu1_armhf.deb ... 158s Unpacking libgfortran5:armhf (15-20250404-0ubuntu1) ... 158s Selecting previously unselected package libgomp1:armhf. 158s Preparing to unpack .../15-libgomp1_15-20250404-0ubuntu1_armhf.deb ... 158s Unpacking libgomp1:armhf (15-20250404-0ubuntu1) ... 158s Selecting previously unselected package libgraphite2-3:armhf. 158s Preparing to unpack .../16-libgraphite2-3_1.3.14-2ubuntu1_armhf.deb ... 158s Unpacking libgraphite2-3:armhf (1.3.14-2ubuntu1) ... 158s Selecting previously unselected package libharfbuzz0b:armhf. 158s Preparing to unpack .../17-libharfbuzz0b_10.2.0-1_armhf.deb ... 158s Unpacking libharfbuzz0b:armhf (10.2.0-1) ... 158s Selecting previously unselected package x11-common. 158s Preparing to unpack .../18-x11-common_1%3a7.7+23ubuntu4_all.deb ... 158s Unpacking x11-common (1:7.7+23ubuntu4) ... 158s Selecting previously unselected package libice6:armhf. 158s Preparing to unpack .../19-libice6_2%3a1.1.1-1_armhf.deb ... 158s Unpacking libice6:armhf (2:1.1.1-1) ... 158s Selecting previously unselected package libjpeg-turbo8:armhf. 158s Preparing to unpack .../20-libjpeg-turbo8_2.1.5-3ubuntu2_armhf.deb ... 158s Unpacking libjpeg-turbo8:armhf (2.1.5-3ubuntu2) ... 158s Selecting previously unselected package libjpeg8:armhf. 158s Preparing to unpack .../21-libjpeg8_8c-2ubuntu11_armhf.deb ... 158s Unpacking libjpeg8:armhf (8c-2ubuntu11) ... 158s Selecting previously unselected package liblapack3:armhf. 158s Preparing to unpack .../22-liblapack3_3.12.1-2_armhf.deb ... 158s Unpacking liblapack3:armhf (3.12.1-2) ... 158s Selecting previously unselected package liblerc4:armhf. 158s Preparing to unpack .../23-liblerc4_4.0.0+ds-5ubuntu1_armhf.deb ... 158s Unpacking liblerc4:armhf (4.0.0+ds-5ubuntu1) ... 158s Selecting previously unselected package libthai-data. 158s Preparing to unpack .../24-libthai-data_0.1.29-2build1_all.deb ... 158s Unpacking libthai-data (0.1.29-2build1) ... 159s Selecting previously unselected package libthai0:armhf. 159s Preparing to unpack .../25-libthai0_0.1.29-2build1_armhf.deb ... 159s Unpacking libthai0:armhf (0.1.29-2build1) ... 159s Selecting previously unselected package libpango-1.0-0:armhf. 159s Preparing to unpack .../26-libpango-1.0-0_1.56.3-1_armhf.deb ... 159s Unpacking libpango-1.0-0:armhf (1.56.3-1) ... 159s Selecting previously unselected package libpangoft2-1.0-0:armhf. 159s Preparing to unpack .../27-libpangoft2-1.0-0_1.56.3-1_armhf.deb ... 159s Unpacking libpangoft2-1.0-0:armhf (1.56.3-1) ... 159s Selecting previously unselected package libpangocairo-1.0-0:armhf. 159s Preparing to unpack .../28-libpangocairo-1.0-0_1.56.3-1_armhf.deb ... 159s Unpacking libpangocairo-1.0-0:armhf (1.56.3-1) ... 159s Selecting previously unselected package libpaper2:armhf. 159s Preparing to unpack .../29-libpaper2_2.2.5-0.3_armhf.deb ... 159s Unpacking libpaper2:armhf (2.2.5-0.3) ... 159s Selecting previously unselected package libpaper-utils. 159s Preparing to unpack .../30-libpaper-utils_2.2.5-0.3_armhf.deb ... 159s Unpacking libpaper-utils (2.2.5-0.3) ... 159s Selecting previously unselected package libsharpyuv0:armhf. 159s Preparing to unpack .../31-libsharpyuv0_1.5.0-0.1_armhf.deb ... 159s Unpacking libsharpyuv0:armhf (1.5.0-0.1) ... 159s Selecting previously unselected package libsm6:armhf. 159s Preparing to unpack .../32-libsm6_2%3a1.2.4-1_armhf.deb ... 159s Unpacking libsm6:armhf (2:1.2.4-1) ... 159s Selecting previously unselected package libtcl8.6:armhf. 159s Preparing to unpack .../33-libtcl8.6_8.6.16+dfsg-1_armhf.deb ... 159s Unpacking libtcl8.6:armhf (8.6.16+dfsg-1) ... 159s Selecting previously unselected package libjbig0:armhf. 159s Preparing to unpack .../34-libjbig0_2.1-6.1ubuntu2_armhf.deb ... 159s Unpacking libjbig0:armhf (2.1-6.1ubuntu2) ... 159s Selecting previously unselected package libwebp7:armhf. 159s Preparing to unpack .../35-libwebp7_1.5.0-0.1_armhf.deb ... 159s Unpacking libwebp7:armhf (1.5.0-0.1) ... 159s Selecting previously unselected package libtiff6:armhf. 159s Preparing to unpack .../36-libtiff6_4.7.0-3ubuntu1_armhf.deb ... 159s Unpacking libtiff6:armhf (4.7.0-3ubuntu1) ... 159s Selecting previously unselected package libxft2:armhf. 159s Preparing to unpack .../37-libxft2_2.3.6-1build1_armhf.deb ... 159s Unpacking libxft2:armhf (2.3.6-1build1) ... 159s Selecting previously unselected package libxss1:armhf. 159s Preparing to unpack .../38-libxss1_1%3a1.2.3-1build3_armhf.deb ... 159s Unpacking libxss1:armhf (1:1.2.3-1build3) ... 159s Selecting previously unselected package libtk8.6:armhf. 159s Preparing to unpack .../39-libtk8.6_8.6.16-1_armhf.deb ... 159s Unpacking libtk8.6:armhf (8.6.16-1) ... 159s Selecting previously unselected package libxt6t64:armhf. 159s Preparing to unpack .../40-libxt6t64_1%3a1.2.1-1.2build1_armhf.deb ... 159s Unpacking libxt6t64:armhf (1:1.2.1-1.2build1) ... 159s Selecting previously unselected package zip. 159s Preparing to unpack .../41-zip_3.0-14ubuntu2_armhf.deb ... 159s Unpacking zip (3.0-14ubuntu2) ... 159s Selecting previously unselected package unzip. 159s Preparing to unpack .../42-unzip_6.0-28ubuntu6_armhf.deb ... 159s Unpacking unzip (6.0-28ubuntu6) ... 159s Selecting previously unselected package xdg-utils. 159s Preparing to unpack .../43-xdg-utils_1.2.1-2ubuntu1_all.deb ... 159s Unpacking xdg-utils (1.2.1-2ubuntu1) ... 159s Selecting previously unselected package r-base-core. 159s Preparing to unpack .../44-r-base-core_4.4.3-1_armhf.deb ... 159s Unpacking r-base-core (4.4.3-1) ... 159s Selecting previously unselected package r-cran-littler. 159s Preparing to unpack .../45-r-cran-littler_0.3.20-2_armhf.deb ... 159s Unpacking r-cran-littler (0.3.20-2) ... 160s Selecting previously unselected package littler. 160s Preparing to unpack .../46-littler_0.3.20-2_all.deb ... 160s Unpacking littler (0.3.20-2) ... 160s Selecting previously unselected package r-cran-boot. 160s Preparing to unpack .../47-r-cran-boot_1.3-31-1_all.deb ... 160s Unpacking r-cran-boot (1.3-31-1) ... 160s Selecting previously unselected package r-cran-brio. 160s Preparing to unpack .../48-r-cran-brio_1.1.5-1_armhf.deb ... 160s Unpacking r-cran-brio (1.1.5-1) ... 160s Selecting previously unselected package r-cran-ps. 160s Preparing to unpack .../49-r-cran-ps_1.9.0-1_armhf.deb ... 160s Unpacking r-cran-ps (1.9.0-1) ... 160s Selecting previously unselected package r-cran-r6. 160s Preparing to unpack .../50-r-cran-r6_2.6.1-1_all.deb ... 160s Unpacking r-cran-r6 (2.6.1-1) ... 160s Selecting previously unselected package r-cran-processx. 160s Preparing to unpack .../51-r-cran-processx_3.8.6-1_armhf.deb ... 160s Unpacking r-cran-processx (3.8.6-1) ... 160s Selecting previously unselected package r-cran-callr. 160s Preparing to unpack .../52-r-cran-callr_3.7.6-1_all.deb ... 160s Unpacking r-cran-callr (3.7.6-1) ... 160s Selecting previously unselected package r-cran-cli. 160s Preparing to unpack .../53-r-cran-cli_3.6.4-1_armhf.deb ... 160s Unpacking r-cran-cli (3.6.4-1) ... 160s Selecting previously unselected package r-cran-crayon. 160s Preparing to unpack .../54-r-cran-crayon_1.5.3-1_all.deb ... 160s Unpacking r-cran-crayon (1.5.3-1) ... 160s Selecting previously unselected package r-cran-desc. 160s Preparing to unpack .../55-r-cran-desc_1.4.3-1_all.deb ... 160s Unpacking r-cran-desc (1.4.3-1) ... 160s Selecting previously unselected package r-cran-diffobj. 160s Preparing to unpack .../56-r-cran-diffobj_0.3.5-1_armhf.deb ... 160s Unpacking r-cran-diffobj (0.3.5-1) ... 160s Selecting previously unselected package r-cran-digest. 160s Preparing to unpack .../57-r-cran-digest_0.6.37-1_armhf.deb ... 160s Unpacking r-cran-digest (0.6.37-1) ... 160s Selecting previously unselected package r-cran-evaluate. 160s Preparing to unpack .../58-r-cran-evaluate_1.0.3-1_all.deb ... 160s Unpacking r-cran-evaluate (1.0.3-1) ... 160s Selecting previously unselected package r-cran-fs. 160s Preparing to unpack .../59-r-cran-fs_1.6.5+dfsg-1_armhf.deb ... 160s Unpacking r-cran-fs (1.6.5+dfsg-1) ... 160s Selecting previously unselected package r-cran-glue. 160s Preparing to unpack .../60-r-cran-glue_1.8.0-1_armhf.deb ... 160s Unpacking r-cran-glue (1.8.0-1) ... 160s Selecting previously unselected package r-cran-jsonlite. 160s Preparing to unpack .../61-r-cran-jsonlite_1.9.1+dfsg-1_armhf.deb ... 160s Unpacking r-cran-jsonlite (1.9.1+dfsg-1) ... 160s Selecting previously unselected package r-cran-lattice. 160s Preparing to unpack .../62-r-cran-lattice_0.22-6-1_armhf.deb ... 160s Unpacking r-cran-lattice (0.22-6-1) ... 160s Selecting previously unselected package r-cran-rlang. 160s Preparing to unpack .../63-r-cran-rlang_1.1.5-1_armhf.deb ... 160s Unpacking r-cran-rlang (1.1.5-1) ... 160s Selecting previously unselected package r-cran-lifecycle. 160s Preparing to unpack .../64-r-cran-lifecycle_1.0.4+dfsg-1_all.deb ... 160s Unpacking r-cran-lifecycle (1.0.4+dfsg-1) ... 160s Selecting previously unselected package r-cran-matrix. 160s Preparing to unpack .../65-r-cran-matrix_1.7-3-1_armhf.deb ... 160s Unpacking r-cran-matrix (1.7-3-1) ... 160s Selecting previously unselected package r-cran-mass. 160s Preparing to unpack .../66-r-cran-mass_7.3-65-1_armhf.deb ... 160s Unpacking r-cran-mass (7.3-65-1) ... 160s Selecting previously unselected package r-cran-nlme. 160s Preparing to unpack .../67-r-cran-nlme_3.1.168-1_armhf.deb ... 160s Unpacking r-cran-nlme (3.1.168-1) ... 160s Selecting previously unselected package r-cran-pkgkitten. 160s Preparing to unpack .../68-r-cran-pkgkitten_0.2.4-1_all.deb ... 160s Unpacking r-cran-pkgkitten (0.2.4-1) ... 160s Selecting previously unselected package r-cran-rcpp. 160s Preparing to unpack .../69-r-cran-rcpp_1.0.14-1_armhf.deb ... 160s Unpacking r-cran-rcpp (1.0.14-1) ... 161s Selecting previously unselected package r-cran-minqa. 161s Preparing to unpack .../70-r-cran-minqa_1.2.8-1_armhf.deb ... 161s Unpacking r-cran-minqa (1.2.8-1) ... 161s Selecting previously unselected package libnlopt0:armhf. 161s Preparing to unpack .../71-libnlopt0_2.7.1-6ubuntu3_armhf.deb ... 161s Unpacking libnlopt0:armhf (2.7.1-6ubuntu3) ... 161s Selecting previously unselected package r-cran-nloptr. 161s Preparing to unpack .../72-r-cran-nloptr_2.2.1-1_armhf.deb ... 161s Unpacking r-cran-nloptr (2.2.1-1) ... 161s Selecting previously unselected package r-cran-rbibutils. 161s Preparing to unpack .../73-r-cran-rbibutils_2.3-1_armhf.deb ... 161s Unpacking r-cran-rbibutils (2.3-1) ... 161s Selecting previously unselected package r-cran-rdpack. 161s Preparing to unpack .../74-r-cran-rdpack_2.6.3-1_all.deb ... 161s Unpacking r-cran-rdpack (2.6.3-1) ... 161s Selecting previously unselected package r-cran-reformulas. 161s Preparing to unpack .../75-r-cran-reformulas_0.4.0-1_all.deb ... 161s Unpacking r-cran-reformulas (0.4.0-1) ... 161s Selecting previously unselected package r-cran-rcppeigen. 161s Preparing to unpack .../76-r-cran-rcppeigen_0.3.4.0.2-1_armhf.deb ... 161s Unpacking r-cran-rcppeigen (0.3.4.0.2-1) ... 161s Selecting previously unselected package r-cran-statmod. 161s Preparing to unpack .../77-r-cran-statmod_1.5.0-1_armhf.deb ... 161s Unpacking r-cran-statmod (1.5.0-1) ... 161s Selecting previously unselected package r-cran-lme4. 161s Preparing to unpack .../78-r-cran-lme4_1.1-36-1_armhf.deb ... 161s Unpacking r-cran-lme4 (1.1-36-1) ... 161s Selecting previously unselected package r-cran-magrittr. 161s Preparing to unpack .../79-r-cran-magrittr_2.0.3-1_armhf.deb ... 161s Unpacking r-cran-magrittr (2.0.3-1) ... 161s Selecting previously unselected package r-cran-nnet. 161s Preparing to unpack .../80-r-cran-nnet_7.3-20-1_armhf.deb ... 161s Unpacking r-cran-nnet (7.3-20-1) ... 161s Selecting previously unselected package r-cran-numderiv. 161s Preparing to unpack .../81-r-cran-numderiv_2016.8-1.1-3_all.deb ... 161s Unpacking r-cran-numderiv (2016.8-1.1-3) ... 161s Selecting previously unselected package r-cran-ucminf. 161s Preparing to unpack .../82-r-cran-ucminf_1.2.2-1_armhf.deb ... 161s Unpacking r-cran-ucminf (1.2.2-1) ... 161s Selecting previously unselected package r-cran-ordinal. 161s Preparing to unpack .../83-r-cran-ordinal_2023.12-4.1-1_armhf.deb ... 161s Unpacking r-cran-ordinal (2023.12-4.1-1) ... 161s Selecting previously unselected package r-cran-pkgbuild. 161s Preparing to unpack .../84-r-cran-pkgbuild_1.4.6-1_all.deb ... 162s Unpacking r-cran-pkgbuild (1.4.6-1) ... 162s Selecting previously unselected package r-cran-rprojroot. 162s Preparing to unpack .../85-r-cran-rprojroot_2.0.4-2_all.deb ... 162s Unpacking r-cran-rprojroot (2.0.4-2) ... 162s Selecting previously unselected package r-cran-withr. 162s Preparing to unpack .../86-r-cran-withr_3.0.2+dfsg-1_all.deb ... 162s Unpacking r-cran-withr (3.0.2+dfsg-1) ... 162s Selecting previously unselected package r-cran-pkgload. 162s Preparing to unpack .../87-r-cran-pkgload_1.4.0-1_all.deb ... 162s Unpacking r-cran-pkgload (1.4.0-1) ... 162s Selecting previously unselected package r-cran-praise. 162s Preparing to unpack .../88-r-cran-praise_1.0.0-4build1_all.deb ... 162s Unpacking r-cran-praise (1.0.0-4build1) ... 162s Selecting previously unselected package r-cran-waldo. 162s Preparing to unpack .../89-r-cran-waldo_0.6.1-2_all.deb ... 162s Unpacking r-cran-waldo (0.6.1-2) ... 162s Selecting previously unselected package r-cran-testthat. 162s Preparing to unpack .../90-r-cran-testthat_3.2.3-1_armhf.deb ... 162s Unpacking r-cran-testthat (3.2.3-1) ... 162s Selecting previously unselected package r-cran-xtable. 162s Preparing to unpack .../91-r-cran-xtable_1%3a1.8-4-2_all.deb ... 162s Unpacking r-cran-xtable (1:1.8-4-2) ... 162s Setting up libgraphite2-3:armhf (1.3.14-2ubuntu1) ... 162s Setting up libpixman-1-0:armhf (0.44.0-3) ... 162s Setting up libsharpyuv0:armhf (1.5.0-0.1) ... 162s Setting up liblerc4:armhf (4.0.0+ds-5ubuntu1) ... 162s Setting up libxrender1:armhf (1:0.9.10-1.1build1) ... 162s Setting up libdatrie1:armhf (0.2.13-3build1) ... 162s Setting up libxcb-render0:armhf (1.17.0-2) ... 162s Setting up unzip (6.0-28ubuntu6) ... 162s Setting up x11-common (1:7.7+23ubuntu4) ... 162s Setting up libdeflate0:armhf (1.23-1) ... 162s Setting up libnlopt0:armhf (2.7.1-6ubuntu3) ... 162s Setting up libxcb-shm0:armhf (1.17.0-2) ... 162s Setting up libgomp1:armhf (15-20250404-0ubuntu1) ... 162s Setting up libjbig0:armhf (2.1-6.1ubuntu2) ... 162s Setting up zip (3.0-14ubuntu2) ... 162s Setting up libblas3:armhf (3.12.1-2) ... 162s update-alternatives: using /usr/lib/arm-linux-gnueabihf/blas/libblas.so.3 to provide /usr/lib/arm-linux-gnueabihf/libblas.so.3 (libblas.so.3-arm-linux-gnueabihf) in auto mode 162s Setting up libfreetype6:armhf (2.13.3+dfsg-1) ... 162s Setting up fonts-dejavu-mono (2.37-8) ... 162s Setting up libtcl8.6:armhf (8.6.16+dfsg-1) ... 162s Setting up fonts-dejavu-core (2.37-8) ... 162s Setting up libjpeg-turbo8:armhf (2.1.5-3ubuntu2) ... 162s Setting up libgfortran5:armhf (15-20250404-0ubuntu1) ... 162s Setting up libwebp7:armhf (1.5.0-0.1) ... 162s Setting up libharfbuzz0b:armhf (10.2.0-1) ... 162s Setting up libthai-data (0.1.29-2build1) ... 162s Setting up libxss1:armhf (1:1.2.3-1build3) ... 162s Setting up libpaper2:armhf (2.2.5-0.3) ... 163s Setting up xdg-utils (1.2.1-2ubuntu1) ... 163s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 163s Setting up libjpeg8:armhf (8c-2ubuntu11) ... 163s Setting up libice6:armhf (2:1.1.1-1) ... 163s Setting up liblapack3:armhf (3.12.1-2) ... 163s update-alternatives: using /usr/lib/arm-linux-gnueabihf/lapack/liblapack.so.3 to provide /usr/lib/arm-linux-gnueabihf/liblapack.so.3 (liblapack.so.3-arm-linux-gnueabihf) in auto mode 163s Setting up fontconfig-config (2.15.0-2.2ubuntu1) ... 163s Setting up libpaper-utils (2.2.5-0.3) ... 163s Setting up libthai0:armhf (0.1.29-2build1) ... 163s Setting up libtiff6:armhf (4.7.0-3ubuntu1) ... 163s Setting up libfontconfig1:armhf (2.15.0-2.2ubuntu1) ... 163s Setting up libsm6:armhf (2:1.2.4-1) ... 163s Setting up fontconfig (2.15.0-2.2ubuntu1) ... 165s Regenerating fonts cache... done. 165s Setting up libxft2:armhf (2.3.6-1build1) ... 165s Setting up libtk8.6:armhf (8.6.16-1) ... 165s Setting up libpango-1.0-0:armhf (1.56.3-1) ... 165s Setting up libcairo2:armhf (1.18.4-1) ... 165s Setting up libxt6t64:armhf (1:1.2.1-1.2build1) ... 165s Setting up libpangoft2-1.0-0:armhf (1.56.3-1) ... 165s Setting up libpangocairo-1.0-0:armhf (1.56.3-1) ... 165s Setting up r-base-core (4.4.3-1) ... 165s Creating config file /etc/R/Renviron with new version 165s Setting up r-cran-crayon (1.5.3-1) ... 165s Setting up r-cran-lattice (0.22-6-1) ... 165s Setting up r-cran-ps (1.9.0-1) ... 165s Setting up r-cran-nlme (3.1.168-1) ... 165s Setting up r-cran-statmod (1.5.0-1) ... 165s Setting up r-cran-nnet (7.3-20-1) ... 165s Setting up r-cran-r6 (2.6.1-1) ... 165s Setting up r-cran-pkgkitten (0.2.4-1) ... 165s Setting up r-cran-numderiv (2016.8-1.1-3) ... 165s Setting up r-cran-magrittr (2.0.3-1) ... 165s Setting up r-cran-littler (0.3.20-2) ... 165s Setting up r-cran-fs (1.6.5+dfsg-1) ... 165s Setting up r-cran-rcpp (1.0.14-1) ... 165s Setting up r-cran-brio (1.1.5-1) ... 165s Setting up r-cran-nloptr (2.2.1-1) ... 165s Setting up r-cran-boot (1.3-31-1) ... 165s Setting up r-cran-diffobj (0.3.5-1) ... 165s Setting up r-cran-rlang (1.1.5-1) ... 165s Setting up littler (0.3.20-2) ... 165s Setting up r-cran-withr (3.0.2+dfsg-1) ... 165s Setting up r-cran-processx (3.8.6-1) ... 165s Setting up r-cran-praise (1.0.0-4build1) ... 165s Setting up r-cran-digest (0.6.37-1) ... 165s Setting up r-cran-evaluate (1.0.3-1) ... 165s Setting up r-cran-mass (7.3-65-1) ... 165s Setting up r-cran-glue (1.8.0-1) ... 165s Setting up r-cran-xtable (1:1.8-4-2) ... 165s Setting up r-cran-cli (3.6.4-1) ... 165s Setting up r-cran-rbibutils (2.3-1) ... 165s Setting up r-cran-lifecycle (1.0.4+dfsg-1) ... 165s Setting up r-cran-rprojroot (2.0.4-2) ... 165s Setting up r-cran-jsonlite (1.9.1+dfsg-1) ... 165s Setting up r-cran-ucminf (1.2.2-1) ... 165s Setting up r-cran-waldo (0.6.1-2) ... 165s Setting up r-cran-matrix (1.7-3-1) ... 165s Setting up r-cran-rcppeigen (0.3.4.0.2-1) ... 165s Setting up r-cran-minqa (1.2.8-1) ... 165s Setting up r-cran-callr (3.7.6-1) ... 165s Setting up r-cran-ordinal (2023.12-4.1-1) ... 165s Setting up r-cran-desc (1.4.3-1) ... 165s Setting up r-cran-rdpack (2.6.3-1) ... 165s Setting up r-cran-pkgbuild (1.4.6-1) ... 165s Setting up r-cran-reformulas (0.4.0-1) ... 165s Setting up r-cran-pkgload (1.4.0-1) ... 165s Setting up r-cran-lme4 (1.1-36-1) ... 165s Setting up r-cran-testthat (3.2.3-1) ... 165s Processing triggers for libc-bin (2.41-6ubuntu1) ... 165s Processing triggers for man-db (2.13.0-1) ... 166s Processing triggers for install-info (7.1.1-1) ... 174s autopkgtest [02:31:12]: test run-unit-test: [----------------------- 176s BEGIN TEST anova.R 176s 176s R version 4.4.3 (2025-02-28) -- "Trophy Case" 176s Copyright (C) 2025 The R Foundation for Statistical Computing 176s Platform: arm-unknown-linux-gnueabihf (32-bit) 176s 176s R is free software and comes with ABSOLUTELY NO WARRANTY. 176s You are welcome to redistribute it under certain conditions. 176s Type 'license()' or 'licence()' for distribution details. 176s 176s R is a collaborative project with many contributors. 176s Type 'contributors()' for more information and 176s 'citation()' on how to cite R or R packages in publications. 176s 176s Type 'demo()' for some demos, 'help()' for on-line help, or 176s 'help.start()' for an HTML browser interface to help. 176s Type 'q()' to quit R. 176s 176s > library(ordinal) 177s > data(wine) 177s > 177s > fm1 <- clm(rating ~ temp, data=wine) 177s > fmm1 <- clmm(rating ~ temp + (1|judge), data=wine) 177s > 177s > ## These now give identical printed results: 177s > ## Previously the printed model names were messed up when anova.clmm 177s > ## were called. 177s > anova(fm1, fmm1) 177s Likelihood ratio tests of cumulative link models: 177s 177s formula: link: threshold: 177s fm1 rating ~ temp logit flexible 177s fmm1 rating ~ temp + (1 | judge) logit flexible 177s 177s no.par AIC logLik LR.stat df Pr(>Chisq) 177s fm1 5 194.03 -92.013 177s fmm1 6 189.48 -88.739 6.5492 1 0.01049 * 177s --- 177s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 177s > anova(fmm1, fm1) 177s Likelihood ratio tests of cumulative link models: 177s 177s formula: link: threshold: 177s fm1 rating ~ temp logit flexible 177s fmm1 rating ~ temp + (1 | judge) logit flexible 177s 177s no.par AIC logLik LR.stat df Pr(>Chisq) 177s fm1 5 194.03 -92.013 177s fmm1 6 189.48 -88.739 6.5492 1 0.01049 * 177s --- 177s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 177s > 177s > ## Testing if 'test' and 'type' arguments are ignored properly: 177s > fm1 <- clm(rating ~ temp + contact, data=wine) 177s > fm2 <- clm(rating ~ temp, data=wine) 177s 'test' argument ignored in anova.clm 177s 177s 'test' argument ignored in anova.clm 177s 177s > anova(fm1, fm2, test="Chi") 177s Likelihood ratio tests of cumulative link models: 177s 177s formula: link: threshold: 177s fm2 rating ~ temp logit flexible 177s fm1 rating ~ temp + contact logit flexible 177s 177s no.par AIC logLik LR.stat df Pr(>Chisq) 177s fm2 5 194.03 -92.013 177s fm1 6 184.98 -86.492 11.043 1 0.0008902 *** 177s --- 177s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 177s > anova(fm1, fm2, type="Chi") 177s Likelihood ratio tests of cumulative link models: 177s 177s formula: link: threshold: 177s fm2 rating ~ temp logit flexible 177s fm1 rating ~ temp + contact logit flexible 177s 177s no.par AIC logLik LR.stat df Pr(>Chisq) 177s fm2 5 194.03 -92.013 177s fm1 6 184.98 -86.492 11.043 1 0.0008902 *** 177s --- 177s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 177s > anova(fm1, fm2) 177s Likelihood ratio tests of cumulative link models: 177s 177s formula: link: threshold: 177s fm2 rating ~ temp logit flexible 177s fm1 rating ~ temp + contact logit flexible 177s 177s no.par AIC logLik LR.stat df Pr(>Chisq) 177s fm2 5 194.03 -92.013 177s fm1 6 184.98 -86.492 11.043 1 0.0008902 *** 177s --- 177s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 177s > ## calling anova.clmm 177s > anova(fmm1, fm1, test="Chi") 177s Likelihood ratio tests of cumulative link models: 177s 177s formula: link: threshold: 177s fmm1 rating ~ temp + (1 | judge) logit flexible 177s fm1 rating ~ temp + contact logit flexible 177s 177s no.par AIC logLik LR.stat df Pr(>Chisq) 177s fmm1 6 189.48 -88.739 177s fm1 6 184.98 -86.492 4.4938 0 177s > anova(fmm1, fm1, type="Chi") 177s Likelihood ratio tests of cumulative link models: 177s 177s formula: link: threshold: 177s fmm1 rating ~ temp + (1 | judge) logit flexible 177s fm1 rating ~ temp + contact logit flexible 177s 177s no.par AIC logLik LR.stat df Pr(>Chisq) 177s fmm1 6 189.48 -88.739 177s fm1 6 184.98 -86.492 4.4938 0 177s > 177s > 177s BEGIN TEST clm.fit.R 177s 177s R version 4.4.3 (2025-02-28) -- "Trophy Case" 177s Copyright (C) 2025 The R Foundation for Statistical Computing 177s Platform: arm-unknown-linux-gnueabihf (32-bit) 177s 177s R is free software and comes with ABSOLUTELY NO WARRANTY. 177s You are welcome to redistribute it under certain conditions. 177s Type 'license()' or 'licence()' for distribution details. 177s 177s R is a collaborative project with many contributors. 177s Type 'contributors()' for more information and 177s 'citation()' on how to cite R or R packages in publications. 177s 177s Type 'demo()' for some demos, 'help()' for on-line help, or 177s 'help.start()' for an HTML browser interface to help. 177s Type 'q()' to quit R. 177s 177s > library(ordinal) 178s > data(wine) 178s > 178s > ## clm.fit with nominal and scale effects: 178s > 178s > ## get simple model: 178s > fm1 <- clm(rating ~ temp, scale=~temp, nominal=~ contact, 178s + data=wine, method="design") 178s > str(fm1, give.attr=FALSE) 178s List of 23 178s $ y : Ord.factor w/ 5 levels "1"<"2"<"3"<"4"<..: 2 3 3 4 4 4 5 5 1 2 ... 178s $ y.levels : chr [1:5] "1" "2" "3" "4" ... 178s $ X : num [1:72, 1:2] 1 1 1 1 1 1 1 1 1 1 ... 179s $ offset : num [1:72] 0 0 0 0 0 0 0 0 0 0 ... 179s $ terms :Classes 'terms', 'formula' language rating ~ temp 179s $ contrasts :List of 1 179s ..$ temp: chr "contr.treatment" 179s $ xlevels :List of 1 179s ..$ temp: chr [1:2] "cold" "warm" 179s $ weights : num [1:72] 1 1 1 1 1 1 1 1 1 1 ... 179s $ S : num [1:72, 1:2] 1 1 1 1 1 1 1 1 1 1 ... 179s $ S.terms :Classes 'terms', 'formula' language ~temp 179s $ S.off : num [1:72] 0 0 0 0 0 0 0 0 0 0 ... 179s $ S.contrasts :List of 1 179s ..$ temp: chr "contr.treatment" 179s $ S.xlevels :List of 1 179s ..$ temp: chr [1:2] "cold" "warm" 179s $ NOM : num [1:72, 1:2] 1 1 1 1 1 1 1 1 1 1 ... 179s $ nom.terms :Classes 'terms', 'formula' language ~contact 179s $ nom.contrasts:List of 1 179s ..$ contact: chr "contr.treatment" 179s $ nom.xlevels :List of 1 179s ..$ contact: chr [1:2] "no" "yes" 179s $ doFit : logi TRUE 179s $ control :List of 11 179s ..$ method : chr "design" 179s ..$ sign.location: chr "negative" 179s ..$ sign.nominal : chr "positive" 179s ..$ convergence : chr "warn" 179s ..$ trace : int 0 179s ..$ maxIter : int 100 179s ..$ gradTol : num 1e-06 179s ..$ relTol : num 1e-06 179s ..$ tol : num 1.49e-08 179s ..$ maxLineIter : int 15 179s ..$ maxModIter : int 5 179s $ link : chr "logit" 179s $ threshold : chr "flexible" 179s $ start : NULL 179s $ formulas :List of 4 179s ..$ formula :Class 'formula' language rating ~ temp 179s ..$ scale :Class 'formula' language ~temp 179s ..$ nominal :Class 'formula' language ~contact 179s ..$ fullForm:Class 'formula' language rating ~ temp + temp + contact 179s > fm1$control$method <- "Newton" 179s > res <- clm.fit(fm1) 179s > names(res) 179s [1] "aliased" "alpha" "alpha.mat" "beta" 179s [5] "coefficients" "cond.H" "convergence" "df.residual" 179s [9] "edf" "fitted.values" "gradient" "Hessian" 179s [13] "logLik" "maxGradient" "message" "n" 179s [17] "niter" "nobs" "Theta" "tJac" 179s [21] "vcov" "zeta" 179s > res$Theta 179s contact 1|2 2|3 3|4 4|5 179s 1 no -1.357136 1.2482871 3.839568 5.114111 179s 2 yes -2.969353 -0.2819631 1.959306 3.923477 179s > 179s > ## construct some weights and offsets: 179s > set.seed(1) 179s > off1 <- runif(length(fm1$y)) 179s > set.seed(1) 179s > off2 <- rnorm(length(fm1$y)) 179s > set.seed(1) 179s > wet <- runif(length(fm1$y)) 179s > 179s > ## Fit various models: 179s > fit <- clm.fit(fm1$y, fm1$X, fm1$S, fm1$NOM, weights=wet) 179s Warning message: 179s Cannot assess if all thresholds are increasing 179s > Coef <- 179s + c(-0.905224120279548, 1.31043498891987, 3.34235590523008, 179s + 4.52389661722693, -3.03954652971192, -1.56922389038976, 179s + -1.75662549320839, -1.16845464236365, 2.52988580848393, 179s + -0.0261457032829033) 179s > stopifnot(all.equal(coef(fit), Coef, check.attributes=FALSE, tol=1e-6)) 179s > str(fit) 179s List of 20 179s $ aliased :List of 3 179s ..$ alpha: Named logi [1:8] FALSE FALSE FALSE FALSE FALSE FALSE ... 179s .. ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s ..$ beta : Named logi FALSE 179s .. ..- attr(*, "names")= chr "tempwarm" 179s ..$ zeta : Named logi FALSE 179s .. ..- attr(*, "names")= chr "tempwarm" 179s $ alpha : Named num [1:8] -0.905 1.31 3.342 4.524 -3.04 ... 179s ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s $ beta : Named num 2.53 179s ..- attr(*, "names")= chr "tempwarm" 179s $ coefficients : Named num [1:10] -0.905 1.31 3.342 4.524 -3.04 ... 179s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s $ cond.H : num 161 179s $ convergence :List of 3 179s ..$ code : int 0 179s ..$ messages : chr "successful convergence" 179s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 179s $ df.residual : num 27 179s $ edf : int 10 179s $ fitted.values: num [1:72] 0.5 0.178 0.394 0.136 0.188 ... 179s $ gradient : Named num [1:10] 7.85e-15 2.69e-13 2.68e-13 -5.17e-13 3.75e-16 ... 179s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s $ Hessian : num [1:10, 1:10] 2.488 -1.01 0 0 0.207 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s Warning message: 179s Cannot assess if all thresholds are increasing 179s $ logLik : num -44.9 179s $ maxGradient : num 8.91e-13 179s $ message : chr "Absolute and relative convergence criteria were met" 179s $ n : int 72 179s $ niter : Named num [1:2] 9 0 179s ..- attr(*, "names")= chr [1:2] "outer" "inner" 179s $ nobs : num 37 179s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s $ vcov : num [1:10, 1:10] 0.5338 0.1835 0.0254 -0.0626 -0.511 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s $ zeta : Named num -0.0261 179s ..- attr(*, "names")= chr "tempwarm" 179s - attr(*, "class")= chr "clm.fit" 179s > 179s > fit <- clm.fit(fm1$y, fm1$X, fm1$S, fm1$NOM, offset=off1) 179s > str(fit) 179s List of 20 179s $ aliased :List of 3 179s ..$ alpha: Named logi [1:8] FALSE FALSE FALSE FALSE FALSE FALSE ... 179s .. ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s ..$ beta : Named logi FALSE 179s .. ..- attr(*, "names")= chr "tempwarm" 179s ..$ zeta : Named logi FALSE 179s .. ..- attr(*, "names")= chr "tempwarm" 179s $ alpha : Named num [1:8] -0.864 1.746 4.342 5.615 -1.567 ... 179s ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s $ beta : Named num 2.7 179s ..- attr(*, "names")= chr "tempwarm" 179s $ coefficients : Named num [1:10] -0.864 1.746 4.342 5.615 -1.567 ... 179s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s $ cond.H : num 196 179s $ convergence :List of 3 179s ..$ code : int 0 179s ..$ messages : chr "successful convergence" 179s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 179s $ df.residual : num 62 179s $ edf : int 10 179s $ fitted.values: num [1:72] 0.57 0.183 0.452 0.145 0.135 ... 179s $ gradient : Named num [1:10] 2.19e-09 6.14e-08 5.92e-08 -1.23e-07 4.69e-10 ... 179s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s $ Hessian : num [1:10, 1:10] 4.48 -1.89 0 0 1.02 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s $ logLik : num -86.1 179s $ maxGradient : num 2.17e-07 179s $ message : chr "Absolute and relative convergence criteria were met" 179s $ n : int 72 179s $ niter : Named num [1:2] 8 0 179s ..- attr(*, "names")= chr [1:2] "outer" "inner" 179s $ nobs : num 72 179s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s $ vcov : num [1:10, 1:10] 0.33117 0.09074 0.00108 -0.04015 -0.31468 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s $ zeta : Named num 0.114 179s ..- attr(*, "names")= chr "tempwarm" 179s - attr(*, "class")= chr "clm.fit" 179s > 179s > fit <- clm.fit(fm1$y, fm1$X, fm1$S, fm1$NOM, offset=off1, 179s + S.offset=off2) 179s > str(fit) 179s List of 20 179s Warning message: 179s Cannot assess if all thresholds are increasing 179s $ aliased :List of 3 179s ..$ alpha: Named logi [1:8] FALSE FALSE FALSE FALSE FALSE FALSE ... 179s .. ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s ..$ beta : Named logi FALSE 179s .. ..- attr(*, "names")= chr "tempwarm" 179s ..$ zeta : Named logi FALSE 179s .. ..- attr(*, "names")= chr "tempwarm" 179s $ alpha : Named num [1:8] -0.585 1.951 3.24 4.18 -6.481 ... 179s ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s $ beta : Named num 2.12 179s ..- attr(*, "names")= chr "tempwarm" 179s $ coefficients : Named num [1:10] -0.585 1.951 3.24 4.18 -6.481 ... 179s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s $ cond.H : num 634 179s $ convergence :List of 3 179s ..$ code : int 0 179s ..$ messages : chr "successful convergence" 179s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 179s $ df.residual : num 62 179s $ edf : int 10 179s $ fitted.values: num [1:72] 0.7899 0.1277 0.7 0.0888 0.1521 ... 179s $ gradient : Named num [1:10] 6.72e-12 8.06e-10 7.28e-10 -7.85e-10 1.15e-12 ... 179s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s $ Hessian : num [1:10, 1:10] 4.126 -1.006 0 0 0.079 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s $ logLik : num -87.6 179s $ maxGradient : num 9.74e-10 179s $ message : chr "Absolute and relative convergence criteria were met" 179s $ n : int 72 179s $ niter : Named num [1:2] 13 0 179s ..- attr(*, "names")= chr [1:2] "outer" "inner" 179s $ nobs : num 72 179s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s $ vcov : num [1:10, 1:10] 0.2616 0.0523 0.0345 0.0236 -0.2449 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 179s $ zeta : Named num -0.502 179s ..- attr(*, "names")= chr "tempwarm" 179s - attr(*, "class")= chr "clm.fit" 179s > 179s > fit <- clm.fit(fm1$y, fm1$X, fm1$S) 179s > str(fit) 179s List of 21 179s $ aliased :List of 3 179s ..$ alpha: Named logi [1:4] FALSE FALSE FALSE FALSE 179s .. ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s ..$ beta : Named logi FALSE 179s .. ..- attr(*, "names")= chr "tempwarm" 179s ..$ zeta : Named logi FALSE 179s .. ..- attr(*, "names")= chr "tempwarm" 179s $ alpha : Named num [1:4] -1.988 0.418 2.648 4.306 179s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s $ beta : Named num 2.51 179s ..- attr(*, "names")= chr "tempwarm" 179s $ coefficients : Named num [1:6] -1.988 0.418 2.648 4.306 2.512 ... 179s ..- attr(*, "names")= chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 179s $ cond.H : num 80.6 179s $ convergence :List of 3 179s ..$ code : int 0 179s ..$ messages : chr "successful convergence" 179s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 179s $ df.residual : num 66 179s $ edf : int 6 179s $ fitted.values: num [1:72] 0.4826 0.3308 0.3308 0.0528 0.2897 ... 179s $ gradient : Named num [1:6] 7.03e-09 6.91e-08 5.99e-07 -7.42e-07 2.76e-08 ... 179s ..- attr(*, "names")= chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 179s $ Hessian : num [1:6, 1:6] 4.8066 -2.4889 0 0 -0.0926 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 179s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 179s $ logLik : num -91.8 179s $ maxGradient : num 8.53e-07 179s $ message : chr "Absolute and relative convergence criteria were met" 179s $ n : int 72 179s $ niter : Named num [1:2] 8 0 179s ..- attr(*, "names")= chr [1:2] "outer" "inner" 179s $ nobs : num 72 179s $ Theta : num [1, 1:4] -1.988 0.418 2.648 4.306 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : NULL 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s $ vcov : num [1:6, 1:6] 0.2481 0.0622 0.0179 -0.0253 0.0197 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 179s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 179s $ zeta : Named num 0.176 179s ..- attr(*, "names")= chr "tempwarm" 179s - attr(*, "class")= chr "clm.fit" 179s > 179s > fit <- clm.fit(fm1$y, fm1$X) 179s > str(fit) 179s List of 20 179s $ aliased :List of 2 179s ..$ alpha: Named logi [1:4] FALSE FALSE FALSE FALSE 179s .. ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s ..$ beta : Named logi FALSE 179s .. ..- attr(*, "names")= chr "tempwarm" 179s $ alpha : Named num [1:4] -1.936 0.435 2.432 3.827 179s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s $ beta : Named num 2.29 179s ..- attr(*, "names")= chr "tempwarm" 179s $ coefficients : Named num [1:5] -1.936 0.435 2.432 3.827 2.287 179s ..- attr(*, "names")= chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 179s $ cond.H : num 16.8 179s $ convergence :List of 3 179s ..$ code : int 0 179s ..$ messages : chr "successful convergence" 179s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 179s $ df.residual : num 67 179s $ edf : int 5 179s $ fitted.values: num [1:72] 0.481 0.3122 0.3122 0.0594 0.2871 ... 179s $ gradient : Named num [1:5] 4.07e-14 8.24e-14 -9.90e-14 6.66e-16 -2.22e-14 179s ..- attr(*, "names")= chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 179s $ Hessian : num [1:5, 1:5] 4.8983 -2.499 0 0 -0.0854 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 179s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 179s $ logLik : num -92 179s $ maxGradient : num 9.9e-14 179s $ message : chr "Absolute and relative convergence criteria were met" 179s $ n : int 72 179s $ niter : Named num [1:2] 6 0 179s ..- attr(*, "names")= chr [1:2] "outer" "inner" 179s $ nobs : num 72 179s $ Theta : num [1, 1:4] -1.936 0.435 2.432 3.827 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : NULL 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s $ vcov : num [1:5, 1:5] 0.2345 0.0577 0.0505 0.0512 0.0537 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 179s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 179s - attr(*, "class")= chr "clm.fit" 179s > 179s > fit <- clm.fit(fm1$y) 179s > coef(fit) 179s 1|2 2|3 3|4 4|5 179s -2.5952547 -0.5108256 1.0258529 2.2284771 179s > str(fit) 179s List of 19 179s $ aliased :List of 2 179s ..$ alpha: Named logi [1:4] FALSE FALSE FALSE FALSE 179s .. ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s ..$ beta : Named logi(0) 179s .. ..- attr(*, "names")= chr(0) 179s $ alpha : Named num [1:4] -2.595 -0.511 1.026 2.228 179s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s $ coefficients : Named num [1:4] -2.595 -0.511 1.026 2.228 179s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s $ cond.H : num 8.38 179s $ convergence :List of 3 179s ..$ code : int 0 179s ..$ messages : chr "successful convergence" 179s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 179s $ df.residual : num 68 179s $ edf : int 4 179s $ fitted.values: num [1:72] 0.306 0.361 0.361 0.167 0.167 ... 179s $ gradient : Named num [1:4] 7.23e-08 -5.51e-08 -1.72e-11 -4.86e-12 179s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s $ Hessian : num [1:4, 1:4] 5.31 -3.57 0 0 -3.57 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s $ logLik : num -104 179s $ maxGradient : num 7.23e-08 179s $ message : chr "Absolute and relative convergence criteria were met" 179s $ n : int 72 179s $ niter : Named num [1:2] 5 0 179s ..- attr(*, "names")= chr [1:2] "outer" "inner" 179s $ nobs : num 72 179s $ Theta : num [1, 1:4] -2.595 -0.511 1.026 2.228 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : NULL 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s $ vcov : num [1:4, 1:4] 0.2149 0.0398 0.0203 0.0165 0.0398 ... 179s ..- attr(*, "dimnames")=List of 2 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 179s - attr(*, "class")= chr "clm.fit" 179s > 179s > ## Remember: compare with corresponding .Rout file 179s > 179s BEGIN TEST clm.formula.R 179s 179s R version 4.4.3 (2025-02-28) -- "Trophy Case" 179s Copyright (C) 2025 The R Foundation for Statistical Computing 179s Platform: arm-unknown-linux-gnueabihf (32-bit) 179s 179s R is free software and comes with ABSOLUTELY NO WARRANTY. 179s You are welcome to redistribute it under certain conditions. 179s Type 'license()' or 'licence()' for distribution details. 179s 179s R is a collaborative project with many contributors. 179s Type 'contributors()' for more information and 179s 'citation()' on how to cite R or R packages in publications. 179s 179s Type 'demo()' for some demos, 'help()' for on-line help, or 179s 'help.start()' for an HTML browser interface to help. 179s Type 'q()' to quit R. 179s 179s > library(ordinal) 180s > ## library(devtools) 180s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 180s > ## clean_dll(pkg = r2path) 180s > ## load_all(r2path) 180s > 180s > ################################# 180s > ## Appropriate evaluation of formulas: 180s > 180s > ## These fail and give appropriate error messages: 180s > ## fm1 <- clm(rating ~ contact, scale=temp, data=wine) 180s > ## fm1 <- clm(rating ~ contact, scale=~Temp, data=wine) 180s > ## fm1 <- clm(rating ~ contact, scale="temp", data=wine) 180s > ## sca <- "temp" 180s > ## fm1 <- clm(rating ~ contact, scale=sca, data=wine) 180s > ## sca <- as.formula(sca) 180s > ## sca <- as.formula(temp) 180s > ## sca <- with(wine, as.formula(temp)) 180s > 180s > ## These all work as intended with no warnings or errors: 180s > fm1 <- clm(rating ~ contact, scale="~temp", data=wine) 180s > fm1 <- clm(rating ~ contact, scale=~temp, data=wine) 180s > sca <- "~temp" 180s > fm1 <- clm(rating ~ contact, scale=sca, data=wine) 180s > sca <- as.formula("~temp") 180s > fm1 <- clm(rating ~ contact, scale=sca, data=wine) 180s > fm1 <- clm(rating ~ contact, scale=as.formula(~temp), data=wine) 180s > fm1 <- clm(rating ~ contact, scale=as.formula("~temp"), data=wine) 180s > 180s > ################################# 180s > ## can evaluate if 'formula' is a character: 180s > f <- "rating ~ contact + temp" 180s > clm(f, data=wine) 180s formula: rating ~ contact + temp 180s data: wine 180s 180s link threshold nobs logLik AIC niter max.grad cond.H 180s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 180s 180s Coefficients: 180s contactyes tempwarm 180s 1.528 2.503 180s 180s Threshold coefficients: 180s 1|2 2|3 3|4 4|5 180s -1.344 1.251 3.467 5.006 180s > clm(as.formula(f), data=wine) 180s formula: rating ~ contact + temp 180s data: wine 180s 180s link threshold nobs logLik AIC niter max.grad cond.H 180s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 180s 180s Coefficients: 180s contactyes tempwarm 180s 1.528 2.503 180s 180s Threshold coefficients: 180s 1|2 2|3 3|4 4|5 180s -1.344 1.251 3.467 5.006 180s > 180s > ################################# 180s > 180s > ### finding variables in the environment of the formula: 180s > makeform <- function() { 180s + f1 <- as.formula(rating ~ temp + contact) 180s + rating <- wine$rating 180s + temp <- wine$temp 180s + contact <- wine$contact 180s + f1 180s + } 180s > ## 'makeform' makes are formula object in the environment of the 180s > ## function makeform: 180s > f1 <- makeform() 180s > f1 # print 180s rating ~ temp + contact 180s 180s > class(f1) 180s [1] "formula" 180s > ## If we give the data, we can evaluate the model: 180s > fm1 <- clm(f1, data=wine) 180s > ## We can also evaluate the model because the data are available in 180s > ## the environment associated with the formula: 180s > fm1 <- clm(f1) 180s > ## For instance, the 'rating' variable is not found in the Global 180s > ## environment; we have to evaluate the 'name' of 'rating' in the 180s > ## appropriate environment: 180s > (try(rating, silent=TRUE)) 180s [1] "Error : object 'rating' not found\n" 180s attr(,"class") 180s [1] "try-error" 180s attr(,"condition") 180s 180s > eval(as.name("rating"), envir=environment(f1)) 180s [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 180s [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 180s Levels: 1 < 2 < 3 < 4 < 5 180s > ## If instead we generate the formula in the Global environment where 180s > ## the variables are not found, we cannot evaluate the model: 180s > f2 <- as.formula(rating ~ temp + contact) 180s > (try(fm2 <- clm(f2), silent=TRUE)) 180s [1] "Error in eval(predvars, data, env) : object 'rating' not found\n" 180s attr(,"class") 180s [1] "try-error" 180s attr(,"condition") 180s 180s > environment(f2) <- environment(f1) 180s > fm2 <- clm(f2) 180s > 180s > 180s > ################################# 180s > ## Use of formula-objects in location, scale and nominal: 180s > ## Bug-report from Llus Marco Almagro 180s > ## 5 May 2010 17:58 180s > f <- formula(rating ~ temp) 180s > fs <- formula( ~ contact) 180s > m2 <- clm(f, scale = fs, data = wine) 180s > summary(m2) 180s formula: rating ~ temp 180s scale: ~contact 180s data: wine 180s 180s link threshold nobs logLik AIC niter max.grad cond.H 180s logit flexible 72 -91.92 195.83 8(0) 1.57e-09 5.6e+01 180s 180s Coefficients: 180s Estimate Std. Error z value Pr(>|z|) 180s tempwarm 2.1690 0.5527 3.924 8.69e-05 *** 180s --- 180s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 180s 180s log-scale coefficients: 180s Estimate Std. Error z value Pr(>|z|) 180s contactyes -0.1222 0.2775 -0.44 0.66 180s 180s Threshold coefficients: 180s Estimate Std. Error z value 180s 1|2 -1.8957 0.4756 -3.986 180s 2|3 0.3668 0.3442 1.066 180s 3|4 2.2483 0.5932 3.790 180s 4|5 3.5393 0.8336 4.246 180s > 180s > ################################# 180s > ## Other ways to construct formulas: 180s > set.seed(12345) 180s > y <- factor(sample(1:4,20,replace=TRUE)) 180s > x <- rnorm(20) 180s > data <- data.frame(y=y,x=x) 180s > rm(x, y) 180s > fit <- clm(data$y ~ data$x) 180s > fit 180s formula: data$y ~ data$x 180s 180s link threshold nobs logLik AIC niter max.grad cond.H 180s logit flexible 20 -25.37 58.74 5(0) 2.68e-09 8.4e+00 180s 180s Coefficients: 180s data$x 180s 0.2527 180s 180s Threshold coefficients: 180s 1|2 2|3 3|4 180s -2.18234 0.06059 0.92746 180s > fit <- clm(data[,1] ~ data[,2]) 180s > fit 180s formula: data[, 1] ~ data[, 2] 180s 180s link threshold nobs logLik AIC niter max.grad cond.H 180s logit flexible 20 -25.37 58.74 5(0) 2.68e-09 8.4e+00 180s 180s Coefficients: 180s data[, 2] 180s 0.2527 180s 180s Threshold coefficients: 180s 1|2 2|3 3|4 180s -2.18234 0.06059 0.92746 180s > ## This previously failed, but now works: 180s > fit <- clm(data$y ~ data$x, ~data$x) 180s > fit 180s formula: data$y ~ data$x 180s scale: ~data$x 180s 180s link threshold nobs logLik AIC niter max.grad cond.H 180s logit flexible 20 -25.32 60.64 7(0) 1.86e-09 9.7e+00 180s 180s Coefficients: 180s data$x 180s 0.2477 180s 180s log-scale coefficients: 180s data$x 180s -0.1136 180s 180s Threshold coefficients: 180s 1|2 2|3 3|4 180s -2.16950 0.07039 0.91381 180s > 180s > ################################# 180s > ## Evaluation within other functions: 180s > ## date: January 18th 2012. 180s > ## 180s > ## The problem was raised by Stefan Herzog (stefan.herzog@unibas.ch) 180s > ## January 12th 2012 in trying to make clm work with glmulti. 180s > 180s > fun.clm <- function(formula, data) 180s + ### This only works because clm via eclm.model.frame is careful to 180s + ### evaluate the 'formula' in the parent environment such it is not the 180s + ### character "formula" that is attempted evaluated. 180s + clm(formula, data = data) 180s > 180s > fun2.clm <- function(formula, data, weights, subset) { 180s + ### This should be the safe way to ensure evaluation of clm in the 180s + ### right environment. 180s + mc <- match.call() 180s + mc[[1]] <- as.name("clm") 180s + eval.parent(mc) 180s + } 180s > 180s > fun.clm(rating ~ temp + contact, data=wine) ## works 180s formula: rating ~ temp + contact 180s data: data 180s 180s link threshold nobs logLik AIC niter max.grad cond.H 180s logit flexible 72 -86.49 184.98 6(0) 4.02e-12 2.7e+01 180s 180s Coefficients: 180s tempwarm contactyes 180s 2.503 1.528 180s 180s Threshold coefficients: 180s 1|2 2|3 3|4 4|5 180s -1.344 1.251 3.467 5.006 180s > fun2.clm(rating ~ temp + contact, data=wine) ## works 180s formula: rating ~ temp + contact 180s data: wine 180s 180s link threshold nobs logLik AIC niter max.grad cond.H 180s logit flexible 72 -86.49 184.98 6(0) 4.02e-12 2.7e+01 180s 180s Coefficients: 180s tempwarm contactyes 180s 2.503 1.528 180s 180s Threshold coefficients: 180s 1|2 2|3 3|4 4|5 180s -1.344 1.251 3.467 5.006 180s > 180s > form1 <- "rating ~ temp + contact" 180s > fun.clm(form1, data=wine) ## works 180s formula: rating ~ temp + contact 180s data: data 180s 180s link threshold nobs logLik AIC niter max.grad cond.H 180s logit flexible 72 -86.49 184.98 6(0) 4.02e-12 2.7e+01 180s 180s Coefficients: 180s tempwarm contactyes 180s 2.503 1.528 180s 180s Threshold coefficients: 180s 1|2 2|3 3|4 4|5 180s -1.344 1.251 3.467 5.006 180s > fun2.clm(form1, data=wine) ## works 180s formula: rating ~ temp + contact 180s data: wine 180s 180s link threshold nobs logLik AIC niter max.grad cond.H 180s logit flexible 72 -86.49 184.98 6(0) 4.02e-12 2.7e+01 180s 180s Coefficients: 180s tempwarm contactyes 180s 2.503 1.528 180s 180s Threshold coefficients: 180s 1|2 2|3 3|4 4|5 180s -1.344 1.251 3.467 5.006 180s > 180s > form2 <- formula(rating ~ temp + contact) 180s > fun.clm(form2, data=wine) ## works 180s formula: rating ~ temp + contact 180s data: data 180s 180s link threshold nobs logLik AIC niter max.grad cond.H 180s logit flexible 72 -86.49 184.98 6(0) 4.02e-12 2.7e+01 180s 180s Coefficients: 180s tempwarm contactyes 180s 2.503 1.528 180s 180s Threshold coefficients: 180s 1|2 2|3 3|4 4|5 180s -1.344 1.251 3.467 5.006 180s > fun2.clm(form2, data=wine) ## works 180s formula: rating ~ temp + contact 180s data: wine 180s 180s link threshold nobs logLik AIC niter max.grad cond.H 180s logit flexible 72 -86.49 184.98 6(0) 4.02e-12 2.7e+01 180s 180s Coefficients: 180s tempwarm contactyes 180s 2.503 1.528 180s 180s Threshold coefficients: 180s 1|2 2|3 3|4 4|5 180s -1.344 1.251 3.467 5.006 180s > ## Notice that clm is not able to get the name of the data (wine) 180s > ## correct when using fun.clm. 180s > 180s > ################################# 180s > ## Evaluation of long formulas: no line breaking in getFullForm: 180s > data(soup, package="ordinal") 180s > 180s > rhs <- paste(names(soup)[c(3, 5:12)], collapse=" + ") 180s > Location <- as.formula(paste("SURENESS ~ ", rhs, sep=" ")) 180s > Scale <- as.formula("~ PROD") 180s > 180s > fm5 <- clm(Location, scale=Scale, data=soup) 180s > summary(fm5) 180s formula: 180s SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ + COLD + EASY + GENDER + AGEGROUP + LOCATION 180s scale: ~PROD 180s data: soup 180s 180s link threshold nobs logLik AIC niter max.grad cond.H 180s logit flexible 1847 -2651.65 5367.30 8(1) 4.65e-07 1.1e+04 180s 180s Coefficients: 180s Estimate Std. Error z value Pr(>|z|) 180s PRODID2 1.09324 0.14790 7.392 1.45e-13 *** 180s PRODID3 1.54233 0.21252 7.257 3.95e-13 *** 180s PRODID4 0.95602 0.18180 5.258 1.45e-07 *** 180s PRODID5 1.52404 0.20311 7.504 6.21e-14 *** 180s PRODID6 1.83964 0.21750 8.458 < 2e-16 *** 180s DAY2 -0.26999 0.10280 -2.626 0.00863 ** 180s SOUPTYPECanned -0.31340 0.11745 -2.668 0.00762 ** 180s SOUPTYPEDry-mix 0.22429 0.14295 1.569 0.11665 180s SOUPFREQ1-4/month -0.06459 0.10551 -0.612 0.54046 180s SOUPFREQ<1/month 0.03664 0.21310 0.172 0.86350 180s COLDYes 0.31373 0.14894 2.106 0.03517 * 180s EASY2 0.16689 0.55063 0.303 0.76182 180s EASY3 0.34765 0.50432 0.689 0.49061 180s EASY4 0.30008 0.48283 0.621 0.53428 180s EASY5 0.23492 0.47686 0.493 0.62226 180s EASY6 -0.03205 0.46993 -0.068 0.94562 180s EASY7 0.02823 0.46963 0.060 0.95208 180s EASY8 -0.04600 0.47066 -0.098 0.92215 180s EASY9 -0.04084 0.49595 -0.082 0.93437 180s EASY10 1.03641 0.60080 1.725 0.08452 . 180s GENDERFemale -0.05092 0.10738 -0.474 0.63534 180s AGEGROUP31-40 0.02098 0.14822 0.142 0.88745 180s AGEGROUP41-50 0.23712 0.15824 1.498 0.13401 180s AGEGROUP51-65 -0.13791 0.14393 -0.958 0.33798 180s LOCATIONRegion 2 -0.09641 0.13225 -0.729 0.46599 180s LOCATIONRegion 3 0.06062 0.11981 0.506 0.61290 180s --- 180s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 180s 180s log-scale coefficients: 180s Estimate Std. Error z value Pr(>|z|) 180s PRODTest 0.14545 0.06621 2.197 0.028 * 180s --- 180s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 180s 180s Threshold coefficients: 180s Estimate Std. Error z value 180s 1|2 -1.64700 0.49982 -3.295 180s 2|3 -0.58840 0.49681 -1.184 180s 3|4 -0.23496 0.49669 -0.473 180s 4|5 0.04394 0.49679 0.088 180s 5|6 0.78551 0.49869 1.575 180s > 180s > ################################# 180s > ## Check that "."-notation works in formula: 180s > ## December 25th 2014, RHBC 180s > data(wine) 180s > wine2 <- wine[c("rating", "contact", "temp")] 180s > str(wine2) 180s 'data.frame': 72 obs. of 3 variables: 180s $ rating : Ord.factor w/ 5 levels "1"<"2"<"3"<"4"<..: 2 3 3 4 4 4 5 5 1 2 ... 180s $ contact: Factor w/ 2 levels "no","yes": 1 1 2 2 1 1 2 2 1 1 ... 180s $ temp : Factor w/ 2 levels "cold","warm": 1 1 1 1 2 2 2 2 1 1 ... 180s > fm0 <- clm(rating ~ ., data=wine2) 180s > fm1 <- clm(rating ~ contact + temp, data=wine2) 180s > keep <- c("coefficients", "logLik", "info") 180s > fun <- function(x, y) stopifnot(isTRUE(all.equal(x, y))) 180s > mapply(fun, fm0[keep], fm1[keep]) 180s $coefficients 180s NULL 180s 180s $logLik 180s NULL 180s 180s $info 180s NULL 180s 180s > ################################# 180s > 181s BEGIN TEST clmm.R 181s 181s R version 4.4.3 (2025-02-28) -- "Trophy Case" 181s Copyright (C) 2025 The R Foundation for Statistical Computing 181s Platform: arm-unknown-linux-gnueabihf (32-bit) 181s 181s R is free software and comes with ABSOLUTELY NO WARRANTY. 181s You are welcome to redistribute it under certain conditions. 181s Type 'license()' or 'licence()' for distribution details. 181s 181s R is a collaborative project with many contributors. 181s Type 'contributors()' for more information and 181s 'citation()' on how to cite R or R packages in publications. 181s 181s Type 'demo()' for some demos, 'help()' for on-line help, or 181s 'help.start()' for an HTML browser interface to help. 181s Type 'q()' to quit R. 181s 181s > library(ordinal) 182s > data(wine) 182s > 182s > ################################# 182s > ## Estimation with a single simple RE term: 182s > ## Laplace: 182s > fmm1 <- clmm(rating ~ contact + temp + (1|judge), data=wine) 182s > summary(fmm1) 182s Cumulative Link Mixed Model fitted with the Laplace approximation 182s 182s formula: rating ~ contact + temp + (1 | judge) 182s data: wine 182s 182s link threshold nobs logLik AIC niter max.grad cond.H 182s logit flexible 72 -81.57 177.13 332(999) 1.04e-05 2.8e+01 182s 182s Random effects: 182s Groups Name Variance Std.Dev. 182s judge (Intercept) 1.279 1.131 182s Number of groups: judge 9 182s 182s Coefficients: 182s Estimate Std. Error z value Pr(>|z|) 182s contactyes 1.8349 0.5125 3.580 0.000344 *** 182s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 182s --- 182s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 182s 182s Threshold coefficients: 182s Estimate Std. Error z value 182s 1|2 -1.6237 0.6824 -2.379 182s 2|3 1.5134 0.6038 2.507 182s 3|4 4.2285 0.8090 5.227 182s 4|5 6.0888 0.9725 6.261 182s > ## GHQ: 182s > fmm.ghq <- clmm(rating ~ contact + temp + (1|judge), data=wine, 182s + nAGQ=-10) 182s > summary(fmm.ghq) 182s Cumulative Link Mixed Model fitted with the Gauss-Hermite 182s quadrature approximation with 10 quadrature points 182s 182s formula: rating ~ contact + temp + (1 | judge) 182s data: wine 182s 182s link threshold nobs logLik AIC niter max.grad cond.H 182s logit flexible 72 -81.53 177.06 304(3) 1.67e-05 2.8e+01 182s 182s Random effects: 182s Groups Name Variance Std.Dev. 182s judge (Intercept) 1.288 1.135 182s Number of groups: judge 9 182s 182s Coefficients: 182s Estimate Std. Error z value Pr(>|z|) 182s contactyes 1.8335 0.5122 3.580 0.000344 *** 182s tempwarm 3.0620 0.5951 5.145 2.67e-07 *** 182s --- 182s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 182s 182s Threshold coefficients: 182s Estimate Std. Error z value 182s 1|2 -1.6231 0.6829 -2.377 182s 2|3 1.5133 0.6045 2.503 182s 3|4 4.2277 0.8094 5.223 182s 4|5 6.0869 0.9726 6.258 182s > ## AGQ: 182s > fmm.agq <- clmm(rating ~ contact + temp + (1|judge), data=wine, 182s + nAGQ=10) 182s > summary(fmm.agq) 182s Cumulative Link Mixed Model fitted with the adaptive Gauss-Hermite 182s quadrature approximation with 10 quadrature points 182s 182s formula: rating ~ contact + temp + (1 | judge) 182s data: wine 182s 182s link threshold nobs logLik AIC niter max.grad cond.H 182s logit flexible 72 -81.53 177.06 304(915) 2.26e-05 2.8e+01 182s 182s Random effects: 182s Groups Name Variance Std.Dev. 182s judge (Intercept) 1.288 1.135 182s Number of groups: judge 9 182s 182s Coefficients: 182s Estimate Std. Error z value Pr(>|z|) 182s contactyes 1.8334 0.5122 3.580 0.000344 *** 182s tempwarm 3.0619 0.5951 5.145 2.67e-07 *** 182s --- 182s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 182s 182s Threshold coefficients: 182s Estimate Std. Error z value 182s 1|2 -1.6235 0.6834 -2.376 182s 2|3 1.5128 0.6044 2.503 182s 3|4 4.2271 0.8090 5.225 182s 4|5 6.0862 0.9719 6.262 182s > ## tests: 182s > ## Notice warning about Laplace with multiple REs when nAGQ != 1: 182s > fmm1 <- try(clmm(rating ~ contact + temp + (1|judge) + (1|bottle), 182s + data=wine, nAGQ=10)) 182s > stopifnot(inherits(fmm1, "try-error")) 182s > 182s > ################################# 182s > ## Estimation with several RE terms: 182s > data(soup, package="ordinal") 182s Error : Quadrature methods are not available with more than one random effects term 182s > fmm <- clmm(SURENESS ~ PROD + (1|RESP) + (1|PROD:RESP), data=soup, 182s + threshold="equidistant") 184s > summary(fmm) 184s Cumulative Link Mixed Model fitted with the Laplace approximation 184s 184s formula: SURENESS ~ PROD + (1 | RESP) + (1 | PROD:RESP) 184s data: soup 184s 184s link threshold nobs logLik AIC niter max.grad cond.H 184s logit equidistant 1847 -2766.32 5542.63 225(711) 9.82e-04 1.3e+02 184s 184s Random effects: 184s Groups Name Variance Std.Dev. 184s PROD:RESP (Intercept) 0.4070 0.6379 184s RESP (Intercept) 0.1308 0.3616 184s Number of groups: PROD:RESP 370, RESP 185 184s 184s Coefficients: 184s Estimate Std. Error z value Pr(>|z|) 184s PRODTest 1.2865 0.1156 11.12 <2e-16 *** 184s --- 184s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 184s 184s Threshold coefficients: 184s Estimate Std. Error z value 184s threshold.1 -1.35104 0.09526 -14.18 184s spacing 0.56472 0.01905 29.65 184s > 184s > ################################# 184s > 184s > ## Estimation with implicit intercept: 184s > fm1 <- clmm(rating ~ 1 + (1|judge), data = wine) 184s > fm2 <- clmm(rating ~ (1|judge), data = wine) 184s > fm3 <- clmm(rating ~ 0 + (1|judge), data = wine) 184s > stopifnot(isTRUE(all.equal(coef(fm1), coef(fm2), tolerance=1e-5)), 184s + isTRUE(all.equal(coef(fm1), coef(fm3), tolerance=1e-5))) 184s > 184s Warning message: 184s In getX(fullmf, fixedmf, contrasts) : an intercept is needed and assumed 184s BEGIN TEST clmm.control.R 184s 184s R version 4.4.3 (2025-02-28) -- "Trophy Case" 184s Copyright (C) 2025 The R Foundation for Statistical Computing 184s Platform: arm-unknown-linux-gnueabihf (32-bit) 184s 184s R is free software and comes with ABSOLUTELY NO WARRANTY. 184s You are welcome to redistribute it under certain conditions. 184s Type 'license()' or 'licence()' for distribution details. 184s 184s R is a collaborative project with many contributors. 184s Type 'contributors()' for more information and 184s 'citation()' on how to cite R or R packages in publications. 184s 184s Type 'demo()' for some demos, 'help()' for on-line help, or 184s 'help.start()' for an HTML browser interface to help. 184s Type 'q()' to quit R. 184s 184s > library(ordinal) 185s > data(wine) 185s > 185s > 185s > ### 3 options for specifying control arguments: 185s > ## 1) control is a simple list, e.g. list(trace=-1) 185s > ## 2) control is a call to clmm.control 185s > ## 3) control is an empty list; list() 185s > ## all in combination with extra control arguments. 185s > 185s > ordinal:::getCtrlArgs(clmm.control(), list(maxIter=200)) 185s $method 185s [1] "nlminb" 185s 185s $useMatrix 185s [1] FALSE 185s 185s $ctrl 185s $ctrl$trace 185s [1] 0 185s 185s $ctrl$maxIter 185s [1] 200 185s 185s $ctrl$gradTol 185s [1] 1e-04 185s 185s $ctrl$maxLineIter 185s [1] 50 185s 185s $ctrl$innerCtrl 185s [1] "warnOnly" 185s 185s 185s $optCtrl 185s $optCtrl$trace 185s [1] 0 185s 185s 185s $checkRanef 185s [1] "warn" 185s 185s > ordinal:::getCtrlArgs(list(), list(maxIter=200)) 185s $method 185s [1] "nlminb" 185s 185s $useMatrix 185s [1] FALSE 185s 185s $ctrl 185s $ctrl$trace 185s [1] 0 185s 185s $ctrl$maxIter 185s [1] 200 185s 185s $ctrl$gradTol 185s [1] 1e-04 185s 185s $ctrl$maxLineIter 185s [1] 50 185s 185s $ctrl$innerCtrl 185s [1] "warnOnly" 185s 185s 185s $optCtrl 185s $optCtrl$trace 185s [1] 0 185s 185s 185s $checkRanef 185s [1] "warn" 185s 185s > ordinal:::getCtrlArgs(list(), list(trace=-1)) 185s $method 185s [1] "nlminb" 185s 185s $useMatrix 185s [1] FALSE 185s 185s $ctrl 185s $ctrl$trace 185s [1] 1 185s 185s $ctrl$maxIter 185s [1] 50 185s 185s $ctrl$gradTol 185s [1] 1e-04 185s 185s $ctrl$maxLineIter 185s [1] 50 185s 185s $ctrl$innerCtrl 185s [1] "warnOnly" 185s 185s 185s $optCtrl 185s $optCtrl$trace 185s [1] 1 185s 185s 185s $checkRanef 185s [1] "warn" 185s 185s > ordinal:::getCtrlArgs(list(), list(trace=1)) 185s $method 185s [1] "nlminb" 185s 185s $useMatrix 185s [1] FALSE 185s 185s $ctrl 185s $ctrl$trace 185s [1] 0 185s 185s $ctrl$maxIter 185s [1] 50 185s 185s $ctrl$gradTol 185s [1] 1e-04 185s 186s $ctrl$maxLineIter 186s [1] 50 186s 186s $ctrl$innerCtrl 186s [1] "warnOnly" 186s 186s 186s $optCtrl 186s $optCtrl$trace 186s [1] 1 186s 186s 186s $checkRanef 186s [1] "warn" 186s 186s > ordinal:::getCtrlArgs(list(), list()) 186s $method 186s [1] "nlminb" 186s 186s $useMatrix 186s [1] FALSE 186s 186s $ctrl 186s $ctrl$trace 186s [1] 0 186s 186s $ctrl$maxIter 186s [1] 50 186s 186s $ctrl$gradTol 186s [1] 1e-04 186s 186s $ctrl$maxLineIter 186s [1] 50 186s 186s $ctrl$innerCtrl 186s [1] "warnOnly" 186s 186s 186s $optCtrl 186s $optCtrl$trace 186s [1] 0 186s 186s 186s $checkRanef 186s [1] "warn" 186s 186s > ordinal:::getCtrlArgs(list(maxIter=2), list()) 186s $method 186s [1] "nlminb" 186s 186s $useMatrix 186s [1] FALSE 186s 186s $ctrl 186s $ctrl$trace 186s [1] 0 186s 186s $ctrl$maxIter 186s [1] 2 186s 186s $ctrl$gradTol 186s [1] 1e-04 186s 186s $ctrl$maxLineIter 186s [1] 50 186s 186s $ctrl$innerCtrl 186s [1] "warnOnly" 186s 186s 186s $optCtrl 186s $optCtrl$trace 186s [1] 0 186s 186s 186s $checkRanef 186s [1] "warn" 186s 186s > 186s > ordinal:::getCtrlArgs(clmm.control(), list()) 186s $method 186s [1] "nlminb" 186s 186s $useMatrix 186s [1] FALSE 186s 186s $ctrl 186s $ctrl$trace 186s [1] 0 186s 186s $ctrl$maxIter 186s [1] 50 186s 186s $ctrl$gradTol 186s [1] 1e-04 186s 186s $ctrl$maxLineIter 186s [1] 50 186s 186s $ctrl$innerCtrl 186s [1] "warnOnly" 186s 186s 186s $optCtrl 186s $optCtrl$trace 186s [1] 0 186s 186s 186s $checkRanef 186s [1] "warn" 186s 186s > ordinal:::getCtrlArgs(clmm.control(maxIter=100), list(maxIter=200)) 186s $method 186s [1] "nlminb" 186s 186s $useMatrix 186s [1] FALSE 186s 186s $ctrl 186s $ctrl$trace 186s [1] 0 186s 186s $ctrl$maxIter 186s [1] 200 186s 186s $ctrl$gradTol 186s [1] 1e-04 186s 186s $ctrl$maxLineIter 186s [1] 50 186s 186s $ctrl$innerCtrl 186s [1] "warnOnly" 186s 186s 186s $optCtrl 186s $optCtrl$trace 186s [1] 0 186s 186s 186s $checkRanef 186s [1] "warn" 186s 186s > ordinal:::getCtrlArgs(clmm.control(maxIter=100), list(maxIter=200)) 186s $method 186s [1] "nlminb" 186s 186s $useMatrix 186s [1] FALSE 186s 186s $ctrl 186s $ctrl$trace 186s [1] 0 186s 186s $ctrl$maxIter 186s [1] 200 186s 186s $ctrl$gradTol 186s [1] 1e-04 186s 186s $ctrl$maxLineIter 186s [1] 50 186s 186s $ctrl$innerCtrl 186s [1] "warnOnly" 186s 186s 186s $optCtrl 186s $optCtrl$trace 186s [1] 0 186s 186s 186s $checkRanef 186s [1] "warn" 186s 186s > ordinal:::getCtrlArgs(clmm.control(), list(trace=1)) 186s $method 186s [1] "nlminb" 186s 186s $useMatrix 186s [1] FALSE 186s 186s $ctrl 186s $ctrl$trace 186s [1] 0 186s 186s $ctrl$maxIter 186s [1] 50 186s 186s $ctrl$gradTol 186s [1] 1e-04 186s 186s $ctrl$maxLineIter 186s [1] 50 186s 186s $ctrl$innerCtrl 186s [1] "warnOnly" 186s 186s 186s $optCtrl 186s $optCtrl$trace 186s [1] 1 186s 186s 186s $checkRanef 186s [1] "warn" 186s 186s > ordinal:::getCtrlArgs(clmm.control(), list(trace=-1)) 186s $method 186s [1] "nlminb" 186s 186s $useMatrix 186s [1] FALSE 186s 186s $ctrl 186s $ctrl$trace 186s [1] 1 186s 186s $ctrl$maxIter 186s [1] 50 186s 186s $ctrl$gradTol 186s [1] 1e-04 186s 186s $ctrl$maxLineIter 186s [1] 50 186s 186s $ctrl$innerCtrl 186s [1] "warnOnly" 186s 186s 186s $optCtrl 186s $optCtrl$trace 186s [1] 1 186s 186s 186s $checkRanef 186s [1] "warn" 186s 186s > ordinal:::getCtrlArgs(clmm.control(trace=1), list()) 186s $method 186s [1] "nlminb" 186s 186s $useMatrix 186s [1] FALSE 186s 186s $ctrl 186s $ctrl$trace 186s [1] 0 186s 186s $ctrl$maxIter 186s [1] 50 186s 186s $ctrl$gradTol 186s [1] 1e-04 186s 186s $ctrl$maxLineIter 186s [1] 50 186s 186s $ctrl$innerCtrl 186s [1] "warnOnly" 186s 186s 186s $optCtrl 186s $optCtrl$trace 186s [1] 1 186s 186s 186s $checkRanef 186s [1] "warn" 186s 186s > ordinal:::getCtrlArgs(clmm.control(trace=-1), list()) 186s $method 186s [1] "nlminb" 186s 186s $useMatrix 186s [1] FALSE 186s 186s $ctrl 186s $ctrl$trace 186s [1] 1 186s 186s $ctrl$maxIter 186s [1] 50 186s 186s $ctrl$gradTol 186s [1] 1e-04 186s 186s $ctrl$maxLineIter 186s [1] 50 186s 186s $ctrl$innerCtrl 186s [1] "warnOnly" 186s 186s 186s $optCtrl 186s $optCtrl$trace 186s [1] 1 186s 186s 186s $checkRanef 186s [1] "warn" 186s 186s > ordinal:::getCtrlArgs(clmm.control(trace=0), list()) 186s $method 186s [1] "nlminb" 186s 186s $useMatrix 186s [1] FALSE 186s 186s $ctrl 186s $ctrl$trace 186s [1] 0 186s 186s $ctrl$maxIter 186s [1] 50 186s 186s $ctrl$gradTol 186s [1] 1e-04 186s 186s $ctrl$maxLineIter 186s [1] 50 186s 186s $ctrl$innerCtrl 186s [1] "warnOnly" 186s 186s 186s $optCtrl 186s $optCtrl$trace 186s [1] 0 186s 186s 186s $checkRanef 186s [1] "warn" 186s 186s > ## Don't specify trace twice - surprising behavior might occur: 186s > ordinal:::getCtrlArgs(clmm.control(trace=1), list(trace=-1)) 186s $method 186s [1] "nlminb" 186s 186s $useMatrix 186s [1] FALSE 186s 186s $ctrl 186s $ctrl$trace 186s [1] 1 186s 186s $ctrl$maxIter 186s [1] 50 186s 186s $ctrl$gradTol 186s [1] 1e-04 186s 186s $ctrl$maxLineIter 186s [1] 50 186s 186s $ctrl$innerCtrl 186s [1] "warnOnly" 186s 186s 186s $optCtrl 186s $optCtrl$trace 186s [1] 1 186s 186s 186s $checkRanef 186s [1] "warn" 186s 186s > ordinal:::getCtrlArgs(clmm.control(trace=-1), list(trace=1)) 186s $method 186s [1] "nlminb" 186s 186s $useMatrix 186s [1] FALSE 186s 186s $ctrl 186s $ctrl$trace 186s [1] 1 186s 186s $ctrl$maxIter 186s [1] 50 186s 186s $ctrl$gradTol 186s [1] 1e-04 186s 186s $ctrl$maxLineIter 186s [1] 50 186s 186s $ctrl$innerCtrl 186s [1] "warnOnly" 186s 186s 186s $optCtrl 186s $optCtrl$trace 186s [1] 1 186s 186s 186s $checkRanef 186s [1] "warn" 186s 186s > 186s BEGIN TEST clmm.formula.R 186s 186s R version 4.4.3 (2025-02-28) -- "Trophy Case" 186s Copyright (C) 2025 The R Foundation for Statistical Computing 186s Platform: arm-unknown-linux-gnueabihf (32-bit) 186s 186s R is free software and comes with ABSOLUTELY NO WARRANTY. 186s You are welcome to redistribute it under certain conditions. 186s Type 'license()' or 'licence()' for distribution details. 186s 186s R is a collaborative project with many contributors. 186s Type 'contributors()' for more information and 186s 'citation()' on how to cite R or R packages in publications. 186s 186s Type 'demo()' for some demos, 'help()' for on-line help, or 186s 'help.start()' for an HTML browser interface to help. 186s Type 'q()' to quit R. 186s 186s > library(ordinal) 187s > data(wine) 187s > 187s > ################################# 187s > ## Appropriate evaluation of formulas: 187s > 187s > ## These all work as intended with no warnings or errors: 187s > fm1 <- clmm(rating ~ contact + (1|judge), data=wine) 187s > fm1 187s Cumulative Link Mixed Model fitted with the Laplace approximation 187s 187s formula: rating ~ contact + (1 | judge) 187s data: wine 187s 187s link threshold nobs logLik AIC niter max.grad 187s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 187s 187s Random effects: 187s Groups Name Variance Std.Dev. 187s judge (Intercept) 0.4428 0.6654 187s Number of groups: judge 9 187s 187s Coefficients: 187s contactyes 187s 1.3 187s 187s Thresholds: 187s 1|2 2|3 3|4 4|5 187s -2.28331 0.04325 1.86062 3.20298 187s > fm1 <- clmm("rating ~ contact + (1|judge)", data=wine) 187s > fm1 187s Cumulative Link Mixed Model fitted with the Laplace approximation 187s 187s formula: rating ~ contact + (1 | judge) 187s data: wine 187s 187s link threshold nobs logLik AIC niter max.grad 187s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 187s 187s Random effects: 187s Groups Name Variance Std.Dev. 187s judge (Intercept) 0.4428 0.6654 187s Number of groups: judge 9 187s 187s Coefficients: 187s contactyes 187s 1.3 187s 187s Thresholds: 187s 1|2 2|3 3|4 4|5 187s -2.28331 0.04325 1.86062 3.20298 187s > fm1 <- clmm(as.formula("rating ~ contact + (1|judge)"), data=wine) 187s > fm1 187s Cumulative Link Mixed Model fitted with the Laplace approximation 187s 187s formula: rating ~ contact + (1 | judge) 187s data: wine 187s 187s link threshold nobs logLik AIC niter max.grad 187s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 187s 187s Random effects: 187s Groups Name Variance Std.Dev. 187s judge (Intercept) 0.4428 0.6654 187s Number of groups: judge 9 187s 187s Coefficients: 187s contactyes 187s 1.3 187s 187s Thresholds: 187s 1|2 2|3 3|4 4|5 187s -2.28331 0.04325 1.86062 3.20298 187s > fm1 <- clmm(as.formula(rating ~ contact + (1|judge)), data=wine) 187s > fm1 187s Cumulative Link Mixed Model fitted with the Laplace approximation 187s 187s formula: rating ~ contact + (1 | judge) 187s data: wine 187s 187s link threshold nobs logLik AIC niter max.grad 187s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 187s 187s Random effects: 187s Groups Name Variance Std.Dev. 187s judge (Intercept) 0.4428 0.6654 187s Number of groups: judge 9 187s 187s Coefficients: 187s contactyes 187s 1.3 187s 187s Thresholds: 187s 1|2 2|3 3|4 4|5 187s -2.28331 0.04325 1.86062 3.20298 187s > 187s > ################################# 187s > 187s > ### finding variables in the environment of the formula: 187s > makeform <- function() { 187s + f1 <- as.formula(rating ~ temp + contact + (1|judge)) 187s + rating <- wine$rating 187s + temp <- wine$temp 187s + contact <- wine$contact 187s + judge <- wine$judge 187s + f1 187s + } 187s > ## 'makeform' makes are formula object in the environment of the 187s > ## function makeform: 187s > f1 <- makeform() 187s > f1 # print 187s rating ~ temp + contact + (1 | judge) 187s 187s > class(f1) 187s [1] "formula" 187s > ## If we give the data, we can evaluate the model: 187s > fm1 <- clmm(f1, data=wine) 187s > ## We can also evaluate the model because the data are available in 187s > ## the environment associated with the formula: 187s > fm1 <- clmm(f1) 187s > ## For instance, the 'rating' variable is not found in the Global 187s > ## environment; we have to evaluate the 'name' of 'rating' in the 187s > ## appropriate environment: 187s > (try(rating, silent=TRUE)) 187s [1] "Error : object 'rating' not found\n" 187s attr(,"class") 187s [1] "try-error" 187s attr(,"condition") 187s 187s > eval(as.name("rating"), envir=environment(f1)) 187s [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 187s [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 187s Levels: 1 < 2 < 3 < 4 < 5 187s > ## If instead we generate the formula in the Global environment where 187s > ## the variables are not found, we cannot evaluate the model: 187s > f2 <- as.formula(rating ~ temp + contact + (1|judge)) 187s > (try(fm2 <- clmm(f2), silent=TRUE)) 187s [1] "Error in eval(predvars, data, env) : object 'rating' not found\n" 187s attr(,"class") 187s [1] "try-error" 187s attr(,"condition") 187s 187s > environment(f2) <- environment(f1) 187s > fm2 <- clmm(f2) 187s > 187s > ################################# 187s > ## Use of formula-objects 187s > f <- formula(rating ~ temp + contact + (1|judge)) 187s > m2 <- clmm(f, data = wine) 187s > summary(m2) 187s Cumulative Link Mixed Model fitted with the Laplace approximation 187s 187s formula: rating ~ temp + contact + (1 | judge) 187s data: wine 187s 187s link threshold nobs logLik AIC niter max.grad cond.H 187s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 2.8e+01 187s 187s Random effects: 187s Groups Name Variance Std.Dev. 187s judge (Intercept) 1.279 1.131 187s Number of groups: judge 9 187s 187s Coefficients: 187s Estimate Std. Error z value Pr(>|z|) 187s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 187s contactyes 1.8349 0.5125 3.580 0.000344 *** 187s --- 187s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 187s 187s Threshold coefficients: 187s Estimate Std. Error z value 187s 1|2 -1.6237 0.6824 -2.379 187s 2|3 1.5134 0.6038 2.507 187s 3|4 4.2285 0.8090 5.227 187s 4|5 6.0888 0.9725 6.261 187s > 187s > ################################# 187s > ## Other ways to construct formulas: 187s > set.seed(12345) 187s > y <- factor(sample(1:4,20,replace=TRUE)) 187s > x <- rnorm(20) 187s > b <- gl(5, 4, labels=letters[1:5]) 187s > data <- data.frame(y=y, x=x, b=b) 187s > rm(x, y, b) 187s > clmm(y ~ x + (1|b), data=data) 187s Cumulative Link Mixed Model fitted with the Laplace approximation 187s 187s formula: y ~ x + (1 | b) 187s data: data 187s 187s link threshold nobs logLik AIC niter max.grad 187s logit flexible 20 -25.37 60.74 338(288) 7.12e-08 187s 187s Random effects: 187s Groups Name Variance Std.Dev. 187s b (Intercept) 9.736e-09 9.867e-05 187s Number of groups: b 5 187s 187s Coefficients: 187s x 187s 0.2527 187s 187s Thresholds: 187s 1|2 2|3 3|4 187s -2.18234 0.06059 0.92746 187s > fit <- clmm(data$y ~ data$x + (1|data$b)) 187s > fit 187s Cumulative Link Mixed Model fitted with the Laplace approximation 187s 187s formula: data$y ~ data$x + (1 | data$b) 187s 187s link threshold nobs logLik AIC niter max.grad 187s logit flexible 20 -25.37 60.74 338(288) 7.12e-08 187s 187s Random effects: 187s Groups Name Variance Std.Dev. 187s data$b (Intercept) 9.736e-09 9.867e-05 187s Number of groups: data$b 5 187s 187s Coefficients: 187s data$x 187s 0.2527 187s 187s Thresholds: 187s 1|2 2|3 3|4 187s -2.18234 0.06059 0.92746 187s > fit <- clmm(data[, 1] ~ data[, 2] + (1|data[, 3])) 187s > fit 187s Cumulative Link Mixed Model fitted with the Laplace approximation 187s 187s formula: data[, 1] ~ data[, 2] + (1 | data[, 3]) 187s 187s link threshold nobs logLik AIC niter max.grad 187s logit flexible 20 -25.37 60.74 338(288) 7.12e-08 187s 187s Random effects: 187s Groups Name Variance Std.Dev. 187s data[, 3] (Intercept) 9.736e-09 9.867e-05 187s Number of groups: data[, 3] 5 187s 187s Coefficients: 187s data[, 2] 187s 0.2527 187s 187s Thresholds: 187s 1|2 2|3 3|4 187s -2.18234 0.06059 0.92746 187s > 187s > ################################# 187s > ## Evaluation within other functions: 187s > ## date: January 18th 2012. 187s > ## 187s > ## The problem was raised by Stefan Herzog (stefan.herzog@unibas.ch) 187s > ## January 12th 2012 in trying to make clmm work with glmulti. 187s > 187s > fun.clmm <- function(formula, data) 187s + ### This only works because clmm via eclmm.model.frame is careful to 187s + ### evaluate the 'formula' in the parent environment such it is not the 187s + ### character "formula" that is attempted evaluated. 187s + clmm(formula, data = data) 187s > 187s > fun2.clmm <- function(formula, data, weights, subset) { 187s + ### This should be the safe way to ensure evaluation of clmm in the 187s + ### right environment. 187s + mc <- match.call() 187s + mc[[1]] <- as.name("clmm") 187s + eval.parent(mc) 187s + } 187s > 187s > fun.clmm(rating ~ temp + contact + (1|judge), data=wine) ## works 187s Cumulative Link Mixed Model fitted with the Laplace approximation 187s 187s formula: rating ~ temp + contact + (1 | judge) 187s data: data 187s 187s link threshold nobs logLik AIC niter max.grad 187s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 187s 187s Random effects: 187s Groups Name Variance Std.Dev. 187s judge (Intercept) 1.279 1.131 187s Number of groups: judge 9 187s 187s Coefficients: 187s tempwarm contactyes 187s 3.063 1.835 187s 187s Thresholds: 187s 1|2 2|3 3|4 4|5 187s -1.624 1.513 4.229 6.089 187s > fun2.clmm(rating ~ temp + contact + (1|judge), data=wine) ## works 187s Cumulative Link Mixed Model fitted with the Laplace approximation 187s 187s formula: rating ~ temp + contact + (1 | judge) 187s data: wine 187s 187s link threshold nobs logLik AIC niter max.grad 187s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 187s 187s Random effects: 187s Groups Name Variance Std.Dev. 187s judge (Intercept) 1.279 1.131 187s Number of groups: judge 9 187s 187s Coefficients: 187s tempwarm contactyes 187s 3.063 1.835 187s 187s Thresholds: 187s 1|2 2|3 3|4 4|5 187s -1.624 1.513 4.229 6.089 187s > 187s > form1 <- "rating ~ temp + contact + (1|judge)" 187s > fun.clmm(form1, data=wine) ## works 188s Cumulative Link Mixed Model fitted with the Laplace approximation 188s 188s formula: rating ~ temp + contact + (1 | judge) 188s data: data 188s 188s link threshold nobs logLik AIC niter max.grad 188s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 188s 188s Random effects: 188s Groups Name Variance Std.Dev. 188s judge (Intercept) 1.279 1.131 188s Number of groups: judge 9 188s 188s Coefficients: 188s tempwarm contactyes 188s 3.063 1.835 188s 188s Thresholds: 188s 1|2 2|3 3|4 4|5 188s -1.624 1.513 4.229 6.089 188s > fun2.clmm(form1, data=wine) ## works 188s Cumulative Link Mixed Model fitted with the Laplace approximation 188s 188s formula: rating ~ temp + contact + (1 | judge) 188s data: wine 188s 188s link threshold nobs logLik AIC niter max.grad 188s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 188s 188s Random effects: 188s Groups Name Variance Std.Dev. 188s judge (Intercept) 1.279 1.131 188s Number of groups: judge 9 188s 188s Coefficients: 188s tempwarm contactyes 188s 3.063 1.835 188s 188s Thresholds: 188s 1|2 2|3 3|4 4|5 188s -1.624 1.513 4.229 6.089 188s > 188s > form2 <- formula(rating ~ temp + contact + (1|judge)) 188s > fun.clmm(form2, data=wine) ## works 188s Cumulative Link Mixed Model fitted with the Laplace approximation 188s 188s formula: rating ~ temp + contact + (1 | judge) 188s data: data 188s 188s link threshold nobs logLik AIC niter max.grad 188s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 188s 188s Random effects: 188s Groups Name Variance Std.Dev. 188s judge (Intercept) 1.279 1.131 188s Number of groups: judge 9 188s 188s Coefficients: 188s tempwarm contactyes 188s 3.063 1.835 188s 188s Thresholds: 188s 1|2 2|3 3|4 4|5 188s -1.624 1.513 4.229 6.089 188s > fun2.clmm(form2, data=wine) ## works 188s Cumulative Link Mixed Model fitted with the Laplace approximation 188s 188s formula: rating ~ temp + contact + (1 | judge) 188s data: wine 188s 188s link threshold nobs logLik AIC niter max.grad 188s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 188s 188s Random effects: 188s Groups Name Variance Std.Dev. 188s judge (Intercept) 1.279 1.131 188s Number of groups: judge 9 188s 188s Coefficients: 188s tempwarm contactyes 188s 3.063 1.835 188s 188s Thresholds: 188s 1|2 2|3 3|4 4|5 188s -1.624 1.513 4.229 6.089 188s > ## Notice that clmm is not able to get the name of the data (wine) 188s > ## correct when using fun.clmm. 188s > 188s > ################################# 188s > 188s > ## ## Example 2: using clmm function 188s > ## # 188s > ## ## Now I want to consider judge as a random effect to account for 188s > ## ## grouping structure of data 188s > ## mod2 <- clmm(rating ~ temp + contact + (1|judge), data=wine) 188s > ## 188s > ## ##Again, I started by using my own code to run all potential models: 188s > ## ## put names of all your variables in this vector: 188s > ## vl2 <- c("temp", "contact") 188s > ## ## generate list of possible combinations of variables: 188s > ## combos2 <- NULL 188s > ## for(i in 1:length(vl2)) { 188s > ## combos2 <- c(combos2, combn(vl2, i, simplify = F)) 188s > ## } 188s > ## ## create formulae and run models one by one, saving them as model1, 188s > ## ## model2 etc... 188s > ## for (i in 1:length(combos2)) { 188s > ## vs2 <- paste(combos2[[i]], collapse=" + ") 188s > ## f2 <- formula(paste("rating ~ ", vs2, "+(1|judge)", sep="")) 188s > ## print(f2) 188s > ## assign(paste("model", i, sep=""), clmm(f2, data=wine)) 188s > ## } 188s > ## summary(model1) # etc 188s > ## summary(model2) # etc 188s > ## summary(model3) # etc 188s > ## 188s > ## models <- vector("list", length(combos2)) 188s > ## for(i in 1:length(combos2)) { 188s > ## vs2 <- paste(combos2[[i]], collapse=" + ") 188s > ## f2 <- formula(paste("rating ~ ", vs2, "+(1|judge)", sep="")) 188s > ## print(f2) 188s > ## models[[i]] <- clmm(f2, data=wine) 188s > ## ## assign(paste("model", i, sep=""), clmm(f2, data=wine)) 188s > ## } 188s > ## 188s > ## ## Coefficients, AIC and BIC: 188s > ## lapply(models, function(m) coef(summary(m))) 188s > ## lapply(models, AIC) 188s > ## lapply(models, BIC) 188s > ## 188s > ## ## library(MuMIn) 188s > ## ## dd2 <- dredge(mod2) ## does not work 188s > ## ## ?dredge 188s > ## ## traceback() 188s > ## ## mod2$formula 188s > ## ## terms(as.formula(formula(mod2))) 188s > ## ## 188s > ## ## library(lme4) 188s > ## ## fmm1 <- lmer(response ~ temp + contact + (1|judge), data=wine) 188s > ## ## fmm1 188s > ## ## terms(as.formula(lme4:::formula(fmm1))) 188s > ## ## terms(as.formula(formula(fmm1))) 188s > 188s BEGIN TEST clmm.methods.R 188s 188s R version 4.4.3 (2025-02-28) -- "Trophy Case" 188s Copyright (C) 2025 The R Foundation for Statistical Computing 188s Platform: arm-unknown-linux-gnueabihf (32-bit) 188s 188s R is free software and comes with ABSOLUTELY NO WARRANTY. 188s You are welcome to redistribute it under certain conditions. 188s Type 'license()' or 'licence()' for distribution details. 188s 188s R is a collaborative project with many contributors. 188s Type 'contributors()' for more information and 188s 'citation()' on how to cite R or R packages in publications. 188s 188s Type 'demo()' for some demos, 'help()' for on-line help, or 188s 'help.start()' for an HTML browser interface to help. 188s Type 'q()' to quit R. 188s 188s > library(ordinal) 189s > data(wine) 189s > 189s > ################################# 189s > ## model.matrix method for clmm-objects: 189s > fmm1 <- clmm(rating ~ contact + temp + (1|judge), data=wine) 189s > mm <- model.matrix(fmm1) 189s > stopifnot(inherits(mm, "matrix"), 189s + dim(mm) == c(72, 3)) 189s > 189s > ################################# 189s > ## anova.clmm works even if formula does not have an environment: 189s > fmm1 <- clmm(rating ~ temp * contact + (1|judge), data = wine) 189s > fmm2 <- clmm(rating ~ temp + contact + (1|judge), data = wine) 189s > environment(fmm1$formula) <- NULL 189s > environment(fmm2$formula) <- NULL 189s > anova(fmm1, fmm2) 189s Likelihood ratio tests of cumulative link models: 189s 189s formula: link: threshold: 189s fmm2 rating ~ temp + contact + (1 | judge) logit flexible 189s fmm1 rating ~ temp * contact + (1 | judge) logit flexible 189s 189s no.par AIC logLik LR.stat df Pr(>Chisq) 189s fmm2 7 177.13 -81.565 189s fmm1 8 179.07 -81.536 0.0589 1 0.8082 189s > 189s > 189s > ################################# 189s > ## Test that ranef, condVar and VarCorr work as they are supposed to whether or 189s > ## not nlme and lme4 are loaded: 189s > 189s > fm <- clmm(rating ~ temp + contact + (1|judge), data = wine) 189s > fm 189s Cumulative Link Mixed Model fitted with the Laplace approximation 189s 189s formula: rating ~ temp + contact + (1 | judge) 189s data: wine 189s 189s link threshold nobs logLik AIC niter max.grad 189s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 189s 189s Random effects: 189s Groups Name Variance Std.Dev. 189s judge (Intercept) 1.279 1.131 189s Number of groups: judge 9 189s 189s Coefficients: 189s tempwarm contactyes 189s 3.063 1.835 189s 189s Thresholds: 189s 1|2 2|3 3|4 4|5 189s -1.624 1.513 4.229 6.089 189s > ranef(fm) 189s $judge 189s (Intercept) 189s 1 1.69617816 189s 2 -0.56578306 189s 3 0.96880827 189s 4 -0.05954988 189s 5 0.23051011 189s 6 0.47703863 189s 7 -1.91097336 189s 8 -0.27294384 189s 9 -0.55467574 189s 189s > VarCorr(fm) 189s $judge 189s (Intercept) 189s (Intercept) 1.279461 189s attr(,"stddev") 189s (Intercept) 189s 1.131133 189s 189s > condVar(fm) 189s $judge 189s (Intercept) 189s 1 0.3067453 189s 2 0.3779358 189s 3 0.3545528 189s 4 0.3651870 189s 5 0.3566066 189s 6 0.3485475 189s 7 0.3435693 189s 8 0.3050453 189s 9 0.3183194 189s 189s > summary(fm) 189s Cumulative Link Mixed Model fitted with the Laplace approximation 189s 189s formula: rating ~ temp + contact + (1 | judge) 189s data: wine 189s 189s link threshold nobs logLik AIC niter max.grad cond.H 189s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 2.8e+01 189s 189s Random effects: 189s Loading required package: Matrix 189s Groups Name Variance Std.Dev. 189s judge (Intercept) 1.279 1.131 189s Number of groups: judge 9 189s 189s Coefficients: 189s Estimate Std. Error z value Pr(>|z|) 189s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 189s contactyes 1.8349 0.5125 3.580 0.000344 *** 189s --- 189s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 189s 189s Threshold coefficients: 189s Estimate Std. Error z value 189s 1|2 -1.6237 0.6824 -2.379 189s 2|3 1.5134 0.6038 2.507 189s 3|4 4.2285 0.8090 5.227 189s 4|5 6.0888 0.9725 6.261 189s > 189s > library(nlme) 189s > ranef(fm) 189s $judge 189s (Intercept) 189s 1 1.69617816 189s 2 -0.56578306 189s 3 0.96880827 189s 4 -0.05954988 189s 5 0.23051011 189s 6 0.47703863 189s 7 -1.91097336 189s 8 -0.27294384 189s 9 -0.55467574 189s 189s > VarCorr(fm) 189s $judge 189s (Intercept) 189s (Intercept) 1.279461 189s attr(,"stddev") 189s (Intercept) 189s 1.131133 189s 189s > condVar(fm) 189s $judge 189s (Intercept) 189s 1 0.3067453 189s 2 0.3779358 189s 3 0.3545528 189s 4 0.3651870 189s 5 0.3566066 189s 6 0.3485475 189s 7 0.3435693 189s 8 0.3050453 189s 9 0.3183194 189s 189s > library(lme4) 190s 190s Attaching package: ‘lme4’ 190s 190s The following object is masked from ‘package:nlme’: 190s 190s lmList 190s 190s > ranef(fm) 190s $judge 190s (Intercept) 190s 1 1.69617816 190s 2 -0.56578306 190s 3 0.96880827 190s 4 -0.05954988 190s 5 0.23051011 190s 6 0.47703863 190s 7 -1.91097336 190s 8 -0.27294384 190s 9 -0.55467574 190s 190s > VarCorr(fm) 190s $judge 190s (Intercept) 190s (Intercept) 1.279461 190s attr(,"stddev") 190s (Intercept) 190s 1.131133 190s 190s > condVar(fm) 190s $judge 190s (Intercept) 190s 1 0.3067453 190s 2 0.3779358 190s 3 0.3545528 190s 4 0.3651870 190s 5 0.3566066 190s 6 0.3485475 190s 7 0.3435693 190s 8 0.3050453 190s 9 0.3183194 190s 190s > fm1 <- lmer(Reaction ~ Days + (Days | Subject), data=sleepstudy) 190s > ranef(fm1) 190s $Subject 190s (Intercept) Days 190s 308 2.2585509 9.1989758 190s 309 -40.3987381 -8.6196806 190s 310 -38.9604090 -5.4488565 190s 330 23.6906196 -4.8143503 190s 331 22.2603126 -3.0699116 190s 332 9.0395679 -0.2721770 190s 333 16.8405086 -0.2236361 190s 334 -7.2326151 1.0745816 190s 335 -0.3336684 -10.7521652 190s 337 34.8904868 8.6282652 190s 349 -25.2102286 1.1734322 190s 350 -13.0700342 6.6142178 190s 351 4.5778642 -3.0152621 190s 352 20.8636782 3.5360011 190s 369 3.2754656 0.8722149 190s 370 -25.6129993 4.8224850 190s 371 0.8070461 -0.9881562 190s 372 12.3145921 1.2840221 190s 190s with conditional variances for “Subject” 190s > VarCorr(fm1) 190s Groups Name Std.Dev. Corr 190s Subject (Intercept) 24.7407 190s Days 5.9221 0.066 190s Residual 25.5918 190s > 190s > ranef(fm) 190s $judge 190s (Intercept) 190s 1 1.69617816 190s 2 -0.56578306 190s 3 0.96880827 190s 4 -0.05954988 190s 5 0.23051011 190s 6 0.47703863 190s 7 -1.91097336 190s 8 -0.27294384 190s 9 -0.55467574 190s 190s > VarCorr(fm) 190s $judge 190s (Intercept) 190s (Intercept) 1.279461 190s attr(,"stddev") 190s (Intercept) 190s 1.131133 190s 190s > condVar(fm) 190s $judge 190s (Intercept) 190s 1 0.3067453 190s 2 0.3779358 190s 3 0.3545528 190s 4 0.3651870 190s 5 0.3566066 190s 6 0.3485475 190s 7 0.3435693 190s 8 0.3050453 190s 9 0.3183194 190s 190s > summary(fm) 190s Cumulative Link Mixed Model fitted with the Laplace approximation 190s 190s formula: rating ~ temp + contact + (1 | judge) 190s data: wine 190s 190s link threshold nobs logLik AIC niter max.grad cond.H 190s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 2.8e+01 190s 190s Random effects: 190s Groups Name Variance Std.Dev. 190s judge (Intercept) 1.279 1.131 190s Number of groups: judge 9 190s 190s Coefficients: 190s Estimate Std. Error z value Pr(>|z|) 190s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 190s contactyes 1.8349 0.5125 3.580 0.000344 *** 190s --- 190s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 190s 190s Threshold coefficients: 190s Estimate Std. Error z value 190s 1|2 -1.6237 0.6824 -2.379 190s 2|3 1.5134 0.6038 2.507 190s 3|4 4.2285 0.8090 5.227 190s 4|5 6.0888 0.9725 6.261 190s > 190s BEGIN TEST confint.R 190s 190s R version 4.4.3 (2025-02-28) -- "Trophy Case" 190s Copyright (C) 2025 The R Foundation for Statistical Computing 190s Platform: arm-unknown-linux-gnueabihf (32-bit) 190s 190s R is free software and comes with ABSOLUTELY NO WARRANTY. 190s You are welcome to redistribute it under certain conditions. 190s Type 'license()' or 'licence()' for distribution details. 190s 190s R is a collaborative project with many contributors. 190s Type 'contributors()' for more information and 190s 'citation()' on how to cite R or R packages in publications. 190s 190s Type 'demo()' for some demos, 'help()' for on-line help, or 190s 'help.start()' for an HTML browser interface to help. 190s Type 'q()' to quit R. 190s 190s > ################################# 190s > ## test profile and confint methods: 190s > library(ordinal) 191s > data(wine) 191s > fm1 <- clm(rating ~ contact + temp, data = wine) 191s > summary(fm1) 191s formula: rating ~ contact + temp 191s data: wine 191s 191s link threshold nobs logLik AIC niter max.grad cond.H 191s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 191s 191s Coefficients: 191s Estimate Std. Error z value Pr(>|z|) 191s contactyes 1.5278 0.4766 3.205 0.00135 ** 191s tempwarm 2.5031 0.5287 4.735 2.19e-06 *** 191s --- 191s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 191s 191s Threshold coefficients: 191s Estimate Std. Error z value 191s 1|2 -1.3444 0.5171 -2.600 191s 2|3 1.2508 0.4379 2.857 191s 3|4 3.4669 0.5978 5.800 191s 4|5 5.0064 0.7309 6.850 191s > 191s > ## profile.clm and confint.clm: 191s > pr1 <- profile(fm1) 191s > confint(pr1) 191s 2.5 % 97.5 % 191s contactyes 0.6158045 2.492424 191s tempwarm 1.5097839 3.595251 191s > pr1 <- profile(fm1, which.beta = 1:2) 191s > confint(pr1) 191s 2.5 % 97.5 % 191s contactyes 0.6158045 2.492424 191s tempwarm 1.5097839 3.595251 191s > pr1 <- profile(fm1, which.beta = 2:1) 191s > confint(pr1) 191s 2.5 % 97.5 % 191s tempwarm 1.5097839 3.595251 191s contactyes 0.6158045 2.492424 191s > pr1 <- profile(fm1, which.beta = 1) 191s > confint(pr1) 191s 2.5 % 97.5 % 191s contactyes 0.6158045 2.492424 191s > pr1 <- profile(fm1, which.beta = 2) 191s > confint(pr1) 191s 2.5 % 97.5 % 191s tempwarm 1.509784 3.595251 191s > pr1 <- try(profile(fm1, which.beta = 0), silent = TRUE) ## error 191s > pr1 <- try(profile(fm1, which.beta = "no.par"), silent = TRUE) ## error 191s > pr1 <- try(profile(fm1, which.beta = -1), silent = TRUE) ## error 191s > pr1 <- profile(fm1, which.beta = "tempwarm") 191s > confint(pr1) 191s 2.5 % 97.5 % 191s tempwarm 1.509784 3.595251 191s > pr1 <- profile(fm1, alpha = 0.1) 191s > confint(pr1) ## should give NA in this case? 191s 2.5 % 97.5 % 191s contactyes NA NA 191s tempwarm NA NA 191s > pr1 <- profile(fm1, max.steps = 9) 191s > pr1 <- profile(fm1, step.warn = 7) 191s > pr1 <- profile(fm1, nsteps = 6) 191s > pr1 <- profile(fm1, trace = 1) 191s 191s Parameter: contactyes down 191s 191s Parameter: contactyes up 191s 191s Parameter: tempwarm down 191s 191s Parameter: tempwarm up 191s > pr1 <- profile(fm1, control = list(gradTol = .1)) 191s > confint(pr1) ## not at all unreliable... 191s 2.5 % 97.5 % 191s contactyes 0.6158045 2.492424 191s tempwarm 1.5097839 3.595251 191s > 191s > ## single regression coef setting: 191s > fm2 <- clm(rating ~ contact, data = wine) 191s > summary(fm2) 191s formula: rating ~ contact 191s data: wine 191s 191s link threshold nobs logLik AIC niter max.grad cond.H 191s logit flexible 72 -99.96 209.91 5(0) 1.67e-07 1.7e+01 191s 191s Coefficients: 191s Estimate Std. Error z value Pr(>|z|) 191s contactyes 1.2070 0.4499 2.683 0.0073 ** 191s --- 191s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 191s 191s Threshold coefficients: 191s Estimate Std. Error z value 191s 1|2 -2.13933 0.48981 -4.368 191s 2|3 0.04257 0.32063 0.133 191s 3|4 1.71449 0.38637 4.437 191s 4|5 2.97875 0.50207 5.933 191s > pr2 <- profile(fm2) 191s > confint(pr2) 191s 2.5 % 97.5 % 191s contactyes 0.3403978 2.110952 191s > 191s > ## confint.clm: 191s > confint(fm1) 191s argument 'parm' ignored 191s 2.5 % 97.5 % 191s contactyes 0.6157925 2.492404 191s tempwarm 1.5097627 3.595225 191s > confint(fm1, 2) 192s 2.5 % 97.5 % 192s contactyes 0.6157925 2.492404 192s tempwarm 1.5097627 3.595225 192s > confint(fm1, 1) 192s argument 'parm' ignored 192s argument 'parm' ignored 192s 2.5 % 97.5 % 192s contactyes 0.6157925 2.492404 192s tempwarm 1.5097627 3.595225 192s > confint(fm1, "tempwarm") 192s 2.5 % 97.5 % 192s contactyes 0.6157925 2.492404 192s tempwarm 1.5097627 3.595225 192s > confint(fm1, type = "profile") 192s argument 'parm' ignored 192s 2.5 % 97.5 % 192s contactyes 0.6157925 2.492404 192s tempwarm 1.5097627 3.595225 192s > confint(fm1, type = "Wald") 192s 2.5 % 97.5 % 192s 1|2 -2.3578848 -0.330882 192s 2|3 0.3925794 2.109038 192s 3|4 2.2952980 4.638476 192s 4|5 3.5738541 6.438954 192s contactyes 0.5936345 2.461961 192s tempwarm 1.4669081 3.539296 192s > confint(fm1, 2, type = "Wald") 192s 2.5 % 97.5 % 192s 1|2 -2.3578848 -0.330882 192s 2|3 0.3925794 2.109038 192s 3|4 2.2952980 4.638476 192s 4|5 3.5738541 6.438954 192s contactyes 0.5936345 2.461961 192s tempwarm 1.4669081 3.539296 192s > confint(fm1, level = 0.5) 192s 25 % 75 % 192s contactyes 1.209254 1.852544 192s tempwarm 2.152051 2.865757 192s > confint(fm1, level = 1 - 1e-6) 192s 0 % 100 % 192s contactyes -0.7003630 4.091731 192s tempwarm 0.1351282 5.520007 192s > confint(fm1, level = 1 - 1e-10) ## extreme, but it works 192s Wait for profiling to be done... 192s 0 % 100 % 192s contactyes -1.4045009 5.059182 192s tempwarm -0.5753928 6.774556 192s > confint(fm1, trace = 1) 192s 192s Parameter: contactyes down 192s 192s Parameter: contactyes up 192s 192s Parameter: tempwarm down 192s 192s Parameter: tempwarm up 192s 2.5 % 97.5 % 192s contactyes 0.6157925 2.492404 192s tempwarm 1.5097627 3.595225 192s > 192s > ## plot.profile: 192s > pr1 <- profile(fm1, which.beta=1:2, alpha = 1e-3) 192s > par(mfrow = c(1,2)) 192s > plot(pr1) 192s > plot(pr1, 1) 192s > plot(pr1, "contactyes") 192s > plot(pr1, level = .97) 192s > plot(pr1, Log = TRUE) 192s > plot(pr1, relative = FALSE) 192s > plot(pr1, root = TRUE) 192s > plot(pr1, approx = TRUE) 192s > plot(pr1, n=10) 192s > plot(pr1, ylim = c(0,2)) 192s > plot(pr1, las = 1) 192s > plot(pr2) 192s > 192s > 192s BEGIN TEST nominal.test.R 192s 192s R version 4.4.3 (2025-02-28) -- "Trophy Case" 192s Copyright (C) 2025 The R Foundation for Statistical Computing 192s Platform: arm-unknown-linux-gnueabihf (32-bit) 192s 192s R is free software and comes with ABSOLUTELY NO WARRANTY. 192s You are welcome to redistribute it under certain conditions. 192s Type 'license()' or 'licence()' for distribution details. 192s 192s R is a collaborative project with many contributors. 192s Type 'contributors()' for more information and 192s 'citation()' on how to cite R or R packages in publications. 192s 192s Type 'demo()' for some demos, 'help()' for on-line help, or 192s 'help.start()' for an HTML browser interface to help. 192s Type 'q()' to quit R. 192s 192s > library(ordinal) 193s Loading required package: MASS 193s > 193s > if(require(MASS)) { 193s + fm1 <- clm(Sat ~ Infl + Type + Cont, data=housing, weights=Freq) 193s + scale_test(fm1) 193s + nominal_test(fm1) 193s + 193s + fm2 <- update(fm1, scale=~Cont) 193s + scale_test(fm2) 193s + nominal_test(fm2) 193s + fm3 <- update(fm1, nominal=~ Cont) 193s + fm3$Theta 193s + anova(fm2, fm3) 193s + fm3$alpha.mat 193s + summary(fm3) 193s + } 193s formula: Sat ~ Infl + Type + Cont 193s nominal: ~Cont 193s data: housing 193s 193s link threshold nobs logLik AIC niter max.grad cond.H 193s logit flexible 1681 -1738.35 3494.70 4(0) 1.31e-07 6.3e+01 193s 193s Coefficients: (1 not defined because of singularities) 193s Estimate Std. Error z value Pr(>|z|) 193s InflMedium 0.5695 0.1048 5.436 5.45e-08 *** 193s InflHigh 1.2884 0.1271 10.137 < 2e-16 *** 193s TypeApartment -0.5706 0.1192 -4.788 1.68e-06 *** 193s TypeAtrium -0.3643 0.1552 -2.348 0.0189 * 193s TypeTerrace -1.0980 0.1516 -7.242 4.43e-13 *** 193s ContHigh NA NA NA NA 193s --- 193s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 193s 193s Threshold coefficients: 193s Estimate Std. Error z value 193s Low|Medium.(Intercept) -0.4494 0.1279 -3.515 193s Medium|High.(Intercept) 0.6480 0.1279 5.066 193s Low|Medium.ContHigh -0.4440 0.1095 -4.056 193s Medium|High.ContHigh -0.2861 0.1063 -2.691 193s > 193s > ################################# 193s > ### Testing nominal_test and scale_test: 193s > fm1 <- clm(rating ~ temp * contact, data=wine) 193s > ## names(fm1) 193s > fm2 <- clm(rating ~ temp * contact, data=wine, nominal=~contact) 193s > (an <- anova(fm1, fm2)) 193s Likelihood ratio tests of cumulative link models: 193s 193s formula: nominal: link: threshold: 193s fm1 rating ~ temp * contact ~1 logit flexible 193s fm2 rating ~ temp * contact ~contact logit flexible 193s 193s no.par AIC logLik LR.stat df Pr(>Chisq) 193s fm1 7 186.83 -86.416 193s fm2 10 192.17 -86.083 0.6669 3 0.881 193s > (nm <- nominal_test(fm1)) 194s Tests of nominal effects 194s 194s formula: rating ~ temp * contact 194s Df logLik AIC LRT Pr(>Chi) 194s -86.416 186.83 194s temp 3 -84.874 189.75 3.08352 0.3789 194s contact 3 -86.083 192.16 0.66691 0.8810 194s temp:contact 194s > stopifnot(isTRUE(all.equal(an[2, 6], nm["contact", 5]))) 194s > 194s > fm2 <- clm(rating ~ temp * contact, data=wine, scale=~contact) 194s > (an <- anova(fm1, fm2)) 194s Likelihood ratio tests of cumulative link models: 194s 194s formula: scale: link: threshold: 194s fm1 rating ~ temp * contact ~1 logit flexible 194s fm2 rating ~ temp * contact ~contact logit flexible 194s 194s no.par AIC logLik LR.stat df Pr(>Chisq) 194s fm1 7 186.83 -86.416 194s fm2 8 188.60 -86.300 0.2325 1 0.6297 194s > (sc <- scale_test(fm1)) 194s Tests of scale effects 194s 194s formula: rating ~ temp * contact 194s Df logLik AIC LRT Pr(>Chi) 194s -86.416 186.83 194s temp 1 -86.326 188.65 0.18061 0.6709 194s contact 1 -86.300 188.60 0.23252 0.6297 194s temp:contact 3 -86.259 192.52 0.31391 0.9574 194s > stopifnot(isTRUE(all.equal(an[2, 6], sc["contact", "Pr(>Chi)"]))) 194s > 194s > fm1 <- clm(rating ~ temp + contact, 194s + nominal=~temp + contact, data=wine) 194s Warning message: 194s (1) Hessian is numerically singular: parameters are not uniquely determined 194s In addition: Absolute convergence criterion was met, but relative criterion was not met 194s > fm1 194s formula: rating ~ temp + contact 194s nominal: ~temp + contact 194s data: wine 194s 194s link threshold nobs logLik AIC niter max.grad cond.H 194s logit flexible 72 -84.61 193.22 20(0) 4.36e-09 5.0e+10 194s 194s Coefficients: (2 not defined because of singularities) 194s tempwarm contactyes 194s NA NA 194s 194s Threshold coefficients: 194s 1|2 2|3 3|4 4|5 194s (Intercept) -1.226 1.033 3.946 24.553 194s tempwarm -21.118 -2.111 -2.940 -22.432 194s contactyes -1.659 -1.343 -1.693 -1.162 194s > try(nominal_test(fm1), silent=TRUE)[1] ## gives error OK 194s 194s no additional terms to add to nominal 194s 194s Df 194s 194s > scale_test(fm1) 194s Warning messages: 194s 1: (1) Hessian is numerically singular: parameters are not uniquely determined 194s In addition: Absolute convergence criterion was met, but relative criterion was not met 194s 2: (1) Hessian is numerically singular: parameters are not uniquely determined 194s In addition: Absolute convergence criterion was met, but relative criterion was not met 194s Tests of scale effects 194s 194s formula: rating ~ temp + contact 194s nominal: ~temp + contact 194s Df logLik AIC LRT Pr(>Chi) 194s -84.611 193.22 194s temp 1 -84.604 195.21 0.0129568 0.9094 194s contact 1 -84.610 195.22 0.0012219 0.9721 194s > fm1 <- clm(rating ~ temp + contact, 194s + scale=~temp + contact, data=wine) 194s > fm1 194s formula: rating ~ temp + contact 194s scale: ~temp + contact 194s data: wine 194s 194s link threshold nobs logLik AIC niter max.grad cond.H 194s logit flexible 72 -86.34 188.68 8(0) 7.40e-09 2.0e+02 194s 194s Coefficients: 194s tempwarm contactyes 194s 2.446 1.482 194s 194s log-scale coefficients: 194s tempwarm contactyes 194s 0.05008 -0.11418 194s 194s Threshold coefficients: 194s 1|2 2|3 3|4 4|5 194s -1.303 1.219 3.377 4.872 194s > try(scale_test(fm1), silent=TRUE)[1] ## gives error OK 194s 194s no relevant terms to add to scale 194s 194s Df 194s 194s > nominal_test(fm1) 194s Tests of nominal effects 194s 194s formula: rating ~ temp + contact 194s scale: ~temp + contact 194s Df logLik AIC LRT Pr(>Chi) 194s -86.342 188.69 194s temp 3 -84.851 191.70 2.98202 0.3944 194s contact 3 -86.008 194.02 0.66808 0.8807 194s > 194s > 194s > ## Using weights: 194s > set.seed(123454321) 194s > wt <- runif(nrow(wine)) 194s > fm1 <- clm(rating ~ temp * contact, data=wine, weigths=wt) 194s > nominal_test(fm1) 194s Tests of nominal effects 194s 194s formula: rating ~ temp * contact 194s Df logLik AIC LRT Pr(>Chi) 194s -86.416 186.83 194s temp 3 -84.874 189.75 3.08352 0.3789 194s contact 3 -86.083 192.16 0.66691 0.8810 194s temp:contact 194s > scale_test(fm1) 194s Tests of scale effects 194s 194s formula: rating ~ temp * contact 194s Df logLik AIC LRT Pr(>Chi) 194s -86.416 186.83 194s temp 1 -86.326 188.65 0.18061 0.6709 194s contact 1 -86.300 188.60 0.23252 0.6297 194s temp:contact 3 -86.259 192.52 0.31391 0.9574 194s > 194s > ## No nominal test for judge since that model is not identifiable: 194s > fm1 <- clm(rating ~ judge + temp + contact, data=wine) 194s > nominal_test(fm1) 194s Tests of nominal effects 194s 194s formula: rating ~ judge + temp + contact 194s Df logLik AIC LRT Pr(>Chi) 194s -70.921 169.84 194s judge 194s temp 3 -69.900 173.80 2.04253 0.5636 194s contact 3 -70.708 175.42 0.42612 0.9348 194s > scale_test(fm1) 194s Tests of scale effects 194s 194s formula: rating ~ judge + temp + contact 194s Df logLik AIC LRT Pr(>Chi) 194s -70.921 169.84 194s judge 8 -64.731 173.46 12.3790 0.1351 194s temp 1 -70.897 171.79 0.0474 0.8276 194s contact 1 -70.870 171.74 0.1018 0.7497 194s > fm1 <- clm(rating ~ judge + temp, nominal=~contact, data=wine) 194s > nominal_test(fm1) 194s Tests of nominal effects 194s 194s formula: rating ~ judge + temp 194s nominal: ~contact 194s Df logLik AIC LRT Pr(>Chi) 194s -70.708 175.42 194s judge 194s temp 3 -69.707 179.41 2.0015 0.5721 194s > summary(fm1) 194s formula: rating ~ judge + temp 194s nominal: ~contact 194s data: wine 194s 194s link threshold nobs logLik AIC niter max.grad cond.H 194s logit flexible 72 -70.71 175.42 6(0) 8.07e-08 9.9e+01 194s 194s Coefficients: 194s Estimate Std. Error z value Pr(>|z|) 194s judge2 -3.2395 1.0683 -3.032 0.00243 ** 194s judge3 -0.9556 0.9699 -0.985 0.32452 194s judge4 -2.4613 1.0321 -2.385 0.01709 * 194s judge5 -2.0248 1.0093 -2.006 0.04484 * 194s judge6 -1.6379 0.9770 -1.677 0.09364 . 194s judge7 -5.2222 1.1381 -4.589 4.46e-06 *** 194s judge8 -2.7648 0.9776 -2.828 0.00468 ** 194s judge9 -3.1751 1.0028 -3.166 0.00154 ** 194s tempwarm 3.3309 0.6174 5.395 6.87e-08 *** 194s --- 194s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 194s 194s Threshold coefficients: 194s Estimate Std. Error z value 194s 1|2.(Intercept) -4.1549 0.9897 -4.198 194s 2|3.(Intercept) -0.7354 0.7920 -0.928 194s 3|4.(Intercept) 2.3388 0.8909 2.625 194s 4|5.(Intercept) 3.8873 1.0352 3.755 194s 1|2.contactyes -2.0216 1.3072 -1.547 194s 2|3.contactyes -1.9865 0.6904 -2.877 194s 3|4.contactyes -2.1825 0.7774 -2.807 194s 4|5.contactyes -1.5077 1.0044 -1.501 194s > 194s > ## A continuous variable: 194s > set.seed(123454321) 194s > x <- rnorm(nrow(wine), sd=1) 194s > fm <- clm(rating ~ temp, nominal=~contact * x, data=wine) 194s Warning message: 194s (1) Hessian is numerically singular: parameters are not uniquely determined 194s In addition: Absolute convergence criterion was met, but relative criterion was not met 194s > nominal_test(fm) 194s Tests of nominal effects 194s 194s formula: rating ~ temp 194s nominal: ~contact * x 194s Df logLik AIC LRT Pr(>Chi) 194s -77.858 189.72 194s temp 3 -76.738 193.48 2.24 0.5241 194s > scale_test(fm) 194s Tests of scale effects 194s 194s formula: rating ~ temp 194s nominal: ~contact * x 194s Df logLik AIC LRT Pr(>Chi) 194s -77.858 189.72 194s temp 1 -77.684 191.37 0.34804 0.5552 194s > fm <- clm(rating ~ temp + x, nominal=~contact, data=wine) 194s Warning message: 194s (1) Hessian is numerically singular: parameters are not uniquely determined 194s In addition: Absolute convergence criterion was met, but relative criterion was not met 194s > nominal_test(fm) 194s Tests of nominal effects 194s 194s formula: rating ~ temp + x 194s nominal: ~contact 194s Df logLik AIC LRT Pr(>Chi) 194s -84.949 189.90 194s temp 3 -83.421 192.84 3.0560 0.3831 194s x 3 -84.333 194.67 1.2322 0.7453 194s > scale_test(fm) 194s Tests of scale effects 194s 194s formula: rating ~ temp + x 194s nominal: ~contact 194s Df logLik AIC LRT Pr(>Chi) 194s -84.949 189.90 194s temp 1 -84.737 191.47 0.42504 0.5144 194s x 1 -84.896 191.79 0.10781 0.7426 194s > ## poly: 194s > fm <- clm(rating ~ temp + poly(x, 2), nominal=~contact, data=wine) 194s > nominal_test(fm) 194s Tests of nominal effects 194s 194s formula: rating ~ temp + poly(x, 2) 194s nominal: ~contact 194s Df logLik AIC LRT Pr(>Chi) 194s -84.079 190.16 194s temp 3 -82.694 193.39 2.7693 0.4286 194s poly(x, 2) 6 -80.941 195.88 6.2762 0.3930 194s > scale_test(fm) 194s Tests of scale effects 194s 194s formula: rating ~ temp + poly(x, 2) 194s nominal: ~contact 194s Df logLik AIC LRT Pr(>Chi) 194s -84.079 190.16 194s temp 1 -84.020 192.04 0.11784 0.7314 194s poly(x, 2) 2 -83.314 192.63 1.53017 0.4653 194s > ## another combination: 194s > fm1 <- clm(SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ, 194s + scale=~PROD, 194s + nominal=~ DAY*GENDER, data=soup) 194s > fm1 194s formula: SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ 194s scale: ~PROD 194s nominal: ~DAY * GENDER 194s data: soup 194s 194s link threshold nobs logLik AIC niter max.grad cond.H 194s logit flexible 1847 -2657.84 5375.68 8(2) 3.50e-07 4.0e+03 194s 194s Coefficients: (1 not defined because of singularities) 194s PRODID2 PRODID3 PRODID4 PRODID5 194s 1.0780 1.5090 0.9482 1.4910 194s PRODID6 DAY2 SOUPTYPECanned SOUPTYPEDry-mix 194s 1.8174 NA -0.2337 0.1832 194s SOUPFREQ1-4/month SOUPFREQ<1/month 194s -0.0954 -0.1137 194s 194s log-scale coefficients: 194s PRODTest 194s 0.1427 194s 194s Threshold coefficients: 194s 1|2 2|3 3|4 4|5 5|6 194s (Intercept) -1.65979 -0.75912 -0.36903 0.02374 0.66929 194s DAY2 -0.22291 0.13711 0.16406 0.10279 0.23721 194s GENDERFemale 0.06531 0.06089 -0.01938 -0.13670 -0.01594 194s DAY2:GENDERFemale 0.36194 0.25429 0.25482 0.23375 0.05243 194s > nominal_test(fm1) 195s Tests of nominal effects 195s 195s formula: SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ 195s scale: ~PROD 195s nominal: ~DAY * GENDER 195s Df logLik AIC LRT Pr(>Chi) 195s -2657.8 5375.7 195s PRODID 20 -2644.7 5389.4 26.2387 0.1580707 195s SOUPTYPE 8 -2654.0 5384.1 7.5969 0.4738067 195s SOUPFREQ 8 -2644.6 5365.1 26.5587 0.0008423 *** 195s PROD 4 -2654.7 5377.5 6.2011 0.1846258 195s --- 195s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 195s > scale_test(fm1) 195s Tests of scale effects 195s 195s formula: SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ 195s scale: ~PROD 195s nominal: ~DAY * GENDER 195s Df logLik AIC LRT Pr(>Chi) 195s -2657.8 5375.7 195s PRODID 4 -2657.3 5382.5 1.1526 0.885842 195s DAY 1 -2655.9 5373.8 3.8544 0.049616 * 195s SOUPTYPE 2 -2657.6 5379.1 0.5416 0.762771 195s SOUPFREQ 2 -2652.7 5369.3 10.3447 0.005671 ** 195s --- 195s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 195s > 195s > ################################# 195s > 195s > 195s BEGIN TEST ranef.loading.R 196s 196s R version 4.4.3 (2025-02-28) -- "Trophy Case" 196s Copyright (C) 2025 The R Foundation for Statistical Computing 196s Platform: arm-unknown-linux-gnueabihf (32-bit) 196s 196s R is free software and comes with ABSOLUTELY NO WARRANTY. 196s You are welcome to redistribute it under certain conditions. 196s Type 'license()' or 'licence()' for distribution details. 196s 196s R is a collaborative project with many contributors. 196s Type 'contributors()' for more information and 196s 'citation()' on how to cite R or R packages in publications. 196s 196s Type 'demo()' for some demos, 'help()' for on-line help, or 196s 'help.start()' for an HTML browser interface to help. 196s Type 'q()' to quit R. 196s 196s > # check that ranef and VarCorr work even after loading ordinal: 196s > library(lme4) 196s Loading required package: Matrix 197s > fm1 <- lmer(Reaction ~ Days + (Days | Subject), data=sleepstudy) 197s > ranef(fm1) 197s $Subject 197s (Intercept) Days 197s 308 2.2585509 9.1989758 197s 309 -40.3987381 -8.6196806 197s 310 -38.9604090 -5.4488565 197s 330 23.6906196 -4.8143503 197s 331 22.2603126 -3.0699116 197s 332 9.0395679 -0.2721770 197s 333 16.8405086 -0.2236361 197s 334 -7.2326151 1.0745816 197s 335 -0.3336684 -10.7521652 197s 337 34.8904868 8.6282652 197s 349 -25.2102286 1.1734322 197s 350 -13.0700342 6.6142178 197s 351 4.5778642 -3.0152621 197s 352 20.8636782 3.5360011 197s 369 3.2754656 0.8722149 197s 370 -25.6129993 4.8224850 197s 371 0.8070461 -0.9881562 197s 372 12.3145921 1.2840221 197s 197s with conditional variances for “Subject” 197s > VarCorr(fm1) 197s Groups Name Std.Dev. Corr 197s Subject (Intercept) 24.7407 197s Days 5.9221 0.066 197s Residual 25.5918 197s > library(ordinal) 197s > ranef(fm1) 197s $Subject 197s (Intercept) Days 197s 308 2.2585509 9.1989758 197s 309 -40.3987381 -8.6196806 197s 310 -38.9604090 -5.4488565 197s 330 23.6906196 -4.8143503 197s 331 22.2603126 -3.0699116 197s 332 9.0395679 -0.2721770 197s 333 16.8405086 -0.2236361 197s 334 -7.2326151 1.0745816 197s 335 -0.3336684 -10.7521652 197s 337 34.8904868 8.6282652 197s 349 -25.2102286 1.1734322 197s 350 -13.0700342 6.6142178 197s 351 4.5778642 -3.0152621 197s 352 20.8636782 3.5360011 197s 369 3.2754656 0.8722149 197s 370 -25.6129993 4.8224850 197s 371 0.8070461 -0.9881562 197s 372 12.3145921 1.2840221 197s 197s with conditional variances for “Subject” 197s > VarCorr(fm1) 197s Groups Name Std.Dev. Corr 197s Subject (Intercept) 24.7407 197s Days 5.9221 0.066 197s Residual 25.5918 197s > 197s BEGIN TEST test-all.R 197s 197s R version 4.4.3 (2025-02-28) -- "Trophy Case" 197s Copyright (C) 2025 The R Foundation for Statistical Computing 197s Platform: arm-unknown-linux-gnueabihf (32-bit) 197s 197s R is free software and comes with ABSOLUTELY NO WARRANTY. 197s You are welcome to redistribute it under certain conditions. 197s Type 'license()' or 'licence()' for distribution details. 197s 197s R is a collaborative project with many contributors. 197s Type 'contributors()' for more information and 197s 'citation()' on how to cite R or R packages in publications. 197s 197s Type 'demo()' for some demos, 'help()' for on-line help, or 197s 'help.start()' for an HTML browser interface to help. 197s Type 'q()' to quit R. 197s 197s > 197s > if(require(testthat) && require(ordinal)) { 197s Loading required package: testthat 197s + test_check("ordinal") 197s + } 198s Loading required package: ordinal 206s [ FAIL 0 | WARN 0 | SKIP 0 | PASS 81 ] 206s > 206s BEGIN TEST test.clm.Theta.R 206s 206s R version 4.4.3 (2025-02-28) -- "Trophy Case" 206s Copyright (C) 2025 The R Foundation for Statistical Computing 206s Platform: arm-unknown-linux-gnueabihf (32-bit) 206s 206s R is free software and comes with ABSOLUTELY NO WARRANTY. 206s You are welcome to redistribute it under certain conditions. 206s Type 'license()' or 'licence()' for distribution details. 206s 206s R is a collaborative project with many contributors. 206s Type 'contributors()' for more information and 206s 'citation()' on how to cite R or R packages in publications. 206s 206s Type 'demo()' for some demos, 'help()' for on-line help, or 206s 'help.start()' for an HTML browser interface to help. 206s Type 'q()' to quit R. 206s 206s > library(ordinal) 207s > 207s > ################################# 207s > ## 1 categorical variable in nominal: 207s > fm <- clm(rating ~ temp, nominal=~contact, data=wine) 207s > fm$Theta 207s contact 1|2 2|3 3|4 4|5 207s 1 no -1.323043 1.2464435 3.550044 4.660247 207s 2 yes -2.938103 -0.2651238 1.875288 3.609624 207s > fm$alpha.mat 207s 1|2 2|3 3|4 4|5 207s (Intercept) -1.323043 1.246444 3.550044 4.660247 207s contactyes -1.615059 -1.511567 -1.674756 -1.050623 207s > ## Threshold effects: 207s > fm <- clm(rating ~ temp, nominal=~contact, data=wine, 207s + threshold="symmetric") 207s > fm$Theta 207s contact 1|2 2|3 3|4 4|5 207s 1 no -1.054279 1.083892 3.383980 5.522152 207s 2 yes -2.360683 -0.356889 1.753317 3.757111 207s > fm$alpha.mat 207s central.1 central.2 spacing.1 207s (Intercept) 1.083892 3.383980 2.1381713 207s contactyes -1.440781 -1.630663 -0.1343777 207s > fm <- clm(rating ~ temp, nominal=~contact, data=wine, 207s + threshold="equidistant") 207s > fm$Theta 207s contact 1|2 2|3 3|4 4|5 207s 1 no -1.089140 1.1176064 3.324353 5.531099 207s 2 yes -2.386361 -0.3365063 1.713348 3.763202 207s > fm$alpha.mat 207s threshold.1 spacing 207s (Intercept) -1.08914 2.2067465 207s contactyes -1.29722 -0.1568922 207s > ## Singular fit is still ok (with a warning, though) 207s > fm <- clm(rating ~ contact, nominal=~temp, data=wine) 207s Warning message: 207s (1) Hessian is numerically singular: parameters are not uniquely determined 207s In addition: Absolute convergence criterion was met, but relative criterion was not met 207s > fm$alpha.mat 207s 1|2 2|3 3|4 4|5 207s (Intercept) -1.265638 1.104045 3.765661 24.89643 207s tempwarm -21.095417 -2.153024 -2.873317 -22.55000 207s > fm$Theta 207s temp 1|2 2|3 3|4 4|5 207s 1 cold -1.265638 1.104045 3.7656606 24.896432 207s 2 warm -22.361055 -1.048979 0.8923431 2.346436 207s > 207s > ################################# 207s > ## 1 continuous variable: 207s > set.seed(123) 207s > x <- rnorm(nrow(wine), sd=1) 207s > fm <- clm(rating ~ temp, nominal=~ x, data=wine) 207s > fm$alpha.mat 207s 1|2 2|3 3|4 4|5 207s (Intercept) -1.93392115 0.4251062 2.4798775 3.9190335 207s x 0.09463825 0.3805713 0.4261607 0.3809099 207s > fm$Theta 207s 1|2 2|3 3|4 4|5 207s 1 -1.933921 0.4251062 2.479878 3.919034 207s > fm <- clm(rating ~ temp, nominal=~ poly(x, 2), data=wine) 207s > fm$alpha.mat 207s 1|2 2|3 3|4 4|5 207s (Intercept) -1.9310988 0.4469436 2.517523 4.094448 207s poly(x, 2)1 0.8763914 3.2908002 3.471603 4.422045 207s poly(x, 2)2 -0.3826811 0.2518184 -2.064209 5.810095 207s > fm$Theta 207s 1|2 2|3 3|4 4|5 207s 1 -1.931099 0.4469436 2.517523 4.094448 207s > 207s > ################################# 207s > ## 1 categorical + 1 continuous variable: 207s > set.seed(123) 207s > x <- rnorm(nrow(wine), sd=1) 207s > fm <- clm(rating ~ temp, nominal=~contact + x, data=wine) 207s > fm$alpha.mat 207s 1|2 2|3 3|4 4|5 207s (Intercept) -1.279484 1.2782515 3.612766 4.7496630 207s contactyes -1.770377 -1.6715296 -1.647335 -0.9575417 207s x 0.300792 0.5330593 0.351517 0.3320371 207s > fm$Theta 207s contact 1|2 2|3 3|4 4|5 207s 1 no -1.279484 1.2782515 3.612766 4.749663 207s 2 yes -3.049860 -0.3932781 1.965431 3.792121 207s > fm <- clm(rating ~ temp, nominal=~contact + x, data=wine, 207s + threshold="symmetric") 207s > fm$alpha.mat 207s central.1 central.2 spacing.1 207s (Intercept) 1.1195535 3.4384752 2.134429723 207s contactyes -1.5864032 -1.5904314 -0.007568099 207s x 0.5069573 0.3485632 0.137951085 207s > fm$Theta 207s contact 1|2 2|3 3|4 4|5 207s 1 no -1.014876 1.1195535 3.438475 5.572905 207s 2 yes -2.593711 -0.4668497 1.848044 3.974905 207s > ################################# 207s > ### NOTE: To get the by-threshold nominal effects of continuous terms 207s > ## use: 207s > with(fm, t(apply(alpha.mat, 1, function(th) tJac %*% th))) 207s [,1] [,2] [,3] [,4] 207s (Intercept) -1.0148763 1.1195535 3.4384752 5.5729049 207s contactyes -1.5788351 -1.5864032 -1.5904314 -1.5979995 207s x 0.3690062 0.5069573 0.3485632 0.4865143 207s > ################################# 207s > ## Interactions: 207s > fm <- clm(rating ~ temp, nominal=~contact:x, data=wine) 207s > fm$alpha.mat 207s 1|2 2|3 3|4 4|5 207s (Intercept) -1.9577944 0.5997213 2.6863244 4.1510613 207s contactno:x 0.1127629 0.7818026 0.4423216 0.9364319 207s contactyes:x 0.2129232 -0.2720801 0.3848893 0.1730418 207s > fm$Theta 207s 1|2 2|3 3|4 4|5 207s 1 -1.957794 0.5997213 2.686324 4.151061 207s > fm <- clm(rating ~ temp, nominal=~contact+x+contact:x, data=wine) 207s > fm$alpha.mat 207s 1|2 2|3 3|4 4|5 207s (Intercept) -1.3000385 1.4056290 3.8340494 5.195521 207s contactyes -2.2801110 -1.5685386 -1.7308097 -1.318630 207s x 0.1790630 0.8754972 0.5140440 1.061857 207s contactyes:x 0.7541913 -0.8829449 -0.2203363 -1.055090 207s > fm$Theta 207s contact 1|2 2|3 3|4 4|5 207s 1 no -1.300039 1.4056290 3.834049 5.195521 207s 2 yes -3.580150 -0.1629096 2.103240 3.876891 207s > fm <- clm(rating ~ temp, nominal=~contact*x, data=wine) 207s > fm$alpha.mat 207s 1|2 2|3 3|4 4|5 207s (Intercept) -1.3000385 1.4056290 3.8340494 5.195521 207s contactyes -2.2801110 -1.5685386 -1.7308097 -1.318630 207s x 0.1790630 0.8754972 0.5140440 1.061857 207s contactyes:x 0.7541913 -0.8829449 -0.2203363 -1.055090 207s > fm$Theta 207s contact 1|2 2|3 3|4 4|5 207s 1 no -1.300039 1.4056290 3.834049 5.195521 207s 2 yes -3.580150 -0.1629096 2.103240 3.876891 207s > ## polynomial terms: 207s > fm <- clm(rating ~ temp, nominal=~contact + poly(x, 2), data=wine) 207s > fm$alpha.mat 207s 1|2 2|3 3|4 4|5 207s (Intercept) -1.2704762 1.3058436 3.635351 4.984803 207s contactyes -1.7725959 -1.6863567 -1.668402 -1.045016 207s poly(x, 2)1 2.4660191 4.4257770 3.395876 4.572499 207s poly(x, 2)2 -0.5079931 -0.4326472 -2.815490 5.853814 207s > fm$Theta 207s contact 1|2 2|3 3|4 4|5 207s 1 no -1.270476 1.3058436 3.635351 4.984803 207s 2 yes -3.043072 -0.3805131 1.966949 3.939787 207s > ## logical variables: (treated like numeric variables) 207s > wine$Con <- as.character(wine$contact) == "yes" 207s > fm <- clm(rating ~ temp, nominal=~Con, data=wine) 207s > fm$Theta 207s 1|2 2|3 3|4 4|5 207s 1 -1.323043 1.246444 3.550044 4.660247 207s > fm$alpha.mat 207s 1|2 2|3 3|4 4|5 207s (Intercept) -1.323043 1.246444 3.550044 4.660247 207s ConTRUE -1.615059 -1.511567 -1.674756 -1.050623 207s > wine$Con.num <- 1 * wine$Con 207s > fm <- clm(rating ~ temp, nominal=~Con.num, data=wine) 207s > fm$Theta 207s 1|2 2|3 3|4 4|5 207s 1 -1.323043 1.246444 3.550044 4.660247 207s > fm$alpha.mat 207s 1|2 2|3 3|4 4|5 207s (Intercept) -1.323043 1.246444 3.550044 4.660247 207s Con.num -1.615059 -1.511567 -1.674756 -1.050623 207s > ################################# 207s > ## Two continuous variables: 207s > set.seed(321) 207s > y <- rnorm(nrow(wine), sd=1) 207s > fm1 <- clm(rating ~ temp, nominal=~y + x, data=wine) 207s > fm1$alpha.mat 207s 1|2 2|3 3|4 4|5 207s (Intercept) -2.0361734 0.4221202 2.4970718 3.92796873 207s y 0.4687950 0.1396038 0.3125431 0.08012751 207s x 0.1283933 0.3903469 0.4322374 0.37584062 207s > fm1$Theta 207s 1|2 2|3 3|4 4|5 207s 1 -2.036173 0.4221202 2.497072 3.927969 207s > ## summary(fm1) 207s > 207s > ################################# 207s > ## 1 categorical + 2 continuous variables: 207s > fm1 <- clm(rating ~ temp, nominal=~y + contact + x, data=wine) 207s > fm1$alpha.mat 207s 1|2 2|3 3|4 4|5 207s (Intercept) -1.3789903 1.2645381 3.5778844 4.76356985 207s y 0.4385042 0.1049073 0.2439721 -0.01655843 207s contactyes -1.7688345 -1.6608152 -1.5801690 -0.98076349 207s x 0.3414184 0.5436276 0.3683201 0.33263316 207s > fm1$Theta 207s contact 1|2 2|3 3|4 4|5 207s 1 no -1.378990 1.2645381 3.577884 4.763570 207s 2 yes -3.147825 -0.3962771 1.997715 3.782806 207s > 207s > fm1 <- clm(rating ~ temp, nominal=~contact + x + contact:x + y, 207s + data=wine) 207s > summary(fm1) 207s formula: rating ~ temp 207s nominal: ~contact + x + contact:x + y 207s data: wine 207s 207s link threshold nobs logLik AIC niter max.grad cond.H 207s logit flexible 72 -81.86 205.72 7(0) 6.30e-12 9.3e+01 207s 207s Coefficients: 207s Estimate Std. Error z value Pr(>|z|) 207s tempwarm 2.8541 0.6159 4.634 3.58e-06 *** 207s --- 207s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 207s 207s Threshold coefficients: 207s Estimate Std. Error z value 207s 1|2.(Intercept) -1.40166 0.63306 -2.214 207s 2|3.(Intercept) 1.38723 0.49672 2.793 207s 3|4.(Intercept) 3.78725 0.71352 5.308 207s 4|5.(Intercept) 5.19478 1.07162 4.848 207s 1|2.contactyes -2.25974 1.68593 -1.340 207s 2|3.contactyes -1.54343 0.62658 -2.463 207s 3|4.contactyes -1.65472 0.68161 -2.428 207s 4|5.contactyes -1.34417 1.10192 -1.220 207s 1|2.x 0.21217 0.60781 0.349 207s 2|3.x 0.88433 0.41592 2.126 207s 3|4.x 0.47072 0.57857 0.814 207s 4|5.x 0.98582 0.94345 1.045 207s 1|2.y 0.41959 0.59889 0.701 207s 2|3.y 0.08377 0.27912 0.300 207s 3|4.y 0.27724 0.33118 0.837 207s 4|5.y -0.03370 0.59652 -0.056 207s 1|2.contactyes:x 0.71850 1.19479 0.601 207s 2|3.contactyes:x -0.89167 0.68974 -1.293 207s 3|4.contactyes:x -0.10843 0.74237 -0.146 207s 4|5.contactyes:x -0.98243 1.06343 -0.924 207s > fm1$Theta 207s contact 1|2 2|3 3|4 4|5 207s 1 no -1.401661 1.3872281 3.787248 5.194782 207s 2 yes -3.661402 -0.1562067 2.132530 3.850615 207s > fm1$alpha.mat 207s 1|2 2|3 3|4 4|5 207s (Intercept) -1.4016606 1.38722808 3.7872478 5.19478152 207s contactyes -2.2597419 -1.54343480 -1.6547177 -1.34416691 207s x 0.2121750 0.88432858 0.4707237 0.98581604 207s y 0.4195947 0.08377343 0.2772447 -0.03369796 207s contactyes:x 0.7184952 -0.89166532 -0.1084271 -0.98242663 207s > fm1 <- clm(rating ~ temp, nominal=~contact*x + y, data=wine) 207s > fm1$Theta 207s contact 1|2 2|3 3|4 4|5 207s 1 no -1.401661 1.3872281 3.787248 5.194782 207s 2 yes -3.661402 -0.1562067 2.132530 3.850615 207s > fm1$alpha.mat 207s 1|2 2|3 3|4 4|5 207s (Intercept) -1.4016606 1.38722808 3.7872478 5.19478152 207s contactyes -2.2597419 -1.54343480 -1.6547177 -1.34416691 207s x 0.2121750 0.88432858 0.4707237 0.98581604 207s y 0.4195947 0.08377343 0.2772447 -0.03369796 207s contactyes:x 0.7184952 -0.89166532 -0.1084271 -0.98242663 207s > t(fm1$alpha.mat) 207s (Intercept) contactyes x y contactyes:x 207s 1|2 -1.401661 -2.259742 0.2121750 0.41959467 0.7184952 207s 2|3 1.387228 -1.543435 0.8843286 0.08377343 -0.8916653 207s 3|4 3.787248 -1.654718 0.4707237 0.27724473 -0.1084271 207s 4|5 5.194782 -1.344167 0.9858160 -0.03369796 -0.9824266 207s > fm1 207s formula: rating ~ temp 207s nominal: ~contact * x + y 207s data: wine 207s 207s link threshold nobs logLik AIC niter max.grad cond.H 207s logit flexible 72 -81.86 205.72 7(0) 6.30e-12 9.3e+01 207s 207s Coefficients: 207s tempwarm 207s 2.854 207s 207s Threshold coefficients: 207s 1|2 2|3 3|4 4|5 207s (Intercept) -1.40166 1.38723 3.78725 5.19478 207s contactyes -2.25974 -1.54343 -1.65472 -1.34417 207s x 0.21217 0.88433 0.47072 0.98582 207s y 0.41959 0.08377 0.27724 -0.03370 207s contactyes:x 0.71850 -0.89167 -0.10843 -0.98243 207s > 207s > ################################# 207s > ## ordered factors (behaves like numerical variables): 207s > data(soup, package="ordinal") 207s > fm2 <- clm(SURENESS ~ 1, nominal=~PRODID + DAY, data=soup) 207s > fm2$Theta 207s PRODID DAY 1|2 2|3 3|4 4|5 5|6 207s 1 1 1 -1.541481 -0.5738506 -0.21399538 0.04222703 0.75684062 207s 2 2 1 -2.260759 -1.5442697 -1.21890789 -0.91689299 -0.24659733 207s 3 3 1 -2.662588 -1.8500284 -1.67612929 -1.15745279 -0.65265582 207s 4 4 1 -2.230317 -1.3875834 -1.10527201 -0.70760465 -0.16454916 207s 5 5 1 -2.291960 -1.8870049 -1.51852627 -1.32708454 -0.64222204 207s 6 6 1 -2.765844 -2.1222058 -1.93080891 -1.76177831 -0.87239437 207s 7 1 2 -1.497366 -0.2765643 0.08617449 0.27652240 0.97863135 207s 8 2 2 -2.216645 -1.2469835 -0.91873802 -0.68259762 -0.02480661 207s 9 3 2 -2.618473 -1.5527421 -1.37595942 -0.92315742 -0.43086509 207s 10 4 2 -2.186203 -1.0902972 -0.80510215 -0.47330927 0.05724157 207s 11 5 2 -2.247845 -1.5897187 -1.21835640 -1.09278917 -0.42043131 207s 12 6 2 -2.721729 -1.8249196 -1.63063905 -1.52748294 -0.65060365 207s > fm2$alpha.mat 207s 1|2 2|3 3|4 4|5 5|6 207s (Intercept) -1.54148084 -0.5738506 -0.2139954 0.04222703 0.7568406 207s PRODID2 -0.71927809 -0.9704192 -1.0049125 -0.95912001 -1.0034380 207s PRODID3 -1.12110698 -1.2761778 -1.4621339 -1.19967981 -1.4094964 207s PRODID4 -0.68883656 -0.8137329 -0.8912766 -0.74983167 -0.9213898 207s PRODID5 -0.75047874 -1.3131544 -1.3045309 -1.36931157 -1.3990627 207s PRODID6 -1.22436292 -1.5483553 -1.7168135 -1.80400534 -1.6292350 207s DAY2 0.04411439 0.2972862 0.3001699 0.23429537 0.2217907 207s > prodid <- factor(soup$PRODID, ordered=TRUE) 207s > fm2 <- clm(SURENESS ~ 1, nominal=~prodid + DAY, data=soup) 208s > fm2$alpha.mat 208s 1|2 2|3 3|4 4|5 5|6 208s (Intercept) -2.29215806 -1.5608238 -1.2772733 -0.9714310 -0.3035963 208s prodid.L -0.69121817 -0.9929406 -1.0651956 -1.1714141 -1.0571728 208s prodid.Q 0.28234300 0.3165731 0.3424949 0.1207237 0.3905959 208s prodid.C -0.56889235 -0.5360906 -0.6536897 -0.5924148 -0.5462885 208s prodid^4 -0.08220340 0.2121409 0.0953785 0.2423256 0.1732012 208s prodid^5 0.20500444 0.3017272 0.3458281 0.2989342 0.3294562 208s DAY2 0.04411439 0.2972862 0.3001699 0.2342954 0.2217907 208s > fm2$Theta 208s DAY 1|2 2|3 3|4 4|5 5|6 208s 1 1 -2.292158 -1.560824 -1.2772733 -0.9714310 -0.30359635 208s 2 2 -2.248044 -1.263538 -0.9771034 -0.7371357 -0.08180562 208s > fm2 <- clm(SURENESS ~ 1, nominal=~prodid, data=soup) 208s > fm2$alpha.mat 208s 1|2 2|3 3|4 4|5 5|6 208s (Intercept) -2.2615449 -1.4231189 -1.13844940 -0.8610163 -0.20025662 208s prodid.L -0.6802192 -1.0171675 -1.08713192 -1.1713363 -1.05578526 208s prodid.Q 0.2551357 0.3521163 0.37511177 0.1651463 0.43182970 208s prodid.C -0.6064464 -0.5635065 -0.68182671 -0.6050149 -0.55490977 208s prodid^4 -0.1115795 0.1036958 -0.01443457 0.1577696 0.09355651 208s prodid^5 0.2349647 0.4222560 0.46856405 0.3867234 0.41280490 208s > fm2$Theta 208s 1|2 2|3 3|4 4|5 5|6 208s 1 -2.261545 -1.423119 -1.138449 -0.8610163 -0.2002566 208s > ################################# 208s > ## Aliased Coefficients: 208s > ## 208s > ## Example where the interaction in the nominal effects is aliased (by 208s > ## design). Here the two Theta matrices coincide. The alpha.mat 208s > ## matrices are similar except one has an extra row with NAs: 208s > soup2 <- soup 208s > levels(soup2$DAY) 208s [1] "1" "2" 208s > levels(soup2$GENDER) 208s [1] "Male" "Female" 208s > xx <- with(soup2, DAY == "2" & GENDER == "Female") 208s > ## Model with additive nominal effects: 208s > fm8 <- clm(SURENESS ~ PRODID, nominal= ~ DAY + GENDER, data=soup2, subset=!xx) 208s > fm8$alpha.mat 208s 1|2 2|3 3|4 4|5 5|6 208s (Intercept) -1.5296912 -0.68765358 -0.3255117394 0.03773041 0.629325973 208s DAY2 -0.2553049 0.08584421 0.1101987830 0.05149732 0.168514829 208s GENDERFemale 0.0790841 0.07464904 -0.0001589362 -0.11045608 -0.005418789 208s > fm8$Theta 208s DAY GENDER 1|2 2|3 3|4 4|5 5|6 208s 1 1 Male -1.529691 -0.6876536 -0.3255117 0.03773041 0.6293260 208s 2 2 Male -1.784996 -0.6018094 -0.2153130 0.08922773 0.7978408 208s 3 1 Female -1.450607 -0.6130045 -0.3256707 -0.07272568 0.6239072 208s 4 2 Female -1.705912 -0.5271603 -0.2154719 -0.02122835 0.7924220 208s > ## Model with non-additive, but aliased nominal effects: 208s > fm9 <- clm(SURENESS ~ PRODID, nominal= ~ DAY * GENDER, data=soup2, subset=!xx) 208s > fm9$alpha.mat 208s 1|2 2|3 3|4 4|5 5|6 208s (Intercept) -1.5296912 -0.68765358 -0.3255117394 0.03773041 0.629325973 208s DAY2 -0.2553049 0.08584421 0.1101987830 0.05149732 0.168514829 208s GENDERFemale 0.0790841 0.07464904 -0.0001589362 -0.11045608 -0.005418789 208s DAY2:GENDERFemale NA NA NA NA NA 208s > fm9$Theta 208s DAY GENDER 1|2 2|3 3|4 4|5 5|6 208s 1 1 Male -1.529691 -0.6876536 -0.3255117 0.03773041 0.6293260 208s 2 2 Male -1.784996 -0.6018094 -0.2153130 0.08922773 0.7978408 208s 3 1 Female -1.450607 -0.6130045 -0.3256707 -0.07272568 0.6239072 208s 4 2 Female -1.705912 -0.5271603 -0.2154719 -0.02122835 0.7924220 208s > 208s > stopEqual <- function(x, y, ca=FALSE) 208s + stopifnot(isTRUE(all.equal(x, y, check.attributes=ca))) 208s > 208s > stopEqual(fm8$alpha.mat, fm9$alpha.mat[1:3, ]) 208s > stopEqual(fm8$Theta, fm9$Theta) 208s > stopEqual(logLik(fm8), logLik(fm9)) 208s > 208s > ################################# 208s > ## Weights: 208s > set.seed(12345) 208s > wts <- runif(nrow(soup)) 208s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE + DAY, data=soup, weights=wts) 208s > fm2$Theta 208s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 208s 1 Self-made 1 -1.957136 -1.2051740 -0.8829317 -0.6651699 -0.03270025 208s 2 Canned 1 -1.665918 -0.9408556 -0.6818962 -0.4277315 0.14356406 208s 3 Dry-mix 1 -2.180024 -1.2221288 -1.1502087 -0.8113657 -0.24840514 208s 4 Self-made 2 -1.988269 -0.9456030 -0.5614139 -0.3852570 0.23978932 208s 5 Canned 2 -1.697051 -0.6812846 -0.3603783 -0.1478186 0.41605363 208s 6 Dry-mix 2 -2.211157 -0.9625577 -0.8286909 -0.5314528 0.02408443 208s > 208s > ## Offset (correctly gives and error) 208s > fm2 <- try(clm(SURENESS ~ 1, nominal=~SOUPTYPE + DAY + offset(wts), 208s + data=soup), silent=TRUE) 208s > stopifnot(inherits(fm2, "try-error")) 208s > 208s > ################################# 208s > ### Other (misc) examples: 208s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE + DAY, data=soup) 208s > fm2$Theta 208s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 208s 1 Self-made 1 -2.040111 -1.2615146 -0.9302684 -0.6740629 -0.05003069 208s 2 Canned 1 -1.816274 -1.0347697 -0.7305192 -0.4563265 0.15972072 208s 3 Dry-mix 1 -2.313198 -1.3029029 -1.1328903 -0.8076982 -0.23529457 208s 4 Self-made 2 -1.956698 -0.9371883 -0.5968669 -0.4131354 0.21403949 208s 5 Canned 2 -1.732861 -0.7104435 -0.3971177 -0.1953990 0.42379090 208s 6 Dry-mix 2 -2.229785 -0.9785767 -0.7994888 -0.5467707 0.02877561 208s > fm2 208s formula: SURENESS ~ 1 208s nominal: ~SOUPTYPE + DAY 208s data: soup 208s 208s link threshold nobs logLik AIC niter max.grad cond.H 208s logit flexible 1847 -2758.02 5556.03 6(2) 1.77e-11 8.7e+02 208s 208s Threshold coefficients: 208s 1|2 2|3 3|4 4|5 5|6 208s (Intercept) -2.04011 -1.26151 -0.93027 -0.67406 -0.05003 208s SOUPTYPECanned 0.22384 0.22674 0.19975 0.21774 0.20975 208s SOUPTYPEDry-mix -0.27309 -0.04139 -0.20262 -0.13364 -0.18526 208s DAY2 0.08341 0.32433 0.33340 0.26093 0.26407 208s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE * DAY, data=soup) 208s > fm2$Theta 208s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 208s 1 Self-made 1 -2.062794 -1.3083328 -0.9935434 -0.7187896 -0.05107493 208s 2 Canned 1 -1.757074 -0.9398212 -0.6286087 -0.3721287 0.15415068 208s 3 Dry-mix 1 -2.369525 -1.3618033 -1.1700713 -0.8661663 -0.23795864 208s 4 Self-made 2 -1.945910 -0.9005649 -0.5459555 -0.3731219 0.21392690 208s 5 Canned 2 -1.775759 -0.7985077 -0.4924765 -0.2776317 0.43428555 208s 6 Dry-mix 2 -2.182299 -0.9257695 -0.7649729 -0.4964369 0.02702867 208s > fm2 208s formula: SURENESS ~ 1 208s nominal: ~SOUPTYPE * DAY 208s data: soup 208s 208s link threshold nobs logLik AIC niter max.grad cond.H 208s logit flexible 1847 -2755.60 5571.21 6(2) 1.76e-11 4.9e+03 208s 208s Threshold coefficients: 208s 1|2 2|3 3|4 4|5 5|6 208s (Intercept) -2.063e+00 -1.308e+00 -9.935e-01 -7.188e-01 -5.107e-02 208s SOUPTYPECanned 3.057e-01 3.685e-01 3.649e-01 3.467e-01 2.052e-01 208s SOUPTYPEDry-mix -3.067e-01 -5.347e-02 -1.765e-01 -1.474e-01 -1.869e-01 208s DAY2 1.169e-01 4.078e-01 4.476e-01 3.457e-01 2.650e-01 208s SOUPTYPECanned:DAY2 -1.356e-01 -2.665e-01 -3.115e-01 -2.512e-01 1.513e-02 208s SOUPTYPEDry-mix:DAY2 7.034e-02 2.827e-02 -4.249e-02 2.406e-02 -1.452e-05 208s > fm2$alpha.mat 208s 1|2 2|3 3|4 4|5 208s (Intercept) -2.06279431 -1.30833282 -0.99354336 -0.71878961 208s SOUPTYPECanned 0.30572040 0.36851159 0.36493470 0.34666092 208s SOUPTYPEDry-mix -0.30673027 -0.05347052 -0.17652789 -0.14737673 208s DAY2 0.11688416 0.40776793 0.44758789 0.34566775 208s SOUPTYPECanned:DAY2 -0.13556938 -0.26645440 -0.31145572 -0.25117080 208s SOUPTYPEDry-mix:DAY2 0.07034149 0.02826594 -0.04248955 0.02406171 208s 5|6 208s (Intercept) -5.107493e-02 208s SOUPTYPECanned 2.052256e-01 208s SOUPTYPEDry-mix -1.868837e-01 208s DAY2 2.650018e-01 208s SOUPTYPECanned:DAY2 1.513304e-02 208s SOUPTYPEDry-mix:DAY2 -1.451666e-05 208s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE * DAY, data=soup, 208s + threshold="symmetric") 208s > fm2$Theta 208s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 208s 1 Self-made 1 -2.023473 -1.3261580 -1.0328445 -0.7395310 -0.04221610 208s 2 Canned 1 -1.650803 -1.0121961 -0.7301243 -0.4480525 0.19055466 208s 3 Dry-mix 1 -2.214507 -1.4643357 -1.2132431 -0.9621504 -0.21197912 208s 4 Self-made 2 -1.757994 -1.0009894 -0.7422397 -0.4834900 0.27351461 208s 5 Canned 2 -1.673970 -0.8581393 -0.5997040 -0.3412687 0.47456211 208s 6 Dry-mix 2 -1.899340 -1.1167968 -0.9013722 -0.6859476 0.09659551 208s > fm2$alpha.mat 208s central spacing.1 spacing.2 208s (Intercept) -1.03284450 0.293313471 0.99062841 208s SOUPTYPECanned 0.30272022 -0.011241697 -0.06994946 208s SOUPTYPEDry-mix -0.18039855 -0.042220836 0.01063552 208s DAY2 0.29060480 -0.034563797 0.02512591 208s SOUPTYPECanned:DAY2 -0.16018453 0.010927306 0.12846128 208s SOUPTYPEDry-mix:DAY2 0.02126607 -0.001104241 -0.02842214 208s > 208s > ################################# 208s > ### Check correctness of Theta matrix when intercept is removed in 208s > ### nominal formula: 208s > ### December 25th 2014, RHBC 208s > fm1 <- clm(rating ~ temp, nominal=~contact-1, data=wine) 208s Warning message: 208s an intercept is needed and assumed in 'nominal' 208s > fm2 <- clm(rating ~ temp, nominal=~contact, data=wine) 208s > stopifnot(isTRUE(all.equal(fm1$Theta, fm2$Theta))) 208s > stopifnot(isTRUE(all.equal(fm1$logLik, fm2$logLik))) 208s > wine2 <- wine 208s > wine2$contact <- relevel(wine2$contact, "yes") 208s > fm3 <- clm(rating ~ temp, nominal=~contact, data=wine2) 208s > stopifnot(isTRUE(all.equal(coef(fm1, na.rm=TRUE), coef(fm3)))) 208s > ################################# 208s > 208s > 208s BEGIN TEST test.clm.convergence.R 208s 208s R version 4.4.3 (2025-02-28) -- "Trophy Case" 208s Copyright (C) 2025 The R Foundation for Statistical Computing 208s Platform: arm-unknown-linux-gnueabihf (32-bit) 208s 208s R is free software and comes with ABSOLUTELY NO WARRANTY. 208s You are welcome to redistribute it under certain conditions. 208s Type 'license()' or 'licence()' for distribution details. 208s 208s R is a collaborative project with many contributors. 208s Type 'contributors()' for more information and 208s 'citation()' on how to cite R or R packages in publications. 208s 208s Type 'demo()' for some demos, 'help()' for on-line help, or 208s 'help.start()' for an HTML browser interface to help. 208s Type 'q()' to quit R. 208s 208s > library(ordinal) 209s > 209s > 209s > ## Testing that errors in chol() are caught soon enough: 209s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 209s > wine2 <- subset(wine, subset=(!1:nrow(wine) %in% cy)) 209s > wine2[c(9, 15, 46), "rating"] <- NA 209s > fm1 <- clm(rating ~ temp, scale=~contact, nominal=~contact, 209s + data=wine2) 209s > fm1 <- try(clm(rating ~ temp, scale=~contact, nominal=~contact, 209s + data=wine2, control=list(gradTol=1e-12)), silent=TRUE) 209s Warning message: 209s (1) Hessian is numerically singular: parameters are not uniquely determined 209s In addition: Absolute convergence criterion was met, but relative criterion was not met 209s > fm2 <- try(clm(rating ~ temp, scale=~contact, nominal=~contact, 209s + data=wine2, control=list(gradTol=1e-15)), silent=TRUE) 209s Warning message: 209s (1) Hessian is numerically singular: parameters are not uniquely determined 209s In addition: Absolute convergence criterion was met, but relative criterion was not met 209s Warning message: 209s (-1) Model failed to converge with max|grad| = 4.32588e-08 (tol = 1e-15) 209s In addition: iteration limit reached 209s > ## These gave errors in version 2014.11-12. 209s > stopifnot(!inherits(fm1, "try-error")) 209s > stopifnot(!inherits(fm2, "try-error")) 209s > summary(fm1) 209s formula: rating ~ temp 209s scale: ~contact 209s nominal: ~contact 209s data: wine2 209s 209s link threshold nobs logLik AIC niter max.grad cond.H 209s logit flexible 51 -60.44 140.87 64(40) 5.26e-14 3.5e+16 209s 209s Coefficients: 209s Estimate Std. Error z value Pr(>|z|) 209s tempwarm 2.306 NA NA NA 209s 209s log-scale coefficients: 209s Estimate Std. Error z value Pr(>|z|) 209s contactyes -0.0715 NA NA NA 209s 209s Threshold coefficients: 209s Estimate Std. Error z value 209s 1|2.(Intercept) -1.354 NA NA 209s 2|3.(Intercept) 1.092 NA NA 209s 3|4.(Intercept) 3.469 NA NA 209s 4|5.(Intercept) 5.066 NA NA 209s 1|2.contactyes -30.757 NA NA 209s 2|3.contactyes -1.424 NA NA 209s 3|4.contactyes -1.808 NA NA 209s 4|5.contactyes -1.870 NA NA 209s (3 observations deleted due to missingness) 209s > summary(fm2) 209s formula: rating ~ temp 209s scale: ~contact 209s nominal: ~contact 209s data: wine2 209s 209s link threshold nobs logLik AIC niter max.grad cond.H 209s logit flexible 51 -60.44 140.87 111(88) 4.33e-08 1.6e+16 209s 209s Coefficients: 209s Estimate Std. Error z value Pr(>|z|) 209s tempwarm 2.3060 0.7713 2.99 0.00279 ** 209s --- 209s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 209s 209s log-scale coefficients: 209s Estimate Std. Error z value Pr(>|z|) 209s contactyes -0.07113 4807.97981 0 1 209s 209s Threshold coefficients: 209s Estimate Std. Error z value 209s 1|2.(Intercept) -1.354e+00 5.707e-01 -2.373 209s 2|3.(Intercept) 1.092e+00 5.251e-01 2.080 209s 3|4.(Intercept) 3.469e+00 7.982e-01 4.346 209s 4|5.(Intercept) 5.066e+00 1.193e+00 4.246 209s 1|2.contactyes -3.824e+01 1.288e+09 0.000 209s 2|3.contactyes -1.425e+00 1.269e+04 0.000 209s 3|4.contactyes -1.808e+00 3.104e+03 -0.001 209s 4|5.contactyes -1.870e+00 4.279e+03 0.000 209s (3 observations deleted due to missingness) 209s > 209s > ## Error in convergence.clm() due to bad evaluation of model 209s > ## environment with update(object, doFit=FALSE): 209s > wine3 <- wine 209s > set.seed(1234) 209s > wts <- runif(nrow(wine3), 0, 2) 209s > fm3 <- clm(rating ~ temp + contact, data=wine3, 209s + weights=wts) 209s > c0 <- convergence(fm3) 209s > set.seed(1234) 209s > fm3 <- clm(rating ~ temp + contact, data=wine3, 209s + weights=runif(nrow(wine3), 0, 2)) 209s > c1 <- convergence(fm3) 209s > c0$info$logLik.Error 209s [1] "<1e-10" 209s > c1$info$logLik.Error 209s [1] "<1e-10" 209s > all.equal(c0$info$logLik.Error, c1$info$logLik.Error) 209s [1] TRUE 209s > ## In version 2014.11-14: 209s > ## > wine3 <- wine 209s > ## > set.seed(1234) 209s > ## > wts <- runif(nrow(wine3), 0, 2) 209s > ## > fm3 <- clm(rating ~ temp + contact, data=wine3, 209s > ## + weights=wts) 209s > ## > c0 <- convergence(fm3) 209s > ## > set.seed(1234) 209s > ## > fm3 <- clm(rating ~ temp + contact, data=wine3, 209s > ## + weights=runif(nrow(wine3), 0, 2)) 209s > ## > c1 <- convergence(fm3) 209s > ## > c0$info$logLik.Error 209s > ## [1] "<1e-10" 209s > ## > c1$info$logLik.Error 209s > ## [1] "4.80e+00" 209s > ## > all.equal(c0$info$logLik.Error, c1$info$logLik.Error) 209s > ## [1] "1 string mismatch" 209s > stopifnot(c0$info$logLik.Error == 209s + c1$info$logLik.Error) 209s > 209s BEGIN TEST test.clm.flex.link.R 210s 210s R version 4.4.3 (2025-02-28) -- "Trophy Case" 210s Copyright (C) 2025 The R Foundation for Statistical Computing 210s Platform: arm-unknown-linux-gnueabihf (32-bit) 210s 210s R is free software and comes with ABSOLUTELY NO WARRANTY. 210s You are welcome to redistribute it under certain conditions. 210s Type 'license()' or 'licence()' for distribution details. 210s 210s R is a collaborative project with many contributors. 210s Type 'contributors()' for more information and 210s 'citation()' on how to cite R or R packages in publications. 210s 210s Type 'demo()' for some demos, 'help()' for on-line help, or 210s 'help.start()' for an HTML browser interface to help. 210s Type 'q()' to quit R. 210s 210s > # test.clm.flex.link.R 210s > 210s > library(ordinal) 211s > 211s > fm <- clm(rating ~ contact + temp, data=wine, link="log-gamma") 211s Changing to 'nlminb' optimizer for flexible link function 211s > fm 211s formula: rating ~ contact + temp 211s data: wine 211s 211s Warning message: 211s (-1) Model failed to converge with max|grad| = 9.90148e-05 (tol = 1e-06) 211s link threshold nobs logLik AIC niter max.grad cond.H 211s log-gamma flexible 72 -85.72 185.44 27(179) 9.90e-05 5.9e+01 211s 211s Coefficients: 211s contactyes tempwarm 211s 0.8614 1.5072 211s 211s Link coefficient: 211s lambda 211s 0.1615 211s 211s Threshold coefficients: 211s 1|2 2|3 3|4 4|5 211s -0.8798 0.6678 1.9807 2.8593 211s > summary(fm) 211s formula: rating ~ contact + temp 211s data: wine 211s 211s link threshold nobs logLik AIC niter max.grad cond.H 211s log-gamma flexible 72 -85.72 185.44 27(179) 9.90e-05 5.9e+01 211s 211s Coefficients: 211s Estimate Std. Error z value Pr(>|z|) 211s contactyes 0.8614 0.2675 3.220 0.00128 ** 211s tempwarm 1.5072 0.2947 5.114 3.16e-07 *** 211s Profile intervals not available for models with flexible link function: 211s reporting Wald intervals instead 211s --- 211s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 211s 211s Link coefficients: 211s Estimate Std. Error z value Pr(>|z|) 211s lambda 0.1615 0.5752 0.281 0.779 211s 211s Threshold coefficients: 211s Estimate Std. Error z value 211s 1|2 -0.8798 0.5003 -1.759 211s 2|3 0.6678 0.3450 1.936 211s 3|4 1.9807 0.3826 5.177 211s 4|5 2.8593 0.4656 6.141 211s > vcov(fm) 211s 1|2 2|3 3|4 4|5 contactyes 211s 1|2 0.25029668 0.12858124 0.11888120 0.14341730 0.03339111 211s 2|3 0.12858124 0.11899385 0.10688715 0.12363923 0.04117758 211s 3|4 0.11888120 0.10688715 0.14635448 0.15493865 0.05320442 211s 4|5 0.14341730 0.12363923 0.15493865 0.21676904 0.06051103 211s contactyes 0.03339111 0.04117758 0.05320442 0.06051103 0.07156735 211s tempwarm 0.00707258 0.03006561 0.05390802 0.06549176 0.01159715 211s lambda -0.23173316 -0.13979171 -0.12509774 -0.15581155 -0.01157951 211s tempwarm lambda 211s 1|2 0.00707258 -0.23173316 211s 2|3 0.03006561 -0.13979171 211s 3|4 0.05390802 -0.12509774 211s 4|5 0.06549176 -0.15581155 211s contactyes 0.01159715 -0.01157951 211s tempwarm 0.08687098 0.01970691 211s lambda 0.01970691 0.33082449 211s > logLik(fm) 211s 'log Lik.' -85.72141 (df=7) 211s > extractAIC(fm) 211s [1] 7.0000 185.4428 211s > fm2 <- update(fm, link="probit") 211s > anova(fm, fm2) 211s Likelihood ratio tests of cumulative link models: 211s 211s formula: link: threshold: 211s fm2 rating ~ contact + temp probit flexible 211s fm rating ~ contact + temp log-gamma flexible 211s 211s no.par AIC logLik LR.stat df Pr(>Chisq) 211s fm2 6 183.52 -85.761 211s fm 7 185.44 -85.721 0.0795 1 0.778 211s > head(model.matrix(fm)$X) 211s (Intercept) contactyes tempwarm 211s 1 1 0 0 211s 2 1 0 0 211s 3 1 1 0 211s 4 1 1 0 211s 5 1 0 1 211s 6 1 0 1 211s > head(model.frame(fm)) 211s rating contact temp 211s 1 2 no cold 211s 2 3 no cold 211s 3 3 yes cold 211s 4 4 yes cold 211s 5 4 no warm 211s 6 4 no warm 211s > coef(fm) 211s 1|2 2|3 3|4 4|5 contactyes tempwarm lambda 211s -0.8797774 0.6678307 1.9806826 2.8593125 0.8614400 1.5071959 0.1614741 211s > coef(summary(fm)) 211s Estimate Std. Error z value Pr(>|z|) 211s 1|2 -0.8797774 0.5002966 -1.7585116 7.866049e-02 211s 2|3 0.6678307 0.3449548 1.9359945 5.286838e-02 211s 3|4 1.9806826 0.3825630 5.1774020 2.249971e-07 211s 4|5 2.8593125 0.4655846 6.1413379 8.182932e-10 211s contactyes 0.8614400 0.2675208 3.2200867 1.281518e-03 211s tempwarm 1.5071959 0.2947388 5.1136658 3.159661e-07 211s lambda 0.1614741 0.5751734 0.2807398 7.789100e-01 211s > nobs(fm) 211s [1] 72 211s > terms(fm) 211s rating ~ contact + temp 211s attr(,"variables") 211s list(rating, contact, temp) 211s attr(,"factors") 211s contact temp 211s rating Changing to 'nlminb' optimizer for flexible link function 211s 0 0 211s contact 1 0 211s temp 0 1 211s attr(,"term.labels") 211s [1] "contact" "temp" 211s attr(,"order") 211s [1] 1 1 211s attr(,"intercept") 211s [1] 1 211s attr(,"response") 211s [1] 1 211s attr(,".Environment") 211s 211s attr(,"predvars") 211s list(rating, contact, temp) 211s attr(,"dataClasses") 211s rating contact temp 211s "ordered" "factor" "factor" 211s > # profile(fm) # not implemented 211s > confint(fm) 211s 2.5 % 97.5 % 211s 1|2 -1.860340665 0.1007859 211s 2|3 -0.008268395 1.3439298 211s 3|4 1.230872839 2.7304924 211s 4|5 1.946783395 3.7718416 211s contactyes 0.337108993 1.3857711 211s tempwarm 0.929518433 2.0848735 211s lambda -0.965845161 1.2887933 211s > 211s > predict(fm, se=TRUE, interval = TRUE) 211s $fit 211s [1] 0.55792545 0.21565445 0.44140778 0.09846706 0.22428321 0.22428321 211s [7] 0.29090566 0.29090566 0.21042288 0.55792545 0.05388914 0.44140778 211s [13] 0.20737472 0.48129483 0.29090566 0.33832254 0.55792545 0.21565445 211s [19] 0.44140778 0.39099052 0.07269587 0.07269587 0.33832254 0.33832254 211s [25] 0.21565445 0.55792545 0.44140778 0.39099052 0.48129483 0.20737472 211s [31] 0.29090566 0.31272339 0.55792545 0.21565445 0.09846706 0.44140778 211s [37] 0.48129483 0.48129483 0.31272339 0.31272339 0.21565445 0.55792545 211s [43] 0.44140778 0.39099052 0.20737472 0.22428321 0.29090566 0.33832254 211s [49] 0.21042288 0.21042288 0.39099052 0.39099052 0.20737472 0.48129483 211s [55] 0.05636253 0.31272339 0.55792545 0.55792545 0.39099052 0.44140778 211s [61] 0.48129483 0.48129483 0.31272339 0.33832254 0.21042288 0.55792545 211s [67] 0.44140778 0.39099052 0.48129483 0.20737472 0.33832254 0.33832254 211s 211s $se.fit 211s [1] 0.09164058 0.09494135 0.08777656 0.05464347 0.08112461 0.08112461 211s [7] 0.13494789 0.13494789 0.13693811 0.09164058 0.04809909 0.08777656 211s [13] 0.09512593 0.07373113 0.13494789 0.08236628 0.09164058 0.09494135 211s [19] 0.08777656 0.09756681 0.06362571 0.06362571 0.08236628 0.08236628 211s [25] 0.09494135 0.09164058 0.08777656 0.09756681 0.07373113 0.09512593 211s [31] 0.13494789 0.09451059 0.09164058 0.09494135 0.05464347 0.08777656 211s [37] 0.07373113 0.07373113 0.09451059 0.09451059 0.09494135 0.09164058 211s [43] 0.08777656 0.09756681 0.09512593 0.08112461 0.13494789 0.08236628 211s [49] 0.13693811 0.13693811 0.09756681 0.09756681 0.09512593 0.07373113 211s [55] 0.03866211 0.09451059 0.09164058 0.09164058 0.09756681 0.08777656 211s [61] 0.07373113 0.07373113 0.09451059 0.08236628 0.13693811 0.09164058 211s [67] 0.08777656 0.09756681 0.07373113 0.09512593 0.08236628 0.08236628 211s 211s $lwr 211s [1] 0.378604422 0.083839588 0.282278453 0.031650564 0.103885178 0.103885178 211s [7] 0.102183448 0.102183448 0.050316475 0.378604422 0.008885132 0.282278453 211s [13] 0.077621510 0.342154616 0.102183448 0.199101468 0.378604422 0.083839588 211s [19] 0.282278453 0.223352984 0.012177666 0.012177666 0.199101468 0.199101468 211s [25] 0.083839588 0.378604422 0.282278453 0.223352984 0.342154616 0.077621510 211s [31] 0.102183448 0.161206608 0.378604422 0.083839588 0.031650564 0.282278453 211s [37] 0.342154616 0.342154616 0.161206608 0.161206608 0.083839588 0.378604422 211s [43] 0.282278453 0.223352984 0.077621510 0.103885178 0.102183448 0.199101468 211s [49] 0.050316475 0.050316475 0.223352984 0.223352984 0.077621510 0.342154616 211s [55] 0.014165415 0.161206608 0.378604422 0.378604422 0.223352984 0.282278453 211s [61] 0.342154616 0.342154616 0.161206608 0.199101468 0.050316475 0.378604422 211s [67] 0.282278453 0.223352984 0.342154616 0.077621510 0.199101468 0.199101468 211s 211s $upr 211s [1] 0.7233159 0.4523801 0.6135565 0.2673887 0.4189772 0.4189772 0.5965756 211s [8] 0.5965756 0.5727401 0.7233159 0.2657272 0.6135565 0.4485489 0.6233979 211s [15] 0.5965756 0.5125880 0.7233159 0.4523801 0.6135565 0.5890239 0.3326787 211s [22] 0.3326787 0.5125880 0.5125880 0.4523801 0.7233159 0.6135565 0.5890239 211s [29] 0.6233979 0.4485489 0.5965756 0.5186019 0.7233159 0.4523801 0.2673887 211s [36] 0.6135565 0.6233979 0.6233979 0.5186019 0.5186019 0.4523801 0.7233159 211s [43] 0.6135565 0.5890239 0.4485489 0.4189772 0.5965756 0.5125880 0.5727401 211s [50] 0.5727401 0.5890239 0.5890239 0.4485489 0.6233979 0.1988990 0.5186019 211s [57] 0.7233159 0.7233159 0.5890239 0.6135565 0.6233979 0.6233979 0.5186019 211s [64] 0.5125880 0.5727401 0.7233159 0.6135565 0.5890239 0.6233979 0.4485489 211s [71] 0.5125880 0.5125880 211s 211s > predict(fm, type="class") 211s $fit 211s [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 211s [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 211s Levels: 1 2 3 4 5 211s 211s > newData <- expand.grid(temp = c("cold", "warm"), 211s + contact = c("no", "yes")) 211s > 211s > ## Predicted probabilities in all five response categories for each of 211s > ## the four cases in newData: 211s > predict(fm, newdata=newData, type="prob") 211s $fit 211s 1 2 3 4 5 211s 1 0.210422882 0.55792545 0.2156544 0.01517801 0.0008192111 211s 2 0.014351371 0.20737472 0.4812948 0.22428321 0.0726958743 211s 3 0.053889141 0.39099052 0.4414078 0.09846706 0.0152454932 211s 4 0.001685878 0.05636253 0.3127234 0.33832254 0.2909056643 211s 211s > predict(fm, newdata=newData, type="class") 211s $fit 211s [1] 2 3 3 4 211s Levels: 1 2 3 4 5 211s 211s > 211s > predict(fm, newdata=newData, type="prob", se.fit = TRUE, interval = TRUE) 211s $fit 211s 1 2 3 4 5 211s 1 0.210422882 0.55792545 0.2156544 0.01517801 0.0008192111 211s 2 0.014351371 0.20737472 0.4812948 0.22428321 0.0726958743 211s 3 0.053889141 0.39099052 0.4414078 0.09846706 0.0152454932 211s 4 0.001685878 0.05636253 0.3127234 0.33832254 0.2909056643 211s 211s $se.fit 211s 1 2 3 4 5 211s 1 0.136938111 0.09164058 0.09494135 0.01696529 0.002047363 211s 2 0.016247015 0.09512593 0.07373113 0.08112461 0.063625711 211s 3 0.048099092 0.09756681 0.08777656 0.05464347 0.019268561 211s 4 0.002046575 0.03866211 0.09451059 0.08236628 0.134947885 211s 211s $lwr 211s 1 2 3 4 5 211s 1 0.050316475 0.37860442 0.08383959 0.001663553 6.091051e-06 211s 2 0.001530524 0.07762151 0.34215462 0.103885178 1.217767e-02 211s 3 0.008885132 0.22335298 0.28227845 0.031650564 1.249665e-03 211s 4 0.000155750 0.01416541 0.16120661 0.199101468 1.021834e-01 211s 211s $upr 211s 1 2 3 4 5 211s 1 0.57274013 0.7233159 0.4523801 0.1247616 0.09939056 211s 2 0.12150065 0.4485489 0.6233979 0.4189772 0.33267866 211s 3 0.26572719 0.5890239 0.6135565 0.2673887 0.16075952 211s 4 0.01797808 0.1988990 0.5186019 0.5125880 0.59657563 211s 211s > 211s > 211s > ## Aranda-Ordaz link: 211s > fm <- clm(rating ~ contact + temp, data=wine, link="Aranda-Ordaz") 211s > fm 211s formula: rating ~ contact + temp 211s data: wine 211s 211s Warning message: 211s (-1) Model failed to converge with max|grad| = 1.6288e-05 (tol = 1e-06) 211s link threshold nobs logLik AIC niter max.grad cond.H 211s Aranda-Ordaz flexible 72 -86.34 186.68 31(219) 1.63e-05 3.9e+02 211s 211s Coefficients: 211s contactyes tempwarm 211s 1.193 2.076 211s 211s Link coefficient: 211s lambda 211s 0.4994 211s 211s Threshold coefficients: 211s 1|2 2|3 3|4 4|5 211s -1.5284 0.7669 2.6021 3.7962 211s > summary(fm) 211s formula: rating ~ contact + temp 211s data: wine 211s 211s link threshold nobs logLik AIC niter max.grad cond.H 211s Aranda-Ordaz flexible 72 -86.34 186.68 31(219) 1.63e-05 3.9e+02 211s 211s Coefficients: 211s Estimate Std. Error z value Pr(>|z|) 211s contactyes 1.1927 0.6526 1.828 0.0676 . 211s tempwarm 2.0758 0.8196 2.533 0.0113 * 211s --- 211s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 211s 211s Link coefficients: 211s Estimate Std. Error z value Pr(>|z|) 211s lambda 0.4994 0.7840 0.637 0.524 211s 211s Threshold coefficients: 211s Profile intervals not available for models with flexible link function: 211s reporting Wald intervals instead 211s Estimate Std. Error z value 211s 1|2 -1.5284 0.5775 -2.647 211s 2|3 0.7669 0.8234 0.931 211s 3|4 2.6021 1.4335 1.815 211s 4|5 3.7962 1.9674 1.930 211s > vcov(fm) 211s 1|2 2|3 3|4 4|5 contactyes tempwarm 211s 1|2 0.3335060 0.2983830 0.4851477 0.6557866 0.2132243 0.2586679 211s 2|3 0.2983830 0.6780278 1.1261329 1.5330564 0.4699069 0.5953101 211s 3|4 0.4851477 1.1261329 2.0550132 2.7755715 0.8214403 1.0831428 211s 4|5 0.6557866 1.5330564 2.7755715 3.8705158 1.1194941 1.4831342 211s contactyes 0.2132243 0.4699069 0.8214403 1.1194941 0.4259333 0.3965112 211s tempwarm 0.2586679 0.5953101 1.0831428 1.4831342 0.3965112 0.6717720 211s lambda 0.2424389 0.5895693 1.0675177 1.4810301 0.4153797 0.5471765 211s lambda 211s 1|2 0.2424389 211s 2|3 0.5895693 211s 3|4 1.0675177 211s 4|5 1.4810301 211s contactyes 0.4153797 211s tempwarm 0.5471765 211s lambda 0.6146953 211s > logLik(fm) 211s 'log Lik.' -86.34171 (df=7) 211s > extractAIC(fm) 211s [1] 7.0000 186.6834 211s > fm2 <- update(fm, link="logit") 211s > anova(fm, fm2) 211s Likelihood ratio tests of cumulative link models: 211s 211s formula: link: threshold: 211s fm2 rating ~ contact + temp logit flexible 211s fm rating ~ contact + temp Aranda-Ordaz flexible 211s 211s no.par AIC logLik LR.stat df Pr(>Chisq) 211s fm2 6 184.98 -86.492 211s fm 7 186.68 -86.342 0.3004 1 0.5836 211s > head(model.matrix(fm)$X) 211s (Intercept) contactyes tempwarm 211s 1 1 0 0 211s 2 1 0 0 211s 3 1 1 0 211s 4 1 1 0 211s 5 1 0 1 211s 6 1 0 1 211s > head(model.frame(fm)) 211s rating contact temp 211s 1 2 no cold 211s 2 3 no cold 211s 3 3 yes cold 211s 4 4 yes cold 211s 5 4 no warm 211s 6 4 no warm 211s > coef(fm) 211s 1|2 2|3 3|4 4|5 contactyes tempwarm lambda 211s -1.5283885 0.7668892 2.6021281 3.7962200 1.1927244 2.0757936 0.4994415 211s > coef(summary(fm)) 211s Estimate Std. Error z value Pr(>|z|) 211s 1|2 -1.5283885 0.5774998 -2.6465611 0.008131482 211s 2|3 0.7668892 0.8234244 0.9313413 0.351677025 211s 3|4 2.6021281 1.4335317 1.8151869 0.069495186 211s 4|5 3.7962200 1.9673627 1.9295985 0.053656609 211s contactyes 1.1927244 0.6526357 1.8275501 0.067617099 211s tempwarm 2.0757936 0.8196170 2.5326386 0.011320761 211s lambda 0.4994415 0.7840251 0.6370223 0.524110286 211s > nobs(fm) 211s [1] 72 211s > terms(fm) 211s rating ~ contact + temp 211s attr(,"variables") 211s list(rating, contact, temp) 211s attr(,"factors") 211s contact temp 211s rating 0 0 211s contact 1 0 211s temp 0 1 211s attr(,"term.labels") 211s [1] "contact" "temp" 211s attr(,"order") 211s [1] 1 1 211s attr(,"intercept") 211s [1] 1 211s attr(,"response") 211s [1] 1 211s attr(,".Environment") 211s 211s attr(,"predvars") 211s list(rating, contact, temp) 211s attr(,"dataClasses") 211s rating contact temp 211s "ordered" "factor" "factor" 211s > # profile(fm) # not implemented 211s > confint(fm) 211s 2.5 % 97.5 % 211s 1|2 -2.66026726 -0.3965097 211s 2|3 -0.84699301 2.3807714 211s 3|4 -0.20754248 5.4117986 211s 4|5 -0.05973998 7.6521799 211s contactyes -0.08641802 2.4718668 211s tempwarm 0.46937383 3.6822133 211s lambda -1.03721940 2.0361024 211s > 211s > predict(fm, se=TRUE, interval = TRUE) 211s $fit 211s [1] 0.58209325 0.21518056 0.46054754 0.09103825 0.22383779 0.22383779 211s [7] 0.29286866 0.29286866 0.18610435 0.58209325 0.06269201 0.46054754 211s [13] 0.19716614 0.48293297 0.29286866 0.34021081 0.58209325 0.21518056 211s [19] 0.46054754 0.36913993 0.06939859 0.06939859 0.34021081 0.34021081 211s [25] 0.21518056 0.58209325 0.46054754 0.36913993 0.48293297 0.19716614 211s [31] 0.29286866 0.28974275 0.58209325 0.21518056 0.09103825 0.46054754 211s [37] 0.48293297 0.48293297 0.28974275 0.28974275 0.21518056 0.58209325 211s [43] 0.46054754 0.36913993 0.19716614 0.22383779 0.29286866 0.34021081 211s [49] 0.18610435 0.18610435 0.36913993 0.36913993 0.19716614 0.48293297 211s [55] 0.06897335 0.28974275 0.58209325 0.58209325 0.36913993 0.46054754 211s [61] 0.48293297 0.48293297 0.28974275 0.34021081 0.18610435 0.58209325 211s [67] 0.46054754 0.36913993 0.48293297 0.19716614 0.34021081 0.34021081 211s 211s $se.fit 211s [1] 0.14151187 0.09458704 0.10284384 0.06173010 0.06089158 0.06089158 211s [7] 0.17401323 0.17401323 0.08458282 0.14151187 0.03342713 0.10284384 211s [13] 0.06151480 0.16022480 0.17401323 0.14317221 0.14151187 0.09458704 211s [19] 0.10284384 0.09671235 0.16165494 0.16165494 0.14317221 0.14317221 211s [25] 0.09458704 0.14151187 0.10284384 0.09671235 0.16022480 0.06151480 211s [31] 0.17401323 0.08680263 0.14151187 0.09458704 0.06173010 0.10284384 211s [37] 0.16022480 0.16022480 0.08680263 0.08680263 0.09458704 0.14151187 211s [43] 0.10284384 0.09671235 0.06151480 0.06089158 0.17401323 0.14317221 211s [49] 0.08458282 0.08458282 0.09671235 0.09671235 0.06151480 0.16022480 211s [55] 0.03861752 0.08680263 0.14151187 0.14151187 0.09671235 0.10284384 211s [61] 0.16022480 0.16022480 0.08680263 0.14317221 0.08458282 0.14151187 211s [67] 0.10284384 0.09671235 0.16022480 0.06151480 0.14317221 0.14317221 211s 211s $lwr 211s [1] 0.3081470907 0.0838051152 0.2749859872 0.0226847131 0.1267084217 211s [6] 0.1267084217 0.0738941554 0.0738941554 0.0710944695 0.3081470907 211s [11] 0.0214631498 0.2749859872 0.1028661817 0.2098384787 0.0738941554 211s [16] 0.1287024772 0.3081470907 0.0838051152 0.2749859872 0.2058910207 211s [21] 0.0005517244 0.0005517244 0.1287024772 0.1287024772 0.0838051152 211s [26] 0.3081470907 0.2749859872 0.2058910207 0.2098384787 0.1028661817 211s [31] 0.0738941554 0.1514410900 0.3081470907 0.0838051152 0.0226847131 211s [36] 0.2749859872 0.2098384787 0.2098384787 0.1514410900 0.1514410900 211s [41] 0.0838051152 0.3081470907 0.2749859872 0.2058910207 0.1028661817 211s [46] 0.1267084217 0.0738941554 0.1287024772 0.0710944695 0.0710944695 211s [51] 0.2058910207 0.2058910207 0.1028661817 0.2098384787 0.0222866430 211s [56] 0.1514410900 0.3081470907 0.3081470907 0.2058910207 0.2749859872 211s [61] 0.2098384787 0.2098384787 0.1514410900 0.1287024772 0.0710944695 211s [66] 0.3081470907 0.2749859872 0.2058910207 0.2098384787 0.1028661817 211s [71] 0.1287024772 0.1287024772 211s 211s $upr 211s [1] 0.8132915 0.4511024 0.6577298 0.3017605 0.3643579 0.3643579 0.6825186 211s [8] 0.6825186 0.4058732 0.8132915 0.1694071 0.6577298 0.3446983 0.7666176 211s [15] 0.6825186 0.6428534 0.8132915 0.4511024 0.6577298 0.5690698 0.9097003 211s [22] 0.9097003 0.6428534 0.6428534 0.4511024 0.8132915 0.6577298 0.5690698 211s [29] 0.7666176 0.3446983 0.6825186 0.4825259 0.8132915 0.4511024 0.3017605 211s [36] 0.6577298 0.7666176 0.7666176 0.4825259 0.4825259 0.4511024 0.8132915 211s [43] 0.6577298 0.5690698 0.3446983 0.3643579 0.6825186 0.6428534 0.4058732 211s [50] 0.4058732 0.5690698 0.5690698 0.3446983 0.7666176 0.1940499 0.4825259 211s [57] 0.8132915 0.8132915 0.5690698 0.6577298 0.7666176 0.7666176 0.4825259 211s [64] 0.6428534 0.4058732 0.8132915 0.6577298 0.5690698 0.7666176 0.3446983 211s [71] 0.6428534 0.6428534 211s 211s > predict(fm, type="class") 211s $fit 211s [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 211s [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 211s Levels: 1 2 3 4 5 211s 211s > newData <- expand.grid(temp = c("cold", "warm"), 211s + contact = c("no", "yes")) 211s > 211s > ## Predicted probabilities in all five response categories for each of 211s > ## the four cases in newData: 211s > predict(fm, newdata=newData, type="prob") 211s $fit 211s 1 2 3 4 5 211s 1 0.186104347 0.58209325 0.2151806 0.01478353 0.001838315 211s 2 0.026664518 0.19716614 0.4829330 0.22383779 0.069398588 211s 3 0.062692012 0.36913993 0.4605475 0.09103825 0.016582262 211s 4 0.008204432 0.06897335 0.2897428 0.34021081 0.292868655 211s 211s > predict(fm, newdata=newData, type="class") 211s $fit 211s [1] 2 3 3 4 211s Levels: 1 2 3 4 5 211s 211s > 211s > predict(fm, newdata=newData, type="prob", se.fit = TRUE, interval = TRUE) 211s $fit 211s 1 2 3 4 5 211s 1 0.186104347 0.58209325 0.2151806 0.01478353 0.001838315 211s 2 0.026664518 0.19716614 0.4829330 0.22383779 0.069398588 211s 3 0.062692012 0.36913993 0.4605475 0.09103825 0.016582262 211s 4 0.008204432 0.06897335 0.2897428 0.34021081 0.292868655 211s 211s $se.fit 211s 1 2 3 4 5 211s 1 0.084582817 0.14151187 0.09458704 0.05105462 0.04225890 211s 2 0.018013146 0.06151480 0.16022480 0.06089158 0.16165494 211s 3 0.033427133 0.09671235 0.10284384 0.06173010 0.09203687 211s 4 0.009189041 0.03861752 0.08680263 0.14317221 0.17401323 211s 211s $lwr 211s 1 2 3 4 5 211s 1 0.0710944695 0.30814709 0.08380512 1.557841e-05 4.590852e-23 211s 2 0.0069799028 0.10286618 0.20983848 1.267084e-01 5.517244e-04 211s 3 0.0214631498 0.20589102 0.27498599 2.268471e-02 2.647288e-07 211s 4 0.0009036362 0.02228664 0.15144109 1.287025e-01 7.389416e-02 211s 211s $upr 211s 1 2 3 4 5 211s 1 0.40587324 0.8132915 0.4511024 0.9352884 1.0000000 211s 2 0.09647027 0.3446983 0.7666176 0.3643579 0.9097003 211s 3 0.16940714 0.5690698 0.6577298 0.3017605 0.9990698 211s 4 0.07033824 0.1940499 0.4825259 0.6428534 0.6825186 211s 211s > 211s > ######################################################################## 211s > ### Models with scale + flex link (or cauchit link) 211s > ######################################################################## 211s > 211s > fm <- clm(SURENESS ~ PRODID, scale=~PROD, data = soup, link="Aranda-Ordaz") 211s Changing to 'nlminb' optimizer for flexible link function 212s > summary(fm) 212s formula: SURENESS ~ PRODID 212s scale: ~PROD 212s data: soup 212s 212s link threshold nobs logLik AIC niter max.grad cond.H 212s Aranda-Ordaz flexible 1847 -2674.65 5373.30 57(720) 3.76e-04 9.0e+03 212s 212s Coefficients: 212s Estimate Std. Error z value Pr(>|z|) 212s PRODID2 1.3604 0.4137 3.289 0.001007 ** 212s PRODID3 2.2066 0.6659 3.314 0.000921 *** 212s PRODID4 1.2553 0.4086 3.072 0.002124 ** 212s PRODID5 1.9820 0.5886 3.367 0.000759 *** 212s PRODID6 2.4715 0.7713 3.204 0.001355 ** 212s --- 212s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 212s 212s log-scale coefficients: 212s Estimate Std. Error z value Pr(>|z|) 212s PRODTest 0.2807 0.1553 1.808 0.0706 . 212s --- 212s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 212s 212s Link coefficients: 212s Warning message: 212s (-1) Model failed to converge with max|grad| = 0.000376367 (tol = 1e-06) 212s Estimate Std. Error z value Pr(>|z|) 212s lambda 2.063 1.136 1.816 0.0693 . 212s --- 212s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 212s 212s Threshold coefficients: 212s Estimate Std. Error z value 212s 1|2 -1.3927 0.1491 -9.344 212s 2|3 -0.1449 0.3533 -0.410 212s 3|4 0.3051 0.4699 0.649 212s 4|5 0.6733 0.5802 1.160 212s 5|6 1.7210 0.9594 1.794 212s > 212s > fm <- clm(SURENESS ~ PRODID, scale=~PROD, data = soup, link="log-gamma") 212s Changing to 'nlminb' optimizer for flexible link function 214s Warning message: 214s (-1) Model failed to converge with max|grad| = 0.00281342 (tol = 1e-06) 214s > summary(fm) 214s formula: SURENESS ~ PRODID 214s scale: ~PROD 214s data: soup 214s 214s link threshold nobs logLik AIC niter max.grad cond.H 214s log-gamma flexible 1847 -2676.84 5377.68 79(1001) 2.81e-03 8.9e+03 214s 214s Coefficients: 214s Estimate Std. Error z value Pr(>|z|) 214s PRODID2 0.62876 0.09223 6.817 9.27e-12 *** 214s PRODID3 1.02757 0.13449 7.640 2.16e-14 *** 214s PRODID4 0.59158 0.11435 5.173 2.30e-07 *** 214s PRODID5 0.91937 0.12977 7.085 1.39e-12 *** 214s PRODID6 1.13202 0.13927 8.128 4.35e-16 *** 214s --- 214s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 214s 214s log-scale coefficients: 214s Estimate Std. Error z value Pr(>|z|) 214s PRODTest 0.09066 0.18405 0.493 0.622 214s 214s Link coefficients: 214s Estimate Std. Error z value Pr(>|z|) 214s lambda 0.4749 0.7031 0.675 0.499 214s 214s Threshold coefficients: 214s Estimate Std. Error z value 214s 1|2 -1.15648 0.45771 -2.527 214s 2|3 -0.47328 0.29574 -1.600 214s 3|4 -0.24744 0.26543 -0.932 214s 4|5 -0.07223 0.24987 -0.289 214s 5|6 0.37914 0.24135 1.571 214s > 214s > fm <- clm(SURENESS ~ PRODID, scale=~PROD, data = soup, link="cauchit") 214s > summary(fm) 214s Changing to 'nlminb' optimizer for flexible link function 214s formula: SURENESS ~ PRODID 214s scale: ~PROD 214s data: soup 214s 214s link threshold nobs logLik AIC niter max.grad cond.H 214s cauchit flexible 1847 -2679.34 5380.67 11(1) 3.10e-07 3.0e+02 214s 214s Coefficients: 214s Estimate Std. Error z value Pr(>|z|) 214s PRODID2 0.70550 0.09611 7.341 2.12e-13 *** 214s PRODID3 1.06186 0.13882 7.649 2.02e-14 *** 214s PRODID4 0.66876 0.11911 5.614 1.97e-08 *** 214s PRODID5 1.01135 0.13277 7.617 2.59e-14 *** 214s PRODID6 1.12784 0.14159 7.966 1.64e-15 *** 214s --- 214s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 214s 214s log-scale coefficients: 214s Estimate Std. Error z value Pr(>|z|) 214s PRODTest -0.20801 0.09524 -2.184 0.029 * 214s --- 214s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 214s 214s Threshold coefficients: 214s Estimate Std. Error z value 214s 1|2 -1.70920 0.14977 -11.412 214s 2|3 -0.36737 0.06302 -5.830 214s 3|4 -0.06736 0.05734 -1.175 214s 4|5 0.14657 0.05708 2.568 214s 5|6 0.67063 0.07072 9.483 214s > 214s > ######################################################################## 214s > ### clm.fit 214s > ######################################################################## 214s > 214s > ## Example with log-gamma: 214s > fm1 <- clm(rating ~ contact + temp, data=wine, link="log-gamma") 214s Warning message: 214s (-1) Model failed to converge with max|grad| = 9.90148e-05 (tol = 1e-06) 214s > summary(fm1) 214s formula: rating ~ contact + temp 214s data: wine 214s 214s link threshold nobs logLik AIC niter max.grad cond.H 214s log-gamma flexible 72 -85.72 185.44 27(179) 9.90e-05 5.9e+01 214s 214s Coefficients: 214s Estimate Std. Error z value Pr(>|z|) 214s contactyes 0.8614 0.2675 3.220 0.00128 ** 214s tempwarm 1.5072 0.2947 5.114 3.16e-07 *** 214s --- 214s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 214s 214s Link coefficients: 214s Estimate Std. Error z value Pr(>|z|) 214s lambda 0.1615 0.5752 0.281 0.779 214s 214s Threshold coefficients: 214s Estimate Std. Error z value 214s 1|2 -0.8798 0.5003 -1.759 214s 2|3 0.6678 0.3450 1.936 214s 3|4 1.9807 0.3826 5.177 214s 4|5 2.8593 0.4656 6.141 214s > ## get the model frame containing y and X: 214s > mf1 <- update(fm1, method="design") 214s > names(mf1) 214s [1] "y" "y.levels" "X" "offset" "terms" "contrasts" 214s [7] "xlevels" "weights" "doFit" "control" "link" "threshold" 214s [13] "start" "formulas" 214s > res <- clm.fit(mf1$y, mf1$X, link="log-gamma") ## invoking the factor method 214s Changing to 'nlminb' optimizer for flexible link function 214s > coef(res) 214s 1|2 2|3 3|4 4|5 contactyes tempwarm lambda 214s -0.8797774 0.6678307 1.9806826 2.8593125 0.8614400 1.5071959 0.1614741 214s > stopifnot(all.equal(coef(res), coef(fm1))) 214s > 214s > ## Example with Aranda-Ordaz: 214s > fm1 <- clm(rating ~ contact + temp, data=wine, link="Aranda-Ordaz") 214s Warning message: 214s (-1) Model failed to converge with max|grad| = 9.90148e-05 (tol = 1e-06) 214s Changing to 'nlminb' optimizer for flexible link function 214s Warning message: 214s (-1) Model failed to converge with max|grad| = 1.6288e-05 (tol = 1e-06) 214s > mf1 <- update(fm1, method="design") 214s > res <- clm.fit(mf1$y, mf1$X, link="Aranda") ## invoking the factor method 214s Changing to 'nlminb' optimizer for flexible link function 214s > stopifnot(all.equal(coef(res), coef(fm1))) 214s > 214s > 214s Warning message: 214s (-1) Model failed to converge with max|grad| = 1.6288e-05 (tol = 1e-06) 214s BEGIN TEST test.clm.model.matrix.R 214s 214s R version 4.4.3 (2025-02-28) -- "Trophy Case" 214s Copyright (C) 2025 The R Foundation for Statistical Computing 214s Platform: arm-unknown-linux-gnueabihf (32-bit) 214s 214s R is free software and comes with ABSOLUTELY NO WARRANTY. 214s You are welcome to redistribute it under certain conditions. 214s Type 'license()' or 'licence()' for distribution details. 214s 214s R is a collaborative project with many contributors. 214s Type 'contributors()' for more information and 214s 'citation()' on how to cite R or R packages in publications. 214s 214s Type 'demo()' for some demos, 'help()' for on-line help, or 214s 'help.start()' for an HTML browser interface to help. 214s Type 'q()' to quit R. 214s 214s > library(ordinal) 215s > ## source("test.clm.model.matrix.R") 215s > 215s > ## library(devtools) 215s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 215s > ## clean_dll(pkg = r2path) 215s > ## load_all(r2path) 215s > 215s > ## Check that get_clmDesign works in standard setting: 215s > fm1 <- clm(rating ~ temp, scale=~contact, nominal=~contact, data=wine) 215s > contr <- c(fm1$contrasts, fm1$S.contrasts, fm1$nom.contrasts) 215s > XX <- ordinal:::get_clmDesign(fm1$model, terms(fm1, "all"), contrasts=contr) 215s > XX2 <- update(fm1, method="design") 215s > (keep <- intersect(names(XX), names(XX2))) 215s [1] "y" "y.levels" "X" "offset" 215s [5] "terms" "contrasts" "xlevels" "weights" 215s [9] "S" "S.terms" "S.off" "S.contrasts" 215s [13] "S.xlevels" "NOM" "nom.terms" "nom.contrasts" 215s [17] "nom.xlevels" 215s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 215s + XX[keep], XX2[keep])) 215s y y.levels X offset terms 215s TRUE TRUE TRUE TRUE TRUE 215s contrasts xlevels weights S S.terms 215s TRUE TRUE TRUE TRUE TRUE 215s S.off S.contrasts S.xlevels NOM nom.terms 215s TRUE TRUE TRUE TRUE TRUE 215s nom.contrasts nom.xlevels 215s TRUE TRUE 215s > stopifnot(all(test)) 215s > 215s > ## Check that get_clmDesign works with singular fit and NAs: 215s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 215s > wine2 <- subset(wine, subset=(!1:nrow(wine) %in% cy)) 215s > wine2[c(9, 15, 46), "rating"] <- NA 215s > fm1 <- clm(rating ~ temp, scale=~contact, nominal=~contact, 215s + data=wine2) 215s Warning message: 215s (1) Hessian is numerically singular: parameters are not uniquely determined 215s In addition: Absolute convergence criterion was met, but relative criterion was not met 215s > contr <- c(fm1$contrasts, fm1$S.contrasts, fm1$nom.contrasts) 215s > XX <- ordinal:::get_clmDesign(fm1$model, terms(fm1, "all"), contrasts=contr) 215s > XX2 <- update(fm1, method="design") 215s > (keep <- intersect(names(XX), names(XX2))) 215s [1] "y" "y.levels" "X" "offset" 215s [5] "terms" "contrasts" "xlevels" "na.action" 215s [9] "weights" "S" "S.terms" "S.off" 215s [13] "S.contrasts" "S.xlevels" "NOM" "nom.terms" 215s [17] "nom.contrasts" "nom.xlevels" 215s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 215s + XX[keep], XX2[keep])) 215s y y.levels X offset terms 215s TRUE TRUE TRUE TRUE TRUE 215s contrasts xlevels na.action weights S 215s TRUE TRUE TRUE TRUE TRUE 215s S.terms S.off S.contrasts S.xlevels NOM 215s TRUE TRUE TRUE TRUE TRUE 215s nom.terms nom.contrasts nom.xlevels 215s TRUE TRUE TRUE 215s > stopifnot(all(test)) 215s > 215s > ## In this situation update and get_clmRho give the same results: 215s > wine2 <- wine 215s > fm1 <- clm(rating ~ temp + contact, data=wine2) ## OK 215s > rho1 <- ordinal:::get_clmRho.clm(fm1) 215s > l1 <- as.list(rho1) 215s > l2 <- as.list(update(fm1, doFit=FALSE)) 215s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 215s + l1, l2[names(l1)])) 215s nlambda link gfun dfun pfun par clm.hess clm.grad 215s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 215s clm.nll wts fitted has.scale sigma k Soff S 215s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 215s n.psi o2 o1 B2 B1 215s TRUE TRUE TRUE TRUE TRUE 215s > stopifnot(all(test)) 215s > ## If we modify the data (or other subset, weights, formulae, etc.) 215s > ## used in the model call, the results from update no longer correspond 215s > ## to the elements of the fitted model object. get_clmRho gets it 215s > ## right on the other hand: 215s > wine2[10:13, "rating"] <- NA 215s > l3 <- as.list(ordinal:::get_clmRho.clm(fm1)) 215s > l4 <- as.list(update(fm1, doFit=FALSE)) 215s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 215s + l1, l3)) 215s nlambda link gfun dfun pfun par clm.hess clm.grad 215s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 215s clm.nll wts fitted has.scale sigma k Soff S 215s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 215s n.psi o2 o1 B2 B1 215s TRUE TRUE TRUE TRUE TRUE 215s > stopifnot(all(test)) ## same 215s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 215s + l3, l4[names(l3)])) 215s nlambda link gfun dfun pfun par clm.hess clm.grad 215s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 215s clm.nll wts fitted has.scale sigma k Soff S 215s TRUE FALSE FALSE TRUE FALSE TRUE FALSE TRUE 215s n.psi o2 o1 B2 B1 215s TRUE FALSE FALSE FALSE FALSE 215s > stopifnot(sum(!test) == 8) ## not all the same anymore! 215s > ## In conclusion l1, l2, and l3 are identical. l4 is different. 215s > 215s > ################################# 215s > ## Test that checkContrasts give appropriate warnings: 215s > contr <- c(temp="contr.sum", contact="contr.sum") 215s > fm1 <- clm(rating ~ temp + contact, scale=~contact, data=wine) ## OK 215s > fm1 <- clm(rating ~ temp + contact, scale=~contact, data=wine, 215s + contrasts=contr) ## OK 215s Warning messages: 215s 1: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 215s non-list contrasts argument ignored 215s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 215s non-list contrasts argument ignored 215s > fm1 <- clm(rating ~ temp, scale=~contact, data=wine, 215s + contrasts=contr) ## OK 215s > ## These should give warnings: 215s > fm1 <- clm(rating ~ temp, contrasts=c(contact="contr.sum"), data=wine) 215s Warning messages: 215s 1: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 215s non-list contrasts argument ignored 215s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 215s non-list contrasts argument ignored 215s > fm1 <- clm(rating ~ temp, contrasts=contr, data=wine) 215s Warning messages: 215s 1: variable 'contact' is absent: its contrasts will be ignored 215s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 215s non-list contrasts argument ignored 215s > fm1 <- clm(rating ~ 1, scale=~contact, contrasts=c(temp="contr.sum"), 215s + data=wine) 216s Warning messages: 216s 1: variable 'contact' is absent: its contrasts will be ignored 216s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 216s non-list contrasts argument ignored 216s Warning messages: 216s 1: variable 'temp' is absent: its contrasts will be ignored 216s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 216s non-list contrasts argument ignored 216s 3: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 216s non-list contrasts argument ignored 216s > fm1 <- clm(rating ~ 1, scale=~contact, contrasts=list(temp="contr.sum"), 216s + data=wine) 216s Warning message: 216s variable 'temp' is absent: its contrasts will be ignored 216s > 216s > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 216s Warning message: 216s variable 'temp' is absent: its contrasts will be ignored 216s > ordinal:::checkContrasts(fm0$S.terms, fm0$contrasts) 216s > ordinal:::checkContrasts(fm0$S.terms, fm0$S.contrasts) 216s > ordinal:::checkContrasts(fm0$terms, fm0$contrasts) 216s > ordinal:::checkContrasts(fm0$terms, fm0$S.contrasts) 216s > 216s > ################################# 216s > ## Check that clm and model.matrix respects contrast settings: 216s > options("contrasts" = c("contr.treatment", "contr.poly")) 216s > fm0 <- clm(rating ~ temp + contact, data=wine) 216s > options("contrasts" = c("contr.sum", "contr.poly")) 216s > fm1 <- clm(rating ~ temp + contact, data=wine) 216s > stopifnot(all(model.matrix(fm0)$X[, 2] %in% c(0, 1))) 216s > stopifnot(all(model.matrix(fm1)$X[, 2] %in% c(1, -1))) 216s > 216s > ################################# 216s > ## Check that model.matrix results do not depend on global contrast 216s > ## setting: 216s > options("contrasts" = c("contr.sum", "contr.poly")) 216s > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 216s > MM <- model.matrix(fm0) 216s > options("contrasts" = c("contr.treatment", "contr.poly")) 216s > MM2 <- model.matrix(fm0) 216s > for(x in MM) print(head(x)) 216s (Intercept) temp1 contact1 216s 1 1 1 1 216s 2 1 1 1 216s 3 1 1 -1 216s 4 1 1 -1 216s 5 1 -1 1 216s 6 1 -1 1 216s (Intercept) contact1 216s 1 1 1 216s 2 1 1 216s 3 1 -1 216s 4 1 -1 216s 5 1 1 216s 6 1 1 216s > for(x in MM2) print(head(x)) 216s (Intercept) temp1 contact1 216s 1 1 1 1 216s 2 1 1 1 216s 3 1 1 -1 216s 4 1 1 -1 216s 5 1 -1 1 216s 6 1 -1 1 216s (Intercept) contact1 216s 1 1 1 216s 2 1 1 216s 3 1 -1 216s 4 1 -1 216s 5 1 1 216s 6 1 1 216s > stopifnot(all(mapply(all.equal, MM, MM2))) 216s > 216s > ################################# 216s > ## This gave a warning before getContrasts was implemented: 216s > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 216s > MM <- model.matrix(fm0) 216s > ## > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 216s > ## > MM <- model.matrix(fm0) 216s > ## Warning message: 216s > ## In model.matrix.default(res$S.terms, data = fullmf, contrasts.arg = getContrasts(res$S.terms, : 216s > ## variable 'temp' is absent, its contrast will be ignored 216s > for(x in MM) print(head(x)) 216s (Intercept) tempwarm contactyes 216s 1 1 0 0 216s 2 1 0 0 216s 3 1 0 1 216s 4 1 0 1 216s 5 1 1 0 216s 6 1 1 0 216s (Intercept) contactyes 216s 1 1 0 216s 2 1 0 216s 3 1 1 216s 4 1 1 216s 5 1 0 216s 6 1 0 216s > 216s > 216s BEGIN TEST test.clm.predict.R 216s 216s R version 4.4.3 (2025-02-28) -- "Trophy Case" 216s Copyright (C) 2025 The R Foundation for Statistical Computing 216s Platform: arm-unknown-linux-gnueabihf (32-bit) 216s 216s R is free software and comes with ABSOLUTELY NO WARRANTY. 216s You are welcome to redistribute it under certain conditions. 216s Type 'license()' or 'licence()' for distribution details. 216s 216s R is a collaborative project with many contributors. 216s Type 'contributors()' for more information and 216s 'citation()' on how to cite R or R packages in publications. 216s 216s Type 'demo()' for some demos, 'help()' for on-line help, or 216s 'help.start()' for an HTML browser interface to help. 216s Type 'q()' to quit R. 216s 216s > library(ordinal) 217s > ## source("test.clm.predict.R") 217s > 217s > ## library(devtools) 217s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 217s > ## clean_dll(pkg = r2path) 217s > ## load_all(r2path) 217s > 217s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 217s > options("contrasts" = c("contr.treatment", "contr.poly")) 217s > getOption("contrasts") 217s [1] "contr.treatment" "contr.poly" 217s > 217s > ## Example model 217s > 217s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine) 217s > summary(wine1.clm) 217s formula: rating ~ temp * contact 217s data: wine 217s subset: -cy 217s 217s link threshold nobs logLik AIC niter max.grad cond.H 217s logit flexible 54 -65.47 142.93 6(0) 2.80e-12 2.9e+01 217s 217s Coefficients: (1 not defined because of singularities) 217s Estimate Std. Error z value Pr(>|z|) 217s tempwarm 2.2892 0.7192 3.183 0.00146 ** 217s contactyes 1.6505 0.6698 2.464 0.01374 * 217s tempwarm:contactyes NA NA NA NA 217s --- 217s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 217s 217s Threshold coefficients: 217s Estimate Std. Error z value 217s 1|2 -1.3971 0.5728 -2.439 217s 2|3 1.1349 0.5262 2.157 217s 3|4 3.3351 0.6987 4.774 217s 4|5 4.7924 0.7996 5.994 217s > names(wine1.clm) 217s [1] "aliased" "alpha" "beta" "call" 217s [5] "coefficients" "cond.H" "contrasts" "control" 217s [9] "convergence" "df.residual" "edf" "fitted.values" 217s [13] "formula" "formulas" "gradient" "Hessian" 217s [17] "info" "link" "logLik" "maxGradient" 217s [21] "message" "model" "n" "niter" 217s [25] "nobs" "start" "terms" "Theta" 217s [29] "threshold" "tJac" "vcov" "xlevels" 217s [33] "y" "y.levels" 217s > 217s > wine.clm <- clm(rating~temp*contact, data=wine) 217s > summary(wine.clm) 217s formula: rating ~ temp * contact 217s data: wine 217s 217s link threshold nobs logLik AIC niter max.grad cond.H 217s logit flexible 72 -86.42 186.83 6(0) 5.22e-12 5.1e+01 217s 217s Coefficients: 217s Estimate Std. Error z value Pr(>|z|) 217s tempwarm 2.3212 0.7009 3.311 0.000928 *** 217s contactyes 1.3475 0.6604 2.041 0.041300 * 217s tempwarm:contactyes 0.3595 0.9238 0.389 0.697129 217s --- 217s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 217s 217s Threshold coefficients: 217s Estimate Std. Error z value 217s 1|2 -1.4113 0.5454 -2.588 217s 2|3 1.1436 0.5097 2.244 217s 3|4 3.3771 0.6382 5.292 217s 4|5 4.9420 0.7509 6.581 217s > names(wine.clm) 217s [1] "aliased" "alpha" "beta" "call" 217s [5] "coefficients" "cond.H" "contrasts" "control" 217s [9] "convergence" "df.residual" "edf" "fitted.values" 217s [13] "formula" "formulas" "gradient" "Hessian" 217s [17] "info" "link" "logLik" "maxGradient" 217s [21] "message" "model" "n" "niter" 217s [25] "nobs" "start" "terms" "Theta" 217s [29] "threshold" "tJac" "vcov" "xlevels" 217s [33] "y" "y.levels" 217s > ## Make sure the same elements are present with a rank deficient model 217s > ## fit: 217s > stopifnot(all(names(wine1.clm) == names(wine.clm))) 217s > 217s > ## With treatment contrasts: 217s > options("contrasts" = c("contr.treatment", "contr.poly")) 217s > wine.clm <- clm(rating~temp*contact, data=wine) 217s > coef(summary(wine.clm)) 217s Estimate Std. Error z value Pr(>|z|) 217s 1|2 -1.4112620 0.5453532 -2.5877943 9.659266e-03 217s 2|3 1.1435537 0.5096555 2.2437776 2.484671e-02 217s 3|4 3.3770825 0.6381617 5.2918913 1.210578e-07 217s 4|5 4.9419823 0.7509113 6.5813133 4.663108e-11 217s tempwarm 2.3211843 0.7009479 3.3114931 9.279953e-04 217s contactyes 1.3474604 0.6603557 2.0405072 4.129984e-02 217s tempwarm:contactyes 0.3595489 0.9238188 0.3891985 6.971293e-01 217s > head(model.matrix(wine.clm)$X) 217s (Intercept) tempwarm contactyes tempwarm:contactyes 217s 1 1 0 0 0 217s 2 1 0 0 0 217s 3 1 0 1 0 217s 4 1 0 1 0 217s 5 1 1 0 0 217s 6 1 1 0 0 217s > wine.clm$contrasts 217s $temp 217s [1] "contr.treatment" 217s 217s $contact 217s [1] "contr.treatment" 217s 217s > head(pred1 <- predict(wine.clm)$fit) 217s [1] 0.56229641 0.20864908 0.43467309 0.08938852 0.19028226 0.19028226 217s > 217s > ## With sum contrasts: 217s > options("contrasts" = c("contr.sum", "contr.poly")) 217s > wine.clm <- clm(rating~temp*contact, data=wine) 217s > coef(summary(wine.clm)) 217s Estimate Std. Error z value Pr(>|z|) 217s 1|2 -3.33547153 0.5253364 -6.3492103 2.164231e-10 217s 2|3 -0.78065590 0.2945538 -2.6503003 8.042025e-03 217s 3|4 1.45287292 0.3367529 4.3143590 1.600667e-05 217s 4|5 3.01777269 0.4813097 6.2699186 3.612370e-10 217s temp1 -1.25047935 0.2641023 -4.7348292 2.192396e-06 217s contact1 -0.76361743 0.2380971 -3.2071683 1.340485e-03 217s temp1:contact1 0.08988722 0.2309547 0.3891985 6.971293e-01 217s > head(model.matrix(wine.clm)$X) 217s (Intercept) temp1 contact1 temp1:contact1 217s 1 1 1 1 1 217s 2 1 1 1 1 217s 3 1 1 -1 -1 217s 4 1 1 -1 -1 217s 5 1 -1 1 -1 217s 6 1 -1 1 -1 217s > wine.clm$contrasts 217s $temp 217s [1] "contr.sum" 217s 217s $contact 217s [1] "contr.sum" 217s 217s > head(pred2 <- predict(wine.clm)$fit) 217s [1] 0.56229641 0.20864908 0.43467309 0.08938852 0.19028226 0.19028226 217s > 217s > ## Mixture of sum and treatment contrasts: 217s > options("contrasts" = c("contr.treatment", "contr.poly")) 217s > wine.clm <- clm(rating~temp*contact, data=wine, 217s + contrasts=list(temp="contr.sum")) 217s > coef(summary(wine.clm)) 217s Estimate Std. Error z value Pr(>|z|) 217s 1|2 -2.57185410 0.5227165 -4.92016984 8.646915e-07 217s 2|3 -0.01703847 0.3611634 -0.04717662 9.623725e-01 217s 3|4 2.21649036 0.4529312 4.89365773 9.897892e-07 217s 4|5 3.78139013 0.5957919 6.34683010 2.197966e-10 217s temp1 -1.16059213 0.3504740 -3.31149309 9.279953e-04 217s contactyes 1.52723487 0.4761942 3.20716830 1.340485e-03 217s temp1:contactyes -0.17977444 0.4619094 -0.38919847 6.971293e-01 217s > head(model.matrix(wine.clm)$X) 217s (Intercept) temp1 contactyes temp1:contactyes 217s 1 1 1 0 0 217s 2 1 1 0 0 217s 3 1 1 1 1 217s 4 1 1 1 1 217s 5 1 -1 0 0 217s 6 1 -1 0 0 217s > wine.clm$contrasts 217s $temp 217s [1] "contr.sum" 217s 217s $contact 217s [1] "contr.treatment" 217s 217s > head(pred3 <- predict(wine.clm)$fit) 217s [1] 0.56229641 0.20864908 0.43467309 0.08938852 0.19028226 0.19028226 217s > 217s > stopifnot(isTRUE(all.equal(pred1, pred2))) 217s > stopifnot(isTRUE(all.equal(pred1, pred3))) 217s > 217s > ################################# 217s > ### Now for a rank deficient fit: 217s > ################################# 217s > 217s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 217s > options("contrasts" = c("contr.treatment", "contr.poly")) 217s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine) 217s > coef(summary(wine1.clm)) 217s Estimate Std. Error z value Pr(>|z|) 217s 1|2 -1.397134 0.5727918 -2.439164 1.472127e-02 217s 2|3 1.134907 0.5261653 2.156940 3.101038e-02 217s 3|4 3.335090 0.6986647 4.773521 1.810331e-06 217s 4|5 4.792428 0.7995580 5.993846 2.049352e-09 217s tempwarm 2.289221 0.7191705 3.183140 1.456870e-03 217s contactyes 1.650538 0.6698484 2.464047 1.373782e-02 217s tempwarm:contactyes NA NA NA NA 217s > attributes(model.matrix(wine1.clm)$X)$contrasts 217s $temp 217s [1] "contr.treatment" 217s 217s $contact 217s [1] "contr.treatment" 217s 217s > wine1.clm$contrasts 217s $temp 217s [1] "contr.treatment" 217s 217s $contact 217s [1] "contr.treatment" 217s 217s > head(pred4 <- predict(wine1.clm)$fit) 217s [1] 0.5584719 0.2088699 0.1843854 0.1843854 0.2988733 0.2988733 217s > 217s > options("contrasts" = c("contr.sum", "contr.poly")) 217s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine) 217s > attributes(model.matrix(wine1.clm)$X)$contrasts 217s $temp 217s [1] "contr.sum" 217s 217s $contact 217s [1] "contr.sum" 217s 217s > options("contrasts" = c("contr.treatment", "contr.poly")) 217s > attributes(model.matrix(wine1.clm)$X)$contrasts 217s $temp 217s [1] "contr.sum" 217s 217s $contact 217s [1] "contr.sum" 217s 217s > ## Notice that the contrasts change in the attributes of the fit!!! 217s > coef(summary(wine1.clm)) 217s Estimate Std. Error z value Pr(>|z|) 217s 1|2 -3.3670128 0.6149672 -5.475110 4.372411e-08 217s 2|3 -0.8349725 0.4231096 -1.973419 4.844787e-02 217s 3|4 1.3652108 0.4310181 3.167409 1.538037e-03 217s 4|5 2.8225483 0.5190089 5.438343 5.377826e-08 217s temp1 -1.1446104 0.3595853 -3.183140 1.456870e-03 217s contact1 -0.8252689 0.3349242 -2.464047 1.373782e-02 217s temp1:contact1 NA NA NA NA 217s > wine1.clm$contrasts 217s $temp 217s [1] "contr.sum" 217s 217s $contact 217s [1] "contr.sum" 217s 217s > head(pred5 <- predict(wine1.clm)$fit) 217s [1] 0.5584719 0.2088699 0.1843854 0.1843854 0.2988733 0.2988733 217s > 217s > head(cbind(pred4, pred5)) 217s pred4 pred5 217s [1,] 0.5584719 0.5584719 217s [2,] 0.2088699 0.2088699 217s [3,] 0.1843854 0.1843854 217s [4,] 0.1843854 0.1843854 217s [5,] 0.2988733 0.2988733 217s [6,] 0.2988733 0.2988733 217s > stopifnot(isTRUE(all.equal(pred4, pred5))) 217s > 217s > options("contrasts" = c("contr.treatment", "contr.poly")) 217s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine, 217s + contrasts=list(temp="contr.sum")) 217s > coef(summary(wine1.clm)) 217s Estimate Std. Error z value Pr(>|z|) 217s 1|2 -2.54174387 0.5792622 -4.38789851 1.144512e-05 217s 2|3 -0.00970353 0.3737929 -0.02595964 9.792895e-01 217s 3|4 2.19047975 0.4965589 4.41131906 1.027428e-05 217s 4|5 3.64781729 0.6257007 5.82997171 5.543677e-09 217s temp1 -1.14461036 0.3595853 -3.18314035 1.456870e-03 217s contactyes 1.65053789 0.6698484 2.46404685 1.373782e-02 217s temp1:contactyes NA NA NA NA 217s > head(model.matrix(wine1.clm)$X) 217s (Intercept) temp1 contactyes temp1:contactyes 217s 1 1 1 0 0 217s 2 1 1 0 0 217s 5 1 -1 0 0 217s 6 1 -1 0 0 217s 7 1 -1 1 -1 217s 8 1 -1 1 -1 217s > attributes(model.matrix(wine1.clm)$X)$contrasts 217s $temp 217s [1] "contr.sum" 217s 217s $contact 217s [1] "contr.treatment" 217s 217s > wine1.clm$contrasts 217s $temp 217s [1] "contr.sum" 217s 217s $contact 217s [1] "contr.treatment" 217s 217s > head(pred6 <- predict(wine1.clm)$fit) 217s [1] 0.5584719 0.2088699 0.1843854 0.1843854 0.2988733 0.2988733 217s > 217s > head(cbind(pred4, pred5, pred6)) 217s pred4 pred5 pred6 217s [1,] 0.5584719 0.5584719 0.5584719 217s [2,] 0.2088699 0.2088699 0.2088699 217s [3,] 0.1843854 0.1843854 0.1843854 217s [4,] 0.1843854 0.1843854 0.1843854 217s [5,] 0.2988733 0.2988733 0.2988733 217s [6,] 0.2988733 0.2988733 0.2988733 217s > stopifnot(isTRUE(all.equal(pred4, pred6))) 217s > ################################################################## 217s > 217s > ## Compare equality of fitted values for models with different contrasts: 217s > options("contrasts" = c("contr.treatment", "contr.poly")) 217s > fm1 <- clm(rating ~ temp + contact, data=wine) 217s > fitted(fm1) 217s [1] 0.57064970 0.19229094 0.44305990 0.09582084 0.20049402 0.20049402 217s [7] 0.27378469 0.27378469 0.20679013 0.57064970 0.05354601 0.44305990 217s [13] 0.20141572 0.50157554 0.27378469 0.36359581 0.57064970 0.19229094 217s [19] 0.44305990 0.37764614 0.07562701 0.07562701 0.36359581 0.36359581 217s [25] 0.19229094 0.57064970 0.44305990 0.37764614 0.50157554 0.20141572 217s [31] 0.27378469 0.30420994 0.57064970 0.19229094 0.09582084 0.44305990 217s [37] 0.50157554 0.50157554 0.30420994 0.30420994 0.19229094 0.57064970 217s [43] 0.44305990 0.37764614 0.20141572 0.20049402 0.27378469 0.36359581 217s [49] 0.20679013 0.20679013 0.37764614 0.37764614 0.20141572 0.50157554 217s [55] 0.05380128 0.30420994 0.57064970 0.57064970 0.37764614 0.44305990 217s [61] 0.50157554 0.50157554 0.30420994 0.36359581 0.20679013 0.57064970 217s [67] 0.44305990 0.37764614 0.50157554 0.20141572 0.36359581 0.36359581 217s > options("contrasts" = c("contr.sum", "contr.poly")) 217s > fm2 <- clm(rating ~ temp + contact, data=wine) 217s > fitted(fm2) 217s [1] 0.57064970 0.19229094 0.44305990 0.09582084 0.20049402 0.20049402 217s [7] 0.27378469 0.27378469 0.20679013 0.57064970 0.05354601 0.44305990 217s [13] 0.20141572 0.50157554 0.27378469 0.36359581 0.57064970 0.19229094 217s [19] 0.44305990 0.37764614 0.07562701 0.07562701 0.36359581 0.36359581 217s [25] 0.19229094 0.57064970 0.44305990 0.37764614 0.50157554 0.20141572 217s [31] 0.27378469 0.30420994 0.57064970 0.19229094 0.09582084 0.44305990 217s [37] 0.50157554 0.50157554 0.30420994 0.30420994 0.19229094 0.57064970 217s [43] 0.44305990 0.37764614 0.20141572 0.20049402 0.27378469 0.36359581 217s [49] 0.20679013 0.20679013 0.37764614 0.37764614 0.20141572 0.50157554 217s [55] 0.05380128 0.30420994 0.57064970 0.57064970 0.37764614 0.44305990 217s [61] 0.50157554 0.50157554 0.30420994 0.36359581 0.20679013 0.57064970 217s [67] 0.44305990 0.37764614 0.50157554 0.20141572 0.36359581 0.36359581 217s > options("contrasts" = c("contr.treatment", "contr.poly")) 217s > fm3 <- clm(rating ~ temp + contact, data=wine, 217s + contrasts=list(contact="contr.sum")) 217s > fitted(fm3) 217s [1] 0.57064970 0.19229094 0.44305990 0.09582084 0.20049402 0.20049402 217s [7] 0.27378469 0.27378469 0.20679013 0.57064970 0.05354601 0.44305990 217s [13] 0.20141572 0.50157554 0.27378469 0.36359581 0.57064970 0.19229094 217s [19] 0.44305990 0.37764614 0.07562701 0.07562701 0.36359581 0.36359581 217s [25] 0.19229094 0.57064970 0.44305990 0.37764614 0.50157554 0.20141572 217s [31] 0.27378469 0.30420994 0.57064970 0.19229094 0.09582084 0.44305990 217s [37] 0.50157554 0.50157554 0.30420994 0.30420994 0.19229094 0.57064970 217s [43] 0.44305990 0.37764614 0.20141572 0.20049402 0.27378469 0.36359581 217s [49] 0.20679013 0.20679013 0.37764614 0.37764614 0.20141572 0.50157554 217s [55] 0.05380128 0.30420994 0.57064970 0.57064970 0.37764614 0.44305990 217s [61] 0.50157554 0.50157554 0.30420994 0.36359581 0.20679013 0.57064970 217s [67] 0.44305990 0.37764614 0.50157554 0.20141572 0.36359581 0.36359581 217s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm2)))) 217s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm3)))) 217s > 217s > ################################################################## 217s > ## Compare equality of fitted values for models with different 217s > ## contrasts in face of aliased coefficients: 217s > options("contrasts" = c("contr.treatment", "contr.poly")) 217s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 217s > Wine <- subset(wine, subset=!(temp == "cold" & contact == "yes")) 217s > fm1 <- clm(rating ~ temp + contact, data=Wine) 217s > options("contrasts" = c("contr.sum", "contr.poly")) 217s > fm2 <- clm(rating ~ temp + contact, data=Wine) 217s > options("contrasts" = c("contr.treatment", "contr.poly")) 217s > fm3 <- clm(rating ~ temp + contact, data=Wine, 217s + contrasts=list(contact="contr.sum")) 217s > 217s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm2)))) 217s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm3)))) 217s > stopifnot(isTRUE(all.equal(predict(fm1)$fit, predict(fm2)$fit))) 217s > stopifnot(isTRUE(all.equal(predict(fm1)$fit, predict(fm3)$fit))) 217s > 217s > ################################# 217s > ## Does this also happen if the wine data has changed? 217s > options("contrasts" = c("contr.treatment", "contr.poly")) 217s > Wine <- subset(wine, subset=!(temp == "cold" & contact == "yes")) 217s > fm1 <- clm(rating ~ temp + contact, data=Wine) 217s > fit1 <- fitted(fm1) 217s > pred1 <- predict(fm1)$fit 217s > Wine <- wine 217s > pred2 <- predict(fm1)$fit 217s > stopifnot(isTRUE(all.equal(fit1, pred1))) 217s > stopifnot(isTRUE(all.equal(fit1, pred2))) 217s > 217s > ## What if weights, say, is an expression? 217s > ## Notice that updating the model object changes it: 217s > set.seed(123) 217s > fm1 <- clm(rating ~ temp + contact, data=wine, 217s + weights=runif(nrow(wine), .5, 1.5)) 217s > fm2 <- update(fm1) 217s > stopifnot(isTRUE(all.equal(fitted(fm1), predict(fm1)$fit))) 217s > stopifnot(!isTRUE(all.equal(fitted(fm1), fitted(fm2)))) 217s > 217s > ################################# 217s > ## Test equality of fits and predictions of models with: 217s > ## 'x + I(x^2)' and 'poly(x, 2)': 217s > ## December 25th 2014, RHBC. 217s > data(wine) 217s > set.seed(1) 217s > x <- rnorm(nrow(wine), sd=2) + as.numeric(wine$rating) 217s > range(x) 217s [1] -1.429400 7.803236 217s > 217s > ## Comparison of 'x + I(x^2)' and 'poly(x, 2)': 217s > fm3 <- clm(rating ~ temp + x + I(x^2), data=wine) 217s > fm4 <- clm(rating ~ temp + poly(x, 2), data=wine) 217s > ## Same model fits, but different parameterizations: 217s > stopifnot( 217s + !isTRUE(all.equal(coef(fm3), coef(fm4), check.names=FALSE)) 217s + ) 217s > stopifnot(isTRUE(all.equal(logLik(fm3), logLik(fm4)))) 217s > newData <- expand.grid(temp = levels(wine$temp), 217s + x=seq(-1, 7, 3)) 217s > predict(fm3, newdata=newData)$fit 217s 1 2 3 4 5 217s 1 0.206057293 0.56152859 0.2029812 0.0245885 0.004844463 217s 2 0.036289668 0.28766182 0.5031703 0.1404155 0.032462707 217s 3 0.147105364 0.53988789 0.2693657 0.0363691 0.007271946 217s 4 0.024413857 0.21711772 0.5192073 0.1912002 0.048060899 217s 5 0.035397238 0.28292433 0.5050762 0.1433185 0.033283705 217s 6 0.005296054 0.05815716 0.3400568 0.4047024 0.191787585 217s > predict(fm4, newdata=newData)$fit 217s 1 2 3 4 5 217s 1 0.206057293 0.56152859 0.2029812 0.0245885 0.004844463 217s 2 0.036289668 0.28766182 0.5031703 0.1404155 0.032462707 217s 3 0.147105364 0.53988789 0.2693657 0.0363691 0.007271946 217s 4 0.024413857 0.21711772 0.5192073 0.1912002 0.048060899 217s 5 0.035397238 0.28292433 0.5050762 0.1433185 0.033283705 217s 6 0.005296054 0.05815716 0.3400568 0.4047024 0.191787585 217s > stopifnot(isTRUE(all.equal(fitted(fm3), fitted(fm4)))) 217s > stopifnot(isTRUE( 217s + all.equal(predict(fm3, newdata=newData)$fit, 217s + predict(fm4, newdata=newData)$fit))) 217s > ################################# 217s > 217s BEGIN TEST test.clm.profile.R 217s 217s R version 4.4.3 (2025-02-28) -- "Trophy Case" 217s Copyright (C) 2025 The R Foundation for Statistical Computing 217s Platform: arm-unknown-linux-gnueabihf (32-bit) 217s 217s R is free software and comes with ABSOLUTELY NO WARRANTY. 217s You are welcome to redistribute it under certain conditions. 217s Type 'license()' or 'licence()' for distribution details. 217s 217s R is a collaborative project with many contributors. 217s Type 'contributors()' for more information and 217s 'citation()' on how to cite R or R packages in publications. 217s 217s Type 'demo()' for some demos, 'help()' for on-line help, or 217s 'help.start()' for an HTML browser interface to help. 217s Type 'q()' to quit R. 217s 217s > library(ordinal) 218s > 218s > ## Testing that the profile remains the same - that the model object 218s > ## is not 'distorted' by update(object/fitted, doFit=FALSE) 218s > set.seed(1234) 218s > wts <- runif(nrow(wine), 0, 2) 218s > fm3 <- clm(rating ~ temp + contact, data=wine, 218s + weights=wts) 218s > pr <- profile(fm3) 218s > 218s > set.seed(1234) 218s > fm3 <- clm(rating ~ temp + contact, data=wine, 218s + weights=runif(nrow(wine), 0, 2)) 218s > pr3 <- profile(fm3) 218s > ## > set.seed(1234) 218s > ## > fm3 <- clm(rating ~ temp + contact, data=wine, 218s > ## + weights=runif(nrow(wine), 0, 2)) 218s > ## > pr3 <- profile(fm3) 218s > ## Warning messages: 218s > ## 1: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 218s > ## profile may be unreliable for tempwarm because only 1 218s > ## steps were taken down 218s > ## 2: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 218s > ## profile may be unreliable for tempwarm because only 1 218s > ## steps were taken up 218s > ## 3: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 218s > ## profile may be unreliable for contactyes because only 1 218s > ## steps were taken down 218s > ## 4: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 218s > ## profile may be unreliable for contactyes because only 1 218s > ## steps were taken up 218s > ## 218s > stopifnot(isTRUE(all.equal(pr, pr3, check.attributes=FALSE))) 218s > stopifnot( 218s + isTRUE(all.equal(pr$tempwarm[, "lroot"], pr3$tempwarm[, "lroot"])), 218s + isTRUE(all.equal(pr$contactyes[, "lroot"], pr3$contactyes[, "lroot"]))) 218s > 218s BEGIN TEST test.clm.single.anova.R 219s 219s R version 4.4.3 (2025-02-28) -- "Trophy Case" 219s Copyright (C) 2025 The R Foundation for Statistical Computing 219s Platform: arm-unknown-linux-gnueabihf (32-bit) 219s 219s R is free software and comes with ABSOLUTELY NO WARRANTY. 219s You are welcome to redistribute it under certain conditions. 219s Type 'license()' or 'licence()' for distribution details. 219s 219s R is a collaborative project with many contributors. 219s Type 'contributors()' for more information and 219s 'citation()' on how to cite R or R packages in publications. 219s 219s Type 'demo()' for some demos, 'help()' for on-line help, or 219s 'help.start()' for an HTML browser interface to help. 219s Type 'q()' to quit R. 219s 219s > # test.clm.single.anova.R 219s > 219s > library(ordinal) 220s > 220s > # WRE says "using if(requireNamespace("pkgname")) is preferred, if possible." 220s > # even in tests: 220s > assertError <- function(expr, ...) 220s + if(requireNamespace("tools")) tools::assertError(expr, ...) else invisible() 220s > assertWarning <- function(expr, ...) 220s + if(requireNamespace("tools")) tools::assertWarning(expr, ...) else invisible() 220s > 220s > fm <- clm(rating ~ temp * contact, scale=~contact, data=wine) 220s > 220s > anova(fm, type="I") 220s Type I Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 17.1046 3.538e-05 *** 220s contact 1 9.1574 0.002477 ** 220s temp:contact 1 0.1097 0.740512 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > anova(fm, type="II") 220s Type II Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 17.1046 3.538e-05 *** 220s contact 1 9.1574 0.002477 ** 220s temp:contact 1 0.1097 0.740512 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > anova(fm, type="III") 220s Type III Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 9.5681 0.00198 ** 220s contact 1 4.1830 0.04083 * 220s temp:contact 1 0.1097 0.74051 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > anova(fm, type=1) 220s Type I Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 17.1046 3.538e-05 *** 220s contact 1 9.1574 0.002477 ** 220s temp:contact 1 0.1097 0.740512 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > anova(fm, type=2) 220s Type II Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 17.1046 3.538e-05 *** 220s contact 1 9.1574 0.002477 ** 220s temp:contact 1 0.1097 0.740512 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > anova(fm, type=3) 220s Type III Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 9.5681 0.00198 ** 220s contact 1 4.1830 0.04083 * 220s temp:contact 1 0.1097 0.74051 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > anova(fm, type="1") 220s Type I Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 17.1046 3.538e-05 *** 220s contact 1 9.1574 0.002477 ** 220s temp:contact 1 0.1097 0.740512 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > anova(fm, type="2") 220s Type II Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 17.1046 3.538e-05 *** 220s contact 1 9.1574 0.002477 ** 220s temp:contact 1 0.1097 0.740512 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > anova(fm, type="3") 220s Type III Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 9.5681 0.00198 ** 220s contact 1 4.1830 0.04083 * 220s temp:contact 1 0.1097 0.74051 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > anova(fm, type="marginal") 220s Marginal Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 9.5681 0.00198 ** 220s contact 1 4.1830 0.04083 * 220s temp:contact 1 0.1097 0.74051 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > 220s > # Nominal effects: 220s > fm <- clm(rating ~ temp, nominal=~contact, data=wine) 220s > anova(fm) 220s Type I Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 22.166 2.501e-06 *** 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > 220s > # Flexible links: 220s > fm1 <- clm(rating ~ temp + contact, link="log-gamma", data=wine) 220s Changing to 'nlminb' optimizer for flexible link function 220s > anova(fm1, type=1) 220s Warning message: 220s (-1) Model failed to converge with max|grad| = 9.89593e-05 (tol = 1e-06) 220s Type I Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 26.150 3.16e-07 *** 220s contact 1 10.369 0.001282 ** 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > anova(fm1, type=2) 220s Type II Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 26.150 3.16e-07 *** 220s contact 1 10.369 0.001282 ** 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > anova(fm1, type=3) 220s Type III Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 26.150 3.16e-07 *** 220s contact 1 10.369 0.001282 ** 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > 220s > # Equivalence of tests irrespective of contrasts: 220s > fm1 <- clm(SURENESS ~ PRODID * SOUPFREQ, data=soup) 220s > # summary(fm1) 220s > (an1 <- anova(fm1, type=3)) 220s Type III Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s PRODID 5 72.5901 2.959e-14 *** 220s SOUPFREQ 2 1.8132 0.4039 220s PRODID:SOUPFREQ 10 8.5837 0.5720 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > fm2 <- clm(SURENESS ~ PRODID * SOUPFREQ, data=soup, 220s + contrasts = list(SOUPFREQ = "contr.sum", PRODID = "contr.SAS")) 220s > # summary(fm2) 220s > anova(fm1, fm2) 220s Likelihood ratio tests of cumulative link models: 220s 220s formula: link: threshold: 220s fm1 SURENESS ~ PRODID * SOUPFREQ logit flexible 220s fm2 SURENESS ~ PRODID * SOUPFREQ logit flexible 220s 220s no.par AIC logLik LR.stat df Pr(>Chisq) 220s fm1 22 5388 -2672 220s fm2 22 5388 -2672 0 0 220s > (an2 <- anova(fm2, type=3)) 220s Type III Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s PRODID 5 72.5901 2.959e-14 *** 220s SOUPFREQ 2 1.8132 0.4039 220s PRODID:SOUPFREQ 10 8.5837 0.5720 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > stopifnot( 220s + isTRUE(all.equal(an1, an2, check.attributes=FALSE)) 220s + ) 220s > 220s > 220s > # Aliased coefficients: 220s > fm1 <- clm(SURENESS ~ PRODID * DAY, data=soup) 220s > anova(fm1, type=1) 220s Type I Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s PRODID 5 185.2017 < 2e-16 *** 220s DAY 1 4.1131 0.04255 * 220s PRODID:DAY 4 5.1186 0.27534 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > anova(fm1, type=2) 220s Type II Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s PRODID 5 181.5967 < 2e-16 *** 220s DAY 1 4.1131 0.04255 * 220s PRODID:DAY 4 5.1186 0.27534 220s Missing cells for: PRODID3:DAY2. 220s Interpret type III hypotheses with care. 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > anova(fm1, type=3) 220s Type III Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s PRODID 5 76.3722 4.81e-15 *** 220s DAY 1 10.1485 0.001444 ** 220s PRODID:DAY 4 5.1186 0.275344 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > 220s > # Aliased term (due to nominal effects): 220s > fm <- clm(rating ~ temp * contact, nominal=~contact, data=wine) 220s > anova(fm, type=1) 220s Type I Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 22.066 2.634e-06 *** 220s contact 220s temp:contact 1 0.250 0.6171 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > anova(fm, type=2) 220s Type II Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 22.066 2.634e-06 *** 220s contact 220s temp:contact 1 0.250 0.6171 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > anova(fm, type=3) 220s Type III Analysis of Deviance Table with Wald chi-square tests 220s 220s Df Chisq Pr(>Chisq) 220s temp 1 9.6335 0.001911 ** 220s contact 220s temp:contact 1 0.2500 0.617071 220s --- 220s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 220s > 220s > # model with all NA in vcov(object): 220s > fm <- clm(rating ~ temp * contact, nominal=~contact, scale=~contact, data=wine) 220s Warning message: 220s (1) Hessian is numerically singular: parameters are not uniquely determined 220s In addition: Absolute convergence criterion was met, but relative criterion was not met 220s Loading required namespace: tools 220s > assertError(anova(fm, type=1)) # error 220s > assertError(anova(fm, type=2)) # error 220s > assertError(anova(fm, type=3)) # error 220s > all(is.na(vcov(fm))) 220s [1] TRUE 220s > 220s BEGIN TEST test.general.R 220s 220s R version 4.4.3 (2025-02-28) -- "Trophy Case" 220s Copyright (C) 2025 The R Foundation for Statistical Computing 220s Platform: arm-unknown-linux-gnueabihf (32-bit) 220s 220s R is free software and comes with ABSOLUTELY NO WARRANTY. 220s You are welcome to redistribute it under certain conditions. 220s Type 'license()' or 'licence()' for distribution details. 220s 220s R is a collaborative project with many contributors. 220s Type 'contributors()' for more information and 220s 'citation()' on how to cite R or R packages in publications. 220s 220s Type 'demo()' for some demos, 'help()' for on-line help, or 220s 'help.start()' for an HTML browser interface to help. 220s Type 'q()' to quit R. 220s 220s > 220s > txt <- citation("ordinal") 220s > stopifnot(as.logical(grep("year", txt))) 220s > 220s BEGIN TEST test.makeThresholds.R 221s 221s R version 4.4.3 (2025-02-28) -- "Trophy Case" 221s Copyright (C) 2025 The R Foundation for Statistical Computing 221s Platform: arm-unknown-linux-gnueabihf (32-bit) 221s 221s R is free software and comes with ABSOLUTELY NO WARRANTY. 221s You are welcome to redistribute it under certain conditions. 221s Type 'license()' or 'licence()' for distribution details. 221s 221s R is a collaborative project with many contributors. 221s Type 'contributors()' for more information and 221s 'citation()' on how to cite R or R packages in publications. 221s 221s Type 'demo()' for some demos, 'help()' for on-line help, or 221s 'help.start()' for an HTML browser interface to help. 221s Type 'q()' to quit R. 221s 221s > # test.makeThresholds.R 221s > 221s > library(ordinal) 222s > 222s > # Prvious bug which is now fixed: 222s > res <- ordinal:::makeThresholds(letters[1:3], "symmetric") 222s > stopifnot(length(res$alpha.names) == res$nalpha) 222s > # length(res$alpha.names) used to be 4 222s > 222s > # Real data example: 222s > wine <- within(wine, { 222s + rating_comb3b <- rating 222s + levels(rating_comb3b) <- c("1-2", "1-2", "3", "4-5", "4-5") 222s + }) 222s > wine$rating_comb3b[1] <- "4-5" # Need to remove the zero here to avoid inf MLE 222s > ftable(rating_comb3b ~ temp + contact, data=wine) 222s rating_comb3b 1-2 3 4-5 222s temp contact 222s cold no 12 5 1 222s yes 8 8 2 222s warm no 5 8 5 222s yes 1 5 12 222s > 222s > fm.comb3_c <- clm(rating_comb3b ~ contact, #scale=~contact, 222s + threshold = "symmetric", data=wine) # no error 222s > 222s BEGIN TEST test.sign.R 222s 222s R version 4.4.3 (2025-02-28) -- "Trophy Case" 222s Copyright (C) 2025 The R Foundation for Statistical Computing 222s Platform: arm-unknown-linux-gnueabihf (32-bit) 222s 222s R is free software and comes with ABSOLUTELY NO WARRANTY. 222s You are welcome to redistribute it under certain conditions. 222s Type 'license()' or 'licence()' for distribution details. 222s 222s R is a collaborative project with many contributors. 222s Type 'contributors()' for more information and 222s 'citation()' on how to cite R or R packages in publications. 222s 222s Type 'demo()' for some demos, 'help()' for on-line help, or 222s 'help.start()' for an HTML browser interface to help. 222s Type 'q()' to quit R. 222s 222s > # test.sign.R 222s > 222s > # Test the use of sign.location and sign.nominal in clm.control(): 222s > 222s > library(ordinal) 224s > 224s > fm1 <- clm(rating ~ temp + contact, data=wine) 224s > fm2 <- clm(rating ~ temp + contact, data=wine, 224s + sign.location="positive") 224s > # dput(names(fm1)) 224s > keep <- c("aliased", "alpha", "cond.H", 224s + "contrasts", "convergence", "df.residual", "edf", 224s + "fitted.values", "formula", "formulas", "gradient", 224s + "info", "link", "logLik", "maxGradient", "message", "model", 224s + "n", "niter", "nobs", "start", "terms", "Theta", "threshold", 224s + "tJac", "xlevels", "y", "y.levels") 224s > check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1[keep], fm2[keep]) 224s > stopifnot(all(check)) 224s > stopifnot(isTRUE(all.equal( 224s + fm1$beta, - fm2$beta 224s + ))) 224s > 224s > fm1 <- clm(rating ~ temp, nominal=~ contact, data=wine) 224s > fm2 <- clm(rating ~ temp, nominal=~ contact, data=wine, 224s + sign.nominal="negative") 224s > keep <- c("aliased", "beta", "cond.H", 224s + "contrasts", "convergence", "df.residual", "edf", 224s + "fitted.values", "formula", "formulas", "gradient", 224s + "info", "link", "logLik", "maxGradient", "message", "model", 224s + "n", "niter", "nobs", "start", "terms", "Theta", "threshold", 224s + "tJac", "xlevels", "y", "y.levels") 224s > # check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1, fm2) 224s > check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1[keep], fm2[keep]) 224s > stopifnot(all(check)) 224s > stopifnot(isTRUE(all.equal( 224s + fm1$alpha[5:8], -fm2$alpha[5:8] 224s + ))) 224s > 224s > 224s > fm1 <- clm(rating ~ temp, nominal=~ contact, data=wine) 224s > fm2 <- clm(rating ~ temp, nominal=~ contact, data=wine, 224s + sign.nominal="negative", sign.location="positive") 224s > keep <- c("aliased", "cond.H", 224s + "contrasts", "convergence", "df.residual", "edf", 224s + "fitted.values", "formula", "formulas", "gradient", 224s + "info", "link", "logLik", "maxGradient", "message", "model", 224s + "n", "niter", "nobs", "start", "terms", "Theta", "threshold", 224s + "tJac", "xlevels", "y", "y.levels") 224s > # check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1, fm2) 224s > check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1[keep], fm2[keep]) 224s > stopifnot(all(check)) 224s > stopifnot( 224s + isTRUE(all.equal(fm1$alpha[5:8], -fm2$alpha[5:8])), 224s + isTRUE(all.equal(fm1$beta, -fm2$beta)) 224s + ) 224s > 224s > # Check predict method: 224s > newData <- with(wine, expand.grid(temp=levels(temp), contact=levels(contact))) 224s > (p1 <- predict(fm1, newdata=newData)) 224s $fit 224s 1 2 3 4 5 224s 1 0.210312404 0.56637121 0.1953950 0.0185460 0.009375394 224s 2 0.020998377 0.19781391 0.5182972 0.1577343 0.105156202 224s 3 0.050301839 0.38380275 0.4329644 0.1065821 0.026348960 224s 4 0.004247588 0.05393811 0.2862121 0.4040930 0.251509196 224s 224s > (p2 <- predict(fm2, newdata=newData)) 224s $fit 224s 1 2 3 4 5 224s 1 0.210312404 0.56637121 0.1953950 0.0185460 0.009375394 224s 2 0.020998377 0.19781391 0.5182972 0.1577343 0.105156202 224s 3 0.050301839 0.38380275 0.4329644 0.1065821 0.026348960 224s 4 0.004247588 0.05393811 0.2862121 0.4040930 0.251509196 224s 224s > stopifnot(isTRUE(all.equal(p1, p2))) 224s > 224s > stopifnot(isTRUE( 224s + all.equal(predict(fm1, newdata=wine, se=TRUE, interval=TRUE), 224s + predict(fm2, newdata=wine, se=TRUE, interval=TRUE)) 224s + )) 224s > 224s > # Check profile and confint methods: 224s > confint.default(fm1) 224s 2.5 % 97.5 % 224s 1|2.(Intercept) -2.4250844 -0.2210024 224s 2|3.(Intercept) 0.3158056 2.1770814 224s 3|4.(Intercept) 2.2642614 4.8358258 224s 4|5.(Intercept) 2.9738888 6.3466053 224s 1|2.contactyes -3.8921464 0.6620280 224s 2|3.contactyes -2.6692032 -0.3539315 224s 3|4.contactyes -2.9464535 -0.4030579 224s 4|5.contactyes -2.8077520 0.7065061 224s tempwarm 1.4703720 3.5677176 224s > confint.default(fm2) 224s 2.5 % 97.5 % 224s 1|2.(Intercept) -2.4250844 -0.2210024 224s 2|3.(Intercept) 0.3158056 2.1770814 224s 3|4.(Intercept) 2.2642614 4.8358258 224s 4|5.(Intercept) 2.9738888 6.3466053 224s 1|2.contactyes -0.6620280 3.8921464 224s 2|3.contactyes 0.3539315 2.6692032 224s 3|4.contactyes 0.4030579 2.9464535 224s 4|5.contactyes -0.7065061 2.8077520 224s tempwarm -3.5677176 -1.4703720 224s > 224s > stopifnot( 224s + isTRUE(all.equal(confint(fm1), -confint(fm2)[, 2:1, drop=FALSE], 224s + check.attributes=FALSE)) 224s + ) 224s > 224s > fm1 <- clm(rating ~ temp + contact, data=wine) 224s > fm2 <- clm(rating ~ temp + contact, data=wine, 224s + sign.location="positive") 224s > pr1 <- profile(fm1) 224s > pr2 <- profile(fm2) 224s > stopifnot( 224s + isTRUE(all.equal(confint(fm1), - confint(fm2)[, 2:1], check.attributes=FALSE)) 224s + ) 225s > 225s > 225s BEGIN TEST test0weights.R 225s 225s R version 4.4.3 (2025-02-28) -- "Trophy Case" 225s Copyright (C) 2025 The R Foundation for Statistical Computing 225s Platform: arm-unknown-linux-gnueabihf (32-bit) 225s 225s R is free software and comes with ABSOLUTELY NO WARRANTY. 225s You are welcome to redistribute it under certain conditions. 225s Type 'license()' or 'licence()' for distribution details. 225s 225s R is a collaborative project with many contributors. 225s Type 'contributors()' for more information and 225s 'citation()' on how to cite R or R packages in publications. 225s 225s Type 'demo()' for some demos, 'help()' for on-line help, or 225s 'help.start()' for an HTML browser interface to help. 225s Type 'q()' to quit R. 225s 225s > library(ordinal) 226s > options(contrasts = c("contr.treatment", "contr.poly")) 226s > ## library(devtools) 226s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 226s > ## clean_dll(pkg = r2path) 226s > ## load_all(r2path) 226s > 226s > ## one zero weight: 226s > data(wine, package="ordinal") 226s > wts <- rep(1, nrow(wine)) 226s > wine$rating 226s [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 226s [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 226s Levels: 1 < 2 < 3 < 4 < 5 226s > wts[1] <- 0 226s > fm1 <- clm(rating ~ contact + temp, data=wine, weights=wts) 226s > fm1 226s formula: rating ~ contact + temp 226s data: wine 226s 226s link threshold nobs logLik AIC niter max.grad cond.H 226s logit flexible 71 -85.92 183.84 6(0) 3.43e-12 2.7e+01 226s 226s Coefficients: 226s contactyes tempwarm 226s 1.511 2.482 226s 226s Threshold coefficients: 226s 1|2 2|3 3|4 4|5 226s -1.295 1.220 3.437 4.975 226s > fm1$n ## 72 226s [1] 72 226s > fm1$nobs ## 71 226s [1] 71 226s > confint(fm1) 226s 2.5 % 97.5 % 226s contactyes 0.5951066 2.478924 226s tempwarm 1.4856829 3.577621 226s > plot(profile(fm1)) 226s > plot(slice(fm1), 5) 226s > convergence(fm1) 226s nobs logLik niter max.grad cond.H logLik.Error 226s 71 -85.92 6(0) 3.43e-12 2.7e+01 <1e-10 226s 226s Estimate Std.Err Gradient Error Cor.Dec Sig.Dig 226s 1|2 -1.295 0.5220 7.57e-13 7.84e-14 12 13 226s 2|3 1.220 0.4436 2.65e-12 -1.27e-13 12 13 226s 3|4 3.437 0.6014 -3.43e-12 -7.17e-13 11 12 226s 4|5 4.975 0.7341 -6.06e-14 -7.01e-13 11 12 226s contactyes 1.511 0.4785 1.53e-13 -1.95e-13 12 13 226s tempwarm 2.482 0.5303 -4.07e-13 -4.95e-13 12 13 226s 226s Eigen values of Hessian: 226s 21.7419 18.5476 10.4115 5.2426 4.0755 0.8013 226s 226s Convergence message from clm: 226s (0) successful convergence 226s In addition: Absolute and relative convergence criteria were met 226s 226s > drop1(fm1, test="Chi") 226s Single term deletions 226s 226s Model: 226s rating ~ contact + temp 226s Df AIC LRT Pr(>Chi) 226s 183.84 226s contact 1 192.54 10.698 0.001072 ** 226s temp 1 208.07 26.234 3.024e-07 *** 226s --- 226s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 226s > add1(fm1, scope=~.^2, test="Chi") 226s Single term additions 226s 226s Model: 226s rating ~ contact + temp 226s Df AIC LRT Pr(>Chi) 226s 183.84 226s contact:temp 1 185.66 0.18256 0.6692 226s > ## clm_anova(fm1) 226s > pred <- predict(fm1, newdata=wine) ## OK 226s > step.fm1 <- step(fm1, trace=0) 226s > fitted(fm1) 226s [1] 0.19683278 0.44514183 0.09677403 0.20147980 0.20147980 0.27261558 226s [7] 0.27261558 0.21497073 0.55705124 0.05699435 0.44514183 0.19814731 226s [13] 0.50160837 0.27261558 0.36288756 0.55705124 0.19683278 0.44514183 226s [19] 0.37073110 0.07640020 0.07640020 0.36288756 0.36288756 0.19683278 226s [25] 0.55705124 0.44514183 0.37073110 0.50160837 0.19814731 0.27261558 226s [31] 0.30572865 0.55705124 0.19683278 0.09677403 0.44514183 0.50160837 226s [37] 0.50160837 0.30572865 0.30572865 0.19683278 0.55705124 0.44514183 226s [43] 0.37073110 0.19814731 0.20147980 0.27261558 0.36288756 0.21497073 226s [49] 0.21497073 0.37073110 0.37073110 0.19814731 0.50160837 0.05374460 226s [55] 0.30572865 0.55705124 0.55705124 0.37073110 0.44514183 0.50160837 226s [61] 0.50160837 0.30572865 0.36288756 0.21497073 0.55705124 0.44514183 226s [67] 0.37073110 0.50160837 0.19814731 0.36288756 0.36288756 226s > dim(model.matrix(fm1)$X) 226s [1] 72 3 226s > dim(model.matrix(fm1, "B")$B1) 226s [1] 71 6 226s > mf <- update(fm1, method="model.frame") 226s > str(mf) 226s 'data.frame': 72 obs. of 4 variables: 226s $ rating : Ord.factor w/ 5 levels "1"<"2"<"3"<"4"<..: 2 3 3 4 4 4 5 5 1 2 ... 226s $ contact : Factor w/ 2 levels "no","yes": 1 1 2 2 1 1 2 2 1 1 ... 226s $ temp : Factor w/ 2 levels "cold","warm": 1 1 1 1 2 2 2 2 1 1 ... 226s $ (weights): num 0 1 1 1 1 1 1 1 1 1 ... 226s - attr(*, "terms")=Classes 'terms', 'formula' language rating ~ contact + temp 226s .. ..- attr(*, "variables")= language list(rating, contact, temp) 226s .. ..- attr(*, "factors")= int [1:3, 1:2] 0 1 0 0 0 1 226s .. .. ..- attr(*, "dimnames")=List of 2 226s .. .. .. ..$ : chr [1:3] "rating" "contact" "temp" 226s .. .. .. ..$ : chr [1:2] "contact" "temp" 226s .. ..- attr(*, "term.labels")= chr [1:2] "contact" "temp" 226s .. ..- attr(*, "order")= int [1:2] 1 1 226s .. ..- attr(*, "intercept")= int 1 226s .. ..- attr(*, "response")= int 1 226s .. ..- attr(*, ".Environment")= 226s .. ..- attr(*, "predvars")= language list(rating, contact, temp) 226s .. ..- attr(*, "dataClasses")= Named chr [1:4] "ordered" "factor" "factor" "numeric" 226s .. .. ..- attr(*, "names")= chr [1:4] "rating" "contact" "temp" "(weights)" 226s > wts <- mf$wts 226s > dim(model.matrix(fm1)$X[wts > 0, , drop=FALSE]) 226s [1] 0 3 226s > 226s > fm1b <- clm(rating ~ temp, scale=~contact, data=wine, weights=wts) 226s > summary(fm1b) 226s formula: rating ~ temp 226s scale: ~contact 226s data: wine 226s 226s link threshold nobs logLik AIC niter max.grad cond.H 226s logit flexible 72 -91.92 195.83 8(0) 1.57e-09 5.6e+01 226s 226s Coefficients: 226s Estimate Std. Error z value Pr(>|z|) 226s tempwarm 2.1690 0.5527 3.924 8.69e-05 *** 226s --- 226s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 226s 226s log-scale coefficients: 226s Estimate Std. Error z value Pr(>|z|) 226s contactyes -0.1222 0.2775 -0.44 0.66 226s 226s Threshold coefficients: 226s Estimate Std. Error z value 226s 1|2 -1.8957 0.4756 -3.986 226s 2|3 0.3668 0.3442 1.066 226s 3|4 2.2483 0.5932 3.790 226s 4|5 3.5393 0.8336 4.246 226s > pr <- profile(fm1b) 226s > confint(pr) 226s 2.5 % 97.5 % 226s tempwarm 1.2122036 3.4033767 226s sca.contactyes -0.6721766 0.4156449 226s > plot(pr, 1) 226s > fm1c <- clm(rating ~ temp, nominal=~contact, data=wine, weights=wts) 226s > summary(fm1c) 226s formula: rating ~ temp 226s nominal: ~contact 226s data: wine 226s 226s link threshold nobs logLik AIC niter max.grad cond.H 226s logit flexible 72 -86.21 190.42 6(0) 1.64e-10 4.8e+01 226s 226s Coefficients: 226s Estimate Std. Error z value Pr(>|z|) 226s tempwarm 2.519 0.535 4.708 2.5e-06 *** 226s --- 226s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 226s 226s Threshold coefficients: 226s Estimate Std. Error z value 226s 1|2.(Intercept) -1.3230 0.5623 -2.353 226s 2|3.(Intercept) 1.2464 0.4748 2.625 226s 3|4.(Intercept) 3.5500 0.6560 5.411 226s 4|5.(Intercept) 4.6602 0.8604 5.416 226s 1|2.contactyes -1.6151 1.1618 -1.390 226s 2|3.contactyes -1.5116 0.5906 -2.559 226s 3|4.contactyes -1.6748 0.6488 -2.581 226s 4|5.contactyes -1.0506 0.8965 -1.172 226s > pr <- profile(fm1c) 226s > confint(pr) 226s 2.5 % 97.5 % 226s tempwarm 1.516862 3.629098 226s > plot(pr, 1) 226s > 226s > ## nominal.test(fm1) 226s > ## scale.test(fm1) 226s > 226s > ## zero out an entire response category: 226s > wts2 <- 1 * with(wine, rating != "2") 226s > fm2 <- clm(rating ~ contact + temp, data=wine, weights=wts2) 226s > fm2 226s formula: rating ~ contact + temp 226s data: wine 226s 226s link threshold nobs logLik AIC niter max.grad cond.H 226s logit flexible 50 -46.76 103.52 7(0) 3.56e-13 4.2e+01 226s 226s Coefficients: 226s contactyes tempwarm 226s 1.593 3.062 226s 226s Threshold coefficients: 226s 1|3 3|4 4|5 226s -0.5173 3.6238 5.3657 226s > fm2$n ## 72 226s [1] 72 226s > fm2$nobs ## 50 226s [1] 50 226s > ## Dimension of X and B1, B2 differ: 226s > dim(model.matrix(fm2)$X) 226s [1] 72 3 226s > dim(model.matrix(fm2, "B")$B1) 226s [1] 50 5 226s > ## Cannot directly evaluate predictions on the original data: 226s > try(predict(fm2, newdata=wine), silent=TRUE)[1] 226s [1] "Error in predict.clm(fm2, newdata = wine) : \n response factor 'rating' has new levels\n" 226s > confint(fm2) 226s 2.5 % 97.5 % 226s contactyes 0.4216272 2.876550 226s tempwarm 1.5970977 5.026527 226s > profile(fm2) 226s $contactyes 226s lroot par.vals.1|3 par.vals.3|4 par.vals.4|5 par.vals.contactyes 226s 1 3.4747852 -1.448538968 2.255543944 3.804439509 -0.447374822 226s 2 3.0276372 -1.308493024 2.407453551 3.967827135 -0.192380808 226s 3 2.5822211 -1.174976592 2.565043880 4.140537415 0.062613207 226s 4 2.1395315 -1.048101582 2.728199207 4.322490592 0.317607222 226s 5 1.7005507 -0.927983229 2.896810974 4.513576014 0.572601236 226s 6 1.2662317 -0.814738724 3.070776301 4.713647671 0.827595251 226s 7 0.8374817 -0.708483160 3.249996208 4.922519451 1.082589265 226s 8 0.4151468 -0.609322477 3.434373593 5.139960291 1.337583280 226s 9 0.0000000 -0.517343412 3.623810880 5.365689290 1.592577294 226s 10 -0.4072702 -0.432600941 3.818207180 5.599370818 1.847571309 226s 11 -0.8060673 -0.355104205 4.017454848 5.840609731 2.102565323 226s 12 -1.1958918 -0.284802472 4.221435388 6.088946911 2.357559338 226s 13 -1.5763436 -0.221573075 4.430015019 6.343855637 2.612553352 226s 14 -1.9471215 -0.165213368 4.643040370 6.604739566 2.867547367 226s 15 -2.3080198 -0.115438462 4.860335061 6.870933284 3.122541381 226s 16 -2.6589228 -0.071885700 5.081697900 7.141706504 3.377535396 226s 17 -2.9997972 -0.034125762 5.306903276 7.416272839 3.632529410 226s 18 -3.3306833 -0.001679093 5.535703885 7.693803770 3.887523425 226s par.vals.tempwarm 226s 1 2.840981986 226s 2 2.848907417 226s 3 2.863086150 226s 4 2.883227511 226s 5 2.909025226 226s 6 2.940155181 226s 7 2.976272850 226s 8 3.017010511 226s 9 3.061974244 226s 10 3.110740675 226s 11 3.162853507 226s 12 3.217819929 226s 13 3.275107380 226s 14 3.334141312 226s 15 3.394304942 226s 16 3.454942107 226s 17 3.515364293 226s 18 3.574862708 226s 226s $tempwarm 226s lroot par.vals.1|3 par.vals.3|4 par.vals.4|5 par.vals.contactyes 226s 1 3.4300164 -1.3083735 1.7272573 3.1899360 1.3296606 226s 2 2.8813858 -1.1550431 1.9737448 3.4740817 1.3627908 226s 3 2.3491188 -1.0148529 2.2280703 3.7683888 1.3992293 226s 4 1.8354355 -0.8881411 2.4904988 4.0722937 1.4379639 226s 5 1.3422735 -0.7751174 2.7612331 4.3850175 1.4778669 226s 6 0.8712358 -0.6758159 3.0403898 4.7055883 1.5177348 226s 7 0.4235444 -0.5900448 3.3279674 5.0328829 1.5563515 226s 8 0.0000000 -0.5173434 3.6238109 5.3656893 1.5925773 226s 9 -0.3990485 -0.4569595 3.9275814 5.7027863 1.6254526 226s 10 -0.7737184 -0.4078590 4.2387443 6.0430310 1.6542958 226s 11 -1.1245809 -0.3687765 4.5565843 6.3854348 1.6787668 226s 12 -1.4526173 -0.3383014 4.8802522 6.7292117 1.6988730 226s 13 -1.7591420 -0.3149843 5.2088333 7.0737893 1.7149136 226s 14 -2.0457031 -0.2974396 5.5414220 7.4187857 1.7273842 226s 15 -2.3139760 -0.2844232 5.8771833 7.7639689 1.7368704 226s 16 -2.5656664 -0.2748765 6.2153929 8.1092106 1.7439599 226s 17 -2.8024328 -0.2679376 6.5554528 8.4544482 1.7491850 226s 18 -3.0258332 -0.2629290 6.8968876 8.7996559 1.7529951 226s 19 -3.2372944 -0.2593326 7.2393314 9.1448275 1.7557514 226s 20 -3.4380992 -0.2567600 7.5825083 9.4899654 1.7577335 226s par.vals.tempwarm 226s 1 0.6468007 226s 2 0.9918255 226s 3 1.3368503 226s 4 1.6818751 226s 5 2.0268999 226s 6 2.3719247 226s 7 2.7169495 226s 8 3.0619742 226s 9 3.4069990 226s 10 3.7520238 226s 11 4.0970486 226s 12 4.4420734 226s 13 4.7870982 226s 14 5.1321230 226s 15 5.4771478 226s 16 5.8221726 226s 17 6.1671974 226s 18 6.5122222 226s 19 6.8572470 226s 20 7.2022718 226s 226s attr(,"original.fit") 226s formula: rating ~ contact + temp 226s data: wine 226s 226s link threshold nobs logLik AIC niter max.grad cond.H 226s logit flexible 50 -46.76 103.52 7(0) 3.56e-13 4.2e+01 226s 226s Coefficients: 226s contactyes tempwarm 226s 1.593 3.062 226s 226s Threshold coefficients: 226s 1|3 3|4 4|5 226s -0.5173 3.6238 5.3657 226s attr(,"class") 226s [1] "profile.clm" 226s > plot(slice(fm2), 5) 226s > step.fm2 <- step(fm2, trace=0) 226s > fitted(fm2) 226s [1] 0.60053892 0.77590129 0.09349820 0.27230685 0.27230685 0.32934749 226s [7] 0.32934749 0.37347364 0.10813631 0.77590129 0.60973967 0.32934749 226s [13] 0.40771198 0.60053892 0.77590129 0.09081575 0.09081575 0.40771198 226s [19] 0.40771198 0.60053892 0.77590129 0.60973967 0.32934749 0.25729874 226s [25] 0.60053892 0.09349820 0.77590129 0.60973967 0.60973967 0.25729874 226s [31] 0.25729874 0.60053892 0.77590129 0.27230685 0.32934749 0.40771198 226s [37] 0.37347364 0.37347364 0.60973967 0.25729874 0.77590129 0.60973967 226s [43] 0.60973967 0.25729874 0.40771198 0.37347364 0.77590129 0.60973967 226s [49] 0.40771198 0.40771198 226s > ## Scale and nominal effects: 226s > fm2b <- clm(rating ~ temp, scale=~contact, data=wine, weights=wts2) 226s > summary(fm2b) 226s formula: rating ~ temp 226s scale: ~contact 226s data: wine 226s 226s link threshold nobs logLik AIC niter max.grad cond.H 226s logit flexible 50 -50.35 110.71 9(0) 2.51e-08 1.2e+02 226s 226s Coefficients: 226s Estimate Std. Error z value Pr(>|z|) 226s tempwarm 2.667 1.059 2.519 0.0118 * 226s --- 226s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 226s 226s log-scale coefficients: 226s Estimate Std. Error z value Pr(>|z|) 226s contactyes -0.09812 0.38836 -0.253 0.801 226s 226s Threshold coefficients: 226s Estimate Std. Error z value 226s 1|3 -1.2009 0.5033 -2.386 226s 3|4 2.3219 1.0427 2.227 226s 4|5 3.7986 1.3876 2.738 226s > pr <- profile(fm2b) 226s > confint(pr) 226s 2.5 % 97.5 % 226s tempwarm 1.1319929 6.0851931 226s sca.contactyes -0.8403892 0.7190847 226s > plot(pr, 1) 226s > fm2c <- clm(rating ~ temp, nominal=~contact, data=wine, weights=wts2) 227s > summary(fm2c) 227s formula: rating ~ temp 227s nominal: ~contact 227s data: wine 227s 227s link threshold nobs logLik AIC niter max.grad cond.H 227s logit flexible 50 -46.36 106.72 7(0) 1.22e-12 4.8e+01 227s 227s Coefficients: 227s Estimate Std. Error z value Pr(>|z|) 227s tempwarm 3.1100 0.8529 3.646 0.000266 *** 227s --- 227s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 227s 227s Threshold coefficients: 227s Estimate Std. Error z value 227s 1|3.(Intercept) -0.4250 0.6381 -0.666 227s 3|4.(Intercept) 3.6911 0.9505 3.883 227s 4|5.(Intercept) 4.8968 1.1001 4.451 227s 1|3.contactyes -1.8993 1.2128 -1.566 227s 3|4.contactyes -1.7003 0.7432 -2.288 227s 4|5.contactyes -0.9153 0.9243 -0.990 227s > pr <- profile(fm2c) 227s > confint(pr) 227s 2.5 % 97.5 % 227s tempwarm 1.623761 5.102185 227s > plot(pr, 1) 227s > pred <- predict(fm2c, newdata=wine[!names(wine) %in% "rating"]) 227s > pred <- predict(fm2b, newdata=wine[!names(wine) %in% "rating"]) 227s > 227s > ## nominal.test(fm2) 227s > ## scale.test(fm2) 227s > 227s > ## Different data sets (error): 227s > try(anova(fm1, fm2), silent=TRUE)[1] ## OK 227s [1] "Error in anova.clm(fm1, fm2) : \n models were not all fitted to the same dataset\n" 227s > 227s > ## Test clm.fit: 227s > wts2 <- 1 * with(wine, rating != "2") 227s > mf2 <- update(fm2, method="design") 227s > fm3 <- with(mf2, clm.fit(y, X, weights=wts)) 227s > 227s > ################################# 227s > 227s BEGIN TEST testAnova.clm2.R 227s 227s R version 4.4.3 (2025-02-28) -- "Trophy Case" 227s Copyright (C) 2025 The R Foundation for Statistical Computing 227s Platform: arm-unknown-linux-gnueabihf (32-bit) 227s 227s R is free software and comes with ABSOLUTELY NO WARRANTY. 227s You are welcome to redistribute it under certain conditions. 227s Type 'license()' or 'licence()' for distribution details. 227s 227s R is a collaborative project with many contributors. 227s Type 'contributors()' for more information and 227s 'citation()' on how to cite R or R packages in publications. 227s 227s Type 'demo()' for some demos, 'help()' for on-line help, or 227s 'help.start()' for an HTML browser interface to help. 227s Type 'q()' to quit R. 227s 227s > library(ordinal) 228s > options(contrasts = c("contr.treatment", "contr.poly")) 228s > 228s > ## More manageable data set: 228s > (tab26 <- with(soup, table("Product" = PROD, "Response" = SURENESS))) 228s Response 228s Product 1 2 3 4 5 6 228s Ref 132 161 65 41 121 219 228s Test 96 99 50 57 156 650 228s > dimnames(tab26)[[2]] <- c("Sure", "Not Sure", "Guess", "Guess", "Not Sure", "Sure") 228s > dat26 <- expand.grid(sureness = as.factor(1:6), prod = c("Ref", "Test")) 228s > dat26$wghts <- c(t(tab26)) 228s > m1 <- clm(sureness ~ prod, scale = ~prod, data = dat26, 228s + weights = wghts, link = "logit") 228s > 228s > ## anova 228s > m2 <- update(m1, scale = ~1) 228s > anova(m1, m2) 228s Likelihood ratio tests of cumulative link models: 228s 228s formula: scale: link: threshold: 228s m2 sureness ~ prod ~1 logit flexible 228s m1 sureness ~ prod ~prod logit flexible 228s 228s no.par AIC logLik LR.stat df Pr(>Chisq) 228s m2 6 5392.7 -2690.3 228s m1 7 5389.5 -2687.7 5.1749 1 0.02292 * 228s --- 228s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 228s > mN1 <- clm(sureness ~ 1, nominal = ~prod, data = dat26, 228s + link = "logit") 228s > anova(m1, mN1) 228s Likelihood ratio tests of cumulative link models: 228s 228s formula: nominal: scale: link: threshold: 228s m1 sureness ~ prod ~1 ~prod logit flexible 228s mN1 sureness ~ 1 ~prod ~1 logit flexible 228s 228s no.par AIC logLik LR.stat df Pr(>Chisq) 228s m1 7 5389.489 -2687.745 228s mN1 10 63.002 -21.501 5332.5 3 < 2.2e-16 *** 228s --- 228s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 228s > anova(m1, m2, mN1) 228s Likelihood ratio tests of cumulative link models: 228s 228s formula: nominal: scale: link: threshold: 228s m2 sureness ~ prod ~1 ~1 logit flexible 228s m1 sureness ~ prod ~1 ~prod logit flexible 228s mN1 sureness ~ 1 ~prod ~1 logit flexible 228s 228s no.par AIC logLik LR.stat df Pr(>Chisq) 228s m2 6 5392.664 -2690.332 228s m1 7 5389.489 -2687.745 5.1749 1 0.02292 * 228s mN1 10 63.002 -21.501 5332.4869 3 < 2e-16 *** 228s --- 228s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 228s > 228s > ## dropterm 228s > if(require(MASS)) { 228s + dropterm(m1, test = "Chi") 228s + mB1 <- clm(SURENESS ~ PROD + GENDER + SOUPTYPE, 228s + scale = ~ COLD, data = soup, link = "probit") 228s + dropterm(mB1, test = "Chi") # or 228s + 228s + ## addterm 228s + addterm(mB1, scope = ~.^2, test = "Chi") 228s + ## addterm(mB1, scope = ~ . + AGEGROUP + SOUPFREQ, 228s + ## test = "Chi", which = "location") 228s + ## addterm(mB1, scope = ~ . + GENDER + SOUPTYPE, 228s + ## test = "Chi", which = "scale") 228s + 228s + ## Fit model from polr example: 228s + ## data(housing, package = "MASS") 228s + 228s + fm1 <- clm(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) 228s + ## addterm(fm1, ~ Infl + Type + Cont, test= "Chisq", which = "scale") 228s + dropterm(fm1, test = "Chisq") 228s + fm2 <- update(fm1, scale =~ Cont) 228s Loading required package: MASS 228s + fm3 <- update(fm1, formula =~.-Cont, nominal =~ Cont) 228s + anova(fm1, fm2, fm3) 228s + } 228s Likelihood ratio tests of cumulative link models: 228s 228s formula: nominal: scale: link: threshold: 228s fm1 Sat ~ Infl + Type + Cont ~1 ~1 logit flexible 228s fm2 Sat ~ Infl + Type + Cont ~1 ~Cont logit flexible 228s fm3 Sat ~ Infl + Type ~Cont ~1 logit flexible 228s 228s no.par AIC logLik LR.stat df Pr(>Chisq) 228s fm1 8 3495.1 -1739.6 228s fm2 9 3491.5 -1736.7 5.6559 1 0.0174 * 228s fm3 9 3494.7 -1738.4 -3.2113 0 228s --- 228s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 228s > 228s > 228s BEGIN TEST testCLM.R 228s 228s R version 4.4.3 (2025-02-28) -- "Trophy Case" 228s Copyright (C) 2025 The R Foundation for Statistical Computing 228s Platform: arm-unknown-linux-gnueabihf (32-bit) 228s 228s R is free software and comes with ABSOLUTELY NO WARRANTY. 228s You are welcome to redistribute it under certain conditions. 228s Type 'license()' or 'licence()' for distribution details. 228s 228s R is a collaborative project with many contributors. 228s Type 'contributors()' for more information and 228s 'citation()' on how to cite R or R packages in publications. 228s 228s Type 'demo()' for some demos, 'help()' for on-line help, or 228s 'help.start()' for an HTML browser interface to help. 228s Type 'q()' to quit R. 228s 228s > library(ordinal) 229s > options(contrasts = c("contr.treatment", "contr.poly")) 229s > ## library(devtools) 229s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 229s > ## clean_dll(pkg = r2path) 229s > ## load_all(r2path) 229s > 229s > ## More manageable data set: 229s > data(soup, package="ordinal") 229s > (tab26 <- with(soup, table("Product" = PROD, "Response" = SURENESS))) 229s Response 229s Product 1 2 3 4 5 6 229s Ref 132 161 65 41 121 219 229s Test 96 99 50 57 156 650 229s > dimnames(tab26)[[2]] <- c("Sure", "Not Sure", "Guess", "Guess", "Not Sure", "Sure") 229s > dat26 <- expand.grid(sureness = as.factor(1:6), prod = c("Ref", "Test")) 229s > dat26$wghts <- c(t(tab26)) 229s > m1 <- clm(sureness ~ prod, scale = ~prod, data = dat26, 229s + weights = wghts, link = "logit") 229s > ## print, summary, vcov, logLik, AIC: 229s > m1 229s formula: sureness ~ prod 229s scale: ~prod 229s data: dat26 229s 229s link threshold nobs logLik AIC niter max.grad cond.H 229s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 229s 229s Coefficients: 229s prodTest 229s 1.296 229s 229s log-scale coefficients: 229s prodTest 229s 0.148 229s 229s Threshold coefficients: 229s 1|2 2|3 3|4 4|5 5|6 229s -1.4913 -0.4522 -0.1072 0.1634 0.8829 229s > summary(m1) 229s formula: sureness ~ prod 229s scale: ~prod 229s data: dat26 229s 229s link threshold nobs logLik AIC niter max.grad cond.H 229s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 229s 229s Coefficients: 229s Estimate Std. Error z value Pr(>|z|) 229s prodTest 1.296 0.119 10.89 <2e-16 *** 229s --- 229s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 229s 229s log-scale coefficients: 229s Estimate Std. Error z value Pr(>|z|) 229s prodTest 0.1480 0.0651 2.273 0.023 * 229s --- 229s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 229s 229s Threshold coefficients: 229s Estimate Std. Error z value 229s 1|2 -1.49126 0.09215 -16.183 229s 2|3 -0.45218 0.07182 -6.296 229s 3|4 -0.10721 0.06995 -1.533 229s 4|5 0.16337 0.07025 2.325 229s 5|6 0.88291 0.07957 11.096 229s > vcov(m1) 229s 1|2 2|3 3|4 4|5 5|6 229s 1|2 0.0084917417 0.0046258673 0.0038492096 0.003316006 0.002036170 229s 2|3 0.0046258673 0.0051586967 0.0044974099 0.004099300 0.003352323 229s 3|4 0.0038492096 0.0044974099 0.0048935739 0.004528181 0.003948048 229s 4|5 0.0033160059 0.0040993002 0.0045281811 0.004935721 0.004489054 229s 5|6 0.0020361699 0.0033523229 0.0039480481 0.004489054 0.006331523 229s prodTest 0.0009111749 0.0031074167 0.0039832831 0.004738959 0.007064828 229s prodTest -0.0024312129 -0.0007825923 -0.0001820514 0.000338977 0.001989991 229s prodTest prodTest 229s 1|2 0.0009111749 -0.0024312129 229s 2|3 0.0031074167 -0.0007825923 229s 3|4 0.0039832831 -0.0001820514 229s 4|5 0.0047389591 0.0003389770 229s 5|6 0.0070648284 0.0019899912 229s prodTest 0.0141687135 0.0045752922 229s prodTest 0.0045752922 0.0042385585 229s > 229s > logLik(m1) 229s 'log Lik.' -2687.745 (df=7) 229s > ll.m1 <- structure(-2687.74456343981, df = 7L, nobs = 1847, 229s + class = "logLik") 229s > stopifnot(all.equal(logLik(m1), ll.m1)) 229s > 229s > AIC(m1) 229s [1] 5389.489 229s > 229s > coef(m1) 230s 1|2 2|3 3|4 4|5 5|6 prodTest prodTest 230s -1.4912570 -0.4521846 -0.1072083 0.1633653 0.8829135 1.2958776 0.1479862 230s > cm1 <- c(-1.49125702755587, -0.45218462707814, -0.107208315524318, 0.163365282774162, 230s + 0.88291347877514, 1.29587762626394, 0.147986162902775) 230s > stopifnot(all.equal(as.vector(coef(m1)), cm1)) 230s > 230s > coef(summary(m1)) 230s Estimate Std. Error z value Pr(>|z|) 230s 1|2 -1.4912570 0.09215065 -16.182817 6.667319e-59 230s 2|3 -0.4521846 0.07182407 -6.295726 3.059652e-10 230s 3|4 -0.1072083 0.06995408 -1.532553 1.253861e-01 230s 4|5 0.1633653 0.07025469 2.325329 2.005437e-02 230s 5|6 0.8829135 0.07957087 11.095938 1.312749e-28 230s prodTest 1.2958776 0.11903241 10.886763 1.332938e-27 230s prodTest 0.1479862 0.06510421 2.273066 2.302222e-02 230s > csm1 <- structure(c(-1.49125702755587, -0.45218462707814, -0.107208315524318, 230s + 0.163365282774162, 0.88291347877514, 1.29587762626394, 0.147986162902775, 230s + 0.0921506468161812, 0.0718240681909781, 0.069954084652323, 0.0702546879687391, 230s + 0.0795708692869622, 0.119032405993894, 0.065104213008022, -16.1828167145758, 230s + -6.2957256316336, -1.53255261729392, 2.32532927691394, 11.0959385851501, 230s + 10.8867632762999, 2.27306584421104, 6.66732036748908e-59, 3.05965144996025e-10, 230s + 0.125386123756898, 0.0200543599621069, 1.31274723412040e-28, 230s + 1.33293711602276e-27, 0.0230222123418036), .Dim = c(7L, 4L), .Dimnames = list( 230s + c("1|2", "2|3", "3|4", "4|5", "5|6", "prodTest", "prodTest" 230s + ), c("Estimate", "Std. Error", "z value", "Pr(>|z|)"))) 230s > stopifnot(all.equal(coef(summary(m1)), csm1)) 230s > 230s > ## link functions: 230s > m2 <- update(m1, link = "probit") 230s > m3 <- update(m1, link = "cloglog") 230s > 230s > m4 <- update(m1, link = "loglog") 230s > m5 <- update(m1, link = "cauchit", start = coef(m1)) 230s > ## m6 <- update(m1, link = "Aranda-Ordaz", lambda = 1) 230s > ## m7 <- update(m1, link = "Aranda-Ordaz") 230s > ## m8 <- update(m1, link = "log-gamma", lambda = 1) 230s > ## m9 <- update(m1, link = "log-gamma") 230s > ## nominal effects: 230s > mN1 <- clm(sureness ~ 1, nominal = ~ prod, data = dat26, 230s + weights = wghts) 230s > anova(m1, mN1) 230s Likelihood ratio tests of cumulative link models: 230s 230s formula: nominal: scale: link: threshold: 230s m1 sureness ~ prod ~1 ~prod logit flexible 230s mN1 sureness ~ 1 ~prod ~1 logit flexible 230s 230s no.par AIC logLik LR.stat df Pr(>Chisq) 230s m1 7 5389.5 -2687.7 230s mN1 10 5390.1 -2685.1 5.3755 3 0.1463 230s > ## optimizer / method: 230s > update(m1, scale = ~ 1, method = "Newton") 230s formula: sureness ~ prod 230s scale: ~1 230s data: dat26 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1847 -2690.33 5392.66 6(1) 3.35e-12 1.1e+02 230s 230s Coefficients: 230s prodTest 230s 1.144 230s 230s Threshold coefficients: 230s 1|2 2|3 3|4 4|5 5|6 230s -1.4050 -0.4247 -0.1013 0.1508 0.8126 230s > update(m1, scale = ~ 1, method = "ucminf") 230s formula: sureness ~ prod 230s scale: ~1 230s data: dat26 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1847 -2690.33 5392.66 19(0) 1.26e-08 1.1e+02 230s 230s Coefficients: 230s prodTest 230s 1.144 230s 230s Threshold coefficients: 230s 1|2 2|3 3|4 4|5 5|6 230s -1.4050 -0.4247 -0.1013 0.1508 0.8126 230s > update(m1, scale = ~ 1, method = "nlminb") 230s formula: sureness ~ prod 230s scale: ~1 230s data: dat26 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1847 -2690.33 5392.66 56(43) 4.13e-03 1.1e+02 230s 230s Coefficients: 230s prodTest 230s 1.144 230s 230s Threshold coefficients: 230s 1|2 2|3 3|4 4|5 5|6 230s -1.4050 -0.4247 -0.1013 0.1508 0.8126 230s > update(m1, scale = ~ 1, method = "optim") 230s Warning message: 230s (-1) Model failed to converge with max|grad| = 0.00413248 (tol = 1e-06) 230s formula: sureness ~ prod 230s scale: ~1 230s data: dat26 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1847 -2690.33 5392.66 44(12) 4.73e-03 1.1e+02 230s 230s Coefficients: 230s Warning message: 230s (-1) Model failed to converge with max|grad| = 0.00472568 (tol = 1e-06) 230s prodTest 230s 1.144 230s 230s Threshold coefficients: 230s 1|2 2|3 3|4 4|5 5|6 230s -1.4050 -0.4247 -0.1013 0.1508 0.8126 230s > update(m1, scale = ~ 1, method = "model.frame") 230s sureness prod (weights) 230s 1 1 Ref 132 230s 2 2 Ref 161 230s 3 3 Ref 65 230s 4 4 Ref 41 230s 5 5 Ref 121 230s 6 6 Ref 219 230s 7 1 Test 96 230s 8 2 Test 99 230s 9 3 Test 50 230s 10 4 Test 57 230s 11 5 Test 156 230s 12 6 Test 650 230s > update(m1, ~.-prod, scale = ~ 1, 230s + nominal = ~ prod, method = "model.frame") 230s sureness prod (weights) 230s 1 1 Ref 132 230s 2 2 Ref 161 230s 3 3 Ref 65 230s 4 4 Ref 41 230s 5 5 Ref 121 230s 6 6 Ref 219 230s 7 1 Test 96 230s 8 2 Test 99 230s 9 3 Test 50 230s 10 4 Test 57 230s 11 5 Test 156 230s 12 6 Test 650 230s > ## threshold functions 230s > mT1 <- update(m1, threshold = "symmetric") 230s > mT2 <- update(m1, threshold = "equidistant") 230s > anova(m1, mT1, mT2) 230s Likelihood ratio tests of cumulative link models: 230s 230s formula: scale: link: threshold: 230s mT2 sureness ~ prod ~prod logit equidistant 230s mT1 sureness ~ prod ~prod logit symmetric 230s m1 sureness ~ prod ~prod logit flexible 230s 230s no.par AIC logLik LR.stat df Pr(>Chisq) 230s mT2 4 5585.6 -2788.8 230s mT1 5 5407.8 -2698.9 179.806 1 < 2.2e-16 *** 230s m1 7 5389.5 -2687.7 22.271 2 1.459e-05 *** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s > 230s > ## Extend example from polr in package MASS: 230s > ## Fit model from polr example: 230s > if(require(MASS)) { 230s + fm1 <- clm(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) 230s + fm1 230s + summary(fm1) 230s + ## With probit link: 230s + summary(update(fm1, link = "probit")) 230s + ## Allow scale to depend on Cont-variable 230s + summary(fm2 <- update(fm1, scale =~ Cont)) 230s + summary(fm3 <- update(fm1, location =~.-Cont, nominal =~ Cont)) 230s + summary(fm4 <- update(fm2, location =~.-Cont, nominal =~ Cont)) 230s + anova(fm1, fm2, fm3, fm4) 230s + ## which seems to improve the fit 230s + } 230s Loading required package: MASS 230s Likelihood ratio tests of cumulative link models: 230s 230s formula: nominal: scale: link: threshold: 230s fm1 Sat ~ Infl + Type + Cont ~1 ~1 logit flexible 230s fm2 Sat ~ Infl + Type + Cont ~1 ~Cont logit flexible 230s fm3 Sat ~ Infl + Type + Cont ~Cont ~1 logit flexible 230s fm4 Sat ~ Infl + Type + Cont ~Cont ~Cont logit flexible 230s 230s no.par AIC logLik LR.stat df Pr(>Chisq) 230s fm1 8 3495.1 -1739.6 230s fm2 9 3491.5 -1736.7 5.6559 1 0.01740 * 230s fm3 9 3494.7 -1738.4 -3.2113 0 230s fm4 10 3492.5 -1736.2 4.2190 1 0.03997 * 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s > 230s > ################################# 230s > ## Better handling of ill-defined variance-covariance matrix of the 230s > ## parameters in summary methods for clm and clmm objects: 230s > dat26.2 <- data.frame(sureness = as.factor(1:12), 230s + prod = rep(c("One", "Two", "Three"),each=4)) 230s > fm1 <- clm(sureness ~ prod, ~prod, data = dat26.2) 230s Warning message: 230s (1) Hessian is numerically singular: parameters are not uniquely determined 230s In addition: Absolute convergence criterion was met, but relative criterion was not met 230s > fm1 230s formula: sureness ~ prod 230s scale: ~prod 230s data: dat26.2 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 12 -16.64 63.27 33(14) 6.18e-07 2.0e+12 230s 230s Coefficients: 230s prodThree prodTwo 230s 90.72 46.65 230s 230s log-scale coefficients: 230s prodThree prodTwo 230s -0.11719 -0.09167 230s 230s Threshold coefficients: 230s 1|2 2|3 3|4 4|5 5|6 6|7 7|8 230s -1.099e+00 2.045e-16 1.099e+00 2.441e+01 4.564e+01 4.665e+01 4.765e+01 230s 8|9 9|10 10|11 11|12 230s 6.888e+01 8.975e+01 9.072e+01 9.170e+01 230s > summary(fm1) 230s formula: sureness ~ prod 230s scale: ~prod 230s data: dat26.2 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 12 -16.64 63.27 33(14) 6.18e-07 2.0e+12 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s prodThree 90.72 NA NA NA 230s prodTwo 46.65 NA NA NA 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s prodThree -0.11719 NA NA NA 230s prodTwo -0.09167 NA NA NA 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.099e+00 NA NA 230s 2|3 2.045e-16 NA NA 230s 3|4 1.099e+00 NA NA 230s 4|5 2.441e+01 NA NA 230s 5|6 4.564e+01 NA NA 230s 6|7 4.665e+01 NA NA 230s 7|8 4.765e+01 NA NA 230s 8|9 6.888e+01 NA NA 230s 9|10 8.975e+01 NA NA 230s 10|11 9.072e+01 NA NA 230s 11|12 9.170e+01 NA NA 230s > summary(fm1, corr = 1) 230s formula: sureness ~ prod 230s scale: ~prod 230s data: dat26.2 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 12 -16.64 63.27 33(14) 6.18e-07 2.0e+12 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s prodThree 90.72 NA NA NA 230s prodTwo 46.65 NA NA NA 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s prodThree -0.11719 NA NA NA 230s prodTwo -0.09167 NA NA NA 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.099e+00 NA NA 230s 2|3 2.045e-16 NA NA 230s 3|4 1.099e+00 NA NA 230s 4|5 2.441e+01 NA NA 230s 5|6 4.564e+01 NA NA 230s 6|7 4.665e+01 NA NA 230s 7|8 4.765e+01 NA NA 230s 8|9 6.888e+01 NA NA 230s 9|10 8.975e+01 NA NA 230s 10|11 9.072e+01 NA NA 230s 11|12 9.170e+01 NA NA 230s > ## fm1$Hessian 230s > ## sl1 <- slice(fm1, 13) 230s > ## fitted(fm1) 230s > ## convergence(fm1) 230s > ## eigen(fm1$Hessian)$values 230s > ## sqrt(diag(solve(fm1$Hessian))) 230s > ## sqrt(diag(ginv(fm1$Hessian))) 230s > 230s > ################################# 230s > ## Missing values: 230s > ## Bug-report from Jonathan Williams 230s > ## , 18 March 2010 12:42 230s > data(soup, package = "ordinal") 230s Warning message: 230s In summary.clm(fm1, corr = 1) : Correlation matrix is unavailable 230s > soup$SURENESS[10] <- NA 230s > c1a <- clm(ordered(SURENESS)~PROD, data=soup); summary(c1a) 230s formula: ordered(SURENESS) ~ PROD 230s data: soup 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1846 -2688.71 5389.43 6(1) 2.49e-12 1.1e+02 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 1.14251 0.08931 12.79 <2e-16 *** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.40460 0.08174 -17.184 230s 2|3 -0.42733 0.06965 -6.135 230s 3|4 -0.10357 0.06884 -1.505 230s 4|5 0.14862 0.06898 2.155 230s 5|6 0.81063 0.07185 11.282 230s (1 observation deleted due to missingness) 230s > c2a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup) 230s > summary(c2a) 230s formula: ordered(SURENESS) ~ PROD 230s scale: ~PROD 230s data: soup 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1846 -2686.16 5386.32 8(1) 4.81e-07 1.0e+02 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 1.293 0.119 10.87 <2e-16 *** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 0.14711 0.06514 2.258 0.0239 * 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.49041 0.09219 -16.166 230s 2|3 -0.45478 0.07189 -6.326 230s 3|4 -0.10961 0.07000 -1.566 230s 4|5 0.16104 0.07029 2.291 230s 5|6 0.88052 0.07959 11.064 230s (1 observation deleted due to missingness) 230s > c3a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup) 230s > summary(c3a) 230s formula: ordered(SURENESS) ~ 1 230s scale: ~PROD 230s data: soup 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1846 -2769.95 5551.91 10(1) 3.37e-13 6.9e+01 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest -0.15478 0.06683 -2.316 0.0206 * 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.85565 0.08111 -22.878 230s 2|3 -0.98626 0.05260 -18.752 230s 3|4 -0.70743 0.04676 -15.129 230s 4|5 -0.49243 0.04393 -11.208 230s 5|6 0.06504 0.04653 1.398 230s (1 observation deleted due to missingness) 230s > data(soup, package = "ordinal") 230s > soup$PROD[1] <- NA 230s > c1a <- clm(ordered(SURENESS)~PROD, data=soup) 230s > summary(c1a) 230s formula: ordered(SURENESS) ~ PROD 230s data: soup 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1846 -2689.15 5390.30 6(1) 3.37e-12 1.1e+02 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 1.14774 0.08932 12.85 <2e-16 *** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.40278 0.08171 -17.167 230s 2|3 -0.42216 0.06962 -6.064 230s 3|4 -0.09849 0.06882 -1.431 230s 4|5 0.15373 0.06898 2.229 230s 5|6 0.81613 0.07188 11.353 230s (1 observation deleted due to missingness) 230s > c2a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup) 230s > summary(c2a) 230s formula: ordered(SURENESS) ~ PROD 230s scale: ~PROD 230s data: soup 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1846 -2686.51 5387.03 8(1) 5.41e-07 1.0e+02 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 1.3009 0.1192 10.91 <2e-16 *** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 0.1494 0.0651 2.295 0.0217 * 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.48982 0.09217 -16.163 230s 2|3 -0.44981 0.07186 -6.260 230s 3|4 -0.10441 0.07000 -1.492 230s 4|5 0.16655 0.07031 2.369 230s 5|6 0.88740 0.07969 11.136 230s (1 observation deleted due to missingness) 230s > c3a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup) 230s > summary(c3a) 230s formula: ordered(SURENESS) ~ 1 230s scale: ~PROD 230s data: soup 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1846 -2771.22 5554.43 10(1) 7.51e-13 6.9e+01 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest -0.15330 0.06689 -2.292 0.0219 * 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.85700 0.08108 -22.903 230s 2|3 -0.98437 0.05252 -18.742 230s 3|4 -0.70562 0.04673 -15.100 230s 4|5 -0.49061 0.04395 -11.163 230s 5|6 0.06723 0.04667 1.441 230s (1 observation deleted due to missingness) 230s > soup$SURENESS[10] <- NA 230s > c1a <- clm(ordered(SURENESS)~PROD, data=soup) 230s > summary(c1a) 230s formula: ordered(SURENESS) ~ PROD 230s data: soup 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1845 -2687.53 5387.07 6(1) 2.94e-12 1.1e+02 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 1.14581 0.08934 12.82 <2e-16 *** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.40237 0.08175 -17.155 230s 2|3 -0.42475 0.06968 -6.096 230s 3|4 -0.10080 0.06887 -1.464 230s 4|5 0.15158 0.06902 2.196 230s 5|6 0.81421 0.07191 11.322 230s (2 observations deleted due to missingness) 230s > c2a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup) 230s > summary(c2a) 230s formula: ordered(SURENESS) ~ PROD 230s scale: ~PROD 230s data: soup 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1845 -2684.93 5383.86 8(1) 5.12e-07 1.0e+02 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 1.2979 0.1192 10.89 <2e-16 *** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 0.14853 0.06514 2.28 0.0226 * 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.48896 0.09222 -16.147 230s 2|3 -0.45241 0.07192 -6.290 230s 3|4 -0.10681 0.07004 -1.525 230s 4|5 0.16422 0.07034 2.335 230s 5|6 0.88500 0.07970 11.104 230s (2 observations deleted due to missingness) 230s > c3a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup) 230s > summary(c3a) 230s formula: ordered(SURENESS) ~ 1 230s scale: ~PROD 230s data: soup 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1845 -2769.23 5550.46 10(1) 9.65e-13 6.9e+01 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest -0.15410 0.06688 -2.304 0.0212 * 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.85563 0.08111 -22.877 230s 2|3 -0.98586 0.05259 -18.745 230s 3|4 -0.70689 0.04676 -15.116 230s 4|5 -0.49176 0.04395 -11.188 230s 5|6 0.06616 0.04661 1.419 230s (2 observations deleted due to missingness) 230s > 230s > ## na.actions: 230s > c4a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 230s + na.action=na.omit) 230s > summary(c4a) 230s formula: ordered(SURENESS) ~ PROD 230s scale: ~PROD 230s data: soup 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1845 -2684.93 5383.86 8(1) 5.12e-07 1.0e+02 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 1.2979 0.1192 10.89 <2e-16 *** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 0.14853 0.06514 2.28 0.0226 * 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.48896 0.09222 -16.147 230s 2|3 -0.45241 0.07192 -6.290 230s 3|4 -0.10681 0.07004 -1.525 230s 4|5 0.16422 0.07034 2.335 230s 5|6 0.88500 0.07970 11.104 230s (2 observations deleted due to missingness) 230s > 230s > tC1 <- try(clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 230s + na.action=na.fail), silent = TRUE) 230s > stopifnot(inherits(tC1, "try-error")) 230s > 230s > c4a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 230s + na.action=na.exclude) 230s > summary(c4a) 230s formula: ordered(SURENESS) ~ PROD 230s scale: ~PROD 230s data: soup 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1845 -2684.93 5383.86 8(1) 5.12e-07 1.0e+02 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 1.2979 0.1192 10.89 <2e-16 *** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 0.14853 0.06514 2.28 0.0226 * 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.48896 0.09222 -16.147 230s 2|3 -0.45241 0.07192 -6.290 230s 3|4 -0.10681 0.07004 -1.525 230s 4|5 0.16422 0.07034 2.335 230s 5|6 0.88500 0.07970 11.104 230s (2 observations deleted due to missingness) 230s > 230s > tC2 <- try(clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 230s + na.action=na.pass), silent = TRUE) 230s > stopifnot(inherits(tC2, "try-error")) 230s > 230s > ## Subset: 230s > data(soup, package="ordinal") 230s > c4a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 230s + subset = 1:100) 230s > c4a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup, 230s + subset = 1:100) 230s > c4a <- clm(ordered(SURENESS)~PROD, data=soup, 230s + subset = 1:100) 230s > c4a <- clm(ordered(SURENESS)~1, data=soup, 230s + subset = 1:100) 230s > 230s > ## Offset: 230s > data(soup, package = "ordinal") 230s > set.seed(290980) 230s > offs <- runif(nrow(soup)) 230s > c4a <- clm(ordered(SURENESS)~PROD + offset(offs), 230s + scale = ~PROD, data=soup, subset = 1:100) 230s > summary(c4a) 230s formula: ordered(SURENESS) ~ PROD + offset(offs) 230s scale: ~PROD 230s data: soup 230s subset: 1:100 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 100 -139.58 293.17 9(2) 1.41e-07 2.0e+02 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 2.4410 0.7091 3.443 0.000576 *** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 0.5105 0.2671 1.911 0.056 . 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.0470 0.4019 -2.605 230s 2|3 0.4213 0.3106 1.356 230s 3|4 0.5488 0.3106 1.767 230s 4|5 0.9217 0.3162 2.915 230s 5|6 2.0775 0.4062 5.114 230s > 230s > c4a <- clm(ordered(SURENESS)~PROD + offset(offs), 230s + scale = ~PROD + offset(offs), data=soup, subset = 1:100) 230s > summary(c4a) 230s formula: ordered(SURENESS) ~ PROD + offset(offs) 230s scale: ~PROD + offset(offs) 230s data: soup 230s subset: 1:100 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 100 -143.12 300.24 9(2) 5.32e-09 1.9e+02 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 3.344 1.020 3.277 0.00105 ** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 0.4412 0.2753 1.603 0.109 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -2.09797 0.62565 -3.353 230s 2|3 0.06671 0.46874 0.142 230s 3|4 0.25559 0.46525 0.549 230s 4|5 0.80178 0.46743 1.715 230s 5|6 2.46041 0.59193 4.157 230s > 230s > off2 <- offs 230s > c4a <- clm(ordered(SURENESS)~PROD + offset(offs), 230s + scale = ~PROD + offset(off2), data=soup, subset = 1:100) 230s > summary(c4a) 230s formula: ordered(SURENESS) ~ PROD + offset(offs) 230s scale: ~PROD + offset(off2) 230s data: soup 230s subset: 1:100 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 100 -143.12 300.24 9(2) 5.32e-09 1.9e+02 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 3.344 1.020 3.277 0.00105 ** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 0.4412 0.2753 1.603 0.109 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -2.09797 0.62565 -3.353 230s 2|3 0.06671 0.46874 0.142 230s 3|4 0.25559 0.46525 0.549 230s 4|5 0.80178 0.46743 1.715 230s 5|6 2.46041 0.59193 4.157 230s > 230s > c4a <- clm(ordered(SURENESS)~PROD, 230s + scale = ~PROD + offset(offs), data=soup, subset = 1:100) 230s > summary(c4a) 230s formula: ordered(SURENESS) ~ PROD 230s scale: ~PROD + offset(offs) 230s data: soup 230s subset: 1:100 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 100 -142.15 298.31 10(2) 7.69e-10 1.8e+02 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 3.283 1.016 3.231 0.00123 ** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 0.4263 0.2801 1.522 0.128 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -2.4698 0.6308 -3.915 230s 2|3 -0.2916 0.4668 -0.625 230s 3|4 -0.1005 0.4628 -0.217 230s 4|5 0.4484 0.4638 0.967 230s 5|6 2.1036 0.5864 3.587 230s > 230s > ## data as matrix: 230s > dat26M <- as.matrix(dat26) 230s > m1 <- clm(sureness ~ prod, scale = ~prod, data = dat26, 230s + weights = wghts, link = "logit") 230s > summary(m1) 230s formula: sureness ~ prod 230s scale: ~prod 230s data: dat26 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s prodTest 1.296 0.119 10.89 <2e-16 *** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s prodTest 0.1480 0.0651 2.273 0.023 * 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.49126 0.09215 -16.183 230s 2|3 -0.45218 0.07182 -6.296 230s 3|4 -0.10721 0.06995 -1.533 230s 4|5 0.16337 0.07025 2.325 230s 5|6 0.88291 0.07957 11.096 230s > 230s > ## data in enclosing environment: 230s > attach(soup) 230s > m1 <- clm(SURENESS ~ PROD, scale = ~PROD) 230s > summary(m1) 230s formula: SURENESS ~ PROD 230s scale: ~PROD 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 1.296 0.119 10.89 <2e-16 *** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s PRODTest 0.1480 0.0651 2.273 0.023 * 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -1.49126 0.09215 -16.183 230s 2|3 -0.45218 0.07182 -6.296 230s 3|4 -0.10721 0.06995 -1.533 230s 4|5 0.16337 0.07025 2.325 230s 5|6 0.88291 0.07957 11.096 230s > detach(soup) 230s > 230s > ################################################################## 230s > ### Parameter estimates were not correct with large scale effects due 230s > ### to end cut-points being \pm 100. This is not enough for 230s > ### location-scale model, but seems to be for location only models. 230s > ### Bug report from Ioannis Kosmidis : 230s > 230s > ### A 2x3 contigency table that will give a large estimated value of 230s > ### zeta 230s > x <- rep(0:1, each = 3) 230s > response <- factor(rep(c(1, 2, 3), times = 2)) 230s > freq <- c(1, 11, 1, 13, 1, 14) 230s > totals <- rep(tapply(freq, x, sum), each = 3) 230s > Dat <- data.frame(response, x, freq) 230s > 230s > ### Fitting a cumulative link model with dispersion effects 230s > modClm <- clm(response ~ x, scale = ~ x, weights = freq, data = Dat, 230s + control = clm.control(grtol = 1e-10, convTol = 1e-10)) 230s > summary(modClm) 230s formula: response ~ x 230s scale: ~x 230s data: Dat 230s 230s link threshold nobs logLik AIC niter max.grad cond.H 230s logit flexible 41 -29.98 67.96 10(3) 9.23e-10 2.4e+02 230s 230s Coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s x 2.485 13.168 0.189 0.85 230s 230s log-scale coefficients: 230s Estimate Std. Error z value Pr(>|z|) 230s x 3.548 1.023 3.468 0.000524 *** 230s --- 230s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 230s 230s Threshold coefficients: 230s Estimate Std. Error z value 230s 1|2 -2.485 1.041 -2.387 230s 2|3 2.485 1.041 2.387 230s > ### The maximized log-likelihood for this saturated model should be 230s > sum(freq*log(freq/totals)) 230s [1] -29.97808 230s > # > sum(freq*log(freq/totals)) 230s > # [1] -29.97808 230s > ### but apparently clm fails to maximixe the log-likelihood 230s > modClm$logLik 230s [1] -29.97808 230s > # > modClm$logLik 230s > # [1] -30.44452 230s > stopifnot(isTRUE(all.equal(sum(freq*log(freq/totals)), modClm$logLik))) 230s > 230s > ### The estimates reported by clm are 230s > coef(modClm) 230s 1|2 2|3 x x 230s -2.484907 2.484907 2.484907 3.547588 230s > coef.res <- structure(c(-2.48490664104217, 2.48490665578163, 230s + 2.48490659188594, 230s + 3.54758796387530), .Names = c("1|2", "2|3", 230s + "x", "x")) 230s > stopifnot(isTRUE(all.equal(coef.res, coef(modClm)))) 230s > # > modClm$coefficients 230s > # 1|2 2|3 x x 230s > # -2.297718 2.297038 1.239023 2.834285 230s > ### while they should be (from my own software) 230s > # 1|2 2|3 x disp.x 230s > #-2.484907 2.484907 2.484907 3.547588 230s > convergence(modClm) 230s nobs logLik niter max.grad cond.H logLik.Error 230s 41 -29.98 10(3) 9.23e-10 2.4e+02 <1e-10 230s 230s Estimate Std.Err Gradient Error Cor.Dec Sig.Dig 230s 1|2 -2.485 1.041 3.50e-10 5.32e-10 8 9 230s 2|3 2.485 1.041 -1.60e-10 -5.32e-10 8 9 230s x 2.485 13.168 -1.90e-10 -3.54e-08 7 8 230s x 3.548 1.023 -9.23e-10 -1.55e-09 8 9 230s 230s Eigen values of Hessian: 230s 1.374792 0.855786 0.785151 0.005766 230s 230s Convergence message from clm: 230s (0) successful convergence 230s In addition: Absolute and relative convergence criteria were met 230s 230s > 230s > ################################################################## 230s > 231s autopkgtest [02:32:09]: test run-unit-test: -----------------------] 234s run-unit-test PASS 234s autopkgtest [02:32:12]: test run-unit-test: - - - - - - - - - - results - - - - - - - - - - 238s autopkgtest [02:32:16]: test pkg-r-autopkgtest: preparing testbed 260s autopkgtest [02:32:38]: testbed dpkg architecture: armhf 262s autopkgtest [02:32:40]: testbed apt version: 3.0.0 266s autopkgtest [02:32:44]: @@@@@@@@@@@@@@@@@@@@ test bed setup 268s autopkgtest [02:32:46]: testbed release detected to be: questing 275s autopkgtest [02:32:53]: updating testbed package index (apt update) 277s Get:1 http://ftpmaster.internal/ubuntu questing-proposed InRelease [110 kB] 277s Get:2 http://ftpmaster.internal/ubuntu questing InRelease [110 kB] 277s Get:3 http://ftpmaster.internal/ubuntu questing-updates InRelease [110 kB] 277s Get:4 http://ftpmaster.internal/ubuntu questing-security InRelease [110 kB] 277s Get:5 http://ftpmaster.internal/ubuntu questing-proposed/multiverse Sources [43.3 kB] 277s Get:6 http://ftpmaster.internal/ubuntu questing-proposed/main Sources [168 kB] 277s Get:7 http://ftpmaster.internal/ubuntu questing-proposed/universe Sources [1920 kB] 277s Get:8 http://ftpmaster.internal/ubuntu questing-proposed/main armhf Packages [204 kB] 277s Get:9 http://ftpmaster.internal/ubuntu questing-proposed/universe armhf Packages [1378 kB] 277s Get:10 http://ftpmaster.internal/ubuntu questing-proposed/multiverse armhf Packages [12.5 kB] 277s Get:11 http://ftpmaster.internal/ubuntu questing/main Sources [1395 kB] 277s Get:12 http://ftpmaster.internal/ubuntu questing/universe Sources [21.1 MB] 278s Get:13 http://ftpmaster.internal/ubuntu questing/multiverse Sources [299 kB] 278s Get:14 http://ftpmaster.internal/ubuntu questing/main armhf Packages [1358 kB] 278s Get:15 http://ftpmaster.internal/ubuntu questing/universe armhf Packages [14.9 MB] 278s Get:16 http://ftpmaster.internal/ubuntu questing/multiverse armhf Packages [173 kB] 282s Fetched 43.3 MB in 5s (8474 kB/s) 283s Reading package lists... 289s autopkgtest [02:33:07]: upgrading testbed (apt dist-upgrade and autopurge) 290s Reading package lists... 291s Building dependency tree... 291s Reading state information... 291s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 291s Starting 2 pkgProblemResolver with broken count: 0 291s Done 292s Entering ResolveByKeep 292s 293s Calculating upgrade... 293s The following packages will be upgraded: 293s base-files distro-info-data dpkg dpkg-dev ed fwupd htop libdpkg-perl 293s libftdi1-2 libfwupd3 libnpth0t64 libnvme1t64 libsensors-config libsensors5 293s liburcu8t64 motd-news-config nano ubuntu-pro-client ubuntu-pro-client-l10n 293s usb.ids 293s 20 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 293s Need to get 5431 kB of archives. 293s After this operation, 3722 kB disk space will be freed. 293s Get:1 http://ftpmaster.internal/ubuntu questing/main armhf motd-news-config all 13.7ubuntu1 [5260 B] 293s Get:2 http://ftpmaster.internal/ubuntu questing/main armhf base-files armhf 13.7ubuntu1 [75.4 kB] 294s Get:3 http://ftpmaster.internal/ubuntu questing/main armhf dpkg armhf 1.22.18ubuntu3 [1254 kB] 294s Get:4 http://ftpmaster.internal/ubuntu questing/main armhf libnpth0t64 armhf 1.8-3 [7716 B] 294s Get:5 http://ftpmaster.internal/ubuntu questing/main armhf distro-info-data all 0.64 [6664 B] 294s Get:6 http://ftpmaster.internal/ubuntu questing/main armhf ubuntu-pro-client-l10n armhf 35.1ubuntu0 [19.7 kB] 294s Get:7 http://ftpmaster.internal/ubuntu questing/main armhf ubuntu-pro-client armhf 35.1ubuntu0 [258 kB] 294s Get:8 http://ftpmaster.internal/ubuntu questing/main armhf ed armhf 1.21.1-1 [53.0 kB] 294s Get:9 http://ftpmaster.internal/ubuntu questing/main armhf libsensors-config all 1:3.6.2-2 [6756 B] 294s Get:10 http://ftpmaster.internal/ubuntu questing/main armhf libsensors5 armhf 1:3.6.2-2 [26.8 kB] 294s Get:11 http://ftpmaster.internal/ubuntu questing/main armhf liburcu8t64 armhf 0.15.2-2 [57.3 kB] 294s Get:12 http://ftpmaster.internal/ubuntu questing/main armhf nano armhf 8.4-1 [278 kB] 294s Get:13 http://ftpmaster.internal/ubuntu questing/main armhf usb.ids all 2025.04.01-1 [223 kB] 294s Get:14 http://ftpmaster.internal/ubuntu questing/main armhf dpkg-dev all 1.22.18ubuntu3 [1089 kB] 294s Get:15 http://ftpmaster.internal/ubuntu questing/main armhf libdpkg-perl all 1.22.18ubuntu3 [281 kB] 294s Get:16 http://ftpmaster.internal/ubuntu questing/main armhf fwupd armhf 2.0.8-3 [1414 kB] 294s Get:17 http://ftpmaster.internal/ubuntu questing/main armhf libfwupd3 armhf 2.0.8-3 [126 kB] 294s Get:18 http://ftpmaster.internal/ubuntu questing/main armhf htop armhf 3.4.1-4 [147 kB] 294s Get:19 http://ftpmaster.internal/ubuntu questing/main armhf libftdi1-2 armhf 1.5-10 [27.8 kB] 294s Get:20 http://ftpmaster.internal/ubuntu questing/main armhf libnvme1t64 armhf 1.13-2 [74.3 kB] 294s Fetched 5431 kB in 1s (6870 kB/s) 295s (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 ... 63953 files and directories currently installed.) 295s Preparing to unpack .../motd-news-config_13.7ubuntu1_all.deb ... 295s Unpacking motd-news-config (13.7ubuntu1) over (13.6ubuntu2) ... 295s Preparing to unpack .../base-files_13.7ubuntu1_armhf.deb ... 295s Unpacking base-files (13.7ubuntu1) over (13.6ubuntu2) ... 295s Setting up base-files (13.7ubuntu1) ... 295s Installing new version of config file /etc/issue ... 295s Installing new version of config file /etc/issue.net ... 295s Installing new version of config file /etc/lsb-release ... 295s motd-news.service is a disabled or a static unit not running, not starting it. 295s (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 ... 63953 files and directories currently installed.) 295s Preparing to unpack .../dpkg_1.22.18ubuntu3_armhf.deb ... 295s Unpacking dpkg (1.22.18ubuntu3) over (1.22.18ubuntu2) ... 296s Setting up dpkg (1.22.18ubuntu3) ... 296s (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 ... 63953 files and directories currently installed.) 296s Preparing to unpack .../libnpth0t64_1.8-3_armhf.deb ... 296s Unpacking libnpth0t64:armhf (1.8-3) over (1.8-2) ... 296s Setting up libnpth0t64:armhf (1.8-3) ... 296s (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 ... 63953 files and directories currently installed.) 296s Preparing to unpack .../00-distro-info-data_0.64_all.deb ... 296s Unpacking distro-info-data (0.64) over (0.63) ... 296s Preparing to unpack .../01-ubuntu-pro-client-l10n_35.1ubuntu0_armhf.deb ... 296s Unpacking ubuntu-pro-client-l10n (35.1ubuntu0) over (35) ... 296s Preparing to unpack .../02-ubuntu-pro-client_35.1ubuntu0_armhf.deb ... 296s Unpacking ubuntu-pro-client (35.1ubuntu0) over (35) ... 296s Preparing to unpack .../03-ed_1.21.1-1_armhf.deb ... 296s Unpacking ed (1.21.1-1) over (1.21-1) ... 296s Preparing to unpack .../04-libsensors-config_1%3a3.6.2-2_all.deb ... 296s Unpacking libsensors-config (1:3.6.2-2) over (1:3.6.0-10) ... 296s Preparing to unpack .../05-libsensors5_1%3a3.6.2-2_armhf.deb ... 296s Unpacking libsensors5:armhf (1:3.6.2-2) over (1:3.6.0-10) ... 296s Preparing to unpack .../06-liburcu8t64_0.15.2-2_armhf.deb ... 296s Unpacking liburcu8t64:armhf (0.15.2-2) over (0.15.1-1) ... 296s Preparing to unpack .../07-nano_8.4-1_armhf.deb ... 296s Unpacking nano (8.4-1) over (8.3-1) ... 297s Preparing to unpack .../08-usb.ids_2025.04.01-1_all.deb ... 297s Unpacking usb.ids (2025.04.01-1) over (2025.01.14-1) ... 297s Preparing to unpack .../09-dpkg-dev_1.22.18ubuntu3_all.deb ... 297s Unpacking dpkg-dev (1.22.18ubuntu3) over (1.22.18ubuntu2) ... 297s Preparing to unpack .../10-libdpkg-perl_1.22.18ubuntu3_all.deb ... 297s Unpacking libdpkg-perl (1.22.18ubuntu3) over (1.22.18ubuntu2) ... 297s Preparing to unpack .../11-fwupd_2.0.8-3_armhf.deb ... 297s Unpacking fwupd (2.0.8-3) over (2.0.7-1) ... 297s dpkg: warning: unable to delete old directory '/etc/grub.d': Directory not empty 297s Preparing to unpack .../12-libfwupd3_2.0.8-3_armhf.deb ... 297s Unpacking libfwupd3:armhf (2.0.8-3) over (2.0.7-1) ... 297s Preparing to unpack .../13-htop_3.4.1-4_armhf.deb ... 297s Unpacking htop (3.4.1-4) over (3.4.0-2) ... 297s Preparing to unpack .../14-libftdi1-2_1.5-10_armhf.deb ... 297s Unpacking libftdi1-2:armhf (1.5-10) over (1.5-8build1) ... 297s Preparing to unpack .../15-libnvme1t64_1.13-2_armhf.deb ... 297s Unpacking libnvme1t64 (1.13-2) over (1.11.1-2) ... 297s Setting up motd-news-config (13.7ubuntu1) ... 297s Setting up liburcu8t64:armhf (0.15.2-2) ... 297s Setting up distro-info-data (0.64) ... 297s Setting up htop (3.4.1-4) ... 297s Setting up libsensors-config (1:3.6.2-2) ... 297s Installing new version of config file /etc/sensors3.conf ... 297s Setting up libfwupd3:armhf (2.0.8-3) ... 297s Setting up libftdi1-2:armhf (1.5-10) ... 297s Setting up libnvme1t64 (1.13-2) ... 297s Setting up ed (1.21.1-1) ... 297s Setting up usb.ids (2025.04.01-1) ... 297s Setting up libsensors5:armhf (1:3.6.2-2) ... 297s Setting up libdpkg-perl (1.22.18ubuntu3) ... 297s Setting up nano (8.4-1) ... 297s Installing new version of config file /etc/nanorc ... 297s Setting up ubuntu-pro-client (35.1ubuntu0) ... 297s apparmor_parser: Unable to replace "ubuntu_pro_apt_news". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 297s 298s apparmor_parser: Unable to replace "apt_methods". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 298s 298s apparmor_parser: Unable to replace "ubuntu_pro_esm_cache". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 298s 299s Setting up fwupd (2.0.8-3) ... 299s fwupd-refresh.service is a disabled or a static unit not running, not starting it. 299s fwupd.service is a disabled or a static unit not running, not starting it. 299s Setting up ubuntu-pro-client-l10n (35.1ubuntu0) ... 299s Setting up dpkg-dev (1.22.18ubuntu3) ... 299s Processing triggers for dbus (1.16.2-2ubuntu1) ... 299s Processing triggers for install-info (7.1.1-1) ... 300s Processing triggers for libc-bin (2.41-6ubuntu1) ... 300s Processing triggers for man-db (2.13.0-1) ... 302s Processing triggers for plymouth-theme-ubuntu-text (24.004.60-2ubuntu7) ... 302s Processing triggers for initramfs-tools (0.147ubuntu1) ... 303s Reading package lists... 303s Building dependency tree... 303s Reading state information... 304s Starting pkgProblemResolver with broken count: 0 304s Starting 2 pkgProblemResolver with broken count: 0 304s Done 305s Solving dependencies... 305s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 307s autopkgtest [02:33:25]: rebooting testbed after setup commands that affected boot 370s Reading package lists... 370s Building dependency tree... 370s Reading state information... 371s Starting pkgProblemResolver with broken count: 0 371s Starting 2 pkgProblemResolver with broken count: 0 371s Done 372s The following NEW packages will be installed: 372s build-essential cpp cpp-14 cpp-14-arm-linux-gnueabihf 372s cpp-arm-linux-gnueabihf dctrl-tools fontconfig fontconfig-config 372s fonts-dejavu-core fonts-dejavu-mono g++ g++-14 g++-14-arm-linux-gnueabihf 372s g++-arm-linux-gnueabihf gcc gcc-14 gcc-14-arm-linux-gnueabihf 372s gcc-arm-linux-gnueabihf gfortran gfortran-14 gfortran-14-arm-linux-gnueabihf 372s gfortran-arm-linux-gnueabihf icu-devtools libasan8 libblas-dev libblas3 372s libbz2-dev libc-dev-bin libc6-dev libcairo2 libcc1-0 libcrypt-dev libdatrie1 372s libdeflate-dev libdeflate0 libfontconfig1 libfreetype6 libgcc-14-dev 372s libgfortran-14-dev libgfortran5 libgomp1 libgraphite2-3 libharfbuzz0b 372s libice6 libicu-dev libisl23 libjbig0 libjpeg-dev libjpeg-turbo8 372s libjpeg-turbo8-dev libjpeg8 libjpeg8-dev liblapack-dev liblapack3 liblerc4 372s liblzma-dev libmpc3 libncurses-dev libnlopt0 libpango-1.0-0 372s libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils libpaper2 libpcre2-16-0 372s libpcre2-32-0 libpcre2-dev libpcre2-posix3 libpixman-1-0 libpkgconf3 372s libpng-dev libreadline-dev libsharpyuv0 libsm6 libstdc++-14-dev libtcl8.6 372s libthai-data libthai0 libtiff6 libtirpc-dev libtk8.6 libubsan1 libwebp7 372s libxcb-render0 libxcb-shm0 libxft2 libxrender1 libxss1 libxt6t64 372s linux-libc-dev littler pkg-r-autopkgtest pkgconf pkgconf-bin r-base-core 372s r-base-dev r-cran-boot r-cran-brio r-cran-callr r-cran-cli r-cran-crayon 372s r-cran-desc r-cran-diffobj r-cran-digest r-cran-evaluate r-cran-fs 372s r-cran-glue r-cran-jsonlite r-cran-lattice r-cran-lifecycle r-cran-littler 372s r-cran-lme4 r-cran-magrittr r-cran-mass r-cran-matrix r-cran-minqa 372s r-cran-nlme r-cran-nloptr r-cran-nnet r-cran-numderiv r-cran-ordinal 372s r-cran-pkgbuild r-cran-pkgkitten r-cran-pkgload r-cran-praise 372s r-cran-processx r-cran-ps r-cran-r6 r-cran-rbibutils r-cran-rcpp 372s r-cran-rcppeigen r-cran-rdpack r-cran-reformulas r-cran-rlang 372s r-cran-rprojroot r-cran-statmod r-cran-testthat r-cran-ucminf r-cran-waldo 372s r-cran-withr r-cran-xtable rpcsvc-proto unzip x11-common xdg-utils zip 372s zlib1g-dev 372s 0 upgraded, 147 newly installed, 0 to remove and 0 not upgraded. 372s Need to get 148 MB of archives. 372s After this operation, 377 MB of additional disk space will be used. 372s Get:1 http://ftpmaster.internal/ubuntu questing/main armhf libc-dev-bin armhf 2.41-6ubuntu1 [21.7 kB] 372s Get:2 http://ftpmaster.internal/ubuntu questing/main armhf linux-libc-dev armhf 6.14.0-15.15 [1687 kB] 373s Get:3 http://ftpmaster.internal/ubuntu questing/main armhf libcrypt-dev armhf 1:4.4.38-1 [120 kB] 373s Get:4 http://ftpmaster.internal/ubuntu questing/main armhf rpcsvc-proto armhf 1.4.2-0ubuntu7 [62.2 kB] 373s Get:5 http://ftpmaster.internal/ubuntu questing/main armhf libc6-dev armhf 2.41-6ubuntu1 [1396 kB] 373s Get:6 http://ftpmaster.internal/ubuntu questing/main armhf libisl23 armhf 0.27-1 [546 kB] 373s Get:7 http://ftpmaster.internal/ubuntu questing/main armhf libmpc3 armhf 1.3.1-1build2 [47.1 kB] 373s Get:8 http://ftpmaster.internal/ubuntu questing/main armhf cpp-14-arm-linux-gnueabihf armhf 14.2.0-19ubuntu2 [9221 kB] 373s Get:9 http://ftpmaster.internal/ubuntu questing/main armhf cpp-14 armhf 14.2.0-19ubuntu2 [1032 B] 373s Get:10 http://ftpmaster.internal/ubuntu questing/main armhf cpp-arm-linux-gnueabihf armhf 4:14.2.0-1ubuntu1 [5578 B] 373s Get:11 http://ftpmaster.internal/ubuntu questing/main armhf cpp armhf 4:14.2.0-1ubuntu1 [22.4 kB] 373s Get:12 http://ftpmaster.internal/ubuntu questing/main armhf libcc1-0 armhf 15-20250404-0ubuntu1 [43.3 kB] 373s Get:13 http://ftpmaster.internal/ubuntu questing/main armhf libgomp1 armhf 15-20250404-0ubuntu1 [128 kB] 373s Get:14 http://ftpmaster.internal/ubuntu questing/main armhf libasan8 armhf 15-20250404-0ubuntu1 [2951 kB] 373s Get:15 http://ftpmaster.internal/ubuntu questing/main armhf libubsan1 armhf 15-20250404-0ubuntu1 [1188 kB] 373s Get:16 http://ftpmaster.internal/ubuntu questing/main armhf libgcc-14-dev armhf 14.2.0-19ubuntu2 [897 kB] 373s Get:17 http://ftpmaster.internal/ubuntu questing/main armhf gcc-14-arm-linux-gnueabihf armhf 14.2.0-19ubuntu2 [18.0 MB] 374s Get:18 http://ftpmaster.internal/ubuntu questing/main armhf gcc-14 armhf 14.2.0-19ubuntu2 [510 kB] 374s Get:19 http://ftpmaster.internal/ubuntu questing/main armhf gcc-arm-linux-gnueabihf armhf 4:14.2.0-1ubuntu1 [1218 B] 374s Get:20 http://ftpmaster.internal/ubuntu questing/main armhf gcc armhf 4:14.2.0-1ubuntu1 [5004 B] 374s Get:21 http://ftpmaster.internal/ubuntu questing/main armhf libstdc++-14-dev armhf 14.2.0-19ubuntu2 [2576 kB] 374s Get:22 http://ftpmaster.internal/ubuntu questing/main armhf g++-14-arm-linux-gnueabihf armhf 14.2.0-19ubuntu2 [10.5 MB] 374s Get:23 http://ftpmaster.internal/ubuntu questing/main armhf g++-14 armhf 14.2.0-19ubuntu2 [23.0 kB] 374s Get:24 http://ftpmaster.internal/ubuntu questing/main armhf g++-arm-linux-gnueabihf armhf 4:14.2.0-1ubuntu1 [966 B] 374s Get:25 http://ftpmaster.internal/ubuntu questing/main armhf g++ armhf 4:14.2.0-1ubuntu1 [1084 B] 374s Get:26 http://ftpmaster.internal/ubuntu questing/main armhf build-essential armhf 12.12ubuntu1 [5088 B] 374s Get:27 http://ftpmaster.internal/ubuntu questing/main armhf dctrl-tools armhf 2.24-3build3 [94.7 kB] 374s Get:28 http://ftpmaster.internal/ubuntu questing/main armhf libfreetype6 armhf 2.13.3+dfsg-1 [330 kB] 374s Get:29 http://ftpmaster.internal/ubuntu questing/main armhf fonts-dejavu-mono all 2.37-8 [502 kB] 374s Get:30 http://ftpmaster.internal/ubuntu questing/main armhf fonts-dejavu-core all 2.37-8 [835 kB] 374s Get:31 http://ftpmaster.internal/ubuntu questing/main armhf fontconfig-config armhf 2.15.0-2.2ubuntu1 [37.9 kB] 374s Get:32 http://ftpmaster.internal/ubuntu questing/main armhf libfontconfig1 armhf 2.15.0-2.2ubuntu1 [114 kB] 374s Get:33 http://ftpmaster.internal/ubuntu questing/main armhf fontconfig armhf 2.15.0-2.2ubuntu1 [190 kB] 374s Get:34 http://ftpmaster.internal/ubuntu questing/main armhf libgfortran5 armhf 15-20250404-0ubuntu1 [331 kB] 374s Get:35 http://ftpmaster.internal/ubuntu questing/main armhf libgfortran-14-dev armhf 14.2.0-19ubuntu2 [370 kB] 374s Get:36 http://ftpmaster.internal/ubuntu questing/main armhf gfortran-14-arm-linux-gnueabihf armhf 14.2.0-19ubuntu2 [9763 kB] 375s Get:37 http://ftpmaster.internal/ubuntu questing/main armhf gfortran-14 armhf 14.2.0-19ubuntu2 [14.2 kB] 375s Get:38 http://ftpmaster.internal/ubuntu questing/main armhf gfortran-arm-linux-gnueabihf armhf 4:14.2.0-1ubuntu1 [1026 B] 375s Get:39 http://ftpmaster.internal/ubuntu questing/main armhf gfortran armhf 4:14.2.0-1ubuntu1 [1166 B] 375s Get:40 http://ftpmaster.internal/ubuntu questing/main armhf icu-devtools armhf 76.1-1ubuntu2 [206 kB] 375s Get:41 http://ftpmaster.internal/ubuntu questing/main armhf libblas3 armhf 3.12.1-2 [132 kB] 375s Get:42 http://ftpmaster.internal/ubuntu questing/main armhf libblas-dev armhf 3.12.1-2 [141 kB] 375s Get:43 http://ftpmaster.internal/ubuntu questing/main armhf libbz2-dev armhf 1.0.8-6 [30.9 kB] 375s Get:44 http://ftpmaster.internal/ubuntu questing/main armhf libpixman-1-0 armhf 0.44.0-3 [183 kB] 375s Get:45 http://ftpmaster.internal/ubuntu questing/main armhf libxcb-render0 armhf 1.17.0-2 [15.3 kB] 375s Get:46 http://ftpmaster.internal/ubuntu questing/main armhf libxcb-shm0 armhf 1.17.0-2 [5774 B] 375s Get:47 http://ftpmaster.internal/ubuntu questing/main armhf libxrender1 armhf 1:0.9.10-1.1build1 [16.0 kB] 375s Get:48 http://ftpmaster.internal/ubuntu questing/main armhf libcairo2 armhf 1.18.4-1 [483 kB] 375s Get:49 http://ftpmaster.internal/ubuntu questing/main armhf libdatrie1 armhf 0.2.13-3build1 [15.7 kB] 375s Get:50 http://ftpmaster.internal/ubuntu questing/main armhf libdeflate0 armhf 1.23-1 [38.5 kB] 375s Get:51 http://ftpmaster.internal/ubuntu questing/main armhf libdeflate-dev armhf 1.23-1 [45.0 kB] 375s Get:52 http://ftpmaster.internal/ubuntu questing/main armhf libgraphite2-3 armhf 1.3.14-2ubuntu1 [64.8 kB] 375s Get:53 http://ftpmaster.internal/ubuntu questing/main armhf libharfbuzz0b armhf 10.2.0-1 [464 kB] 375s Get:54 http://ftpmaster.internal/ubuntu questing/main armhf x11-common all 1:7.7+23ubuntu4 [21.8 kB] 375s Get:55 http://ftpmaster.internal/ubuntu questing/main armhf libice6 armhf 2:1.1.1-1 [36.5 kB] 375s Get:56 http://ftpmaster.internal/ubuntu questing/main armhf libicu-dev armhf 76.1-1ubuntu2 [12.0 MB] 375s Get:57 http://ftpmaster.internal/ubuntu questing/main armhf libjpeg-turbo8 armhf 2.1.5-3ubuntu2 [127 kB] 375s Get:58 http://ftpmaster.internal/ubuntu questing/main armhf libjpeg-turbo8-dev armhf 2.1.5-3ubuntu2 [265 kB] 375s Get:59 http://ftpmaster.internal/ubuntu questing/main armhf libjpeg8 armhf 8c-2ubuntu11 [2148 B] 375s Get:60 http://ftpmaster.internal/ubuntu questing/main armhf libjpeg8-dev armhf 8c-2ubuntu11 [1484 B] 375s Get:61 http://ftpmaster.internal/ubuntu questing/main armhf libjpeg-dev armhf 8c-2ubuntu11 [1482 B] 375s Get:62 http://ftpmaster.internal/ubuntu questing/main armhf liblapack3 armhf 3.12.1-2 [2091 kB] 375s Get:63 http://ftpmaster.internal/ubuntu questing/main armhf liblapack-dev armhf 3.12.1-2 [2207 kB] 376s Get:64 http://ftpmaster.internal/ubuntu questing/main armhf liblerc4 armhf 4.0.0+ds-5ubuntu1 [160 kB] 376s Get:65 http://ftpmaster.internal/ubuntu questing/main armhf libncurses-dev armhf 6.5+20250216-2 [345 kB] 376s Get:66 http://ftpmaster.internal/ubuntu questing/main armhf libthai-data all 0.1.29-2build1 [158 kB] 376s Get:67 http://ftpmaster.internal/ubuntu questing/main armhf libthai0 armhf 0.1.29-2build1 [15.2 kB] 376s Get:68 http://ftpmaster.internal/ubuntu questing/main armhf libpango-1.0-0 armhf 1.56.3-1 [216 kB] 376s Get:69 http://ftpmaster.internal/ubuntu questing/main armhf libpangoft2-1.0-0 armhf 1.56.3-1 [44.1 kB] 376s Get:70 http://ftpmaster.internal/ubuntu questing/main armhf libpangocairo-1.0-0 armhf 1.56.3-1 [25.0 kB] 376s Get:71 http://ftpmaster.internal/ubuntu questing/main armhf libpaper2 armhf 2.2.5-0.3 [16.3 kB] 376s Get:72 http://ftpmaster.internal/ubuntu questing/main armhf libpaper-utils armhf 2.2.5-0.3 [14.2 kB] 376s Get:73 http://ftpmaster.internal/ubuntu questing/main armhf libpcre2-16-0 armhf 10.45-1 [207 kB] 376s Get:74 http://ftpmaster.internal/ubuntu questing/main armhf libpcre2-32-0 armhf 10.45-1 [197 kB] 376s Get:75 http://ftpmaster.internal/ubuntu questing/main armhf libpcre2-posix3 armhf 10.45-1 [6300 B] 376s Get:76 http://ftpmaster.internal/ubuntu questing/main armhf libpcre2-dev armhf 10.45-1 [752 kB] 376s Get:77 http://ftpmaster.internal/ubuntu questing/main armhf libpkgconf3 armhf 1.8.1-4 [26.6 kB] 376s Get:78 http://ftpmaster.internal/ubuntu questing/main armhf zlib1g-dev armhf 1:1.3.dfsg+really1.3.1-1ubuntu1 [880 kB] 376s Get:79 http://ftpmaster.internal/ubuntu questing/main armhf libpng-dev armhf 1.6.47-1.1 [251 kB] 376s Get:80 http://ftpmaster.internal/ubuntu questing/main armhf libreadline-dev armhf 8.2-6 [153 kB] 376s Get:81 http://ftpmaster.internal/ubuntu questing/main armhf libsharpyuv0 armhf 1.5.0-0.1 [16.4 kB] 376s Get:82 http://ftpmaster.internal/ubuntu questing/main armhf libsm6 armhf 2:1.2.4-1 [15.1 kB] 376s Get:83 http://ftpmaster.internal/ubuntu questing/main armhf libtcl8.6 armhf 8.6.16+dfsg-1 [909 kB] 376s Get:84 http://ftpmaster.internal/ubuntu questing/main armhf libjbig0 armhf 2.1-6.1ubuntu2 [24.9 kB] 376s Get:85 http://ftpmaster.internal/ubuntu questing/main armhf libwebp7 armhf 1.5.0-0.1 [188 kB] 376s Get:86 http://ftpmaster.internal/ubuntu questing/main armhf libtiff6 armhf 4.7.0-3ubuntu1 [184 kB] 376s Get:87 http://ftpmaster.internal/ubuntu questing/main armhf libxft2 armhf 2.3.6-1build1 [37.4 kB] 376s Get:88 http://ftpmaster.internal/ubuntu questing/main armhf libxss1 armhf 1:1.2.3-1build3 [6500 B] 376s Get:89 http://ftpmaster.internal/ubuntu questing/main armhf libtk8.6 armhf 8.6.16-1 [686 kB] 376s Get:90 http://ftpmaster.internal/ubuntu questing/main armhf libxt6t64 armhf 1:1.2.1-1.2build1 [145 kB] 376s Get:91 http://ftpmaster.internal/ubuntu questing/main armhf zip armhf 3.0-14ubuntu2 [164 kB] 376s Get:92 http://ftpmaster.internal/ubuntu questing/main armhf unzip armhf 6.0-28ubuntu6 [167 kB] 376s Get:93 http://ftpmaster.internal/ubuntu questing/main armhf xdg-utils all 1.2.1-2ubuntu1 [66.0 kB] 376s Get:94 http://ftpmaster.internal/ubuntu questing/universe armhf r-base-core armhf 4.4.3-1 [28.2 MB] 377s Get:95 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-littler armhf 0.3.20-2 [90.9 kB] 377s Get:96 http://ftpmaster.internal/ubuntu questing/universe armhf littler all 0.3.20-2 [2554 B] 377s Get:97 http://ftpmaster.internal/ubuntu questing/main armhf liblzma-dev armhf 5.6.4-1ubuntu1 [166 kB] 377s Get:98 http://ftpmaster.internal/ubuntu questing/main armhf pkgconf-bin armhf 1.8.1-4 [21.2 kB] 377s Get:99 http://ftpmaster.internal/ubuntu questing/main armhf pkgconf armhf 1.8.1-4 [16.8 kB] 377s Get:100 http://ftpmaster.internal/ubuntu questing/main armhf libtirpc-dev armhf 1.3.4+ds-1.3 [184 kB] 377s Get:101 http://ftpmaster.internal/ubuntu questing/universe armhf r-base-dev all 4.4.3-1 [4176 B] 377s Get:102 http://ftpmaster.internal/ubuntu questing/universe armhf pkg-r-autopkgtest all 20231212ubuntu1 [6448 B] 377s Get:103 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-boot all 1.3-31-1 [635 kB] 378s Get:104 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-brio armhf 1.1.5-1 [37.9 kB] 378s Get:105 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-ps armhf 1.9.0-1 [403 kB] 378s Get:106 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-r6 all 2.6.1-1 [101 kB] 378s Get:107 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-processx armhf 3.8.6-1 [359 kB] 378s Get:108 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-callr all 3.7.6-1 [458 kB] 378s Get:109 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-cli armhf 3.6.4-1 [1377 kB] 378s Get:110 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-crayon all 1.5.3-1 [165 kB] 378s Get:111 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-desc all 1.4.3-1 [359 kB] 378s Get:112 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-diffobj armhf 0.3.5-1 [1115 kB] 378s Get:113 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-digest armhf 0.6.37-1 [207 kB] 378s Get:114 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-evaluate all 1.0.3-1 [114 kB] 378s Get:115 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-fs armhf 1.6.5+dfsg-1 [242 kB] 378s Get:116 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-glue armhf 1.8.0-1 [162 kB] 378s Get:117 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-jsonlite armhf 1.9.1+dfsg-1 [440 kB] 378s Get:118 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-lattice armhf 0.22-6-1 [1363 kB] 378s Get:119 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-rlang armhf 1.1.5-1 [1701 kB] 378s Get:120 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-lifecycle all 1.0.4+dfsg-1 [110 kB] 378s Get:121 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-matrix armhf 1.7-3-1 [4039 kB] 378s Get:122 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-mass armhf 7.3-65-1 [1108 kB] 378s Get:123 http://ftpmaster.internal/ubuntu questing-proposed/universe armhf r-cran-nlme armhf 3.1.168-1 [2304 kB] 378s Get:124 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-pkgkitten all 0.2.4-1 [27.2 kB] 378s Get:125 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-rcpp armhf 1.0.14-1 [1976 kB] 379s Get:126 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-minqa armhf 1.2.8-1 [108 kB] 379s Get:127 http://ftpmaster.internal/ubuntu questing/universe armhf libnlopt0 armhf 2.7.1-6ubuntu3 [154 kB] 379s Get:128 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-nloptr armhf 2.2.1-1 [250 kB] 379s Get:129 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-rbibutils armhf 2.3-1 [943 kB] 379s Get:130 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-rdpack all 2.6.3-1 [636 kB] 379s Get:131 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-reformulas all 0.4.0-1 [91.5 kB] 379s Get:132 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-rcppeigen armhf 0.3.4.0.2-1 [1402 kB] 379s Get:133 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-statmod armhf 1.5.0-1 [294 kB] 379s Get:134 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-lme4 armhf 1.1-36-1 [4108 kB] 379s Get:135 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-magrittr armhf 2.0.3-1 [154 kB] 379s Get:136 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-nnet armhf 7.3-20-1 [111 kB] 379s Get:137 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-numderiv all 2016.8-1.1-3 [115 kB] 379s Get:138 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-ucminf armhf 1.2.2-1 [34.5 kB] 379s Get:139 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-ordinal armhf 2023.12-4.1-1 [1265 kB] 379s Get:140 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-pkgbuild all 1.4.6-1 [213 kB] 379s Get:141 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-rprojroot all 2.0.4-2 [125 kB] 379s Get:142 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-withr all 3.0.2+dfsg-1 [214 kB] 379s Get:143 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-pkgload all 1.4.0-1 [247 kB] 379s Get:144 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-praise all 1.0.0-4build1 [20.3 kB] 379s Get:145 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-waldo all 0.6.1-2 [150 kB] 379s Get:146 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-testthat armhf 3.2.3-1 [1633 kB] 379s Get:147 http://ftpmaster.internal/ubuntu questing/universe armhf r-cran-xtable all 1:1.8-4-2 [689 kB] 379s Preconfiguring packages ... 380s Fetched 148 MB in 7s (21.2 MB/s) 380s Selecting previously unselected package libc-dev-bin. 380s (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 ... 63951 files and directories currently installed.) 380s Preparing to unpack .../000-libc-dev-bin_2.41-6ubuntu1_armhf.deb ... 380s Unpacking libc-dev-bin (2.41-6ubuntu1) ... 380s Selecting previously unselected package linux-libc-dev:armhf. 380s Preparing to unpack .../001-linux-libc-dev_6.14.0-15.15_armhf.deb ... 380s Unpacking linux-libc-dev:armhf (6.14.0-15.15) ... 380s Selecting previously unselected package libcrypt-dev:armhf. 380s Preparing to unpack .../002-libcrypt-dev_1%3a4.4.38-1_armhf.deb ... 380s Unpacking libcrypt-dev:armhf (1:4.4.38-1) ... 380s Selecting previously unselected package rpcsvc-proto. 380s Preparing to unpack .../003-rpcsvc-proto_1.4.2-0ubuntu7_armhf.deb ... 380s Unpacking rpcsvc-proto (1.4.2-0ubuntu7) ... 380s Selecting previously unselected package libc6-dev:armhf. 380s Preparing to unpack .../004-libc6-dev_2.41-6ubuntu1_armhf.deb ... 380s Unpacking libc6-dev:armhf (2.41-6ubuntu1) ... 380s Selecting previously unselected package libisl23:armhf. 380s Preparing to unpack .../005-libisl23_0.27-1_armhf.deb ... 380s Unpacking libisl23:armhf (0.27-1) ... 380s Selecting previously unselected package libmpc3:armhf. 380s Preparing to unpack .../006-libmpc3_1.3.1-1build2_armhf.deb ... 380s Unpacking libmpc3:armhf (1.3.1-1build2) ... 380s Selecting previously unselected package cpp-14-arm-linux-gnueabihf. 380s Preparing to unpack .../007-cpp-14-arm-linux-gnueabihf_14.2.0-19ubuntu2_armhf.deb ... 380s Unpacking cpp-14-arm-linux-gnueabihf (14.2.0-19ubuntu2) ... 380s Selecting previously unselected package cpp-14. 380s Preparing to unpack .../008-cpp-14_14.2.0-19ubuntu2_armhf.deb ... 380s Unpacking cpp-14 (14.2.0-19ubuntu2) ... 380s Selecting previously unselected package cpp-arm-linux-gnueabihf. 380s Preparing to unpack .../009-cpp-arm-linux-gnueabihf_4%3a14.2.0-1ubuntu1_armhf.deb ... 380s Unpacking cpp-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 381s Selecting previously unselected package cpp. 381s Preparing to unpack .../010-cpp_4%3a14.2.0-1ubuntu1_armhf.deb ... 381s Unpacking cpp (4:14.2.0-1ubuntu1) ... 381s Selecting previously unselected package libcc1-0:armhf. 381s Preparing to unpack .../011-libcc1-0_15-20250404-0ubuntu1_armhf.deb ... 381s Unpacking libcc1-0:armhf (15-20250404-0ubuntu1) ... 381s Selecting previously unselected package libgomp1:armhf. 381s Preparing to unpack .../012-libgomp1_15-20250404-0ubuntu1_armhf.deb ... 381s Unpacking libgomp1:armhf (15-20250404-0ubuntu1) ... 381s Selecting previously unselected package libasan8:armhf. 381s Preparing to unpack .../013-libasan8_15-20250404-0ubuntu1_armhf.deb ... 381s Unpacking libasan8:armhf (15-20250404-0ubuntu1) ... 381s Selecting previously unselected package libubsan1:armhf. 381s Preparing to unpack .../014-libubsan1_15-20250404-0ubuntu1_armhf.deb ... 381s Unpacking libubsan1:armhf (15-20250404-0ubuntu1) ... 381s Selecting previously unselected package libgcc-14-dev:armhf. 381s Preparing to unpack .../015-libgcc-14-dev_14.2.0-19ubuntu2_armhf.deb ... 381s Unpacking libgcc-14-dev:armhf (14.2.0-19ubuntu2) ... 381s Selecting previously unselected package gcc-14-arm-linux-gnueabihf. 381s Preparing to unpack .../016-gcc-14-arm-linux-gnueabihf_14.2.0-19ubuntu2_armhf.deb ... 381s Unpacking gcc-14-arm-linux-gnueabihf (14.2.0-19ubuntu2) ... 381s Selecting previously unselected package gcc-14. 381s Preparing to unpack .../017-gcc-14_14.2.0-19ubuntu2_armhf.deb ... 381s Unpacking gcc-14 (14.2.0-19ubuntu2) ... 381s Selecting previously unselected package gcc-arm-linux-gnueabihf. 381s Preparing to unpack .../018-gcc-arm-linux-gnueabihf_4%3a14.2.0-1ubuntu1_armhf.deb ... 381s Unpacking gcc-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 381s Selecting previously unselected package gcc. 381s Preparing to unpack .../019-gcc_4%3a14.2.0-1ubuntu1_armhf.deb ... 381s Unpacking gcc (4:14.2.0-1ubuntu1) ... 382s Selecting previously unselected package libstdc++-14-dev:armhf. 382s Preparing to unpack .../020-libstdc++-14-dev_14.2.0-19ubuntu2_armhf.deb ... 382s Unpacking libstdc++-14-dev:armhf (14.2.0-19ubuntu2) ... 382s Selecting previously unselected package g++-14-arm-linux-gnueabihf. 382s Preparing to unpack .../021-g++-14-arm-linux-gnueabihf_14.2.0-19ubuntu2_armhf.deb ... 382s Unpacking g++-14-arm-linux-gnueabihf (14.2.0-19ubuntu2) ... 382s Selecting previously unselected package g++-14. 382s Preparing to unpack .../022-g++-14_14.2.0-19ubuntu2_armhf.deb ... 382s Unpacking g++-14 (14.2.0-19ubuntu2) ... 382s Selecting previously unselected package g++-arm-linux-gnueabihf. 382s Preparing to unpack .../023-g++-arm-linux-gnueabihf_4%3a14.2.0-1ubuntu1_armhf.deb ... 382s Unpacking g++-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 382s Selecting previously unselected package g++. 382s Preparing to unpack .../024-g++_4%3a14.2.0-1ubuntu1_armhf.deb ... 382s Unpacking g++ (4:14.2.0-1ubuntu1) ... 382s Selecting previously unselected package build-essential. 382s Preparing to unpack .../025-build-essential_12.12ubuntu1_armhf.deb ... 382s Unpacking build-essential (12.12ubuntu1) ... 382s Selecting previously unselected package dctrl-tools. 382s Preparing to unpack .../026-dctrl-tools_2.24-3build3_armhf.deb ... 382s Unpacking dctrl-tools (2.24-3build3) ... 382s Selecting previously unselected package libfreetype6:armhf. 382s Preparing to unpack .../027-libfreetype6_2.13.3+dfsg-1_armhf.deb ... 382s Unpacking libfreetype6:armhf (2.13.3+dfsg-1) ... 382s Selecting previously unselected package fonts-dejavu-mono. 382s Preparing to unpack .../028-fonts-dejavu-mono_2.37-8_all.deb ... 382s Unpacking fonts-dejavu-mono (2.37-8) ... 382s Selecting previously unselected package fonts-dejavu-core. 382s Preparing to unpack .../029-fonts-dejavu-core_2.37-8_all.deb ... 382s Unpacking fonts-dejavu-core (2.37-8) ... 382s Selecting previously unselected package fontconfig-config. 382s Preparing to unpack .../030-fontconfig-config_2.15.0-2.2ubuntu1_armhf.deb ... 383s Unpacking fontconfig-config (2.15.0-2.2ubuntu1) ... 383s Selecting previously unselected package libfontconfig1:armhf. 383s Preparing to unpack .../031-libfontconfig1_2.15.0-2.2ubuntu1_armhf.deb ... 383s Unpacking libfontconfig1:armhf (2.15.0-2.2ubuntu1) ... 383s Selecting previously unselected package fontconfig. 383s Preparing to unpack .../032-fontconfig_2.15.0-2.2ubuntu1_armhf.deb ... 383s Unpacking fontconfig (2.15.0-2.2ubuntu1) ... 383s Selecting previously unselected package libgfortran5:armhf. 383s Preparing to unpack .../033-libgfortran5_15-20250404-0ubuntu1_armhf.deb ... 383s Unpacking libgfortran5:armhf (15-20250404-0ubuntu1) ... 383s Selecting previously unselected package libgfortran-14-dev:armhf. 383s Preparing to unpack .../034-libgfortran-14-dev_14.2.0-19ubuntu2_armhf.deb ... 383s Unpacking libgfortran-14-dev:armhf (14.2.0-19ubuntu2) ... 383s Selecting previously unselected package gfortran-14-arm-linux-gnueabihf. 383s Preparing to unpack .../035-gfortran-14-arm-linux-gnueabihf_14.2.0-19ubuntu2_armhf.deb ... 383s Unpacking gfortran-14-arm-linux-gnueabihf (14.2.0-19ubuntu2) ... 383s Selecting previously unselected package gfortran-14. 383s Preparing to unpack .../036-gfortran-14_14.2.0-19ubuntu2_armhf.deb ... 383s Unpacking gfortran-14 (14.2.0-19ubuntu2) ... 383s Selecting previously unselected package gfortran-arm-linux-gnueabihf. 383s Preparing to unpack .../037-gfortran-arm-linux-gnueabihf_4%3a14.2.0-1ubuntu1_armhf.deb ... 383s Unpacking gfortran-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 383s Selecting previously unselected package gfortran. 383s Preparing to unpack .../038-gfortran_4%3a14.2.0-1ubuntu1_armhf.deb ... 383s Unpacking gfortran (4:14.2.0-1ubuntu1) ... 383s Selecting previously unselected package icu-devtools. 383s Preparing to unpack .../039-icu-devtools_76.1-1ubuntu2_armhf.deb ... 383s Unpacking icu-devtools (76.1-1ubuntu2) ... 383s Selecting previously unselected package libblas3:armhf. 383s Preparing to unpack .../040-libblas3_3.12.1-2_armhf.deb ... 383s Unpacking libblas3:armhf (3.12.1-2) ... 383s Selecting previously unselected package libblas-dev:armhf. 383s Preparing to unpack .../041-libblas-dev_3.12.1-2_armhf.deb ... 383s Unpacking libblas-dev:armhf (3.12.1-2) ... 383s Selecting previously unselected package libbz2-dev:armhf. 383s Preparing to unpack .../042-libbz2-dev_1.0.8-6_armhf.deb ... 383s Unpacking libbz2-dev:armhf (1.0.8-6) ... 383s Selecting previously unselected package libpixman-1-0:armhf. 383s Preparing to unpack .../043-libpixman-1-0_0.44.0-3_armhf.deb ... 383s Unpacking libpixman-1-0:armhf (0.44.0-3) ... 383s Selecting previously unselected package libxcb-render0:armhf. 383s Preparing to unpack .../044-libxcb-render0_1.17.0-2_armhf.deb ... 383s Unpacking libxcb-render0:armhf (1.17.0-2) ... 384s Selecting previously unselected package libxcb-shm0:armhf. 384s Preparing to unpack .../045-libxcb-shm0_1.17.0-2_armhf.deb ... 384s Unpacking libxcb-shm0:armhf (1.17.0-2) ... 384s Selecting previously unselected package libxrender1:armhf. 384s Preparing to unpack .../046-libxrender1_1%3a0.9.10-1.1build1_armhf.deb ... 384s Unpacking libxrender1:armhf (1:0.9.10-1.1build1) ... 384s Selecting previously unselected package libcairo2:armhf. 384s Preparing to unpack .../047-libcairo2_1.18.4-1_armhf.deb ... 384s Unpacking libcairo2:armhf (1.18.4-1) ... 384s Selecting previously unselected package libdatrie1:armhf. 384s Preparing to unpack .../048-libdatrie1_0.2.13-3build1_armhf.deb ... 384s Unpacking libdatrie1:armhf (0.2.13-3build1) ... 384s Selecting previously unselected package libdeflate0:armhf. 384s Preparing to unpack .../049-libdeflate0_1.23-1_armhf.deb ... 384s Unpacking libdeflate0:armhf (1.23-1) ... 384s Selecting previously unselected package libdeflate-dev:armhf. 384s Preparing to unpack .../050-libdeflate-dev_1.23-1_armhf.deb ... 384s Unpacking libdeflate-dev:armhf (1.23-1) ... 384s Selecting previously unselected package libgraphite2-3:armhf. 384s Preparing to unpack .../051-libgraphite2-3_1.3.14-2ubuntu1_armhf.deb ... 384s Unpacking libgraphite2-3:armhf (1.3.14-2ubuntu1) ... 384s Selecting previously unselected package libharfbuzz0b:armhf. 384s Preparing to unpack .../052-libharfbuzz0b_10.2.0-1_armhf.deb ... 384s Unpacking libharfbuzz0b:armhf (10.2.0-1) ... 384s Selecting previously unselected package x11-common. 384s Preparing to unpack .../053-x11-common_1%3a7.7+23ubuntu4_all.deb ... 384s Unpacking x11-common (1:7.7+23ubuntu4) ... 384s Selecting previously unselected package libice6:armhf. 384s Preparing to unpack .../054-libice6_2%3a1.1.1-1_armhf.deb ... 384s Unpacking libice6:armhf (2:1.1.1-1) ... 384s Selecting previously unselected package libicu-dev:armhf. 384s Preparing to unpack .../055-libicu-dev_76.1-1ubuntu2_armhf.deb ... 384s Unpacking libicu-dev:armhf (76.1-1ubuntu2) ... 384s Selecting previously unselected package libjpeg-turbo8:armhf. 384s Preparing to unpack .../056-libjpeg-turbo8_2.1.5-3ubuntu2_armhf.deb ... 384s Unpacking libjpeg-turbo8:armhf (2.1.5-3ubuntu2) ... 384s Selecting previously unselected package libjpeg-turbo8-dev:armhf. 384s Preparing to unpack .../057-libjpeg-turbo8-dev_2.1.5-3ubuntu2_armhf.deb ... 384s Unpacking libjpeg-turbo8-dev:armhf (2.1.5-3ubuntu2) ... 384s Selecting previously unselected package libjpeg8:armhf. 384s Preparing to unpack .../058-libjpeg8_8c-2ubuntu11_armhf.deb ... 384s Unpacking libjpeg8:armhf (8c-2ubuntu11) ... 384s Selecting previously unselected package libjpeg8-dev:armhf. 384s Preparing to unpack .../059-libjpeg8-dev_8c-2ubuntu11_armhf.deb ... 384s Unpacking libjpeg8-dev:armhf (8c-2ubuntu11) ... 384s Selecting previously unselected package libjpeg-dev:armhf. 384s Preparing to unpack .../060-libjpeg-dev_8c-2ubuntu11_armhf.deb ... 384s Unpacking libjpeg-dev:armhf (8c-2ubuntu11) ... 384s Selecting previously unselected package liblapack3:armhf. 384s Preparing to unpack .../061-liblapack3_3.12.1-2_armhf.deb ... 384s Unpacking liblapack3:armhf (3.12.1-2) ... 384s Selecting previously unselected package liblapack-dev:armhf. 384s Preparing to unpack .../062-liblapack-dev_3.12.1-2_armhf.deb ... 384s Unpacking liblapack-dev:armhf (3.12.1-2) ... 385s Selecting previously unselected package liblerc4:armhf. 385s Preparing to unpack .../063-liblerc4_4.0.0+ds-5ubuntu1_armhf.deb ... 385s Unpacking liblerc4:armhf (4.0.0+ds-5ubuntu1) ... 385s Selecting previously unselected package libncurses-dev:armhf. 385s Preparing to unpack .../064-libncurses-dev_6.5+20250216-2_armhf.deb ... 385s Unpacking libncurses-dev:armhf (6.5+20250216-2) ... 385s Selecting previously unselected package libthai-data. 385s Preparing to unpack .../065-libthai-data_0.1.29-2build1_all.deb ... 385s Unpacking libthai-data (0.1.29-2build1) ... 385s Selecting previously unselected package libthai0:armhf. 385s Preparing to unpack .../066-libthai0_0.1.29-2build1_armhf.deb ... 385s Unpacking libthai0:armhf (0.1.29-2build1) ... 385s Selecting previously unselected package libpango-1.0-0:armhf. 385s Preparing to unpack .../067-libpango-1.0-0_1.56.3-1_armhf.deb ... 385s Unpacking libpango-1.0-0:armhf (1.56.3-1) ... 385s Selecting previously unselected package libpangoft2-1.0-0:armhf. 385s Preparing to unpack .../068-libpangoft2-1.0-0_1.56.3-1_armhf.deb ... 385s Unpacking libpangoft2-1.0-0:armhf (1.56.3-1) ... 385s Selecting previously unselected package libpangocairo-1.0-0:armhf. 385s Preparing to unpack .../069-libpangocairo-1.0-0_1.56.3-1_armhf.deb ... 385s Unpacking libpangocairo-1.0-0:armhf (1.56.3-1) ... 385s Selecting previously unselected package libpaper2:armhf. 385s Preparing to unpack .../070-libpaper2_2.2.5-0.3_armhf.deb ... 385s Unpacking libpaper2:armhf (2.2.5-0.3) ... 385s Selecting previously unselected package libpaper-utils. 385s Preparing to unpack .../071-libpaper-utils_2.2.5-0.3_armhf.deb ... 385s Unpacking libpaper-utils (2.2.5-0.3) ... 385s Selecting previously unselected package libpcre2-16-0:armhf. 385s Preparing to unpack .../072-libpcre2-16-0_10.45-1_armhf.deb ... 385s Unpacking libpcre2-16-0:armhf (10.45-1) ... 385s Selecting previously unselected package libpcre2-32-0:armhf. 385s Preparing to unpack .../073-libpcre2-32-0_10.45-1_armhf.deb ... 385s Unpacking libpcre2-32-0:armhf (10.45-1) ... 385s Selecting previously unselected package libpcre2-posix3:armhf. 385s Preparing to unpack .../074-libpcre2-posix3_10.45-1_armhf.deb ... 385s Unpacking libpcre2-posix3:armhf (10.45-1) ... 385s Selecting previously unselected package libpcre2-dev:armhf. 385s Preparing to unpack .../075-libpcre2-dev_10.45-1_armhf.deb ... 385s Unpacking libpcre2-dev:armhf (10.45-1) ... 385s Selecting previously unselected package libpkgconf3:armhf. 385s Preparing to unpack .../076-libpkgconf3_1.8.1-4_armhf.deb ... 385s Unpacking libpkgconf3:armhf (1.8.1-4) ... 385s Selecting previously unselected package zlib1g-dev:armhf. 385s Preparing to unpack .../077-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_armhf.deb ... 385s Unpacking zlib1g-dev:armhf (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 385s Selecting previously unselected package libpng-dev:armhf. 385s Preparing to unpack .../078-libpng-dev_1.6.47-1.1_armhf.deb ... 385s Unpacking libpng-dev:armhf (1.6.47-1.1) ... 385s Selecting previously unselected package libreadline-dev:armhf. 385s Preparing to unpack .../079-libreadline-dev_8.2-6_armhf.deb ... 385s Unpacking libreadline-dev:armhf (8.2-6) ... 385s Selecting previously unselected package libsharpyuv0:armhf. 385s Preparing to unpack .../080-libsharpyuv0_1.5.0-0.1_armhf.deb ... 385s Unpacking libsharpyuv0:armhf (1.5.0-0.1) ... 385s Selecting previously unselected package libsm6:armhf. 385s Preparing to unpack .../081-libsm6_2%3a1.2.4-1_armhf.deb ... 385s Unpacking libsm6:armhf (2:1.2.4-1) ... 385s Selecting previously unselected package libtcl8.6:armhf. 385s Preparing to unpack .../082-libtcl8.6_8.6.16+dfsg-1_armhf.deb ... 385s Unpacking libtcl8.6:armhf (8.6.16+dfsg-1) ... 385s Selecting previously unselected package libjbig0:armhf. 385s Preparing to unpack .../083-libjbig0_2.1-6.1ubuntu2_armhf.deb ... 385s Unpacking libjbig0:armhf (2.1-6.1ubuntu2) ... 385s Selecting previously unselected package libwebp7:armhf. 385s Preparing to unpack .../084-libwebp7_1.5.0-0.1_armhf.deb ... 385s Unpacking libwebp7:armhf (1.5.0-0.1) ... 385s Selecting previously unselected package libtiff6:armhf. 385s Preparing to unpack .../085-libtiff6_4.7.0-3ubuntu1_armhf.deb ... 385s Unpacking libtiff6:armhf (4.7.0-3ubuntu1) ... 385s Selecting previously unselected package libxft2:armhf. 385s Preparing to unpack .../086-libxft2_2.3.6-1build1_armhf.deb ... 385s Unpacking libxft2:armhf (2.3.6-1build1) ... 385s Selecting previously unselected package libxss1:armhf. 386s Preparing to unpack .../087-libxss1_1%3a1.2.3-1build3_armhf.deb ... 386s Unpacking libxss1:armhf (1:1.2.3-1build3) ... 386s Selecting previously unselected package libtk8.6:armhf. 386s Preparing to unpack .../088-libtk8.6_8.6.16-1_armhf.deb ... 386s Unpacking libtk8.6:armhf (8.6.16-1) ... 386s Selecting previously unselected package libxt6t64:armhf. 386s Preparing to unpack .../089-libxt6t64_1%3a1.2.1-1.2build1_armhf.deb ... 386s Unpacking libxt6t64:armhf (1:1.2.1-1.2build1) ... 386s Selecting previously unselected package zip. 386s Preparing to unpack .../090-zip_3.0-14ubuntu2_armhf.deb ... 386s Unpacking zip (3.0-14ubuntu2) ... 386s Selecting previously unselected package unzip. 386s Preparing to unpack .../091-unzip_6.0-28ubuntu6_armhf.deb ... 386s Unpacking unzip (6.0-28ubuntu6) ... 386s Selecting previously unselected package xdg-utils. 386s Preparing to unpack .../092-xdg-utils_1.2.1-2ubuntu1_all.deb ... 386s Unpacking xdg-utils (1.2.1-2ubuntu1) ... 386s Selecting previously unselected package r-base-core. 386s Preparing to unpack .../093-r-base-core_4.4.3-1_armhf.deb ... 386s Unpacking r-base-core (4.4.3-1) ... 386s Selecting previously unselected package r-cran-littler. 386s Preparing to unpack .../094-r-cran-littler_0.3.20-2_armhf.deb ... 386s Unpacking r-cran-littler (0.3.20-2) ... 386s Selecting previously unselected package littler. 386s Preparing to unpack .../095-littler_0.3.20-2_all.deb ... 386s Unpacking littler (0.3.20-2) ... 386s Selecting previously unselected package liblzma-dev:armhf. 386s Preparing to unpack .../096-liblzma-dev_5.6.4-1ubuntu1_armhf.deb ... 386s Unpacking liblzma-dev:armhf (5.6.4-1ubuntu1) ... 386s Selecting previously unselected package pkgconf-bin. 386s Preparing to unpack .../097-pkgconf-bin_1.8.1-4_armhf.deb ... 386s Unpacking pkgconf-bin (1.8.1-4) ... 386s Selecting previously unselected package pkgconf:armhf. 386s Preparing to unpack .../098-pkgconf_1.8.1-4_armhf.deb ... 386s Unpacking pkgconf:armhf (1.8.1-4) ... 386s Selecting previously unselected package libtirpc-dev:armhf. 386s Preparing to unpack .../099-libtirpc-dev_1.3.4+ds-1.3_armhf.deb ... 386s Unpacking libtirpc-dev:armhf (1.3.4+ds-1.3) ... 386s Selecting previously unselected package r-base-dev. 386s Preparing to unpack .../100-r-base-dev_4.4.3-1_all.deb ... 386s Unpacking r-base-dev (4.4.3-1) ... 386s Selecting previously unselected package pkg-r-autopkgtest. 386s Preparing to unpack .../101-pkg-r-autopkgtest_20231212ubuntu1_all.deb ... 386s Unpacking pkg-r-autopkgtest (20231212ubuntu1) ... 386s Selecting previously unselected package r-cran-boot. 386s Preparing to unpack .../102-r-cran-boot_1.3-31-1_all.deb ... 386s Unpacking r-cran-boot (1.3-31-1) ... 386s Selecting previously unselected package r-cran-brio. 386s Preparing to unpack .../103-r-cran-brio_1.1.5-1_armhf.deb ... 386s Unpacking r-cran-brio (1.1.5-1) ... 386s Selecting previously unselected package r-cran-ps. 387s Preparing to unpack .../104-r-cran-ps_1.9.0-1_armhf.deb ... 387s Unpacking r-cran-ps (1.9.0-1) ... 387s Selecting previously unselected package r-cran-r6. 387s Preparing to unpack .../105-r-cran-r6_2.6.1-1_all.deb ... 387s Unpacking r-cran-r6 (2.6.1-1) ... 387s Selecting previously unselected package r-cran-processx. 387s Preparing to unpack .../106-r-cran-processx_3.8.6-1_armhf.deb ... 387s Unpacking r-cran-processx (3.8.6-1) ... 387s Selecting previously unselected package r-cran-callr. 387s Preparing to unpack .../107-r-cran-callr_3.7.6-1_all.deb ... 387s Unpacking r-cran-callr (3.7.6-1) ... 387s Selecting previously unselected package r-cran-cli. 387s Preparing to unpack .../108-r-cran-cli_3.6.4-1_armhf.deb ... 387s Unpacking r-cran-cli (3.6.4-1) ... 387s Selecting previously unselected package r-cran-crayon. 387s Preparing to unpack .../109-r-cran-crayon_1.5.3-1_all.deb ... 387s Unpacking r-cran-crayon (1.5.3-1) ... 387s Selecting previously unselected package r-cran-desc. 387s Preparing to unpack .../110-r-cran-desc_1.4.3-1_all.deb ... 387s Unpacking r-cran-desc (1.4.3-1) ... 387s Selecting previously unselected package r-cran-diffobj. 387s Preparing to unpack .../111-r-cran-diffobj_0.3.5-1_armhf.deb ... 387s Unpacking r-cran-diffobj (0.3.5-1) ... 387s Selecting previously unselected package r-cran-digest. 387s Preparing to unpack .../112-r-cran-digest_0.6.37-1_armhf.deb ... 387s Unpacking r-cran-digest (0.6.37-1) ... 387s Selecting previously unselected package r-cran-evaluate. 387s Preparing to unpack .../113-r-cran-evaluate_1.0.3-1_all.deb ... 387s Unpacking r-cran-evaluate (1.0.3-1) ... 387s Selecting previously unselected package r-cran-fs. 387s Preparing to unpack .../114-r-cran-fs_1.6.5+dfsg-1_armhf.deb ... 387s Unpacking r-cran-fs (1.6.5+dfsg-1) ... 387s Selecting previously unselected package r-cran-glue. 387s Preparing to unpack .../115-r-cran-glue_1.8.0-1_armhf.deb ... 387s Unpacking r-cran-glue (1.8.0-1) ... 387s Selecting previously unselected package r-cran-jsonlite. 387s Preparing to unpack .../116-r-cran-jsonlite_1.9.1+dfsg-1_armhf.deb ... 387s Unpacking r-cran-jsonlite (1.9.1+dfsg-1) ... 387s Selecting previously unselected package r-cran-lattice. 387s Preparing to unpack .../117-r-cran-lattice_0.22-6-1_armhf.deb ... 387s Unpacking r-cran-lattice (0.22-6-1) ... 387s Selecting previously unselected package r-cran-rlang. 387s Preparing to unpack .../118-r-cran-rlang_1.1.5-1_armhf.deb ... 387s Unpacking r-cran-rlang (1.1.5-1) ... 387s Selecting previously unselected package r-cran-lifecycle. 387s Preparing to unpack .../119-r-cran-lifecycle_1.0.4+dfsg-1_all.deb ... 387s Unpacking r-cran-lifecycle (1.0.4+dfsg-1) ... 387s Selecting previously unselected package r-cran-matrix. 387s Preparing to unpack .../120-r-cran-matrix_1.7-3-1_armhf.deb ... 387s Unpacking r-cran-matrix (1.7-3-1) ... 387s Selecting previously unselected package r-cran-mass. 387s Preparing to unpack .../121-r-cran-mass_7.3-65-1_armhf.deb ... 387s Unpacking r-cran-mass (7.3-65-1) ... 387s Selecting previously unselected package r-cran-nlme. 387s Preparing to unpack .../122-r-cran-nlme_3.1.168-1_armhf.deb ... 387s Unpacking r-cran-nlme (3.1.168-1) ... 387s Selecting previously unselected package r-cran-pkgkitten. 387s Preparing to unpack .../123-r-cran-pkgkitten_0.2.4-1_all.deb ... 387s Unpacking r-cran-pkgkitten (0.2.4-1) ... 387s Selecting previously unselected package r-cran-rcpp. 387s Preparing to unpack .../124-r-cran-rcpp_1.0.14-1_armhf.deb ... 387s Unpacking r-cran-rcpp (1.0.14-1) ... 388s Selecting previously unselected package r-cran-minqa. 388s Preparing to unpack .../125-r-cran-minqa_1.2.8-1_armhf.deb ... 388s Unpacking r-cran-minqa (1.2.8-1) ... 388s Selecting previously unselected package libnlopt0:armhf. 388s Preparing to unpack .../126-libnlopt0_2.7.1-6ubuntu3_armhf.deb ... 388s Unpacking libnlopt0:armhf (2.7.1-6ubuntu3) ... 388s Selecting previously unselected package r-cran-nloptr. 388s Preparing to unpack .../127-r-cran-nloptr_2.2.1-1_armhf.deb ... 388s Unpacking r-cran-nloptr (2.2.1-1) ... 388s Selecting previously unselected package r-cran-rbibutils. 388s Preparing to unpack .../128-r-cran-rbibutils_2.3-1_armhf.deb ... 388s Unpacking r-cran-rbibutils (2.3-1) ... 388s Selecting previously unselected package r-cran-rdpack. 388s Preparing to unpack .../129-r-cran-rdpack_2.6.3-1_all.deb ... 388s Unpacking r-cran-rdpack (2.6.3-1) ... 388s Selecting previously unselected package r-cran-reformulas. 388s Preparing to unpack .../130-r-cran-reformulas_0.4.0-1_all.deb ... 388s Unpacking r-cran-reformulas (0.4.0-1) ... 388s Selecting previously unselected package r-cran-rcppeigen. 388s Preparing to unpack .../131-r-cran-rcppeigen_0.3.4.0.2-1_armhf.deb ... 388s Unpacking r-cran-rcppeigen (0.3.4.0.2-1) ... 388s Selecting previously unselected package r-cran-statmod. 388s Preparing to unpack .../132-r-cran-statmod_1.5.0-1_armhf.deb ... 388s Unpacking r-cran-statmod (1.5.0-1) ... 388s Selecting previously unselected package r-cran-lme4. 388s Preparing to unpack .../133-r-cran-lme4_1.1-36-1_armhf.deb ... 388s Unpacking r-cran-lme4 (1.1-36-1) ... 388s Selecting previously unselected package r-cran-magrittr. 388s Preparing to unpack .../134-r-cran-magrittr_2.0.3-1_armhf.deb ... 388s Unpacking r-cran-magrittr (2.0.3-1) ... 388s Selecting previously unselected package r-cran-nnet. 388s Preparing to unpack .../135-r-cran-nnet_7.3-20-1_armhf.deb ... 388s Unpacking r-cran-nnet (7.3-20-1) ... 388s Selecting previously unselected package r-cran-numderiv. 388s Preparing to unpack .../136-r-cran-numderiv_2016.8-1.1-3_all.deb ... 388s Unpacking r-cran-numderiv (2016.8-1.1-3) ... 388s Selecting previously unselected package r-cran-ucminf. 388s Preparing to unpack .../137-r-cran-ucminf_1.2.2-1_armhf.deb ... 388s Unpacking r-cran-ucminf (1.2.2-1) ... 388s Selecting previously unselected package r-cran-ordinal. 388s Preparing to unpack .../138-r-cran-ordinal_2023.12-4.1-1_armhf.deb ... 388s Unpacking r-cran-ordinal (2023.12-4.1-1) ... 388s Selecting previously unselected package r-cran-pkgbuild. 388s Preparing to unpack .../139-r-cran-pkgbuild_1.4.6-1_all.deb ... 388s Unpacking r-cran-pkgbuild (1.4.6-1) ... 388s Selecting previously unselected package r-cran-rprojroot. 388s Preparing to unpack .../140-r-cran-rprojroot_2.0.4-2_all.deb ... 388s Unpacking r-cran-rprojroot (2.0.4-2) ... 388s Selecting previously unselected package r-cran-withr. 388s Preparing to unpack .../141-r-cran-withr_3.0.2+dfsg-1_all.deb ... 388s Unpacking r-cran-withr (3.0.2+dfsg-1) ... 389s Selecting previously unselected package r-cran-pkgload. 389s Preparing to unpack .../142-r-cran-pkgload_1.4.0-1_all.deb ... 389s Unpacking r-cran-pkgload (1.4.0-1) ... 389s Selecting previously unselected package r-cran-praise. 389s Preparing to unpack .../143-r-cran-praise_1.0.0-4build1_all.deb ... 389s Unpacking r-cran-praise (1.0.0-4build1) ... 389s Selecting previously unselected package r-cran-waldo. 389s Preparing to unpack .../144-r-cran-waldo_0.6.1-2_all.deb ... 389s Unpacking r-cran-waldo (0.6.1-2) ... 389s Selecting previously unselected package r-cran-testthat. 389s Preparing to unpack .../145-r-cran-testthat_3.2.3-1_armhf.deb ... 389s Unpacking r-cran-testthat (3.2.3-1) ... 389s Selecting previously unselected package r-cran-xtable. 389s Preparing to unpack .../146-r-cran-xtable_1%3a1.8-4-2_all.deb ... 389s Unpacking r-cran-xtable (1:1.8-4-2) ... 389s Setting up libgraphite2-3:armhf (1.3.14-2ubuntu1) ... 389s Setting up libpixman-1-0:armhf (0.44.0-3) ... 389s Setting up libsharpyuv0:armhf (1.5.0-0.1) ... 389s Setting up liblerc4:armhf (4.0.0+ds-5ubuntu1) ... 389s Setting up libxrender1:armhf (1:0.9.10-1.1build1) ... 389s Setting up libdatrie1:armhf (0.2.13-3build1) ... 389s Setting up libxcb-render0:armhf (1.17.0-2) ... 389s Setting up unzip (6.0-28ubuntu6) ... 389s Setting up x11-common (1:7.7+23ubuntu4) ... 389s Setting up libdeflate0:armhf (1.23-1) ... 389s Setting up linux-libc-dev:armhf (6.14.0-15.15) ... 389s Setting up libnlopt0:armhf (2.7.1-6ubuntu3) ... 389s Setting up libxcb-shm0:armhf (1.17.0-2) ... 389s Setting up libgomp1:armhf (15-20250404-0ubuntu1) ... 389s Setting up libjbig0:armhf (2.1-6.1ubuntu2) ... 389s Setting up libpcre2-16-0:armhf (10.45-1) ... 389s Setting up zip (3.0-14ubuntu2) ... 389s Setting up libpcre2-32-0:armhf (10.45-1) ... 389s Setting up libblas3:armhf (3.12.1-2) ... 389s update-alternatives: using /usr/lib/arm-linux-gnueabihf/blas/libblas.so.3 to provide /usr/lib/arm-linux-gnueabihf/libblas.so.3 (libblas.so.3-arm-linux-gnueabihf) in auto mode 389s Setting up libtirpc-dev:armhf (1.3.4+ds-1.3) ... 389s Setting up libpkgconf3:armhf (1.8.1-4) ... 389s Setting up rpcsvc-proto (1.4.2-0ubuntu7) ... 389s Setting up libfreetype6:armhf (2.13.3+dfsg-1) ... 389s Setting up fonts-dejavu-mono (2.37-8) ... 389s Setting up libmpc3:armhf (1.3.1-1build2) ... 389s Setting up libtcl8.6:armhf (8.6.16+dfsg-1) ... 389s Setting up icu-devtools (76.1-1ubuntu2) ... 389s Setting up fonts-dejavu-core (2.37-8) ... 389s Setting up pkgconf-bin (1.8.1-4) ... 389s Setting up libjpeg-turbo8:armhf (2.1.5-3ubuntu2) ... 389s Setting up libgfortran5:armhf (15-20250404-0ubuntu1) ... 389s Setting up libwebp7:armhf (1.5.0-0.1) ... 389s Setting up liblzma-dev:armhf (5.6.4-1ubuntu1) ... 389s Setting up libubsan1:armhf (15-20250404-0ubuntu1) ... 389s Setting up libpcre2-posix3:armhf (10.45-1) ... 389s Setting up libcrypt-dev:armhf (1:4.4.38-1) ... 389s Setting up libasan8:armhf (15-20250404-0ubuntu1) ... 389s Setting up libharfbuzz0b:armhf (10.2.0-1) ... 389s Setting up libthai-data (0.1.29-2build1) ... 389s Setting up libxss1:armhf (1:1.2.3-1build3) ... 389s Setting up libpaper2:armhf (2.2.5-0.3) ... 389s Setting up libgcc-14-dev:armhf (14.2.0-19ubuntu2) ... 389s Setting up libisl23:armhf (0.27-1) ... 389s Setting up libc-dev-bin (2.41-6ubuntu1) ... 389s Setting up libdeflate-dev:armhf (1.23-1) ... 389s Setting up xdg-utils (1.2.1-2ubuntu1) ... 389s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 389s Setting up libcc1-0:armhf (15-20250404-0ubuntu1) ... 389s Setting up libblas-dev:armhf (3.12.1-2) ... 389s update-alternatives: using /usr/lib/arm-linux-gnueabihf/blas/libblas.so to provide /usr/lib/arm-linux-gnueabihf/libblas.so (libblas.so-arm-linux-gnueabihf) in auto mode 389s Setting up dctrl-tools (2.24-3build3) ... 389s Setting up cpp-14-arm-linux-gnueabihf (14.2.0-19ubuntu2) ... 389s Setting up libjpeg8:armhf (8c-2ubuntu11) ... 389s Setting up libgfortran-14-dev:armhf (14.2.0-19ubuntu2) ... 389s Setting up libice6:armhf (2:1.1.1-1) ... 389s Setting up liblapack3:armhf (3.12.1-2) ... 389s update-alternatives: using /usr/lib/arm-linux-gnueabihf/lapack/liblapack.so.3 to provide /usr/lib/arm-linux-gnueabihf/liblapack.so.3 (liblapack.so.3-arm-linux-gnueabihf) in auto mode 389s Setting up fontconfig-config (2.15.0-2.2ubuntu1) ... 390s Setting up gcc-14-arm-linux-gnueabihf (14.2.0-19ubuntu2) ... 390s Setting up libpaper-utils (2.2.5-0.3) ... 390s Setting up pkgconf:armhf (1.8.1-4) ... 390s Setting up libthai0:armhf (0.1.29-2build1) ... 390s Setting up liblapack-dev:armhf (3.12.1-2) ... 390s update-alternatives: using /usr/lib/arm-linux-gnueabihf/lapack/liblapack.so to provide /usr/lib/arm-linux-gnueabihf/liblapack.so (liblapack.so-arm-linux-gnueabihf) in auto mode 390s Setting up cpp-14 (14.2.0-19ubuntu2) ... 390s Setting up libtiff6:armhf (4.7.0-3ubuntu1) ... 390s Setting up libc6-dev:armhf (2.41-6ubuntu1) ... 390s Setting up libfontconfig1:armhf (2.15.0-2.2ubuntu1) ... 390s Setting up libstdc++-14-dev:armhf (14.2.0-19ubuntu2) ... 390s Setting up libsm6:armhf (2:1.2.4-1) ... 390s Setting up libicu-dev:armhf (76.1-1ubuntu2) ... 390s Setting up cpp-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 390s Setting up gfortran-14-arm-linux-gnueabihf (14.2.0-19ubuntu2) ... 390s Setting up libbz2-dev:armhf (1.0.8-6) ... 390s Setting up gcc-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 390s Setting up g++-14-arm-linux-gnueabihf (14.2.0-19ubuntu2) ... 390s Setting up fontconfig (2.15.0-2.2ubuntu1) ... 392s Regenerating fonts cache... done. 392s Setting up libjpeg-turbo8-dev:armhf (2.1.5-3ubuntu2) ... 392s Setting up libxft2:armhf (2.3.6-1build1) ... 392s Setting up libncurses-dev:armhf (6.5+20250216-2) ... 392s Setting up libpcre2-dev:armhf (10.45-1) ... 392s Setting up libtk8.6:armhf (8.6.16-1) ... 392s Setting up libpango-1.0-0:armhf (1.56.3-1) ... 392s Setting up libreadline-dev:armhf (8.2-6) ... 392s Setting up libcairo2:armhf (1.18.4-1) ... 392s Setting up gcc-14 (14.2.0-19ubuntu2) ... 392s Setting up gfortran-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 392s Setting up libxt6t64:armhf (1:1.2.1-1.2build1) ... 392s Setting up zlib1g-dev:armhf (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 392s Setting up cpp (4:14.2.0-1ubuntu1) ... 392s Setting up g++-14 (14.2.0-19ubuntu2) ... 392s Setting up libpangoft2-1.0-0:armhf (1.56.3-1) ... 392s Setting up libjpeg8-dev:armhf (8c-2ubuntu11) ... 392s Setting up gfortran-14 (14.2.0-19ubuntu2) ... 392s Setting up libpangocairo-1.0-0:armhf (1.56.3-1) ... 392s Setting up g++-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 392s Setting up libpng-dev:armhf (1.6.47-1.1) ... 392s Setting up libjpeg-dev:armhf (8c-2ubuntu11) ... 392s Setting up gcc (4:14.2.0-1ubuntu1) ... 392s Setting up r-base-core (4.4.3-1) ... 392s Creating config file /etc/R/Renviron with new version 392s Setting up r-cran-crayon (1.5.3-1) ... 392s Setting up r-cran-lattice (0.22-6-1) ... 392s Setting up r-cran-ps (1.9.0-1) ... 392s Setting up r-cran-nlme (3.1.168-1) ... 392s Setting up g++ (4:14.2.0-1ubuntu1) ... 392s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 392s Setting up r-cran-statmod (1.5.0-1) ... 392s Setting up build-essential (12.12ubuntu1) ... 392s Setting up r-cran-nnet (7.3-20-1) ... 392s Setting up r-cran-r6 (2.6.1-1) ... 392s Setting up r-cran-pkgkitten (0.2.4-1) ... 392s Setting up r-cran-numderiv (2016.8-1.1-3) ... 392s Setting up r-cran-magrittr (2.0.3-1) ... 392s Setting up r-cran-littler (0.3.20-2) ... 392s Setting up r-cran-fs (1.6.5+dfsg-1) ... 392s Setting up r-cran-rcpp (1.0.14-1) ... 392s Setting up r-cran-brio (1.1.5-1) ... 392s Setting up r-cran-nloptr (2.2.1-1) ... 392s Setting up r-cran-boot (1.3-31-1) ... 392s Setting up r-cran-diffobj (0.3.5-1) ... 392s Setting up r-cran-rlang (1.1.5-1) ... 392s Setting up littler (0.3.20-2) ... 392s Setting up r-cran-withr (3.0.2+dfsg-1) ... 392s Setting up r-cran-processx (3.8.6-1) ... 392s Setting up r-cran-praise (1.0.0-4build1) ... 392s Setting up r-cran-digest (0.6.37-1) ... 392s Setting up r-cran-evaluate (1.0.3-1) ... 392s Setting up r-cran-mass (7.3-65-1) ... 392s Setting up r-cran-glue (1.8.0-1) ... 392s Setting up r-cran-xtable (1:1.8-4-2) ... 392s Setting up r-cran-cli (3.6.4-1) ... 392s Setting up gfortran (4:14.2.0-1ubuntu1) ... 392s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 392s 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 392s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 392s 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 392s Setting up r-cran-rbibutils (2.3-1) ... 392s Setting up r-cran-lifecycle (1.0.4+dfsg-1) ... 392s Setting up r-cran-rprojroot (2.0.4-2) ... 392s Setting up r-cran-jsonlite (1.9.1+dfsg-1) ... 392s Setting up r-cran-ucminf (1.2.2-1) ... 392s Setting up r-cran-waldo (0.6.1-2) ... 392s Setting up r-cran-matrix (1.7-3-1) ... 392s Setting up r-cran-rcppeigen (0.3.4.0.2-1) ... 392s Setting up r-cran-minqa (1.2.8-1) ... 392s Setting up r-base-dev (4.4.3-1) ... 392s Setting up r-cran-callr (3.7.6-1) ... 392s Setting up r-cran-ordinal (2023.12-4.1-1) ... 392s Setting up r-cran-desc (1.4.3-1) ... 392s Setting up r-cran-rdpack (2.6.3-1) ... 392s Setting up pkg-r-autopkgtest (20231212ubuntu1) ... 392s Setting up r-cran-pkgbuild (1.4.6-1) ... 392s Setting up r-cran-reformulas (0.4.0-1) ... 392s Setting up r-cran-pkgload (1.4.0-1) ... 392s Setting up r-cran-lme4 (1.1-36-1) ... 392s Setting up r-cran-testthat (3.2.3-1) ... 392s Processing triggers for libc-bin (2.41-6ubuntu1) ... 392s Processing triggers for man-db (2.13.0-1) ... 393s Processing triggers for install-info (7.1.1-1) ... 407s autopkgtest [02:35:05]: test pkg-r-autopkgtest: /usr/share/dh-r/pkg-r-autopkgtest 407s autopkgtest [02:35:05]: test pkg-r-autopkgtest: [----------------------- 409s Test: Try to load the R library ordinal 409s 409s R version 4.4.3 (2025-02-28) -- "Trophy Case" 409s Copyright (C) 2025 The R Foundation for Statistical Computing 409s Platform: arm-unknown-linux-gnueabihf (32-bit) 409s 409s R is free software and comes with ABSOLUTELY NO WARRANTY. 409s You are welcome to redistribute it under certain conditions. 409s Type 'license()' or 'licence()' for distribution details. 409s 409s R is a collaborative project with many contributors. 409s Type 'contributors()' for more information and 409s 'citation()' on how to cite R or R packages in publications. 409s 409s Type 'demo()' for some demos, 'help()' for on-line help, or 409s 'help.start()' for an HTML browser interface to help. 409s Type 'q()' to quit R. 409s 409s > library('ordinal') 410s > 410s > 410s Other tests are currently unsupported! 410s They will be progressively added. 410s autopkgtest [02:35:08]: test pkg-r-autopkgtest: -----------------------] 414s autopkgtest [02:35:12]: test pkg-r-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 414s pkg-r-autopkgtest PASS 418s autopkgtest [02:35:16]: @@@@@@@@@@@@@@@@@@@@ summary 418s run-unit-test PASS 418s pkg-r-autopkgtest PASS