0s autopkgtest [18:14:35]: starting date and time: 2025-03-15 18:14:35+0000 0s autopkgtest [18:14:35]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [18:14:35]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.7esio39d/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:glibc --apt-upgrade r-cran-ordinal --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=glibc/2.41-1ubuntu2 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-s390x --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@bos03-s390x-3.secgroup --name adt-plucky-s390x-r-cran-ordinal-20250315-181434-juju-7f2275-prod-proposed-migration-environment-2-f0d52814-2753-46c3-95ec-fd0dc2fa95db --image adt/ubuntu-plucky-s390x-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-proposed-migration-s390x -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 114s autopkgtest [18:16:29]: testbed dpkg architecture: s390x 115s autopkgtest [18:16:30]: testbed apt version: 2.9.33 115s autopkgtest [18:16:30]: @@@@@@@@@@@@@@@@@@@@ test bed setup 115s autopkgtest [18:16:30]: testbed release detected to be: None 116s autopkgtest [18:16:31]: updating testbed package index (apt update) 116s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [126 kB] 116s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 116s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 116s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 117s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [379 kB] 117s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [99.7 kB] 117s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.8 kB] 117s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x Packages [113 kB] 117s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x c-n-f Metadata [1824 B] 117s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted s390x c-n-f Metadata [116 B] 117s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe s390x Packages [320 kB] 117s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/universe s390x c-n-f Metadata [13.4 kB] 117s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse s390x Packages [3776 B] 117s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse s390x c-n-f Metadata [240 B] 118s Fetched 1073 kB in 1s (733 kB/s) 118s Reading package lists... 119s Reading package lists... 119s Building dependency tree... 119s Reading state information... 119s Calculating upgrade... 119s Calculating upgrade... 119s The following packages were automatically installed and are no longer required: 119s libnsl2 libpython3.12-minimal libpython3.12-stdlib libpython3.12t64 119s linux-headers-6.11.0-8 linux-headers-6.11.0-8-generic 119s linux-modules-6.11.0-8-generic linux-tools-6.11.0-8 119s linux-tools-6.11.0-8-generic 119s Use 'sudo apt autoremove' to remove them. 119s The following packages will be upgraded: 119s pinentry-curses python3-jinja2 strace 119s 3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 119s Need to get 652 kB of archives. 119s After this operation, 27.6 kB of additional disk space will be used. 119s Get:1 http://ftpmaster.internal/ubuntu plucky/main s390x strace s390x 6.13+ds-1ubuntu1 [500 kB] 120s Get:2 http://ftpmaster.internal/ubuntu plucky/main s390x pinentry-curses s390x 1.3.1-2ubuntu3 [42.9 kB] 120s Get:3 http://ftpmaster.internal/ubuntu plucky/main s390x python3-jinja2 all 3.1.5-2ubuntu1 [109 kB] 120s Fetched 652 kB in 1s (736 kB/s) 120s (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 ... 81428 files and directories currently installed.) 120s Preparing to unpack .../strace_6.13+ds-1ubuntu1_s390x.deb ... 120s Unpacking strace (6.13+ds-1ubuntu1) over (6.11-0ubuntu1) ... 120s Preparing to unpack .../pinentry-curses_1.3.1-2ubuntu3_s390x.deb ... 120s Unpacking pinentry-curses (1.3.1-2ubuntu3) over (1.3.1-2ubuntu2) ... 120s Preparing to unpack .../python3-jinja2_3.1.5-2ubuntu1_all.deb ... 120s Unpacking python3-jinja2 (3.1.5-2ubuntu1) over (3.1.5-2) ... 121s Setting up pinentry-curses (1.3.1-2ubuntu3) ... 121s Setting up python3-jinja2 (3.1.5-2ubuntu1) ... 121s Setting up strace (6.13+ds-1ubuntu1) ... 121s Processing triggers for man-db (2.13.0-1) ... 121s Reading package lists... 121s Building dependency tree... 121s Reading state information... 121s Solving dependencies... 122s The following packages will be REMOVED: 122s libnsl2* libpython3.12-minimal* libpython3.12-stdlib* libpython3.12t64* 122s linux-headers-6.11.0-8* linux-headers-6.11.0-8-generic* 122s linux-modules-6.11.0-8-generic* linux-tools-6.11.0-8* 122s linux-tools-6.11.0-8-generic* 122s 0 upgraded, 0 newly installed, 9 to remove and 5 not upgraded. 122s After this operation, 167 MB disk space will be freed. 122s (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 ... 81428 files and directories currently installed.) 122s Removing linux-tools-6.11.0-8-generic (6.11.0-8.8) ... 122s Removing linux-tools-6.11.0-8 (6.11.0-8.8) ... 122s Removing libpython3.12t64:s390x (3.12.9-1) ... 122s Removing libpython3.12-stdlib:s390x (3.12.9-1) ... 122s Removing libnsl2:s390x (1.3.0-3build3) ... 122s Removing libpython3.12-minimal:s390x (3.12.9-1) ... 122s Removing linux-headers-6.11.0-8-generic (6.11.0-8.8) ... 122s Removing linux-headers-6.11.0-8 (6.11.0-8.8) ... 123s Removing linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 123s Processing triggers for libc-bin (2.41-1ubuntu1) ... 123s (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 ... 56328 files and directories currently installed.) 123s Purging configuration files for libpython3.12-minimal:s390x (3.12.9-1) ... 123s Purging configuration files for linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 123s autopkgtest [18:16:38]: upgrading testbed (apt dist-upgrade and autopurge) 123s Reading package lists... 123s Building dependency tree... 123s Reading state information... 124s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 124s Starting 2 pkgProblemResolver with broken count: 0 124s Done 124s Entering ResolveByKeep 124s 124s Calculating upgrade... 124s The following packages will be upgraded: 124s libc-bin libc-dev-bin libc6 libc6-dev locales 124s 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 124s Need to get 9512 kB of archives. 124s After this operation, 8192 B of additional disk space will be used. 124s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc6-dev s390x 2.41-1ubuntu2 [1678 kB] 126s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc-dev-bin s390x 2.41-1ubuntu2 [24.3 kB] 126s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc6 s390x 2.41-1ubuntu2 [2892 kB] 128s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc-bin s390x 2.41-1ubuntu2 [671 kB] 128s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x locales all 2.41-1ubuntu2 [4246 kB] 132s Preconfiguring packages ... 132s Fetched 9512 kB in 7s (1318 kB/s) 132s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 56326 files and directories currently installed.) 132s Preparing to unpack .../libc6-dev_2.41-1ubuntu2_s390x.deb ... 132s Unpacking libc6-dev:s390x (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 132s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu2_s390x.deb ... 132s Unpacking libc-dev-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 132s Preparing to unpack .../libc6_2.41-1ubuntu2_s390x.deb ... 132s Unpacking libc6:s390x (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 132s Setting up libc6:s390x (2.41-1ubuntu2) ... 132s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 56326 files and directories currently installed.) 132s Preparing to unpack .../libc-bin_2.41-1ubuntu2_s390x.deb ... 132s Unpacking libc-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 132s Setting up libc-bin (2.41-1ubuntu2) ... 132s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 56326 files and directories currently installed.) 132s Preparing to unpack .../locales_2.41-1ubuntu2_all.deb ... 132s Unpacking locales (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 132s Setting up locales (2.41-1ubuntu2) ... 133s Generating locales (this might take a while)... 134s en_US.UTF-8... done 134s Generation complete. 134s Setting up libc-dev-bin (2.41-1ubuntu2) ... 134s Setting up libc6-dev:s390x (2.41-1ubuntu2) ... 134s Processing triggers for man-db (2.13.0-1) ... 134s Processing triggers for systemd (257.3-1ubuntu3) ... 135s Reading package lists... 135s Building dependency tree... 135s Reading state information... 136s Starting pkgProblemResolver with broken count: 0 136s Starting 2 pkgProblemResolver with broken count: 0 136s Done 136s Solving dependencies... 136s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 136s autopkgtest [18:16:51]: rebooting testbed after setup commands that affected boot 156s autopkgtest [18:17:11]: testbed running kernel: Linux 6.14.0-10-generic #10-Ubuntu SMP Wed Mar 12 14:53:49 UTC 2025 158s autopkgtest [18:17:13]: @@@@@@@@@@@@@@@@@@@@ apt-source r-cran-ordinal 160s Get:1 http://ftpmaster.internal/ubuntu plucky/universe r-cran-ordinal 2023.12-4.1-1 (dsc) [2258 B] 160s Get:2 http://ftpmaster.internal/ubuntu plucky/universe r-cran-ordinal 2023.12-4.1-1 (tar) [804 kB] 160s Get:3 http://ftpmaster.internal/ubuntu plucky/universe r-cran-ordinal 2023.12-4.1-1 (diff) [3132 B] 160s gpgv: Signature made Wed Oct 9 23:44:36 2024 UTC 160s gpgv: using RSA key 73471499CC60ED9EEE805946C5BD6C8F2295D502 160s gpgv: issuer "plessy@debian.org" 160s gpgv: Can't check signature: No public key 160s dpkg-source: warning: cannot verify inline signature for ./r-cran-ordinal_2023.12-4.1-1.dsc: no acceptable signature found 161s autopkgtest [18:17:16]: testing package r-cran-ordinal version 2023.12-4.1-1 161s autopkgtest [18:17:16]: build not needed 163s autopkgtest [18:17:18]: test run-unit-test: preparing testbed 163s Reading package lists... 163s Building dependency tree... 163s Reading state information... 163s Starting pkgProblemResolver with broken count: 0 163s Starting 2 pkgProblemResolver with broken count: 0 163s Done 164s The following NEW packages will be installed: 164s fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-mono libblas3 164s libcairo2 libdatrie1 libdeflate0 libfontconfig1 libfreetype6 libgfortran5 164s libgomp1 libgraphite2-3 libharfbuzz0b libice6 libjbig0 libjpeg-turbo8 164s libjpeg8 liblapack3 libnlopt0 libpango-1.0-0 libpangocairo-1.0-0 164s libpangoft2-1.0-0 libpaper-utils libpaper2 libpixman-1-0 libsharpyuv0 libsm6 164s libtcl8.6 libthai-data libthai0 libtiff6 libtk8.6 libwebp7 libxcb-render0 164s libxcb-shm0 libxft2 libxrender1 libxss1 libxt6t64 littler r-base-core 164s r-cran-boot r-cran-brio r-cran-callr r-cran-cli r-cran-crayon r-cran-desc 164s r-cran-diffobj r-cran-digest r-cran-evaluate r-cran-fs r-cran-glue 164s r-cran-jsonlite r-cran-lattice r-cran-lifecycle r-cran-littler r-cran-lme4 164s r-cran-magrittr r-cran-mass r-cran-matrix r-cran-minqa r-cran-nlme 164s r-cran-nloptr r-cran-nnet r-cran-numderiv r-cran-ordinal r-cran-pkgbuild 164s r-cran-pkgkitten r-cran-pkgload r-cran-praise r-cran-processx r-cran-ps 164s r-cran-r6 r-cran-rbibutils r-cran-rcpp r-cran-rcppeigen r-cran-rdpack 164s r-cran-reformulas r-cran-rlang r-cran-rprojroot r-cran-statmod 164s r-cran-testthat r-cran-ucminf r-cran-waldo r-cran-withr r-cran-xtable unzip 164s x11-common xdg-utils zip 164s 0 upgraded, 91 newly installed, 0 to remove and 0 not upgraded. 164s Need to get 72.8 MB of archives. 164s After this operation, 148 MB of additional disk space will be used. 164s Get:1 http://ftpmaster.internal/ubuntu plucky/main s390x libfreetype6 s390x 2.13.3+dfsg-1 [431 kB] 164s Get:2 http://ftpmaster.internal/ubuntu plucky/main s390x fonts-dejavu-mono all 2.37-8 [502 kB] 165s Get:3 http://ftpmaster.internal/ubuntu plucky/main s390x fonts-dejavu-core all 2.37-8 [835 kB] 166s Get:4 http://ftpmaster.internal/ubuntu plucky/main s390x fontconfig-config s390x 2.15.0-2ubuntu1 [37.5 kB] 166s Get:5 http://ftpmaster.internal/ubuntu plucky/main s390x libfontconfig1 s390x 2.15.0-2ubuntu1 [150 kB] 166s Get:6 http://ftpmaster.internal/ubuntu plucky/main s390x fontconfig s390x 2.15.0-2ubuntu1 [191 kB] 166s Get:7 http://ftpmaster.internal/ubuntu plucky/main s390x libblas3 s390x 3.12.1-2 [252 kB] 166s Get:8 http://ftpmaster.internal/ubuntu plucky/main s390x libpixman-1-0 s390x 0.44.0-3 [201 kB] 166s Get:9 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-render0 s390x 1.17.0-2 [17.0 kB] 166s Get:10 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-shm0 s390x 1.17.0-2 [5862 B] 167s Get:11 http://ftpmaster.internal/ubuntu plucky/main s390x libxrender1 s390x 1:0.9.10-1.1build1 [20.4 kB] 167s Get:12 http://ftpmaster.internal/ubuntu plucky/main s390x libcairo2 s390x 1.18.2-2 [580 kB] 167s Get:13 http://ftpmaster.internal/ubuntu plucky/main s390x libdatrie1 s390x 0.2.13-3build1 [20.6 kB] 167s Get:14 http://ftpmaster.internal/ubuntu plucky/main s390x libdeflate0 s390x 1.23-1 [46.1 kB] 167s Get:15 http://ftpmaster.internal/ubuntu plucky/main s390x libgfortran5 s390x 15-20250222-0ubuntu1 [620 kB] 168s Get:16 http://ftpmaster.internal/ubuntu plucky/main s390x libgomp1 s390x 15-20250222-0ubuntu1 [152 kB] 168s Get:17 http://ftpmaster.internal/ubuntu plucky/main s390x libgraphite2-3 s390x 1.3.14-2ubuntu1 [79.8 kB] 168s Get:18 http://ftpmaster.internal/ubuntu plucky/main s390x libharfbuzz0b s390x 10.2.0-1 [538 kB] 169s Get:19 http://ftpmaster.internal/ubuntu plucky/main s390x x11-common all 1:7.7+23ubuntu3 [21.7 kB] 169s Get:20 http://ftpmaster.internal/ubuntu plucky/main s390x libice6 s390x 2:1.1.1-1 [45.4 kB] 169s Get:21 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg-turbo8 s390x 2.1.5-3ubuntu2 [147 kB] 169s Get:22 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg8 s390x 8c-2ubuntu11 [2146 B] 169s Get:23 http://ftpmaster.internal/ubuntu plucky/main s390x liblapack3 s390x 3.12.1-2 [2971 kB] 171s Get:24 http://ftpmaster.internal/ubuntu plucky/main s390x libthai-data all 0.1.29-2build1 [158 kB] 171s Get:25 http://ftpmaster.internal/ubuntu plucky/main s390x libthai0 s390x 0.1.29-2build1 [20.7 kB] 171s Get:26 http://ftpmaster.internal/ubuntu plucky/main s390x libpango-1.0-0 s390x 1.56.2-1 [253 kB] 172s Get:27 http://ftpmaster.internal/ubuntu plucky/main s390x libpangoft2-1.0-0 s390x 1.56.2-1 [50.2 kB] 172s Get:28 http://ftpmaster.internal/ubuntu plucky/main s390x libpangocairo-1.0-0 s390x 1.56.2-1 [28.2 kB] 172s Get:29 http://ftpmaster.internal/ubuntu plucky/main s390x libpaper2 s390x 2.2.5-0.3 [17.2 kB] 172s Get:30 http://ftpmaster.internal/ubuntu plucky/main s390x libpaper-utils s390x 2.2.5-0.3 [15.3 kB] 172s Get:31 http://ftpmaster.internal/ubuntu plucky/main s390x libsharpyuv0 s390x 1.5.0-0.1 [16.7 kB] 172s Get:32 http://ftpmaster.internal/ubuntu plucky/main s390x libsm6 s390x 2:1.2.4-1 [18.4 kB] 172s Get:33 http://ftpmaster.internal/ubuntu plucky/main s390x libtcl8.6 s390x 8.6.16+dfsg-1 [1034 kB] 172s Get:34 http://ftpmaster.internal/ubuntu plucky/main s390x libjbig0 s390x 2.1-6.1ubuntu2 [33.1 kB] 173s Get:35 http://ftpmaster.internal/ubuntu plucky/main s390x libwebp7 s390x 1.5.0-0.1 [210 kB] 173s Get:36 http://ftpmaster.internal/ubuntu plucky/main s390x libtiff6 s390x 4.5.1+git230720-4ubuntu4 [217 kB] 173s Get:37 http://ftpmaster.internal/ubuntu plucky/main s390x libxft2 s390x 2.3.6-1build1 [49.6 kB] 173s Get:38 http://ftpmaster.internal/ubuntu plucky/main s390x libxss1 s390x 1:1.2.3-1build3 [7396 B] 173s Get:39 http://ftpmaster.internal/ubuntu plucky/main s390x libtk8.6 s390x 8.6.16-1 [830 kB] 174s Get:40 http://ftpmaster.internal/ubuntu plucky/main s390x libxt6t64 s390x 1:1.2.1-1.2build1 [184 kB] 174s Get:41 http://ftpmaster.internal/ubuntu plucky/main s390x zip s390x 3.0-14ubuntu2 [187 kB] 174s Get:42 http://ftpmaster.internal/ubuntu plucky/main s390x unzip s390x 6.0-28ubuntu6 [186 kB] 174s Get:43 http://ftpmaster.internal/ubuntu plucky/main s390x xdg-utils all 1.2.1-2ubuntu1 [66.0 kB] 174s Get:44 http://ftpmaster.internal/ubuntu plucky/universe s390x r-base-core s390x 4.4.3-1 [28.6 MB] 200s Get:45 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-littler s390x 0.3.20-2 [95.0 kB] 200s Get:46 http://ftpmaster.internal/ubuntu plucky/universe s390x littler all 0.3.20-2 [2554 B] 200s Get:47 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-boot all 1.3-31-1 [635 kB] 201s Get:48 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-brio s390x 1.1.5-1 [38.6 kB] 201s Get:49 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-ps s390x 1.9.0-1 [408 kB] 201s Get:50 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-r6 all 2.6.1-1 [101 kB] 201s Get:51 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-processx s390x 3.8.6-1 [364 kB] 201s Get:52 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-callr all 3.7.6-1 [458 kB] 202s Get:53 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-cli s390x 3.6.4-1 [1379 kB] 203s Get:54 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-crayon all 1.5.3-1 [165 kB] 203s Get:55 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-desc all 1.4.3-1 [359 kB] 204s Get:56 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-diffobj s390x 0.3.5-1 [1115 kB] 205s Get:57 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-digest s390x 0.6.37-1 [205 kB] 205s Get:58 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-evaluate all 1.0.3-1 [114 kB] 205s Get:59 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-fs s390x 1.6.5+dfsg-1 [245 kB] 206s Get:60 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-glue s390x 1.8.0-1 [164 kB] 206s Get:61 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-jsonlite s390x 1.9.1+dfsg-1 [447 kB] 206s Get:62 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-lattice s390x 0.22-6-1 [1340 kB] 208s Get:63 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-rlang s390x 1.1.5-1 [1713 kB] 210s Get:64 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-lifecycle all 1.0.4+dfsg-1 [110 kB] 210s Get:65 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-matrix s390x 1.7-3-1 [4449 kB] 215s Get:66 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-mass s390x 7.3-64-1 [1113 kB] 216s Get:67 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-nlme s390x 3.1.167-1 [2323 kB] 218s Get:68 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-pkgkitten all 0.2.4-1 [27.2 kB] 218s Get:69 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-rcpp s390x 1.0.14-1 [2003 kB] 219s Get:70 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-minqa s390x 1.2.8-1 [139 kB] 220s Get:71 http://ftpmaster.internal/ubuntu plucky/universe s390x libnlopt0 s390x 2.7.1-6ubuntu3 [227 kB] 220s Get:72 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-nloptr s390x 2.1.1-1 [252 kB] 220s Get:73 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-rbibutils s390x 2.3-1 [1041 kB] 221s Get:74 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-rdpack all 2.6.2-1syncable1 [756 kB] 221s Get:75 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-reformulas all 0.4.0-1 [91.5 kB] 221s Get:76 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-rcppeigen s390x 0.3.4.0.2-1 [1429 kB] 223s Get:77 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-statmod s390x 1.5.0-1 [294 kB] 223s Get:78 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-lme4 s390x 1.1-36-1 [4141 kB] 227s Get:79 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-magrittr s390x 2.0.3-1 [154 kB] 227s Get:80 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-nnet s390x 7.3-20-1 [116 kB] 227s Get:81 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-numderiv all 2016.8-1.1-3 [115 kB] 227s Get:82 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-ucminf s390x 1.2.2-1 [35.8 kB] 227s Get:83 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-ordinal s390x 2023.12-4.1-1 [1269 kB] 228s Get:84 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-pkgbuild all 1.4.6-1 [213 kB] 229s Get:85 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-rprojroot all 2.0.4-2 [125 kB] 229s Get:86 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-withr all 3.0.2+dfsg-1 [214 kB] 229s Get:87 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-pkgload all 1.4.0-1 [247 kB] 229s Get:88 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-praise all 1.0.0-4build1 [20.3 kB] 229s Get:89 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-waldo all 0.6.1-2 [150 kB] 229s Get:90 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-testthat s390x 3.2.3-1 [1641 kB] 231s Get:91 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-xtable all 1:1.8-4-2 [689 kB] 232s Preconfiguring packages ... 232s Fetched 72.8 MB in 1min 8s (1076 kB/s) 232s Selecting previously unselected package libfreetype6:s390x. 232s (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 ... 56326 files and directories currently installed.) 232s Preparing to unpack .../00-libfreetype6_2.13.3+dfsg-1_s390x.deb ... 232s Unpacking libfreetype6:s390x (2.13.3+dfsg-1) ... 232s Selecting previously unselected package fonts-dejavu-mono. 232s Preparing to unpack .../01-fonts-dejavu-mono_2.37-8_all.deb ... 232s Unpacking fonts-dejavu-mono (2.37-8) ... 232s Selecting previously unselected package fonts-dejavu-core. 232s Preparing to unpack .../02-fonts-dejavu-core_2.37-8_all.deb ... 232s Unpacking fonts-dejavu-core (2.37-8) ... 232s Selecting previously unselected package fontconfig-config. 232s Preparing to unpack .../03-fontconfig-config_2.15.0-2ubuntu1_s390x.deb ... 232s Unpacking fontconfig-config (2.15.0-2ubuntu1) ... 232s Selecting previously unselected package libfontconfig1:s390x. 232s Preparing to unpack .../04-libfontconfig1_2.15.0-2ubuntu1_s390x.deb ... 232s Unpacking libfontconfig1:s390x (2.15.0-2ubuntu1) ... 232s Selecting previously unselected package fontconfig. 232s Preparing to unpack .../05-fontconfig_2.15.0-2ubuntu1_s390x.deb ... 232s Unpacking fontconfig (2.15.0-2ubuntu1) ... 232s Selecting previously unselected package libblas3:s390x. 232s Preparing to unpack .../06-libblas3_3.12.1-2_s390x.deb ... 232s Unpacking libblas3:s390x (3.12.1-2) ... 232s Selecting previously unselected package libpixman-1-0:s390x. 232s Preparing to unpack .../07-libpixman-1-0_0.44.0-3_s390x.deb ... 232s Unpacking libpixman-1-0:s390x (0.44.0-3) ... 232s Selecting previously unselected package libxcb-render0:s390x. 232s Preparing to unpack .../08-libxcb-render0_1.17.0-2_s390x.deb ... 232s Unpacking libxcb-render0:s390x (1.17.0-2) ... 232s Selecting previously unselected package libxcb-shm0:s390x. 232s Preparing to unpack .../09-libxcb-shm0_1.17.0-2_s390x.deb ... 232s Unpacking libxcb-shm0:s390x (1.17.0-2) ... 232s Selecting previously unselected package libxrender1:s390x. 232s Preparing to unpack .../10-libxrender1_1%3a0.9.10-1.1build1_s390x.deb ... 232s Unpacking libxrender1:s390x (1:0.9.10-1.1build1) ... 232s Selecting previously unselected package libcairo2:s390x. 232s Preparing to unpack .../11-libcairo2_1.18.2-2_s390x.deb ... 232s Unpacking libcairo2:s390x (1.18.2-2) ... 232s Selecting previously unselected package libdatrie1:s390x. 232s Preparing to unpack .../12-libdatrie1_0.2.13-3build1_s390x.deb ... 232s Unpacking libdatrie1:s390x (0.2.13-3build1) ... 232s Selecting previously unselected package libdeflate0:s390x. 232s Preparing to unpack .../13-libdeflate0_1.23-1_s390x.deb ... 232s Unpacking libdeflate0:s390x (1.23-1) ... 232s Selecting previously unselected package libgfortran5:s390x. 232s Preparing to unpack .../14-libgfortran5_15-20250222-0ubuntu1_s390x.deb ... 232s Unpacking libgfortran5:s390x (15-20250222-0ubuntu1) ... 232s Selecting previously unselected package libgomp1:s390x. 232s Preparing to unpack .../15-libgomp1_15-20250222-0ubuntu1_s390x.deb ... 232s Unpacking libgomp1:s390x (15-20250222-0ubuntu1) ... 232s Selecting previously unselected package libgraphite2-3:s390x. 232s Preparing to unpack .../16-libgraphite2-3_1.3.14-2ubuntu1_s390x.deb ... 232s Unpacking libgraphite2-3:s390x (1.3.14-2ubuntu1) ... 232s Selecting previously unselected package libharfbuzz0b:s390x. 232s Preparing to unpack .../17-libharfbuzz0b_10.2.0-1_s390x.deb ... 232s Unpacking libharfbuzz0b:s390x (10.2.0-1) ... 232s Selecting previously unselected package x11-common. 232s Preparing to unpack .../18-x11-common_1%3a7.7+23ubuntu3_all.deb ... 232s Unpacking x11-common (1:7.7+23ubuntu3) ... 232s Selecting previously unselected package libice6:s390x. 232s Preparing to unpack .../19-libice6_2%3a1.1.1-1_s390x.deb ... 232s Unpacking libice6:s390x (2:1.1.1-1) ... 232s Selecting previously unselected package libjpeg-turbo8:s390x. 232s Preparing to unpack .../20-libjpeg-turbo8_2.1.5-3ubuntu2_s390x.deb ... 232s Unpacking libjpeg-turbo8:s390x (2.1.5-3ubuntu2) ... 232s Selecting previously unselected package libjpeg8:s390x. 232s Preparing to unpack .../21-libjpeg8_8c-2ubuntu11_s390x.deb ... 232s Unpacking libjpeg8:s390x (8c-2ubuntu11) ... 232s Selecting previously unselected package liblapack3:s390x. 232s Preparing to unpack .../22-liblapack3_3.12.1-2_s390x.deb ... 232s Unpacking liblapack3:s390x (3.12.1-2) ... 232s Selecting previously unselected package libthai-data. 232s Preparing to unpack .../23-libthai-data_0.1.29-2build1_all.deb ... 232s Unpacking libthai-data (0.1.29-2build1) ... 232s Selecting previously unselected package libthai0:s390x. 232s Preparing to unpack .../24-libthai0_0.1.29-2build1_s390x.deb ... 232s Unpacking libthai0:s390x (0.1.29-2build1) ... 232s Selecting previously unselected package libpango-1.0-0:s390x. 232s Preparing to unpack .../25-libpango-1.0-0_1.56.2-1_s390x.deb ... 232s Unpacking libpango-1.0-0:s390x (1.56.2-1) ... 232s Selecting previously unselected package libpangoft2-1.0-0:s390x. 232s Preparing to unpack .../26-libpangoft2-1.0-0_1.56.2-1_s390x.deb ... 232s Unpacking libpangoft2-1.0-0:s390x (1.56.2-1) ... 232s Selecting previously unselected package libpangocairo-1.0-0:s390x. 232s Preparing to unpack .../27-libpangocairo-1.0-0_1.56.2-1_s390x.deb ... 232s Unpacking libpangocairo-1.0-0:s390x (1.56.2-1) ... 232s Selecting previously unselected package libpaper2:s390x. 232s Preparing to unpack .../28-libpaper2_2.2.5-0.3_s390x.deb ... 232s Unpacking libpaper2:s390x (2.2.5-0.3) ... 232s Selecting previously unselected package libpaper-utils. 232s Preparing to unpack .../29-libpaper-utils_2.2.5-0.3_s390x.deb ... 232s Unpacking libpaper-utils (2.2.5-0.3) ... 232s Selecting previously unselected package libsharpyuv0:s390x. 232s Preparing to unpack .../30-libsharpyuv0_1.5.0-0.1_s390x.deb ... 232s Unpacking libsharpyuv0:s390x (1.5.0-0.1) ... 232s Selecting previously unselected package libsm6:s390x. 232s Preparing to unpack .../31-libsm6_2%3a1.2.4-1_s390x.deb ... 232s Unpacking libsm6:s390x (2:1.2.4-1) ... 232s Selecting previously unselected package libtcl8.6:s390x. 232s Preparing to unpack .../32-libtcl8.6_8.6.16+dfsg-1_s390x.deb ... 232s Unpacking libtcl8.6:s390x (8.6.16+dfsg-1) ... 232s Selecting previously unselected package libjbig0:s390x. 232s Preparing to unpack .../33-libjbig0_2.1-6.1ubuntu2_s390x.deb ... 232s Unpacking libjbig0:s390x (2.1-6.1ubuntu2) ... 232s Selecting previously unselected package libwebp7:s390x. 232s Preparing to unpack .../34-libwebp7_1.5.0-0.1_s390x.deb ... 232s Unpacking libwebp7:s390x (1.5.0-0.1) ... 232s Selecting previously unselected package libtiff6:s390x. 232s Preparing to unpack .../35-libtiff6_4.5.1+git230720-4ubuntu4_s390x.deb ... 232s Unpacking libtiff6:s390x (4.5.1+git230720-4ubuntu4) ... 232s Selecting previously unselected package libxft2:s390x. 232s Preparing to unpack .../36-libxft2_2.3.6-1build1_s390x.deb ... 232s Unpacking libxft2:s390x (2.3.6-1build1) ... 232s Selecting previously unselected package libxss1:s390x. 232s Preparing to unpack .../37-libxss1_1%3a1.2.3-1build3_s390x.deb ... 232s Unpacking libxss1:s390x (1:1.2.3-1build3) ... 232s Selecting previously unselected package libtk8.6:s390x. 232s Preparing to unpack .../38-libtk8.6_8.6.16-1_s390x.deb ... 232s Unpacking libtk8.6:s390x (8.6.16-1) ... 233s Selecting previously unselected package libxt6t64:s390x. 233s Preparing to unpack .../39-libxt6t64_1%3a1.2.1-1.2build1_s390x.deb ... 233s Unpacking libxt6t64:s390x (1:1.2.1-1.2build1) ... 233s Selecting previously unselected package zip. 233s Preparing to unpack .../40-zip_3.0-14ubuntu2_s390x.deb ... 233s Unpacking zip (3.0-14ubuntu2) ... 233s Selecting previously unselected package unzip. 233s Preparing to unpack .../41-unzip_6.0-28ubuntu6_s390x.deb ... 233s Unpacking unzip (6.0-28ubuntu6) ... 233s Selecting previously unselected package xdg-utils. 233s Preparing to unpack .../42-xdg-utils_1.2.1-2ubuntu1_all.deb ... 233s Unpacking xdg-utils (1.2.1-2ubuntu1) ... 233s Selecting previously unselected package r-base-core. 233s Preparing to unpack .../43-r-base-core_4.4.3-1_s390x.deb ... 233s Unpacking r-base-core (4.4.3-1) ... 233s Selecting previously unselected package r-cran-littler. 233s Preparing to unpack .../44-r-cran-littler_0.3.20-2_s390x.deb ... 233s Unpacking r-cran-littler (0.3.20-2) ... 233s Selecting previously unselected package littler. 233s Preparing to unpack .../45-littler_0.3.20-2_all.deb ... 233s Unpacking littler (0.3.20-2) ... 233s Selecting previously unselected package r-cran-boot. 233s Preparing to unpack .../46-r-cran-boot_1.3-31-1_all.deb ... 233s Unpacking r-cran-boot (1.3-31-1) ... 233s Selecting previously unselected package r-cran-brio. 233s Preparing to unpack .../47-r-cran-brio_1.1.5-1_s390x.deb ... 233s Unpacking r-cran-brio (1.1.5-1) ... 233s Selecting previously unselected package r-cran-ps. 233s Preparing to unpack .../48-r-cran-ps_1.9.0-1_s390x.deb ... 233s Unpacking r-cran-ps (1.9.0-1) ... 233s Selecting previously unselected package r-cran-r6. 233s Preparing to unpack .../49-r-cran-r6_2.6.1-1_all.deb ... 233s Unpacking r-cran-r6 (2.6.1-1) ... 233s Selecting previously unselected package r-cran-processx. 233s Preparing to unpack .../50-r-cran-processx_3.8.6-1_s390x.deb ... 233s Unpacking r-cran-processx (3.8.6-1) ... 233s Selecting previously unselected package r-cran-callr. 233s Preparing to unpack .../51-r-cran-callr_3.7.6-1_all.deb ... 233s Unpacking r-cran-callr (3.7.6-1) ... 233s Selecting previously unselected package r-cran-cli. 233s Preparing to unpack .../52-r-cran-cli_3.6.4-1_s390x.deb ... 233s Unpacking r-cran-cli (3.6.4-1) ... 233s Selecting previously unselected package r-cran-crayon. 233s Preparing to unpack .../53-r-cran-crayon_1.5.3-1_all.deb ... 233s Unpacking r-cran-crayon (1.5.3-1) ... 233s Selecting previously unselected package r-cran-desc. 233s Preparing to unpack .../54-r-cran-desc_1.4.3-1_all.deb ... 233s Unpacking r-cran-desc (1.4.3-1) ... 233s Selecting previously unselected package r-cran-diffobj. 233s Preparing to unpack .../55-r-cran-diffobj_0.3.5-1_s390x.deb ... 233s Unpacking r-cran-diffobj (0.3.5-1) ... 233s Selecting previously unselected package r-cran-digest. 233s Preparing to unpack .../56-r-cran-digest_0.6.37-1_s390x.deb ... 233s Unpacking r-cran-digest (0.6.37-1) ... 233s Selecting previously unselected package r-cran-evaluate. 233s Preparing to unpack .../57-r-cran-evaluate_1.0.3-1_all.deb ... 233s Unpacking r-cran-evaluate (1.0.3-1) ... 233s Selecting previously unselected package r-cran-fs. 233s Preparing to unpack .../58-r-cran-fs_1.6.5+dfsg-1_s390x.deb ... 233s Unpacking r-cran-fs (1.6.5+dfsg-1) ... 233s Selecting previously unselected package r-cran-glue. 233s Preparing to unpack .../59-r-cran-glue_1.8.0-1_s390x.deb ... 233s Unpacking r-cran-glue (1.8.0-1) ... 233s Selecting previously unselected package r-cran-jsonlite. 233s Preparing to unpack .../60-r-cran-jsonlite_1.9.1+dfsg-1_s390x.deb ... 233s Unpacking r-cran-jsonlite (1.9.1+dfsg-1) ... 233s Selecting previously unselected package r-cran-lattice. 233s Preparing to unpack .../61-r-cran-lattice_0.22-6-1_s390x.deb ... 233s Unpacking r-cran-lattice (0.22-6-1) ... 233s Selecting previously unselected package r-cran-rlang. 233s Preparing to unpack .../62-r-cran-rlang_1.1.5-1_s390x.deb ... 233s Unpacking r-cran-rlang (1.1.5-1) ... 233s Selecting previously unselected package r-cran-lifecycle. 233s Preparing to unpack .../63-r-cran-lifecycle_1.0.4+dfsg-1_all.deb ... 233s Unpacking r-cran-lifecycle (1.0.4+dfsg-1) ... 233s Selecting previously unselected package r-cran-matrix. 233s Preparing to unpack .../64-r-cran-matrix_1.7-3-1_s390x.deb ... 233s Unpacking r-cran-matrix (1.7-3-1) ... 233s Selecting previously unselected package r-cran-mass. 233s Preparing to unpack .../65-r-cran-mass_7.3-64-1_s390x.deb ... 233s Unpacking r-cran-mass (7.3-64-1) ... 233s Selecting previously unselected package r-cran-nlme. 233s Preparing to unpack .../66-r-cran-nlme_3.1.167-1_s390x.deb ... 233s Unpacking r-cran-nlme (3.1.167-1) ... 233s Selecting previously unselected package r-cran-pkgkitten. 233s Preparing to unpack .../67-r-cran-pkgkitten_0.2.4-1_all.deb ... 233s Unpacking r-cran-pkgkitten (0.2.4-1) ... 233s Selecting previously unselected package r-cran-rcpp. 233s Preparing to unpack .../68-r-cran-rcpp_1.0.14-1_s390x.deb ... 233s Unpacking r-cran-rcpp (1.0.14-1) ... 233s Selecting previously unselected package r-cran-minqa. 233s Preparing to unpack .../69-r-cran-minqa_1.2.8-1_s390x.deb ... 233s Unpacking r-cran-minqa (1.2.8-1) ... 233s Selecting previously unselected package libnlopt0:s390x. 233s Preparing to unpack .../70-libnlopt0_2.7.1-6ubuntu3_s390x.deb ... 233s Unpacking libnlopt0:s390x (2.7.1-6ubuntu3) ... 233s Selecting previously unselected package r-cran-nloptr. 233s Preparing to unpack .../71-r-cran-nloptr_2.1.1-1_s390x.deb ... 233s Unpacking r-cran-nloptr (2.1.1-1) ... 233s Selecting previously unselected package r-cran-rbibutils. 233s Preparing to unpack .../72-r-cran-rbibutils_2.3-1_s390x.deb ... 233s Unpacking r-cran-rbibutils (2.3-1) ... 233s Selecting previously unselected package r-cran-rdpack. 233s Preparing to unpack .../73-r-cran-rdpack_2.6.2-1syncable1_all.deb ... 233s Unpacking r-cran-rdpack (2.6.2-1syncable1) ... 233s Selecting previously unselected package r-cran-reformulas. 233s Preparing to unpack .../74-r-cran-reformulas_0.4.0-1_all.deb ... 233s Unpacking r-cran-reformulas (0.4.0-1) ... 233s Selecting previously unselected package r-cran-rcppeigen. 233s Preparing to unpack .../75-r-cran-rcppeigen_0.3.4.0.2-1_s390x.deb ... 233s Unpacking r-cran-rcppeigen (0.3.4.0.2-1) ... 233s Selecting previously unselected package r-cran-statmod. 233s Preparing to unpack .../76-r-cran-statmod_1.5.0-1_s390x.deb ... 233s Unpacking r-cran-statmod (1.5.0-1) ... 233s Selecting previously unselected package r-cran-lme4. 233s Preparing to unpack .../77-r-cran-lme4_1.1-36-1_s390x.deb ... 233s Unpacking r-cran-lme4 (1.1-36-1) ... 233s Selecting previously unselected package r-cran-magrittr. 233s Preparing to unpack .../78-r-cran-magrittr_2.0.3-1_s390x.deb ... 233s Unpacking r-cran-magrittr (2.0.3-1) ... 233s Selecting previously unselected package r-cran-nnet. 233s Preparing to unpack .../79-r-cran-nnet_7.3-20-1_s390x.deb ... 233s Unpacking r-cran-nnet (7.3-20-1) ... 233s Selecting previously unselected package r-cran-numderiv. 233s Preparing to unpack .../80-r-cran-numderiv_2016.8-1.1-3_all.deb ... 233s Unpacking r-cran-numderiv (2016.8-1.1-3) ... 233s Selecting previously unselected package r-cran-ucminf. 233s Preparing to unpack .../81-r-cran-ucminf_1.2.2-1_s390x.deb ... 233s Unpacking r-cran-ucminf (1.2.2-1) ... 233s Selecting previously unselected package r-cran-ordinal. 233s Preparing to unpack .../82-r-cran-ordinal_2023.12-4.1-1_s390x.deb ... 233s Unpacking r-cran-ordinal (2023.12-4.1-1) ... 234s Selecting previously unselected package r-cran-pkgbuild. 234s Preparing to unpack .../83-r-cran-pkgbuild_1.4.6-1_all.deb ... 234s Unpacking r-cran-pkgbuild (1.4.6-1) ... 234s Selecting previously unselected package r-cran-rprojroot. 234s Preparing to unpack .../84-r-cran-rprojroot_2.0.4-2_all.deb ... 234s Unpacking r-cran-rprojroot (2.0.4-2) ... 234s Selecting previously unselected package r-cran-withr. 234s Preparing to unpack .../85-r-cran-withr_3.0.2+dfsg-1_all.deb ... 234s Unpacking r-cran-withr (3.0.2+dfsg-1) ... 234s Selecting previously unselected package r-cran-pkgload. 234s Preparing to unpack .../86-r-cran-pkgload_1.4.0-1_all.deb ... 234s Unpacking r-cran-pkgload (1.4.0-1) ... 234s Selecting previously unselected package r-cran-praise. 234s Preparing to unpack .../87-r-cran-praise_1.0.0-4build1_all.deb ... 234s Unpacking r-cran-praise (1.0.0-4build1) ... 234s Selecting previously unselected package r-cran-waldo. 234s Preparing to unpack .../88-r-cran-waldo_0.6.1-2_all.deb ... 234s Unpacking r-cran-waldo (0.6.1-2) ... 234s Selecting previously unselected package r-cran-testthat. 234s Preparing to unpack .../89-r-cran-testthat_3.2.3-1_s390x.deb ... 234s Unpacking r-cran-testthat (3.2.3-1) ... 234s Selecting previously unselected package r-cran-xtable. 234s Preparing to unpack .../90-r-cran-xtable_1%3a1.8-4-2_all.deb ... 234s Unpacking r-cran-xtable (1:1.8-4-2) ... 234s Setting up libgraphite2-3:s390x (1.3.14-2ubuntu1) ... 234s Setting up libpixman-1-0:s390x (0.44.0-3) ... 234s Setting up libsharpyuv0:s390x (1.5.0-0.1) ... 234s Setting up libxrender1:s390x (1:0.9.10-1.1build1) ... 234s Setting up libdatrie1:s390x (0.2.13-3build1) ... 234s Setting up libxcb-render0:s390x (1.17.0-2) ... 234s Setting up unzip (6.0-28ubuntu6) ... 234s Setting up x11-common (1:7.7+23ubuntu3) ... 234s Setting up libdeflate0:s390x (1.23-1) ... 234s Setting up libnlopt0:s390x (2.7.1-6ubuntu3) ... 234s Setting up libxcb-shm0:s390x (1.17.0-2) ... 234s Setting up libgomp1:s390x (15-20250222-0ubuntu1) ... 234s Setting up libjbig0:s390x (2.1-6.1ubuntu2) ... 234s Setting up zip (3.0-14ubuntu2) ... 234s Setting up libblas3:s390x (3.12.1-2) ... 234s update-alternatives: using /usr/lib/s390x-linux-gnu/blas/libblas.so.3 to provide /usr/lib/s390x-linux-gnu/libblas.so.3 (libblas.so.3-s390x-linux-gnu) in auto mode 234s Setting up libfreetype6:s390x (2.13.3+dfsg-1) ... 234s Setting up fonts-dejavu-mono (2.37-8) ... 234s Setting up libtcl8.6:s390x (8.6.16+dfsg-1) ... 234s Setting up fonts-dejavu-core (2.37-8) ... 234s Setting up libjpeg-turbo8:s390x (2.1.5-3ubuntu2) ... 234s Setting up libgfortran5:s390x (15-20250222-0ubuntu1) ... 234s Setting up libwebp7:s390x (1.5.0-0.1) ... 234s Setting up libharfbuzz0b:s390x (10.2.0-1) ... 234s Setting up libthai-data (0.1.29-2build1) ... 234s Setting up libxss1:s390x (1:1.2.3-1build3) ... 234s Setting up libpaper2:s390x (2.2.5-0.3) ... 234s Setting up xdg-utils (1.2.1-2ubuntu1) ... 234s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 234s Setting up libjpeg8:s390x (8c-2ubuntu11) ... 234s Setting up libice6:s390x (2:1.1.1-1) ... 234s Setting up liblapack3:s390x (3.12.1-2) ... 234s update-alternatives: using /usr/lib/s390x-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/s390x-linux-gnu/liblapack.so.3 (liblapack.so.3-s390x-linux-gnu) in auto mode 234s Setting up fontconfig-config (2.15.0-2ubuntu1) ... 234s Setting up libpaper-utils (2.2.5-0.3) ... 234s Setting up libthai0:s390x (0.1.29-2build1) ... 234s Setting up libtiff6:s390x (4.5.1+git230720-4ubuntu4) ... 234s Setting up libfontconfig1:s390x (2.15.0-2ubuntu1) ... 234s Setting up libsm6:s390x (2:1.2.4-1) ... 234s Setting up fontconfig (2.15.0-2ubuntu1) ... 236s Regenerating fonts cache... done. 236s Setting up libxft2:s390x (2.3.6-1build1) ... 236s Setting up libtk8.6:s390x (8.6.16-1) ... 236s Setting up libpango-1.0-0:s390x (1.56.2-1) ... 236s Setting up libcairo2:s390x (1.18.2-2) ... 236s Setting up libxt6t64:s390x (1:1.2.1-1.2build1) ... 236s Setting up libpangoft2-1.0-0:s390x (1.56.2-1) ... 236s Setting up libpangocairo-1.0-0:s390x (1.56.2-1) ... 236s Setting up r-base-core (4.4.3-1) ... 236s Creating config file /etc/R/Renviron with new version 236s Setting up r-cran-crayon (1.5.3-1) ... 236s Setting up r-cran-lattice (0.22-6-1) ... 236s Setting up r-cran-ps (1.9.0-1) ... 236s Setting up r-cran-nlme (3.1.167-1) ... 236s Setting up r-cran-statmod (1.5.0-1) ... 236s Setting up r-cran-nnet (7.3-20-1) ... 236s Setting up r-cran-r6 (2.6.1-1) ... 236s Setting up r-cran-pkgkitten (0.2.4-1) ... 236s Setting up r-cran-numderiv (2016.8-1.1-3) ... 236s Setting up r-cran-magrittr (2.0.3-1) ... 236s Setting up r-cran-littler (0.3.20-2) ... 236s Setting up r-cran-fs (1.6.5+dfsg-1) ... 236s Setting up r-cran-rcpp (1.0.14-1) ... 236s Setting up r-cran-brio (1.1.5-1) ... 236s Setting up r-cran-nloptr (2.1.1-1) ... 236s Setting up r-cran-boot (1.3-31-1) ... 236s Setting up r-cran-diffobj (0.3.5-1) ... 236s Setting up r-cran-rlang (1.1.5-1) ... 236s Setting up littler (0.3.20-2) ... 236s Setting up r-cran-withr (3.0.2+dfsg-1) ... 236s Setting up r-cran-processx (3.8.6-1) ... 236s Setting up r-cran-praise (1.0.0-4build1) ... 236s Setting up r-cran-digest (0.6.37-1) ... 236s Setting up r-cran-evaluate (1.0.3-1) ... 236s Setting up r-cran-mass (7.3-64-1) ... 236s Setting up r-cran-glue (1.8.0-1) ... 236s Setting up r-cran-xtable (1:1.8-4-2) ... 236s Setting up r-cran-cli (3.6.4-1) ... 236s Setting up r-cran-rbibutils (2.3-1) ... 236s Setting up r-cran-lifecycle (1.0.4+dfsg-1) ... 236s Setting up r-cran-rprojroot (2.0.4-2) ... 236s Setting up r-cran-jsonlite (1.9.1+dfsg-1) ... 236s Setting up r-cran-ucminf (1.2.2-1) ... 236s Setting up r-cran-waldo (0.6.1-2) ... 236s Setting up r-cran-matrix (1.7-3-1) ... 236s Setting up r-cran-rcppeigen (0.3.4.0.2-1) ... 236s Setting up r-cran-minqa (1.2.8-1) ... 236s Setting up r-cran-callr (3.7.6-1) ... 236s Setting up r-cran-ordinal (2023.12-4.1-1) ... 236s Setting up r-cran-desc (1.4.3-1) ... 236s Setting up r-cran-rdpack (2.6.2-1syncable1) ... 236s Setting up r-cran-pkgbuild (1.4.6-1) ... 236s Setting up r-cran-reformulas (0.4.0-1) ... 236s Setting up r-cran-pkgload (1.4.0-1) ... 236s Setting up r-cran-lme4 (1.1-36-1) ... 236s Setting up r-cran-testthat (3.2.3-1) ... 236s Processing triggers for libc-bin (2.41-1ubuntu2) ... 236s Processing triggers for man-db (2.13.0-1) ... 237s Processing triggers for install-info (7.1.1-1) ... 238s autopkgtest [18:18:33]: test run-unit-test: [----------------------- 238s BEGIN TEST anova.R 239s 239s R version 4.4.3 (2025-02-28) -- "Trophy Case" 239s Copyright (C) 2025 The R Foundation for Statistical Computing 239s Platform: s390x-ibm-linux-gnu 239s 239s R is free software and comes with ABSOLUTELY NO WARRANTY. 239s You are welcome to redistribute it under certain conditions. 239s Type 'license()' or 'licence()' for distribution details. 239s 239s R is a collaborative project with many contributors. 239s Type 'contributors()' for more information and 239s 'citation()' on how to cite R or R packages in publications. 239s 239s Type 'demo()' for some demos, 'help()' for on-line help, or 239s 'help.start()' for an HTML browser interface to help. 239s Type 'q()' to quit R. 239s 239s > library(ordinal) 239s > data(wine) 239s > 239s > fm1 <- clm(rating ~ temp, data=wine) 239s > fmm1 <- clmm(rating ~ temp + (1|judge), data=wine) 240s > 240s > ## These now give identical printed results: 240s > ## Previously the printed model names were messed up when anova.clmm 240s > ## were called. 240s > anova(fm1, fmm1) 240s Likelihood ratio tests of cumulative link models: 240s 240s formula: link: threshold: 240s fm1 rating ~ temp logit flexible 240s fmm1 rating ~ temp + (1 | judge) logit flexible 240s 240s no.par AIC logLik LR.stat df Pr(>Chisq) 240s fm1 5 194.03 -92.013 240s fmm1 6 189.48 -88.739 6.5492 1 0.01049 * 240s --- 240s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 240s > anova(fmm1, fm1) 240s Likelihood ratio tests of cumulative link models: 240s 240s formula: link: threshold: 240s fm1 rating ~ temp logit flexible 240s fmm1 rating ~ temp + (1 | judge) logit flexible 240s 'test' argument ignored in anova.clm 240s 240s 'test' argument ignored in anova.clm 240s 240s 240s no.par AIC logLik LR.stat df Pr(>Chisq) 240s fm1 5 194.03 -92.013 240s fmm1 6 189.48 -88.739 6.5492 1 0.01049 * 240s --- 240s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 240s > 240s > ## Testing if 'test' and 'type' arguments are ignored properly: 240s > fm1 <- clm(rating ~ temp + contact, data=wine) 240s > fm2 <- clm(rating ~ temp, data=wine) 240s > anova(fm1, fm2, test="Chi") 240s Likelihood ratio tests of cumulative link models: 240s 240s formula: link: threshold: 240s fm2 rating ~ temp logit flexible 240s fm1 rating ~ temp + contact logit flexible 240s 240s no.par AIC logLik LR.stat df Pr(>Chisq) 240s fm2 5 194.03 -92.013 240s fm1 6 184.98 -86.492 11.043 1 0.0008902 *** 240s --- 240s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 240s > anova(fm1, fm2, type="Chi") 240s Likelihood ratio tests of cumulative link models: 240s 240s formula: link: threshold: 240s fm2 rating ~ temp logit flexible 240s fm1 rating ~ temp + contact logit flexible 240s 240s no.par AIC logLik LR.stat df Pr(>Chisq) 240s fm2 5 194.03 -92.013 240s fm1 6 184.98 -86.492 11.043 1 0.0008902 *** 240s --- 240s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 240s > anova(fm1, fm2) 240s Likelihood ratio tests of cumulative link models: 240s 240s formula: link: threshold: 240s fm2 rating ~ temp logit flexible 240s fm1 rating ~ temp + contact logit flexible 240s 240s no.par AIC logLik LR.stat df Pr(>Chisq) 240s fm2 5 194.03 -92.013 240s fm1 6 184.98 -86.492 11.043 1 0.0008902 *** 240s --- 240s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 240s > ## calling anova.clmm 240s > anova(fmm1, fm1, test="Chi") 240s Likelihood ratio tests of cumulative link models: 240s 240s formula: link: threshold: 240s fmm1 rating ~ temp + (1 | judge) logit flexible 240s fm1 rating ~ temp + contact logit flexible 240s 240s no.par AIC logLik LR.stat df Pr(>Chisq) 240s fmm1 6 189.48 -88.739 240s fm1 6 184.98 -86.492 4.4938 0 240s > anova(fmm1, fm1, type="Chi") 240s Likelihood ratio tests of cumulative link models: 240s 240s formula: link: threshold: 240s fmm1 rating ~ temp + (1 | judge) logit flexible 240s fm1 rating ~ temp + contact logit flexible 240s 240s no.par AIC logLik LR.stat df Pr(>Chisq) 240s fmm1 6 189.48 -88.739 240s fm1 6 184.98 -86.492 4.4938 0 240s > 240s > 240s BEGIN TEST clm.fit.R 240s 240s R version 4.4.3 (2025-02-28) -- "Trophy Case" 240s Copyright (C) 2025 The R Foundation for Statistical Computing 240s Platform: s390x-ibm-linux-gnu 240s 240s R is free software and comes with ABSOLUTELY NO WARRANTY. 240s You are welcome to redistribute it under certain conditions. 240s Type 'license()' or 'licence()' for distribution details. 240s 240s R is a collaborative project with many contributors. 240s Type 'contributors()' for more information and 240s 'citation()' on how to cite R or R packages in publications. 240s 240s Type 'demo()' for some demos, 'help()' for on-line help, or 240s 'help.start()' for an HTML browser interface to help. 240s Type 'q()' to quit R. 240s 240s > library(ordinal) 241s > data(wine) 241s > 241s > ## clm.fit with nominal and scale effects: 241s > 241s > ## get simple model: 241s > fm1 <- clm(rating ~ temp, scale=~temp, nominal=~ contact, 241s + data=wine, method="design") 241s > str(fm1, give.attr=FALSE) 241s List of 23 241s $ y : Ord.factor w/ 5 levels "1"<"2"<"3"<"4"<..: 2 3 3 4 4 4 5 5 1 2 ... 241s $ y.levels : chr [1:5] "1" "2" "3" "4" ... 241s $ X : num [1:72, 1:2] 1 1 1 1 1 1 1 1 1 1 ... 241s $ offset : num [1:72] 0 0 0 0 0 0 0 0 0 0 ... 241s $ terms :Classes 'terms', 'formula' language rating ~ temp 241s $ contrasts :List of 1 241s ..$ temp: chr "contr.treatment" 241s $ xlevels :List of 1 241s ..$ temp: chr [1:2] "cold" "warm" 241s $ weights : num [1:72] 1 1 1 1 1 1 1 1 1 1 ... 241s $ S : num [1:72, 1:2] 1 1 1 1 1 1 1 1 1 1 ... 241s $ S.terms :Classes 'terms', 'formula' language ~temp 241s $ S.off : num [1:72] 0 0 0 0 0 0 0 0 0 0 ... 241s $ S.contrasts :List of 1 241s ..$ temp: chr "contr.treatment" 241s $ S.xlevels :List of 1 241s ..$ temp: chr [1:2] "cold" "warm" 241s $ NOM : num [1:72, 1:2] 1 1 1 1 1 1 1 1 1 1 ... 241s $ nom.terms :Classes 'terms', 'formula' language ~contact 241s $ nom.contrasts:List of 1 241s ..$ contact: chr "contr.treatment" 241s $ nom.xlevels :List of 1 241s ..$ contact: chr [1:2] "no" "yes" 241s $ doFit : logi TRUE 241s $ control :List of 11 241s ..$ method : chr "design" 241s ..$ sign.location: chr "negative" 241s ..$ sign.nominal : chr "positive" 241s ..$ convergence : chr "warn" 241s ..$ trace : int 0 241s ..$ maxIter : int 100 241s ..$ gradTol : num 1e-06 241s ..$ relTol : num 1e-06 241s ..$ tol : num 1.49e-08 241s ..$ maxLineIter : int 15 241s ..$ maxModIter : int 5 241s $ link : chr "logit" 241s $ threshold : chr "flexible" 241s $ start : NULL 241s $ formulas :List of 4 241s ..$ formula :Class 'formula' language rating ~ temp 241s ..$ scale :Class 'formula' language ~temp 241s ..$ nominal :Class 'formula' language ~contact 241s ..$ fullForm:Class 'formula' language rating ~ temp + temp + contact 241s > fm1$control$method <- "Newton" 241s > res <- clm.fit(fm1) 241s > names(res) 241s [1] "aliased" "alpha" "alpha.mat" "beta" 241s [5] "coefficients" "cond.H" "convergence" "df.residual" 241s [9] "edf" "fitted.values" "gradient" "Hessian" 241s [13] "logLik" "maxGradient" "message" "n" 241s [17] "niter" "nobs" "Theta" "tJac" 241s [21] "vcov" "zeta" 241s > res$Theta 241s contact 1|2 2|3 3|4 4|5 241s 1 no -1.357136 1.2482871 3.839568 5.114111 241s 2 yes -2.969353 -0.2819631 1.959306 3.923477 241s > 241s > ## construct some weights and offsets: 241s > set.seed(1) 241s > off1 <- runif(length(fm1$y)) 241s > set.seed(1) 241s > off2 <- rnorm(length(fm1$y)) 241s > set.seed(1) 241s > wet <- runif(length(fm1$y)) 241s > 241s > ## Fit various models: 241s > fit <- clm.fit(fm1$y, fm1$X, fm1$S, fm1$NOM, weights=wet) 241s > Coef <- 241s + c(-0.905224120279548, 1.31043498891987, 3.34235590523008, 241s + 4.52389661722693, -3.03954652971192, -1.56922389038976, 241s + -1.75662549320839, -1.16845464236365, 2.52988580848393, 241s + -0.0261457032829033) 241s > stopifnot(all.equal(coef(fit), Coef, check.attributes=FALSE, tol=1e-6)) 241s > str(fit) 241s List of 20 241s $ aliased :List of 3 241s ..$ alpha: Named logi [1:8] FALSE FALSE FALSE FALSE FALSE FALSE ... 241s .. ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s ..$ beta : Named logi FALSE 241s .. ..- attr(*, "names")= chr "tempwarm" 241s ..$ zeta : Named logi FALSE 241s .. ..- attr(*, "names")= chr "tempwarm" 241s $ alpha : Named num [1:8] -0.905 1.31 3.342 4.524 -3.04 ... 241s ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s $ beta : Named num 2.53 241s ..- attr(*, "names")= chr "tempwarm" 241s $ coefficients : Named num [1:10] -0.905 1.31 3.342 4.524 -3.04 ... 241s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s $ cond.H : num 161 241s $ convergence :List of 3 241s ..$ code : int 0 241s ..$ messages : chr "successful convergence" 241s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 241s $ df.residual : num 27 241s $ edf : int 10 241s $ fitted.values: num [1:72] 0.5 0.178 0.394 0.136 0.188 ... 241s $ gradient : Named num [1:10] 7.28e-15 2.70e-13 2.67e-13 -5.17e-13 5.13e-16 ... 241s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s $ Hessian : num [1:10, 1:10] 2.488 -1.01 0 0 0.207 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s $ logLik : num -44.9 241s $ maxGradient :Warning message: 241s Cannot assess if all thresholds are increasing 241s num 8.93e-13 241s $ message : chr "Absolute and relative convergence criteria were met" 241s $ n : int 72 241s $ niter : Named num [1:2] 9 0 241s ..- attr(*, "names")= chr [1:2] "outer" "inner" 241s $ nobs : num 37 241s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s $ vcov : num [1:10, 1:10] 0.5338 0.1835 0.0254 -0.0626 -0.511 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s $ zeta : Named num -0.0261 241s ..- attr(*, "names")= chr "tempwarm" 241s - attr(*, "class")= chr "clm.fit" 241s > 241s > fit <- clm.fit(fm1$y, fm1$X, fm1$S, fm1$NOM, offset=off1) 241s > str(fit) 241s List of 20 241s $ aliased :List of 3 241s ..$ alpha: Named logi [1:8] FALSE FALSE FALSE FALSE FALSE FALSE ... 241s .. ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s ..$ beta : Named logi FALSE 241s .. ..- attr(*, "names")= chr "tempwarm" 241s ..$ zeta : Named logi FALSE 241s .. ..- attr(*, "names")= chr "tempwarm" 241s $ alpha : Named num [1:8] -0.864 1.746 4.342 5.615 -1.567 ... 241s ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s $ beta : Named num 2.7 241s ..- attr(*, "names")= chr "tempwarm" 241s $ coefficients : Named num [1:10] -0.864 1.746 4.342 5.615 -1.567 ... 241s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s $ cond.H : num 196 241s $ convergence :List of 3 241s ..$ code : int 0 241s ..$ messages : chr "successful convergence" 241s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 241s $ df.residual : num 62 241s $ edf : int 10 241s $ fitted.values: num [1:72] 0.57 0.183 0.452 0.145 0.135 ... 241s $ gradient : Named num [1:10] 2.19e-09 6.14e-08 5.92e-08 -1.23e-07 4.69e-10 ... 241s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s $ Hessian : num [1:10, 1:10] 4.48 -1.89 0 0 1.02 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s $ logLik : num -86.1 241s $ maxGradient : num 2.17e-07 241s $ message : chr "Absolute and relative convergence criteria were met" 241s $ n : int 72 241s $ niter : Named num [1:2] 8 0 241s ..- attr(*, "names")= chr [1:2] "outer" "inner" 241s $ nobs : num 72 241s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 241s Warning message: 241s Cannot assess if all thresholds are increasing 241s Warning message: 241s Cannot assess if all thresholds are increasing 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s $ vcov : num [1:10, 1:10] 0.33117 0.09074 0.00108 -0.04015 -0.31468 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s $ zeta : Named num 0.114 241s ..- attr(*, "names")= chr "tempwarm" 241s - attr(*, "class")= chr "clm.fit" 241s > 241s > fit <- clm.fit(fm1$y, fm1$X, fm1$S, fm1$NOM, offset=off1, 241s + S.offset=off2) 241s > str(fit) 241s List of 20 241s $ aliased :List of 3 241s ..$ alpha: Named logi [1:8] FALSE FALSE FALSE FALSE FALSE FALSE ... 241s .. ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s ..$ beta : Named logi FALSE 241s .. ..- attr(*, "names")= chr "tempwarm" 241s ..$ zeta : Named logi FALSE 241s .. ..- attr(*, "names")= chr "tempwarm" 241s $ alpha : Named num [1:8] -0.585 1.951 3.24 4.18 -6.481 ... 241s ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s $ beta : Named num 2.12 241s ..- attr(*, "names")= chr "tempwarm" 241s $ coefficients : Named num [1:10] -0.585 1.951 3.24 4.18 -6.481 ... 241s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s $ cond.H : num 634 241s $ convergence :List of 3 241s ..$ code : int 0 241s ..$ messages : chr "successful convergence" 241s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 241s $ df.residual : num 62 241s $ edf : int 10 241s $ fitted.values: num [1:72] 0.7899 0.1277 0.7 0.0888 0.1521 ... 241s $ gradient : Named num [1:10] 6.73e-12 8.06e-10 7.28e-10 -7.85e-10 1.15e-12 ... 241s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s $ Hessian : num [1:10, 1:10] 4.126 -1.006 0 0 0.079 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s $ logLik : num -87.6 241s $ maxGradient : num 9.74e-10 241s $ message : chr "Absolute and relative convergence criteria were met" 241s $ n : int 72 241s $ niter : Named num [1:2] 13 0 241s ..- attr(*, "names")= chr [1:2] "outer" "inner" 241s $ nobs : num 72 241s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s $ vcov : num [1:10, 1:10] 0.2616 0.0523 0.0345 0.0236 -0.2449 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 241s $ zeta : Named num -0.502 241s ..- attr(*, "names")= chr "tempwarm" 241s - attr(*, "class")= chr "clm.fit" 241s > 241s > fit <- clm.fit(fm1$y, fm1$X, fm1$S) 241s > str(fit) 241s List of 21 241s $ aliased :List of 3 241s ..$ alpha: Named logi [1:4] FALSE FALSE FALSE FALSE 241s .. ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s ..$ beta : Named logi FALSE 241s .. ..- attr(*, "names")= chr "tempwarm" 241s ..$ zeta : Named logi FALSE 241s .. ..- attr(*, "names")= chr "tempwarm" 241s $ alpha : Named num [1:4] -1.988 0.418 2.648 4.306 241s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s $ beta : Named num 2.51 241s ..- attr(*, "names")= chr "tempwarm" 241s $ coefficients : Named num [1:6] -1.988 0.418 2.648 4.306 2.512 ... 241s ..- attr(*, "names")= chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 241s $ cond.H : num 80.6 241s $ convergence :List of 3 241s ..$ code : int 0 241s ..$ messages : chr "successful convergence" 241s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 241s $ df.residual : num 66 241s $ edf : int 6 241s $ fitted.values: num [1:72] 0.4826 0.3308 0.3308 0.0528 0.2897 ... 241s $ gradient : Named num [1:6] 7.03e-09 6.91e-08 5.99e-07 -7.42e-07 2.76e-08 ... 241s ..- attr(*, "names")= chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 241s $ Hessian : num [1:6, 1:6] 4.8066 -2.4889 0 0 -0.0926 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 241s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 241s $ logLik : num -91.8 241s $ maxGradient : num 8.53e-07 241s $ message : chr "Absolute and relative convergence criteria were met" 241s $ n : int 72 241s $ niter : Named num [1:2] 8 0 241s ..- attr(*, "names")= chr [1:2] "outer" "inner" 241s $ nobs : num 72 241s $ Theta : num [1, 1:4] -1.988 0.418 2.648 4.306 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : NULL 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s $ vcov : num [1:6, 1:6] 0.2481 0.0622 0.0179 -0.0253 0.0197 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 241s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 241s $ zeta : Named num 0.176 241s ..- attr(*, "names")= chr "tempwarm" 241s - attr(*, "class")= chr "clm.fit" 241s > 241s > fit <- clm.fit(fm1$y, fm1$X) 241s > str(fit) 241s List of 20 241s $ aliased :List of 2 241s ..$ alpha: Named logi [1:4] FALSE FALSE FALSE FALSE 241s .. ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s ..$ beta : Named logi FALSE 241s .. ..- attr(*, "names")= chr "tempwarm" 241s $ alpha : Named num [1:4] -1.936 0.435 2.432 3.827 241s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s $ beta : Named num 2.29 241s ..- attr(*, "names")= chr "tempwarm" 241s $ coefficients : Named num [1:5] -1.936 0.435 2.432 3.827 2.287 241s ..- attr(*, "names")= chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 241s $ cond.H : num 16.8 241s $ convergence :List of 3 241s ..$ code : int 0 241s ..$ messages : chr "successful convergence" 241s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 241s $ df.residual : num 67 241s $ edf : int 5 241s $ fitted.values: num [1:72] 0.481 0.3122 0.3122 0.0594 0.2871 ... 241s $ gradient : Named num [1:5] 4.12e-14 8.11e-14 -1.06e-13 9.19e-16 -1.79e-14 241s ..- attr(*, "names")= chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 241s $ Hessian : num [1:5, 1:5] 4.8983 -2.499 0 0 -0.0854 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 241s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 241s $ logLik : num -92 241s $ maxGradient : num 1.06e-13 241s $ message : chr "Absolute and relative convergence criteria were met" 241s $ n : int 72 241s $ niter : Named num [1:2] 6 0 241s ..- attr(*, "names")= chr [1:2] "outer" "inner" 241s $ nobs : num 72 241s $ Theta : num [1, 1:4] -1.936 0.435 2.432 3.827 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : NULL 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s $ vcov : num [1:5, 1:5] 0.2345 0.0577 0.0505 0.0512 0.0537 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 241s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 241s - attr(*, "class")= chr "clm.fit" 241s > 241s > fit <- clm.fit(fm1$y) 241s > coef(fit) 241s 1|2 2|3 3|4 4|5 241s -2.5952547 -0.5108256 1.0258529 2.2284771 241s > str(fit) 241s List of 19 241s $ aliased :List of 2 241s ..$ alpha: Named logi [1:4] FALSE FALSE FALSE FALSE 241s .. ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s ..$ beta : Named logi(0) 241s .. ..- attr(*, "names")= chr(0) 241s $ alpha : Named num [1:4] -2.595 -0.511 1.026 2.228 241s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s $ coefficients : Named num [1:4] -2.595 -0.511 1.026 2.228 241s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s $ cond.H : num 8.38 241s $ convergence :List of 3 241s ..$ code : int 0 241s ..$ messages : chr "successful convergence" 241s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 241s $ df.residual : num 68 241s $ edf : int 4 241s $ fitted.values: num [1:72] 0.306 0.361 0.361 0.167 0.167 ... 241s $ gradient : Named num [1:4] 7.23e-08 -5.51e-08 -1.72e-11 -4.87e-12 241s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s $ Hessian : num [1:4, 1:4] 5.31 -3.57 0 0 -3.57 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s $ logLik : num -104 241s $ maxGradient : num 7.23e-08 241s $ message : chr "Absolute and relative convergence criteria were met" 241s $ n : int 72 241s $ niter : Named num [1:2] 5 0 241s ..- attr(*, "names")= chr [1:2] "outer" "inner" 241s $ nobs : num 72 241s $ Theta : num [1, 1:4] -2.595 -0.511 1.026 2.228 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : NULL 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s $ vcov : num [1:4, 1:4] 0.2149 0.0398 0.0203 0.0165 0.0398 ... 241s ..- attr(*, "dimnames")=List of 2 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 241s - attr(*, "class")= chr "clm.fit" 241s > 241s > ## Remember: compare with corresponding .Rout file 241s > 241s BEGIN TEST clm.formula.R 241s 241s R version 4.4.3 (2025-02-28) -- "Trophy Case" 241s Copyright (C) 2025 The R Foundation for Statistical Computing 241s Platform: s390x-ibm-linux-gnu 241s 241s R is free software and comes with ABSOLUTELY NO WARRANTY. 241s You are welcome to redistribute it under certain conditions. 241s Type 'license()' or 'licence()' for distribution details. 241s 241s R is a collaborative project with many contributors. 241s Type 'contributors()' for more information and 241s 'citation()' on how to cite R or R packages in publications. 241s 241s Type 'demo()' for some demos, 'help()' for on-line help, or 241s 'help.start()' for an HTML browser interface to help. 241s Type 'q()' to quit R. 241s 241s > library(ordinal) 242s > ## library(devtools) 242s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 242s > ## clean_dll(pkg = r2path) 242s > ## load_all(r2path) 242s > 242s > ################################# 242s > ## Appropriate evaluation of formulas: 242s > 242s > ## These fail and give appropriate error messages: 242s > ## fm1 <- clm(rating ~ contact, scale=temp, data=wine) 242s > ## fm1 <- clm(rating ~ contact, scale=~Temp, data=wine) 242s > ## fm1 <- clm(rating ~ contact, scale="temp", data=wine) 242s > ## sca <- "temp" 242s > ## fm1 <- clm(rating ~ contact, scale=sca, data=wine) 242s > ## sca <- as.formula(sca) 242s > ## sca <- as.formula(temp) 242s > ## sca <- with(wine, as.formula(temp)) 242s > 242s > ## These all work as intended with no warnings or errors: 242s > fm1 <- clm(rating ~ contact, scale="~temp", data=wine) 242s > fm1 <- clm(rating ~ contact, scale=~temp, data=wine) 242s > sca <- "~temp" 242s > fm1 <- clm(rating ~ contact, scale=sca, data=wine) 242s > sca <- as.formula("~temp") 242s > fm1 <- clm(rating ~ contact, scale=sca, data=wine) 242s > fm1 <- clm(rating ~ contact, scale=as.formula(~temp), data=wine) 242s > fm1 <- clm(rating ~ contact, scale=as.formula("~temp"), data=wine) 242s > 242s > ################################# 242s > ## can evaluate if 'formula' is a character: 242s > f <- "rating ~ contact + temp" 242s > clm(f, data=wine) 242s formula: rating ~ contact + temp 242s data: wine 242s 242s link threshold nobs logLik AIC niter max.grad cond.H 242s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 242s 242s Coefficients: 242s contactyes tempwarm 242s 1.528 2.503 242s 242s Threshold coefficients: 242s 1|2 2|3 3|4 4|5 242s -1.344 1.251 3.467 5.006 242s > clm(as.formula(f), data=wine) 242s formula: rating ~ contact + temp 242s data: wine 242s 242s link threshold nobs logLik AIC niter max.grad cond.H 242s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 242s 242s Coefficients: 242s contactyes tempwarm 242s 1.528 2.503 242s 242s Threshold coefficients: 242s 1|2 2|3 3|4 4|5 242s -1.344 1.251 3.467 5.006 242s > 242s > ################################# 242s > 242s > ### finding variables in the environment of the formula: 242s > makeform <- function() { 242s + f1 <- as.formula(rating ~ temp + contact) 242s + rating <- wine$rating 242s + temp <- wine$temp 242s + contact <- wine$contact 242s + f1 242s + } 242s > ## 'makeform' makes are formula object in the environment of the 242s > ## function makeform: 242s > f1 <- makeform() 242s > f1 # print 242s rating ~ temp + contact 242s 242s > class(f1) 242s [1] "formula" 242s > ## If we give the data, we can evaluate the model: 242s > fm1 <- clm(f1, data=wine) 242s > ## We can also evaluate the model because the data are available in 242s > ## the environment associated with the formula: 242s > fm1 <- clm(f1) 242s > ## For instance, the 'rating' variable is not found in the Global 242s > ## environment; we have to evaluate the 'name' of 'rating' in the 242s > ## appropriate environment: 242s > (try(rating, silent=TRUE)) 242s [1] "Error : object 'rating' not found\n" 242s attr(,"class") 242s [1] "try-error" 242s attr(,"condition") 242s 242s > eval(as.name("rating"), envir=environment(f1)) 242s [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 242s [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 242s Levels: 1 < 2 < 3 < 4 < 5 242s > ## If instead we generate the formula in the Global environment where 242s > ## the variables are not found, we cannot evaluate the model: 242s > f2 <- as.formula(rating ~ temp + contact) 242s > (try(fm2 <- clm(f2), silent=TRUE)) 242s [1] "Error in eval(predvars, data, env) : object 'rating' not found\n" 242s attr(,"class") 242s [1] "try-error" 242s attr(,"condition") 242s 242s > environment(f2) <- environment(f1) 242s > fm2 <- clm(f2) 242s > 242s > 242s > ################################# 242s > ## Use of formula-objects in location, scale and nominal: 242s > ## Bug-report from Llus Marco Almagro 242s > ## 5 May 2010 17:58 242s > f <- formula(rating ~ temp) 242s > fs <- formula( ~ contact) 242s > m2 <- clm(f, scale = fs, data = wine) 242s > summary(m2) 242s formula: rating ~ temp 242s scale: ~contact 242s data: wine 242s 242s link threshold nobs logLik AIC niter max.grad cond.H 242s logit flexible 72 -91.92 195.83 8(0) 1.57e-09 5.6e+01 242s 242s Coefficients: 242s Estimate Std. Error z value Pr(>|z|) 242s tempwarm 2.1690 0.5527 3.924 8.69e-05 *** 242s --- 242s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 242s 242s log-scale coefficients: 242s Estimate Std. Error z value Pr(>|z|) 242s contactyes -0.1222 0.2775 -0.44 0.66 242s 242s Threshold coefficients: 242s Estimate Std. Error z value 242s 1|2 -1.8957 0.4756 -3.986 242s 2|3 0.3668 0.3442 1.066 242s 3|4 2.2483 0.5932 3.790 242s 4|5 3.5393 0.8336 4.246 242s > 242s > ################################# 242s > ## Other ways to construct formulas: 242s > set.seed(12345) 242s > y <- factor(sample(1:4,20,replace=TRUE)) 242s > x <- rnorm(20) 242s > data <- data.frame(y=y,x=x) 242s > rm(x, y) 242s > fit <- clm(data$y ~ data$x) 242s > fit 242s formula: data$y ~ data$x 242s 242s link threshold nobs logLik AIC niter max.grad cond.H 242s logit flexible 20 -25.37 58.74 5(0) 2.68e-09 8.4e+00 242s 242s Coefficients: 242s data$x 242s 0.2527 242s 242s Threshold coefficients: 242s 1|2 2|3 3|4 242s -2.18234 0.06059 0.92746 242s > fit <- clm(data[,1] ~ data[,2]) 242s > fit 242s formula: data[, 1] ~ data[, 2] 242s 242s link threshold nobs logLik AIC niter max.grad cond.H 242s logit flexible 20 -25.37 58.74 5(0) 2.68e-09 8.4e+00 242s 242s Coefficients: 242s data[, 2] 242s 0.2527 242s 242s Threshold coefficients: 242s 1|2 2|3 3|4 242s -2.18234 0.06059 0.92746 242s > ## This previously failed, but now works: 242s > fit <- clm(data$y ~ data$x, ~data$x) 242s > fit 242s formula: data$y ~ data$x 242s scale: ~data$x 242s 242s link threshold nobs logLik AIC niter max.grad cond.H 242s logit flexible 20 -25.32 60.64 7(0) 1.86e-09 9.7e+00 242s 242s Coefficients: 242s data$x 242s 0.2477 242s 242s log-scale coefficients: 242s data$x 242s -0.1136 242s 242s Threshold coefficients: 242s 1|2 2|3 3|4 242s -2.16950 0.07039 0.91381 242s > 242s > ################################# 242s > ## Evaluation within other functions: 242s > ## date: January 18th 2012. 242s > ## 242s > ## The problem was raised by Stefan Herzog (stefan.herzog@unibas.ch) 242s > ## January 12th 2012 in trying to make clm work with glmulti. 242s > 242s > fun.clm <- function(formula, data) 242s + ### This only works because clm via eclm.model.frame is careful to 242s + ### evaluate the 'formula' in the parent environment such it is not the 242s + ### character "formula" that is attempted evaluated. 242s + clm(formula, data = data) 242s > 242s > fun2.clm <- function(formula, data, weights, subset) { 242s + ### This should be the safe way to ensure evaluation of clm in the 242s + ### right environment. 242s + mc <- match.call() 242s + mc[[1]] <- as.name("clm") 242s + eval.parent(mc) 242s + } 242s > 242s > fun.clm(rating ~ temp + contact, data=wine) ## works 242s formula: rating ~ temp + contact 242s data: data 242s 242s link threshold nobs logLik AIC niter max.grad cond.H 242s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 242s 242s Coefficients: 242s tempwarm contactyes 242s 2.503 1.528 242s 242s Threshold coefficients: 242s 1|2 2|3 3|4 4|5 242s -1.344 1.251 3.467 5.006 242s > fun2.clm(rating ~ temp + contact, data=wine) ## works 242s formula: rating ~ temp + contact 242s data: wine 242s 242s link threshold nobs logLik AIC niter max.grad cond.H 242s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 242s 242s Coefficients: 242s tempwarm contactyes 242s 2.503 1.528 242s 242s Threshold coefficients: 242s 1|2 2|3 3|4 4|5 242s -1.344 1.251 3.467 5.006 242s > 242s > form1 <- "rating ~ temp + contact" 242s > fun.clm(form1, data=wine) ## works 242s formula: rating ~ temp + contact 242s data: data 242s 242s link threshold nobs logLik AIC niter max.grad cond.H 242s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 242s 242s Coefficients: 242s tempwarm contactyes 242s 2.503 1.528 242s 242s Threshold coefficients: 242s 1|2 2|3 3|4 4|5 242s -1.344 1.251 3.467 5.006 242s > fun2.clm(form1, data=wine) ## works 242s formula: rating ~ temp + contact 242s data: wine 242s 242s link threshold nobs logLik AIC niter max.grad cond.H 242s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 242s 242s Coefficients: 242s tempwarm contactyes 242s 2.503 1.528 242s 242s Threshold coefficients: 242s 1|2 2|3 3|4 4|5 242s -1.344 1.251 3.467 5.006 242s > 242s > form2 <- formula(rating ~ temp + contact) 242s > fun.clm(form2, data=wine) ## works 242s formula: rating ~ temp + contact 242s data: data 242s 242s link threshold nobs logLik AIC niter max.grad cond.H 242s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 242s 242s Coefficients: 242s tempwarm contactyes 242s 2.503 1.528 242s 242s Threshold coefficients: 242s 1|2 2|3 3|4 4|5 242s -1.344 1.251 3.467 5.006 242s > fun2.clm(form2, data=wine) ## works 242s formula: rating ~ temp + contact 242s data: wine 242s 242s link threshold nobs logLik AIC niter max.grad cond.H 242s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 242s 242s Coefficients: 242s tempwarm contactyes 242s 2.503 1.528 242s 242s Threshold coefficients: 242s 1|2 2|3 3|4 4|5 242s -1.344 1.251 3.467 5.006 242s > ## Notice that clm is not able to get the name of the data (wine) 242s > ## correct when using fun.clm. 242s > 242s > ################################# 242s > ## Evaluation of long formulas: no line breaking in getFullForm: 242s > data(soup, package="ordinal") 242s > 242s > rhs <- paste(names(soup)[c(3, 5:12)], collapse=" + ") 242s > Location <- as.formula(paste("SURENESS ~ ", rhs, sep=" ")) 242s > Scale <- as.formula("~ PROD") 242s > 242s > fm5 <- clm(Location, scale=Scale, data=soup) 242s > summary(fm5) 242s formula: 242s SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ + COLD + EASY + GENDER + AGEGROUP + LOCATION 242s scale: ~PROD 242s data: soup 242s 242s link threshold nobs logLik AIC niter max.grad cond.H 242s logit flexible 1847 -2651.65 5367.30 8(1) 4.65e-07 1.1e+04 242s 242s Coefficients: 242s Estimate Std. Error z value Pr(>|z|) 242s PRODID2 1.09324 0.14790 7.392 1.45e-13 *** 242s PRODID3 1.54233 0.21252 7.257 3.95e-13 *** 242s PRODID4 0.95602 0.18180 5.258 1.45e-07 *** 242s PRODID5 1.52404 0.20311 7.504 6.21e-14 *** 242s PRODID6 1.83964 0.21750 8.458 < 2e-16 *** 242s DAY2 -0.26999 0.10280 -2.626 0.00863 ** 242s SOUPTYPECanned -0.31340 0.11745 -2.668 0.00762 ** 242s SOUPTYPEDry-mix 0.22429 0.14295 1.569 0.11665 242s SOUPFREQ1-4/month -0.06459 0.10551 -0.612 0.54046 242s SOUPFREQ<1/month 0.03664 0.21310 0.172 0.86350 242s COLDYes 0.31373 0.14894 2.106 0.03517 * 242s EASY2 0.16689 0.55063 0.303 0.76182 242s EASY3 0.34765 0.50432 0.689 0.49061 242s EASY4 0.30008 0.48283 0.621 0.53428 242s EASY5 0.23492 0.47686 0.493 0.62226 242s EASY6 -0.03205 0.46993 -0.068 0.94562 242s EASY7 0.02823 0.46963 0.060 0.95208 242s EASY8 -0.04600 0.47066 -0.098 0.92215 242s EASY9 -0.04084 0.49595 -0.082 0.93437 242s EASY10 1.03641 0.60080 1.725 0.08452 . 242s GENDERFemale -0.05092 0.10738 -0.474 0.63534 242s AGEGROUP31-40 0.02098 0.14822 0.142 0.88745 242s AGEGROUP41-50 0.23712 0.15824 1.498 0.13401 242s AGEGROUP51-65 -0.13791 0.14393 -0.958 0.33798 242s LOCATIONRegion 2 -0.09641 0.13225 -0.729 0.46599 242s LOCATIONRegion 3 0.06062 0.11981 0.506 0.61290 242s --- 242s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 242s 242s log-scale coefficients: 242s Estimate Std. Error z value Pr(>|z|) 242s PRODTest 0.14545 0.06621 2.197 0.028 * 242s --- 242s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 242s 242s Threshold coefficients: 242s Estimate Std. Error z value 242s 1|2 -1.64700 0.49982 -3.295 242s 2|3 -0.58840 0.49681 -1.184 242s 3|4 -0.23496 0.49669 -0.473 242s 4|5 0.04394 0.49679 0.088 242s 5|6 0.78551 0.49869 1.575 242s > 242s > ################################# 242s > ## Check that "."-notation works in formula: 242s > ## December 25th 2014, RHBC 242s > data(wine) 242s > wine2 <- wine[c("rating", "contact", "temp")] 242s > str(wine2) 242s 'data.frame': 72 obs. of 3 variables: 242s $ rating : Ord.factor w/ 5 levels "1"<"2"<"3"<"4"<..: 2 3 3 4 4 4 5 5 1 2 ... 242s $ contact: Factor w/ 2 levels "no","yes": 1 1 2 2 1 1 2 2 1 1 ... 242s $ temp : Factor w/ 2 levels "cold","warm": 1 1 1 1 2 2 2 2 1 1 ... 242s > fm0 <- clm(rating ~ ., data=wine2) 242s > fm1 <- clm(rating ~ contact + temp, data=wine2) 242s > keep <- c("coefficients", "logLik", "info") 242s > fun <- function(x, y) stopifnot(isTRUE(all.equal(x, y))) 242s > mapply(fun, fm0[keep], fm1[keep]) 242s $coefficients 242s NULL 242s 242s $logLik 242s NULL 242s 242s $info 242s NULL 242s 242s > ################################# 242s > 242s BEGIN TEST clmm.R 242s 242s R version 4.4.3 (2025-02-28) -- "Trophy Case" 242s Copyright (C) 2025 The R Foundation for Statistical Computing 242s Platform: s390x-ibm-linux-gnu 242s 242s R is free software and comes with ABSOLUTELY NO WARRANTY. 242s You are welcome to redistribute it under certain conditions. 242s Type 'license()' or 'licence()' for distribution details. 242s 242s R is a collaborative project with many contributors. 242s Type 'contributors()' for more information and 242s 'citation()' on how to cite R or R packages in publications. 242s 242s Type 'demo()' for some demos, 'help()' for on-line help, or 242s 'help.start()' for an HTML browser interface to help. 242s Type 'q()' to quit R. 242s 242s > library(ordinal) 243s > data(wine) 243s > 243s > ################################# 243s > ## Estimation with a single simple RE term: 243s > ## Laplace: 243s > fmm1 <- clmm(rating ~ contact + temp + (1|judge), data=wine) 243s > summary(fmm1) 243s Cumulative Link Mixed Model fitted with the Laplace approximation 243s 243s formula: rating ~ contact + temp + (1 | judge) 243s data: wine 243s 243s link threshold nobs logLik AIC niter max.grad cond.H 243s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 2.8e+01 243s 243s Random effects: 243s Groups Name Variance Std.Dev. 243s judge (Intercept) 1.279 1.131 243s Number of groups: judge 9 243s 243s Coefficients: 243s Estimate Std. Error z value Pr(>|z|) 243s contactyes 1.8349 0.5125 3.580 0.000344 *** 243s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 243s --- 243s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 243s 243s Threshold coefficients: 243s Estimate Std. Error z value 243s 1|2 -1.6237 0.6824 -2.379 243s 2|3 1.5134 0.6038 2.507 243s 3|4 4.2285 0.8090 5.227 243s 4|5 6.0888 0.9725 6.261 243s > ## GHQ: 243s > fmm.ghq <- clmm(rating ~ contact + temp + (1|judge), data=wine, 243s + nAGQ=-10) 243s > summary(fmm.ghq) 243s Cumulative Link Mixed Model fitted with the Gauss-Hermite 243s quadrature approximation with 10 quadrature points 243s 243s formula: rating ~ contact + temp + (1 | judge) 243s data: wine 243s 243s link threshold nobs logLik AIC niter max.grad cond.H 243s logit flexible 72 -81.53 177.06 304(3) 1.67e-05 2.8e+01 243s 243s Random effects: 243s Groups Name Variance Std.Dev. 243s judge (Intercept) 1.288 1.135 243s Number of groups: judge 9 243s 243s Coefficients: 243s Estimate Std. Error z value Pr(>|z|) 243s contactyes 1.8335 0.5122 3.580 0.000344 *** 243s tempwarm 3.0620 0.5951 5.145 2.67e-07 *** 243s --- 243s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 243s 243s Threshold coefficients: 243s Estimate Std. Error z value 243s 1|2 -1.6231 0.6829 -2.377 243s 2|3 1.5133 0.6045 2.503 243s 3|4 4.2277 0.8094 5.223 243s 4|5 6.0869 0.9726 6.258 243s > ## AGQ: 243s > fmm.agq <- clmm(rating ~ contact + temp + (1|judge), data=wine, 243s + nAGQ=10) 243s > summary(fmm.agq) 243s Cumulative Link Mixed Model fitted with the adaptive Gauss-Hermite 243s quadrature approximation with 10 quadrature points 243s 243s formula: rating ~ contact + temp + (1 | judge) 243s data: wine 243s 243s link threshold nobs logLik AIC niter max.grad cond.H 243s logit flexible 72 -81.53 177.06 304(915) 2.26e-05 2.8e+01 243s 243s Random effects: 243s Groups Name Variance Std.Dev. 243s judge (Intercept) 1.288 1.135 243s Number of groups: judge 9 243s 243s Coefficients: 243s Estimate Std. Error z value Pr(>|z|) 243s contactyes 1.8334 0.5122 3.580 0.000344 *** 243s tempwarm 3.0619 0.5951 5.145 2.67e-07 *** 243s --- 243s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 243s 243s Threshold coefficients: 243s Estimate Std. Error z value 243s 1|2 -1.6235 0.6834 -2.376 243s 2|3 1.5128 0.6044 2.503 243s 3|4 4.2271 0.8090 5.225 243s 4|5 6.0862 0.9719 6.262 243s > ## tests: 243s > ## Notice warning about Laplace with multiple REs when nAGQ != 1: 243s > fmm1 <- try(clmm(rating ~ contact + temp + (1|judge) + (1|bottle), 243s + data=wine, nAGQ=10)) 243s > stopifnot(inherits(fmm1, "try-error")) 243s > 243s > ################################# 243s > ## Estimation with several RE terms: 243s > data(soup, package="ordinal") 243s > fmm <- clmm(SURENESS ~ PROD + (1|RESP) + (1|PROD:RESP), data=soup, 243s + threshold="equidistant") 243s Error : Quadrature methods are not available with more than one random effects term 245s > summary(fmm) 245s Cumulative Link Mixed Model fitted with the Laplace approximation 245s 245s formula: SURENESS ~ PROD + (1 | RESP) + (1 | PROD:RESP) 245s data: soup 245s 245s link threshold nobs logLik AIC niter max.grad cond.H 245s logit equidistant 1847 -2766.32 5542.63 261(837) 1.55e-03 1.3e+02 245s 245s Random effects: 245s Groups Name Variance Std.Dev. 245s PROD:RESP (Intercept) 0.4069 0.6379 245s RESP (Intercept) 0.1308 0.3616 245s Number of groups: PROD:RESP 370, RESP 185 245s 245s Coefficients: 245s Estimate Std. Error z value Pr(>|z|) 245s PRODTest 1.2865 0.1156 11.12 <2e-16 *** 245s --- 245s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 245s 245s Threshold coefficients: 245s Estimate Std. Error z value 245s threshold.1 -1.35103 0.09526 -14.18 245s spacing 0.56472 0.01905 29.65 245s > 245s > ################################# 245s > 245s > ## Estimation with implicit intercept: 245s > fm1 <- clmm(rating ~ 1 + (1|judge), data = wine) 245s > fm2 <- clmm(rating ~ (1|judge), data = wine) 245s > fm3 <- clmm(rating ~ 0 + (1|judge), data = wine) 245s Warning message: 245s In getX(fullmf, fixedmf, contrasts) : an intercept is needed and assumed 245s > stopifnot(isTRUE(all.equal(coef(fm1), coef(fm2), tolerance=1e-5)), 245s + isTRUE(all.equal(coef(fm1), coef(fm3), tolerance=1e-5))) 245s > 245s BEGIN TEST clmm.control.R 245s 245s R version 4.4.3 (2025-02-28) -- "Trophy Case" 245s Copyright (C) 2025 The R Foundation for Statistical Computing 245s Platform: s390x-ibm-linux-gnu 245s 245s R is free software and comes with ABSOLUTELY NO WARRANTY. 245s You are welcome to redistribute it under certain conditions. 245s Type 'license()' or 'licence()' for distribution details. 245s 245s R is a collaborative project with many contributors. 245s Type 'contributors()' for more information and 245s 'citation()' on how to cite R or R packages in publications. 245s 245s Type 'demo()' for some demos, 'help()' for on-line help, or 245s 'help.start()' for an HTML browser interface to help. 245s Type 'q()' to quit R. 245s 246s > library(ordinal) 246s > data(wine) 246s > 246s > 246s > ### 3 options for specifying control arguments: 246s > ## 1) control is a simple list, e.g. list(trace=-1) 247s > ## 2) control is a call to clmm.control 247s > ## 3) control is an empty list; list() 247s > ## all in combination with extra control arguments. 247s > 247s > ordinal:::getCtrlArgs(clmm.control(), list(maxIter=200)) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 0 247s 247s $ctrl$maxIter 247s [1] 200 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 0 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > ordinal:::getCtrlArgs(list(), list(maxIter=200)) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 0 247s 247s $ctrl$maxIter 247s [1] 200 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 0 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > ordinal:::getCtrlArgs(list(), list(trace=-1)) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 1 247s 247s $ctrl$maxIter 247s [1] 50 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 1 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > ordinal:::getCtrlArgs(list(), list(trace=1)) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 0 247s 247s $ctrl$maxIter 247s [1] 50 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 1 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > ordinal:::getCtrlArgs(list(), list()) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 0 247s 247s $ctrl$maxIter 247s [1] 50 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 0 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > ordinal:::getCtrlArgs(list(maxIter=2), list()) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 0 247s 247s $ctrl$maxIter 247s [1] 2 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 0 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > 247s > ordinal:::getCtrlArgs(clmm.control(), list()) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 0 247s 247s $ctrl$maxIter 247s [1] 50 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 0 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > ordinal:::getCtrlArgs(clmm.control(maxIter=100), list(maxIter=200)) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 0 247s 247s $ctrl$maxIter 247s [1] 200 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 0 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > ordinal:::getCtrlArgs(clmm.control(maxIter=100), list(maxIter=200)) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 0 247s 247s $ctrl$maxIter 247s [1] 200 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 0 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > ordinal:::getCtrlArgs(clmm.control(), list(trace=1)) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 0 247s 247s $ctrl$maxIter 247s [1] 50 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 1 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > ordinal:::getCtrlArgs(clmm.control(), list(trace=-1)) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 1 247s 247s $ctrl$maxIter 247s [1] 50 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 1 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > ordinal:::getCtrlArgs(clmm.control(trace=1), list()) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 0 247s 247s $ctrl$maxIter 247s [1] 50 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 1 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > ordinal:::getCtrlArgs(clmm.control(trace=-1), list()) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 1 247s 247s $ctrl$maxIter 247s [1] 50 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 1 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > ordinal:::getCtrlArgs(clmm.control(trace=0), list()) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 0 247s 247s $ctrl$maxIter 247s [1] 50 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 0 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > ## Don't specify trace twice - surprising behavior might occur: 247s > ordinal:::getCtrlArgs(clmm.control(trace=1), list(trace=-1)) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 1 247s 247s $ctrl$maxIter 247s [1] 50 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 1 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > ordinal:::getCtrlArgs(clmm.control(trace=-1), list(trace=1)) 247s $method 247s [1] "nlminb" 247s 247s $useMatrix 247s [1] FALSE 247s 247s $ctrl 247s $ctrl$trace 247s [1] 1 247s 247s $ctrl$maxIter 247s [1] 50 247s 247s $ctrl$gradTol 247s [1] 1e-04 247s 247s $ctrl$maxLineIter 247s [1] 50 247s 247s $ctrl$innerCtrl 247s [1] "warnOnly" 247s 247s 247s $optCtrl 247s $optCtrl$trace 247s [1] 1 247s 247s 247s $checkRanef 247s [1] "warn" 247s 247s > 247s BEGIN TEST clmm.formula.R 247s 247s R version 4.4.3 (2025-02-28) -- "Trophy Case" 247s Copyright (C) 2025 The R Foundation for Statistical Computing 247s Platform: s390x-ibm-linux-gnu 247s 247s R is free software and comes with ABSOLUTELY NO WARRANTY. 247s You are welcome to redistribute it under certain conditions. 247s Type 'license()' or 'licence()' for distribution details. 247s 247s R is a collaborative project with many contributors. 247s Type 'contributors()' for more information and 247s 'citation()' on how to cite R or R packages in publications. 247s 247s Type 'demo()' for some demos, 'help()' for on-line help, or 247s 'help.start()' for an HTML browser interface to help. 247s Type 'q()' to quit R. 247s 247s > library(ordinal) 247s > data(wine) 247s > 247s > ################################# 247s > ## Appropriate evaluation of formulas: 247s > 247s > ## These all work as intended with no warnings or errors: 247s > fm1 <- clmm(rating ~ contact + (1|judge), data=wine) 247s > fm1 247s Cumulative Link Mixed Model fitted with the Laplace approximation 247s 247s formula: rating ~ contact + (1 | judge) 247s data: wine 247s 247s link threshold nobs logLik AIC niter max.grad 247s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 247s 247s Random effects: 247s Groups Name Variance Std.Dev. 248s judge (Intercept) 0.4428 0.6654 248s Number of groups: judge 9 248s 248s Coefficients: 248s contactyes 248s 1.3 248s 248s Thresholds: 248s 1|2 2|3 3|4 4|5 248s -2.28331 0.04325 1.86062 3.20298 248s > fm1 <- clmm("rating ~ contact + (1|judge)", data=wine) 248s > fm1 248s Cumulative Link Mixed Model fitted with the Laplace approximation 248s 248s formula: rating ~ contact + (1 | judge) 248s data: wine 248s 248s link threshold nobs logLik AIC niter max.grad 248s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 248s 248s Random effects: 248s Groups Name Variance Std.Dev. 248s judge (Intercept) 0.4428 0.6654 248s Number of groups: judge 9 248s 248s Coefficients: 248s contactyes 248s 1.3 248s 248s Thresholds: 248s 1|2 2|3 3|4 4|5 248s -2.28331 0.04325 1.86062 3.20298 248s > fm1 <- clmm(as.formula("rating ~ contact + (1|judge)"), data=wine) 248s > fm1 248s Cumulative Link Mixed Model fitted with the Laplace approximation 248s 248s formula: rating ~ contact + (1 | judge) 248s data: wine 248s 248s link threshold nobs logLik AIC niter max.grad 248s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 248s 248s Random effects: 248s Groups Name Variance Std.Dev. 248s judge (Intercept) 0.4428 0.6654 248s Number of groups: judge 9 248s 248s Coefficients: 248s contactyes 248s 1.3 248s 248s Thresholds: 248s 1|2 2|3 3|4 4|5 248s -2.28331 0.04325 1.86062 3.20298 248s > fm1 <- clmm(as.formula(rating ~ contact + (1|judge)), data=wine) 248s > fm1 248s Cumulative Link Mixed Model fitted with the Laplace approximation 248s 248s formula: rating ~ contact + (1 | judge) 248s data: wine 248s 248s link threshold nobs logLik AIC niter max.grad 248s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 248s 248s Random effects: 248s Groups Name Variance Std.Dev. 248s judge (Intercept) 0.4428 0.6654 248s Number of groups: judge 9 248s 248s Coefficients: 248s contactyes 248s 1.3 248s 248s Thresholds: 248s 1|2 2|3 3|4 4|5 248s -2.28331 0.04325 1.86062 3.20298 248s > 248s > ################################# 248s > 248s > ### finding variables in the environment of the formula: 248s > makeform <- function() { 248s + f1 <- as.formula(rating ~ temp + contact + (1|judge)) 248s + rating <- wine$rating 248s + temp <- wine$temp 248s + contact <- wine$contact 248s + judge <- wine$judge 248s + f1 248s + } 248s > ## 'makeform' makes are formula object in the environment of the 248s > ## function makeform: 248s > f1 <- makeform() 248s > f1 # print 248s rating ~ temp + contact + (1 | judge) 248s 248s > class(f1) 248s [1] "formula" 248s > ## If we give the data, we can evaluate the model: 248s > fm1 <- clmm(f1, data=wine) 248s > ## We can also evaluate the model because the data are available in 248s > ## the environment associated with the formula: 248s > fm1 <- clmm(f1) 248s > ## For instance, the 'rating' variable is not found in the Global 248s > ## environment; we have to evaluate the 'name' of 'rating' in the 248s > ## appropriate environment: 248s > (try(rating, silent=TRUE)) 248s [1] "Error : object 'rating' not found\n" 248s attr(,"class") 248s [1] "try-error" 248s attr(,"condition") 248s 248s > eval(as.name("rating"), envir=environment(f1)) 248s [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 248s [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 248s Levels: 1 < 2 < 3 < 4 < 5 248s > ## If instead we generate the formula in the Global environment where 248s > ## the variables are not found, we cannot evaluate the model: 248s > f2 <- as.formula(rating ~ temp + contact + (1|judge)) 248s > (try(fm2 <- clmm(f2), silent=TRUE)) 248s [1] "Error in eval(predvars, data, env) : object 'rating' not found\n" 248s attr(,"class") 248s [1] "try-error" 248s attr(,"condition") 248s 248s > environment(f2) <- environment(f1) 248s > fm2 <- clmm(f2) 248s > 248s > ################################# 248s > ## Use of formula-objects 248s > f <- formula(rating ~ temp + contact + (1|judge)) 248s > m2 <- clmm(f, data = wine) 248s > summary(m2) 248s Cumulative Link Mixed Model fitted with the Laplace approximation 248s 248s formula: rating ~ temp + contact + (1 | judge) 248s data: wine 248s 248s link threshold nobs logLik AIC niter max.grad cond.H 248s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 2.8e+01 248s 248s Random effects: 248s Groups Name Variance Std.Dev. 248s judge (Intercept) 1.279 1.131 248s Number of groups: judge 9 248s 248s Coefficients: 248s Estimate Std. Error z value Pr(>|z|) 248s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 248s contactyes 1.8349 0.5125 3.580 0.000344 *** 248s --- 248s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 248s 248s Threshold coefficients: 248s Estimate Std. Error z value 248s 1|2 -1.6237 0.6824 -2.379 248s 2|3 1.5134 0.6038 2.507 248s 3|4 4.2285 0.8090 5.227 248s 4|5 6.0888 0.9725 6.261 248s > 248s > ################################# 248s > ## Other ways to construct formulas: 248s > set.seed(12345) 248s > y <- factor(sample(1:4,20,replace=TRUE)) 248s > x <- rnorm(20) 248s > b <- gl(5, 4, labels=letters[1:5]) 248s > data <- data.frame(y=y, x=x, b=b) 248s > rm(x, y, b) 248s > clmm(y ~ x + (1|b), data=data) 248s Cumulative Link Mixed Model fitted with the Laplace approximation 248s 248s formula: y ~ x + (1 | b) 248s data: data 248s 248s link threshold nobs logLik AIC niter max.grad 248s logit flexible 20 -25.37 60.74 334(288) 1.25e-07 248s 248s Random effects: 248s Groups Name Variance Std.Dev. 248s b (Intercept) 2.676e-09 5.173e-05 248s Number of groups: b 5 248s 248s Coefficients: 248s x 248s 0.2527 248s 248s Thresholds: 248s 1|2 2|3 3|4 248s -2.18234 0.06059 0.92746 248s > fit <- clmm(data$y ~ data$x + (1|data$b)) 248s > fit 248s Cumulative Link Mixed Model fitted with the Laplace approximation 248s 248s formula: data$y ~ data$x + (1 | data$b) 248s 248s link threshold nobs logLik AIC niter max.grad 248s logit flexible 20 -25.37 60.74 334(288) 1.25e-07 248s 248s Random effects: 248s Groups Name Variance Std.Dev. 248s data$b (Intercept) 2.676e-09 5.173e-05 248s Number of groups: data$b 5 248s 248s Coefficients: 248s data$x 248s 0.2527 248s 248s Thresholds: 248s 1|2 2|3 3|4 248s -2.18234 0.06059 0.92746 248s > fit <- clmm(data[, 1] ~ data[, 2] + (1|data[, 3])) 248s > fit 248s Cumulative Link Mixed Model fitted with the Laplace approximation 248s 248s formula: data[, 1] ~ data[, 2] + (1 | data[, 3]) 248s 248s link threshold nobs logLik AIC niter max.grad 248s logit flexible 20 -25.37 60.74 334(288) 1.25e-07 248s 248s Random effects: 248s Groups Name Variance Std.Dev. 248s data[, 3] (Intercept) 2.676e-09 5.173e-05 248s Number of groups: data[, 3] 5 248s 248s Coefficients: 248s data[, 2] 248s 0.2527 248s 248s Thresholds: 248s 1|2 2|3 3|4 248s -2.18234 0.06059 0.92746 248s > 248s > ################################# 248s > ## Evaluation within other functions: 248s > ## date: January 18th 2012. 248s > ## 248s > ## The problem was raised by Stefan Herzog (stefan.herzog@unibas.ch) 248s > ## January 12th 2012 in trying to make clmm work with glmulti. 248s > 248s > fun.clmm <- function(formula, data) 248s + ### This only works because clmm via eclmm.model.frame is careful to 248s + ### evaluate the 'formula' in the parent environment such it is not the 248s + ### character "formula" that is attempted evaluated. 248s + clmm(formula, data = data) 248s > 248s > fun2.clmm <- function(formula, data, weights, subset) { 248s + ### This should be the safe way to ensure evaluation of clmm in the 248s + ### right environment. 248s + mc <- match.call() 248s + mc[[1]] <- as.name("clmm") 248s + eval.parent(mc) 248s + } 248s > 248s > fun.clmm(rating ~ temp + contact + (1|judge), data=wine) ## works 248s Cumulative Link Mixed Model fitted with the Laplace approximation 248s 248s formula: rating ~ temp + contact + (1 | judge) 248s data: data 248s 248s link threshold nobs logLik AIC niter max.grad 248s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 248s 248s Random effects: 248s Groups Name Variance Std.Dev. 248s judge (Intercept) 1.279 1.131 248s Number of groups: judge 9 248s 248s Coefficients: 248s tempwarm contactyes 248s 3.063 1.835 248s 248s Thresholds: 248s 1|2 2|3 3|4 4|5 248s -1.624 1.513 4.229 6.089 248s > fun2.clmm(rating ~ temp + contact + (1|judge), data=wine) ## works 248s Cumulative Link Mixed Model fitted with the Laplace approximation 248s 248s formula: rating ~ temp + contact + (1 | judge) 248s data: wine 248s 248s link threshold nobs logLik AIC niter max.grad 248s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 248s 248s Random effects: 248s Groups Name Variance Std.Dev. 248s judge (Intercept) 1.279 1.131 248s Number of groups: judge 9 248s 248s Coefficients: 248s tempwarm contactyes 248s 3.063 1.835 248s 248s Thresholds: 248s 1|2 2|3 3|4 4|5 248s -1.624 1.513 4.229 6.089 248s > 248s > form1 <- "rating ~ temp + contact + (1|judge)" 248s > fun.clmm(form1, data=wine) ## works 248s Cumulative Link Mixed Model fitted with the Laplace approximation 248s 248s formula: rating ~ temp + contact + (1 | judge) 248s data: data 248s 248s link threshold nobs logLik AIC niter max.grad 248s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 248s 248s Random effects: 248s Groups Name Variance Std.Dev. 248s judge (Intercept) 1.279 1.131 248s Number of groups: judge 9 248s 248s Coefficients: 248s tempwarm contactyes 248s 3.063 1.835 248s 248s Thresholds: 248s 1|2 2|3 3|4 4|5 248s -1.624 1.513 4.229 6.089 248s > fun2.clmm(form1, data=wine) ## works 248s Cumulative Link Mixed Model fitted with the Laplace approximation 248s 248s formula: rating ~ temp + contact + (1 | judge) 248s data: wine 248s 248s link threshold nobs logLik AIC niter max.grad 248s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 248s 248s Random effects: 248s Groups Name Variance Std.Dev. 248s judge (Intercept) 1.279 1.131 248s Number of groups: judge 9 248s 248s Coefficients: 248s tempwarm contactyes 248s 3.063 1.835 248s 248s Thresholds: 248s 1|2 2|3 3|4 4|5 248s -1.624 1.513 4.229 6.089 248s > 248s > form2 <- formula(rating ~ temp + contact + (1|judge)) 248s > fun.clmm(form2, data=wine) ## works 248s Cumulative Link Mixed Model fitted with the Laplace approximation 248s 248s formula: rating ~ temp + contact + (1 | judge) 248s data: data 248s 248s link threshold nobs logLik AIC niter max.grad 248s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 248s 248s Random effects: 248s Groups Name Variance Std.Dev. 248s judge (Intercept) 1.279 1.131 248s Number of groups: judge 9 248s 248s Coefficients: 248s tempwarm contactyes 248s 3.063 1.835 248s 248s Thresholds: 248s 1|2 2|3 3|4 4|5 248s -1.624 1.513 4.229 6.089 248s > fun2.clmm(form2, data=wine) ## works 248s Cumulative Link Mixed Model fitted with the Laplace approximation 248s 248s formula: rating ~ temp + contact + (1 | judge) 248s data: wine 248s 248s link threshold nobs logLik AIC niter max.grad 248s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 248s 248s Random effects: 248s Groups Name Variance Std.Dev. 248s judge (Intercept) 1.279 1.131 248s Number of groups: judge 9 248s 248s Coefficients: 248s tempwarm contactyes 248s 3.063 1.835 248s 248s Thresholds: 248s 1|2 2|3 3|4 4|5 248s -1.624 1.513 4.229 6.089 248s > ## Notice that clmm is not able to get the name of the data (wine) 248s > ## correct when using fun.clmm. 248s > 248s > ################################# 248s > 248s > ## ## Example 2: using clmm function 248s > ## # 248s > ## ## Now I want to consider judge as a random effect to account for 248s > ## ## grouping structure of data 248s > ## mod2 <- clmm(rating ~ temp + contact + (1|judge), data=wine) 248s > ## 248s > ## ##Again, I started by using my own code to run all potential models: 248s > ## ## put names of all your variables in this vector: 248s > ## vl2 <- c("temp", "contact") 248s > ## ## generate list of possible combinations of variables: 248s > ## combos2 <- NULL 248s > ## for(i in 1:length(vl2)) { 248s > ## combos2 <- c(combos2, combn(vl2, i, simplify = F)) 248s > ## } 248s > ## ## create formulae and run models one by one, saving them as model1, 248s > ## ## model2 etc... 248s > ## for (i in 1:length(combos2)) { 248s > ## vs2 <- paste(combos2[[i]], collapse=" + ") 248s > ## f2 <- formula(paste("rating ~ ", vs2, "+(1|judge)", sep="")) 248s > ## print(f2) 248s > ## assign(paste("model", i, sep=""), clmm(f2, data=wine)) 248s > ## } 248s > ## summary(model1) # etc 248s > ## summary(model2) # etc 248s > ## summary(model3) # etc 248s > ## 248s > ## models <- vector("list", length(combos2)) 248s > ## for(i in 1:length(combos2)) { 248s > ## vs2 <- paste(combos2[[i]], collapse=" + ") 248s > ## f2 <- formula(paste("rating ~ ", vs2, "+(1|judge)", sep="")) 248s > ## print(f2) 248s > ## models[[i]] <- clmm(f2, data=wine) 248s > ## ## assign(paste("model", i, sep=""), clmm(f2, data=wine)) 248s > ## } 248s > ## 248s > ## ## Coefficients, AIC and BIC: 248s > ## lapply(models, function(m) coef(summary(m))) 248s > ## lapply(models, AIC) 248s > ## lapply(models, BIC) 248s > ## 248s > ## ## library(MuMIn) 248s > ## ## dd2 <- dredge(mod2) ## does not work 248s > ## ## ?dredge 248s > ## ## traceback() 248s > ## ## mod2$formula 248s > ## ## terms(as.formula(formula(mod2))) 248s > ## ## 248s > ## ## library(lme4) 248s > ## ## fmm1 <- lmer(response ~ temp + contact + (1|judge), data=wine) 248s > ## ## fmm1 248s > ## ## terms(as.formula(lme4:::formula(fmm1))) 248s > ## ## terms(as.formula(formula(fmm1))) 248s > 248s BEGIN TEST clmm.methods.R 248s 248s R version 4.4.3 (2025-02-28) -- "Trophy Case" 248s Copyright (C) 2025 The R Foundation for Statistical Computing 248s Platform: s390x-ibm-linux-gnu 248s 248s R is free software and comes with ABSOLUTELY NO WARRANTY. 248s You are welcome to redistribute it under certain conditions. 248s Type 'license()' or 'licence()' for distribution details. 248s 248s R is a collaborative project with many contributors. 248s Type 'contributors()' for more information and 248s 'citation()' on how to cite R or R packages in publications. 248s 248s Type 'demo()' for some demos, 'help()' for on-line help, or 248s 'help.start()' for an HTML browser interface to help. 248s Type 'q()' to quit R. 248s 248s > library(ordinal) 249s > data(wine) 249s > 249s > ################################# 249s > ## model.matrix method for clmm-objects: 249s > fmm1 <- clmm(rating ~ contact + temp + (1|judge), data=wine) 249s > mm <- model.matrix(fmm1) 249s > stopifnot(inherits(mm, "matrix"), 249s + dim(mm) == c(72, 3)) 249s > 249s > ################################# 249s > ## anova.clmm works even if formula does not have an environment: 249s > fmm1 <- clmm(rating ~ temp * contact + (1|judge), data = wine) 249s > fmm2 <- clmm(rating ~ temp + contact + (1|judge), data = wine) 250s > environment(fmm1$formula) <- NULL 250s > environment(fmm2$formula) <- NULL 250s > anova(fmm1, fmm2) 250s Likelihood ratio tests of cumulative link models: 250s 250s formula: link: threshold: 250s fmm2 rating ~ temp + contact + (1 | judge) logit flexible 250s fmm1 rating ~ temp * contact + (1 | judge) logit flexible 250s 250s no.par AIC logLik LR.stat df Pr(>Chisq) 250s fmm2 7 177.13 -81.565 250s fmm1 8 179.07 -81.536 0.0589 1 0.8082 250s > 250s > 250s > ################################# 250s > ## Test that ranef, condVar and VarCorr work as they are supposed to whether or 250s > ## not nlme and lme4 are loaded: 250s > 250s > fm <- clmm(rating ~ temp + contact + (1|judge), data = wine) 250s > fm 250s Cumulative Link Mixed Model fitted with the Laplace approximation 250s 250s formula: rating ~ temp + contact + (1 | judge) 250s data: wine 250s 250s link threshold nobs logLik AIC niter max.grad 250s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 250s 250s Random effects: 250s Groups Name Variance Std.Dev. 250s judge (Intercept) 1.279 1.131 250s Number of groups: judge 9 250s 250s Coefficients: 250s tempwarm contactyes 250s 3.063 1.835 250s 250s Thresholds: 250s 1|2 2|3 3|4 4|5 250s -1.624 1.513 4.229 6.089 250s > ranef(fm) 250s $judge 250s (Intercept) 250s 1 1.6961783 250s 2 -0.5657831 250s 3 0.9688083 250s 4 -0.0595499 250s 5 0.2305101 250s 6 0.4770387 250s 7 -1.9109736 250s 8 -0.2729439 250s 9 -0.5546758 250s 250s > VarCorr(fm) 250s $judge 250s (Intercept) 250s (Intercept) 1.279461 250s attr(,"stddev") 250s (Intercept) 250s 1.131133 250s 250s > condVar(fm) 250s $judge 250s (Intercept) 250s 1 0.3067453 250s 2 0.3779358 250s 3 0.3545529 250s 4 0.3651870 250s 5 0.3566067 250s 6 0.3485475 250s 7 0.3435693 250s 8 0.3050453 250s 9 0.3183194 250s 250s > summary(fm) 250s Cumulative Link Mixed Model fitted with the Laplace approximation 250s 250s formula: rating ~ temp + contact + (1 | judge) 250s data: wine 250s 250s link threshold nobs logLik AIC niter max.grad cond.H 250s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 2.8e+01 250s 250s Random effects: 250s Groups Name Variance Std.Dev. 250s judge (Intercept) 1.279 1.131 250s Number of groups: judge 9 250s 250s Coefficients: 250s Estimate Std. Error z value Pr(>|z|) 250s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 250s contactyes 1.8349 0.5125 3.580 0.000344 *** 250s --- 250s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 250s 250s Threshold coefficients: 250s Estimate Std. Error z value 250s 1|2 -1.6237 0.6824 -2.379 250s 2|3 1.5134 0.6038 2.507 250s 3|4 4.2285 0.8090 5.227 250s 4|5 6.0888 0.9725 6.261 250s > 250s > library(nlme) 250s > ranef(fm) 250s $judge 250s (Intercept) 250s 1 1.6961783 250s 2 -0.5657831 250s 3 0.9688083 250s 4 -0.0595499 250s 5 0.2305101 250s 6 0.4770387 250s 7 -1.9109736 250s 8 -0.2729439 250s 9 -0.5546758 250s 250s > VarCorr(fm) 250s $judge 250s (Intercept) 250s (Intercept) 1.279461 250s attr(,"stddev") 250s (Intercept) 250s 1.131133 250s 250s > condVar(fm) 250s $judge 250s (Intercept) 250s 1 0.3067453 250s 2 0.3779358 250s 3 0.3545529 250s 4 0.3651870 250s 5 0.3566067 250s 6 0.3485475 250s 7 0.3435693 250s 8 0.3050453 250s 9 0.3183194 250s 250s > library(lme4) 250s Loading required package: Matrix 250s > ranef(fm) 250s $judge 250s (Intercept) 250s 1 1.6961783 250s 2 -0.5657831 250s 3 0.9688083 250s 4 -0.0595499 250s 5 0.2305101 250s 6 0.4770387 250s 7 -1.9109736 250s 8 -0.2729439 250s 9 -0.5546758 250s 250s > VarCorr(fm) 250s $judge 250s (Intercept) 250s (Intercept) 1.279461 250s attr(,"stddev") 250s (Intercept) 250s 1.131133 250s 250s > condVar(fm) 250s $judge 250s (Intercept) 250s 1 0.3067453 250s 2 0.3779358 250s 3 0.3545529 250s 4 0.3651870 250s 5 0.3566067 250s 6 0.3485475 250s 7 0.3435693 250s 8 0.3050453 250s 9 0.3183194 250s 250s > fm1 <- lmer(Reaction ~ Days + (Days | Subject), data=sleepstudy) 250s 250s Attaching package: ‘lme4’ 250s 250s The following object is masked from ‘package:nlme’: 250s 250s lmList 250s 250s > ranef(fm1) 250s $Subject 250s (Intercept) Days 250s 308 2.2585510 9.1989758 250s 309 -40.3987381 -8.6196806 250s 310 -38.9604090 -5.4488565 250s 330 23.6906196 -4.8143503 250s 331 22.2603126 -3.0699116 250s 332 9.0395679 -0.2721770 250s 333 16.8405086 -0.2236361 250s 334 -7.2326151 1.0745816 250s 335 -0.3336684 -10.7521652 250s 337 34.8904868 8.6282652 250s 349 -25.2102286 1.1734322 250s 350 -13.0700342 6.6142178 250s 351 4.5778642 -3.0152621 250s 352 20.8636782 3.5360011 250s 369 3.2754656 0.8722149 250s 370 -25.6129993 4.8224850 250s 371 0.8070461 -0.9881562 250s 372 12.3145921 1.2840221 250s 250s with conditional variances for “Subject” 250s > VarCorr(fm1) 250s Groups Name Std.Dev. Corr 250s Subject (Intercept) 24.7407 250s Days 5.9221 0.066 250s Residual 25.5918 250s > 250s > ranef(fm) 250s $judge 250s (Intercept) 250s 1 1.6961783 250s 2 -0.5657831 250s 3 0.9688083 250s 4 -0.0595499 250s 5 0.2305101 250s 6 0.4770387 250s 7 -1.9109736 250s 8 -0.2729439 250s 9 -0.5546758 250s 250s > VarCorr(fm) 250s $judge 250s (Intercept) 250s (Intercept) 1.279461 250s attr(,"stddev") 250s (Intercept) 250s 1.131133 250s 250s > condVar(fm) 250s $judge 250s (Intercept) 250s 1 0.3067453 250s 2 0.3779358 250s 3 0.3545529 250s 4 0.3651870 250s 5 0.3566067 250s 6 0.3485475 250s 7 0.3435693 250s 8 0.3050453 250s 9 0.3183194 250s 250s > summary(fm) 250s Cumulative Link Mixed Model fitted with the Laplace approximation 250s 250s formula: rating ~ temp + contact + (1 | judge) 250s data: wine 250s 250s link threshold nobs logLik AIC niter max.grad cond.H 250s logit flexible 72 -81.57 177.13 332(999) 1.05e-05 2.8e+01 250s 250s Random effects: 250s Groups Name Variance Std.Dev. 250s judge (Intercept) 1.279 1.131 250s Number of groups: judge 9 250s 250s Coefficients: 250s Estimate Std. Error z value Pr(>|z|) 250s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 250s contactyes 1.8349 0.5125 3.580 0.000344 *** 250s --- 250s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 250s 250s Threshold coefficients: 250s Estimate Std. Error z value 250s 1|2 -1.6237 0.6824 -2.379 250s 2|3 1.5134 0.6038 2.507 250s 3|4 4.2285 0.8090 5.227 250s 4|5 6.0888 0.9725 6.261 250s > 250s BEGIN TEST confint.R 250s 250s R version 4.4.3 (2025-02-28) -- "Trophy Case" 250s Copyright (C) 2025 The R Foundation for Statistical Computing 250s Platform: s390x-ibm-linux-gnu 250s 250s R is free software and comes with ABSOLUTELY NO WARRANTY. 250s You are welcome to redistribute it under certain conditions. 250s Type 'license()' or 'licence()' for distribution details. 250s 250s R is a collaborative project with many contributors. 250s Type 'contributors()' for more information and 250s 'citation()' on how to cite R or R packages in publications. 250s 250s Type 'demo()' for some demos, 'help()' for on-line help, or 250s 'help.start()' for an HTML browser interface to help. 250s Type 'q()' to quit R. 250s 250s > ################################# 250s > ## test profile and confint methods: 250s > library(ordinal) 251s > data(wine) 251s > fm1 <- clm(rating ~ contact + temp, data = wine) 251s > summary(fm1) 251s formula: rating ~ contact + temp 251s data: wine 251s 251s link threshold nobs logLik AIC niter max.grad cond.H 251s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 251s 251s Coefficients: 251s Estimate Std. Error z value Pr(>|z|) 251s contactyes 1.5278 0.4766 3.205 0.00135 ** 251s tempwarm 2.5031 0.5287 4.735 2.19e-06 *** 251s --- 251s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 251s 251s Threshold coefficients: 251s Estimate Std. Error z value 251s 1|2 -1.3444 0.5171 -2.600 251s 2|3 1.2508 0.4379 2.857 251s 3|4 3.4669 0.5978 5.800 251s 4|5 5.0064 0.7309 6.850 251s > 251s > ## profile.clm and confint.clm: 251s > pr1 <- profile(fm1) 251s > confint(pr1) 251s 2.5 % 97.5 % 251s contactyes 0.6158045 2.492424 251s tempwarm 1.5097839 3.595251 251s > pr1 <- profile(fm1, which.beta = 1:2) 251s > confint(pr1) 251s 2.5 % 97.5 % 251s contactyes 0.6158045 2.492424 251s tempwarm 1.5097839 3.595251 251s > pr1 <- profile(fm1, which.beta = 2:1) 251s > confint(pr1) 251s 2.5 % 97.5 % 251s tempwarm 1.5097839 3.595251 251s contactyes 0.6158045 2.492424 251s > pr1 <- profile(fm1, which.beta = 1) 251s > confint(pr1) 251s 2.5 % 97.5 % 251s contactyes 0.6158045 2.492424 251s > pr1 <- profile(fm1, which.beta = 2) 251s > confint(pr1) 251s 2.5 % 97.5 % 251s tempwarm 1.509784 3.595251 251s > pr1 <- try(profile(fm1, which.beta = 0), silent = TRUE) ## error 251s > pr1 <- try(profile(fm1, which.beta = "no.par"), silent = TRUE) ## error 251s > pr1 <- try(profile(fm1, which.beta = -1), silent = TRUE) ## error 251s > pr1 <- profile(fm1, which.beta = "tempwarm") 251s > confint(pr1) 251s 2.5 % 97.5 % 251s tempwarm 1.509784 3.595251 251s > pr1 <- profile(fm1, alpha = 0.1) 251s > confint(pr1) ## should give NA in this case? 251s 2.5 % 97.5 % 251s contactyes NA NA 251s tempwarm NA NA 251s > pr1 <- profile(fm1, max.steps = 9) 251s > pr1 <- profile(fm1, step.warn = 7) 251s > pr1 <- profile(fm1, nsteps = 6) 251s > pr1 <- profile(fm1, trace = 1) 251s 251s Parameter: contactyes down 251s 251s Parameter: contactyes up 251s 251s Parameter: tempwarm down 251s 251s Parameter: tempwarm up 251s > pr1 <- profile(fm1, control = list(gradTol = .1)) 251s > confint(pr1) ## not at all unreliable... 251s 2.5 % 97.5 % 251s contactyes 0.6158045 2.492424 251s tempwarm 1.5097839 3.595251 251s > 251s > ## single regression coef setting: 251s > fm2 <- clm(rating ~ contact, data = wine) 251s > summary(fm2) 251s formula: rating ~ contact 251s data: wine 251s 251s link threshold nobs logLik AIC niter max.grad cond.H 251s logit flexible 72 -99.96 209.91 5(0) 1.67e-07 1.7e+01 251s 251s Coefficients: 251s Estimate Std. Error z value Pr(>|z|) 251s contactyes 1.2070 0.4499 2.683 0.0073 ** 251s --- 251s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 251s 251s Threshold coefficients: 251s Estimate Std. Error z value 251s 1|2 -2.13933 0.48981 -4.368 251s 2|3 0.04257 0.32063 0.133 251s 3|4 1.71449 0.38637 4.437 251s 4|5 2.97875 0.50207 5.933 251s > pr2 <- profile(fm2) 251s > confint(pr2) 251s 2.5 % 97.5 % 251s contactyes 0.3403978 2.110952 251s > 251s > ## confint.clm: 251s > confint(fm1) 251s 2.5 % 97.5 % 251s contactyes 0.6157925 2.492404 251s tempwarm 1.5097627 3.595225 251s > confint(fm1, 2) 251s argument 'parm' ignored 252s 2.5 % 97.5 % 252s contactyes 0.6157925 2.492404 252s tempwarm 1.5097627 3.595225 252s > confint(fm1, 1) 252s argument 'parm' ignored 252s 2.5 % 97.5 % 252s contactyes 0.6157925 2.492404 252s tempwarm 1.5097627 3.595225 252s > confint(fm1, "tempwarm") 252s argument 'parm' ignored 252s 2.5 % 97.5 % 252s contactyes 0.6157925 2.492404 252s tempwarm 1.5097627 3.595225 252s > confint(fm1, type = "profile") 252s argument 'parm' ignored 252s 2.5 % 97.5 % 252s contactyes 0.6157925 2.492404 252s tempwarm 1.5097627 3.595225 252s > confint(fm1, type = "Wald") 252s 2.5 % 97.5 % 252s 1|2 -2.3578848 -0.330882 252s 2|3 0.3925794 2.109038 252s 3|4 2.2952980 4.638476 252s 4|5 3.5738541 6.438954 252s contactyes 0.5936345 2.461961 252s tempwarm 1.4669081 3.539296 252s > confint(fm1, 2, type = "Wald") 252s 2.5 % 97.5 % 252s 1|2 -2.3578848 -0.330882 252s 2|3 0.3925794 2.109038 252s 3|4 2.2952980 4.638476 252s 4|5 3.5738541 6.438954 252s contactyes 0.5936345 2.461961 252s tempwarm 1.4669081 3.539296 252s > confint(fm1, level = 0.5) 252s 25 % 75 % 252s contactyes 1.209254 1.852544 252s tempwarm 2.152051 2.865757 252s > confint(fm1, level = 1 - 1e-6) 252s Wait for profiling to be done... 252s 252s Parameter: contactyes down 252s 252s Parameter: contactyes up 252s 252s Parameter: tempwarm down 252s 252s Parameter: tempwarm up 252s 0 % 100 % 252s contactyes -0.7003630 4.091731 252s tempwarm 0.1351282 5.520007 252s > confint(fm1, level = 1 - 1e-10) ## extreme, but it works 252s 0 % 100 % 252s contactyes -1.4045009 5.059182 252s tempwarm -0.5753928 6.774556 252s > confint(fm1, trace = 1) 252s 2.5 % 97.5 % 252s contactyes 0.6157925 2.492404 252s tempwarm 1.5097627 3.595225 252s > 252s > ## plot.profile: 252s > pr1 <- profile(fm1, which.beta=1:2, alpha = 1e-3) 252s > par(mfrow = c(1,2)) 252s > plot(pr1) 252s > plot(pr1, 1) 252s > plot(pr1, "contactyes") 252s > plot(pr1, level = .97) 252s > plot(pr1, Log = TRUE) 252s > plot(pr1, relative = FALSE) 252s > plot(pr1, root = TRUE) 252s > plot(pr1, approx = TRUE) 252s > plot(pr1, n=10) 252s > plot(pr1, ylim = c(0,2)) 252s > plot(pr1, las = 1) 252s > plot(pr2) 252s > 252s > 252s BEGIN TEST nominal.test.R 252s 252s R version 4.4.3 (2025-02-28) -- "Trophy Case" 252s Copyright (C) 2025 The R Foundation for Statistical Computing 252s Platform: s390x-ibm-linux-gnu 252s 252s R is free software and comes with ABSOLUTELY NO WARRANTY. 252s You are welcome to redistribute it under certain conditions. 252s Type 'license()' or 'licence()' for distribution details. 252s 252s R is a collaborative project with many contributors. 252s Type 'contributors()' for more information and 252s 'citation()' on how to cite R or R packages in publications. 252s 252s Type 'demo()' for some demos, 'help()' for on-line help, or 252s 'help.start()' for an HTML browser interface to help. 252s Type 'q()' to quit R. 252s 252s > library(ordinal) 253s > 253s > if(require(MASS)) { 253s + fm1 <- clm(Sat ~ Infl + Type + Cont, data=housing, weights=Freq) 253s + scale_test(fm1) 253s + nominal_test(fm1) 253s + 253s + fm2 <- update(fm1, scale=~Cont) 253s + scale_test(fm2) 253s + nominal_test(fm2) 253s + fm3 <- update(fm1, nominal=~ Cont) 253s + fm3$Theta 253s + anova(fm2, fm3) 253s + fm3$alpha.mat 253s + summary(fm3) 253s + } 253s Loading required package: MASS 253s formula: Sat ~ Infl + Type + Cont 253s nominal: ~Cont 253s data: housing 253s 253s link threshold nobs logLik AIC niter max.grad cond.H 253s logit flexible 1681 -1738.35 3494.70 4(0) 1.31e-07 6.3e+01 253s 253s Coefficients: (1 not defined because of singularities) 253s Estimate Std. Error z value Pr(>|z|) 253s InflMedium 0.5695 0.1048 5.436 5.45e-08 *** 253s InflHigh 1.2884 0.1271 10.137 < 2e-16 *** 253s TypeApartment -0.5706 0.1192 -4.788 1.68e-06 *** 253s TypeAtrium -0.3643 0.1552 -2.348 0.0189 * 253s TypeTerrace -1.0980 0.1516 -7.242 4.43e-13 *** 253s ContHigh NA NA NA NA 253s --- 253s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 253s 253s Threshold coefficients: 253s Estimate Std. Error z value 253s Low|Medium.(Intercept) -0.4494 0.1279 -3.515 253s Medium|High.(Intercept) 0.6480 0.1279 5.066 253s Low|Medium.ContHigh -0.4440 0.1095 -4.056 253s Medium|High.ContHigh -0.2861 0.1063 -2.691 253s > 253s > ################################# 253s > ### Testing nominal_test and scale_test: 253s > fm1 <- clm(rating ~ temp * contact, data=wine) 253s > ## names(fm1) 253s > fm2 <- clm(rating ~ temp * contact, data=wine, nominal=~contact) 253s > (an <- anova(fm1, fm2)) 253s Likelihood ratio tests of cumulative link models: 253s 253s formula: nominal: link: threshold: 253s fm1 rating ~ temp * contact ~1 logit flexible 253s fm2 rating ~ temp * contact ~contact logit flexible 253s 253s no.par AIC logLik LR.stat df Pr(>Chisq) 253s fm1 7 186.83 -86.416 253s fm2 10 192.17 -86.083 0.6669 3 0.881 253s > (nm <- nominal_test(fm1)) 253s Tests of nominal effects 253s 253s formula: rating ~ temp * contact 253s Df logLik AIC LRT Pr(>Chi) 253s -86.416 186.83 253s temp 3 -84.874 189.75 3.08352 0.3789 253s contact 3 -86.083 192.16 0.66691 0.8810 253s temp:contact 253s > stopifnot(isTRUE(all.equal(an[2, 6], nm["contact", 5]))) 253s > 253s > fm2 <- clm(rating ~ temp * contact, data=wine, scale=~contact) 253s > (an <- anova(fm1, fm2)) 253s Likelihood ratio tests of cumulative link models: 253s 253s formula: scale: link: threshold: 253s fm1 rating ~ temp * contact ~1 logit flexible 253s fm2 rating ~ temp * contact ~contact logit flexible 253s 253s no.par AIC logLik LR.stat df Pr(>Chisq) 253s fm1 7 186.83 -86.416 253s fm2 8 188.60 -86.300 0.2325 1 0.6297 253s > (sc <- scale_test(fm1)) 253s Tests of scale effects 253s 253s formula: rating ~ temp * contact 253s Df logLik AIC LRT Pr(>Chi) 253s -86.416 186.83 253s temp 1 -86.326 188.65 0.18061 0.6709 253s contact 1 -86.300 188.60 0.23252 0.6297 253s temp:contact 3 -86.259 192.52 0.31391 0.9574 253s > stopifnot(isTRUE(all.equal(an[2, 6], sc["contact", "Pr(>Chi)"]))) 253s > 253s > fm1 <- clm(rating ~ temp + contact, 253s + nominal=~temp + contact, data=wine) 253s > fm1 253s formula: rating ~ temp + contact 253s nominal: ~temp + contact 253s data: wine 253s 253s link threshold nobs logLik AIC niter max.grad cond.H 253s logit flexible 72 -84.61 193.22 20(0) 4.36e-09 5.0e+10 253s 253s Coefficients: (2 not defined because of singularities) 253s tempwarm contactyes 253s NA NA 253s 253s Threshold coefficients: 253s 1|2 2|3 3|4 Warning message: 253s (1) Hessian is numerically singular: parameters are not uniquely determined 253s In addition: Absolute convergence criterion was met, but relative criterion was not met 253s 4|5 253s (Intercept) -1.226 1.033 3.946 24.553 253s tempwarm -21.118 -2.111 -2.940 -22.432 253s contactyes -1.659 -1.343 -1.693 -1.162 253s > try(nominal_test(fm1), silent=TRUE)[1] ## gives error OK 253s Df 253s 253s > scale_test(fm1) 253s Tests of scale effects 253s 253s formula: rating ~ temp + contact 253s nominal: ~temp + contact 253s Df logLik AIC LRT Pr(>Chi) 253s -84.611 193.22 253s temp 1 -84.604 195.21 0.0129568 0.9094 253s contact 1 -84.610 195.22 0.0012219 0.9721 253s > fm1 <- clm(rating ~ temp + contact, 253s + scale=~temp + contact, data=wine) 253s > fm1 253s formula: rating ~ temp + contact 253s scale: ~temp + contact 253s data: wine 253s no additional terms to add to nominal 253s 253s Warning messages: 253s 1: (1) Hessian is numerically singular: parameters are not uniquely determined 253s In addition: Absolute convergence criterion was met, but relative criterion was not met 253s 2: (1) Hessian is numerically singular: parameters are not uniquely determined 253s In addition: Absolute convergence criterion was met, but relative criterion was not met 253s 253s 253s link threshold nobs logLik AIC niter max.grad cond.H 253s logit flexible 72 -86.34 188.68 8(0) 7.40e-09 2.0e+02 253s 253s Coefficients: 253s tempwarm contactyes 253s 2.446 1.482 253s 253s log-scale coefficients: 253s tempwarm contactyes 253s 0.05008 -0.11418 253s 253s Threshold coefficients: 253s 1|2 2|3 3|4 4|5 253s -1.303 1.219 3.377 4.872 253s > try(scale_test(fm1), silent=TRUE)[1] ## gives error OK 253s Df 253s 253s > nominal_test(fm1) 253s Tests of nominal effects 253s 253s formula: rating ~ temp + contact 253s scale: ~temp + contact 253s Df logLik AIC LRT Pr(>Chi) 253s -86.342 188.69 253s temp 3 -84.851 191.70 2.98202 0.3944 253s contact 3 -86.008 194.02 0.66808 0.8807 253s > 253s > 253s > ## Using weights: 253s > set.seed(123454321) 253s > wt <- runif(nrow(wine)) 253s > fm1 <- clm(rating ~ temp * contact, data=wine, weigths=wt) 253s > nominal_test(fm1) 253s 253s no relevant terms to add to scale 253s 253s Tests of nominal effects 253s 253s formula: rating ~ temp * contact 253s Df logLik AIC LRT Pr(>Chi) 253s -86.416 186.83 253s temp 3 -84.874 189.75 3.08352 0.3789 253s contact 3 -86.083 192.16 0.66691 0.8810 253s temp:contact 253s > scale_test(fm1) 253s Tests of scale effects 253s 253s formula: rating ~ temp * contact 253s Df logLik AIC LRT Pr(>Chi) 253s -86.416 186.83 253s temp 1 -86.326 188.65 0.18061 0.6709 253s contact 1 -86.300 188.60 0.23252 0.6297 253s temp:contact 3 -86.259 192.52 0.31391 0.9574 253s > 253s > ## No nominal test for judge since that model is not identifiable: 253s > fm1 <- clm(rating ~ judge + temp + contact, data=wine) 253s > nominal_test(fm1) 253s Tests of nominal effects 253s 253s formula: rating ~ judge + temp + contact 253s Df logLik AIC LRT Pr(>Chi) 253s -70.921 169.84 253s judge 253s temp 3 -69.900 173.80 2.04253 0.5636 253s contact 3 -70.708 175.42 0.42612 0.9348 253s > scale_test(fm1) 253s Tests of scale effects 253s 253s formula: rating ~ judge + temp + contact 253s Df logLik AIC LRT Pr(>Chi) 253s -70.921 169.84 253s judge 8 -64.731 173.46 12.3790 0.1351 253s temp 1 -70.897 171.79 0.0474 0.8276 253s contact 1 -70.870 171.74 0.1018 0.7497 253s > fm1 <- clm(rating ~ judge + temp, nominal=~contact, data=wine) 253s > nominal_test(fm1) 253s Tests of nominal effects 253s 253s formula: rating ~ judge + temp 253s nominal: ~contact 253s Df logLik AIC LRT Pr(>Chi) 253s -70.708 175.42 253s judge 253s temp 3 -69.707 179.41 2.0015 0.5721 253s > summary(fm1) 253s formula: rating ~ judge + temp 253s nominal: ~contact 253s data: wine 253s 253s link threshold nobs logLik AIC niter max.grad cond.H 253s logit flexible 72 -70.71 175.42 6(0) 8.07e-08 9.9e+01 253s 253s Coefficients: 253s Estimate Std. Error z value Pr(>|z|) 253s judge2 -3.2395 1.0683 -3.032 0.00243 ** 253s judge3 -0.9556 0.9699 -0.985 0.32452 253s judge4 -2.4613 1.0321 -2.385 0.01709 * 253s judge5 -2.0248 1.0093 -2.006 0.04484 * 253s judge6 -1.6379 0.9770 -1.677 0.09364 . 253s judge7 -5.2222 1.1381 -4.589 4.46e-06 *** 253s judge8 -2.7648 0.9776 -2.828 0.00468 ** 253s judge9 -3.1751 1.0028 -3.166 0.00154 ** 253s tempwarm 3.3309 0.6174 5.395 6.87e-08 *** 253s --- 253s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 253s 253s Threshold coefficients: 253s Estimate Std. Error z value 253s 1|2.(Intercept) -4.1549 0.9897 -4.198 253s 2|3.(Intercept) -0.7354 0.7920 -0.928 253s 3|4.(Intercept) 2.3388 0.8909 2.625 253s 4|5.(Intercept) 3.8873 1.0352 3.755 253s 1|2.contactyes -2.0216 1.3072 -1.547 253s 2|3.contactyes -1.9865 0.6904 -2.877 253s 3|4.contactyes -2.1825 0.7774 -2.807 253s 4|5.contactyes -1.5077 1.0044 -1.501 253s > 253s > ## A continuous variable: 253s > set.seed(123454321) 253s > x <- rnorm(nrow(wine), sd=1) 253s > fm <- clm(rating ~ temp, nominal=~contact * x, data=wine) 253s Warning message: 253s (1) Hessian is numerically singular: parameters are not uniquely determined 253s In addition: Absolute convergence criterion was met, but relative criterion was not met 253s > nominal_test(fm) 254s Tests of nominal effects 254s 254s formula: rating ~ temp 254s nominal: ~contact * x 254s Df logLik AIC LRT Pr(>Chi) 254s -77.858 189.72 254s temp 3 -76.738 193.48 2.24 0.5241 254s > scale_test(fm) 254s Tests of scale effects 254s 254s formula: rating ~ temp 254s nominal: ~contact * x 254s Df logLik AIC LRT Pr(>Chi) 254s -77.858 189.72 254s temp 1 -77.684 191.37 0.34804 0.5552 254s > fm <- clm(rating ~ temp + x, nominal=~contact, data=wine) 254s Warning message: 254s (1) Hessian is numerically singular: parameters are not uniquely determined 254s In addition: Absolute convergence criterion was met, but relative criterion was not met 254s > nominal_test(fm) 254s Tests of nominal effects 254s 254s formula: rating ~ temp + x 254s nominal: ~contact 254s Df logLik AIC LRT Pr(>Chi) 254s -84.949 189.90 254s temp 3 -83.421 192.84 3.0560 0.3831 254s x 3 -84.333 194.67 1.2322 0.7453 254s > scale_test(fm) 254s Tests of scale effects 254s 254s formula: rating ~ temp + x 254s nominal: ~contact 254s Df logLik AIC LRT Pr(>Chi) 254s -84.949 189.90 254s temp 1 -84.737 191.47 0.42504 0.5144 254s x 1 -84.896 191.79 0.10781 0.7426 254s > ## poly: 254s > fm <- clm(rating ~ temp + poly(x, 2), nominal=~contact, data=wine) 254s > nominal_test(fm) 254s Tests of nominal effects 254s 254s formula: rating ~ temp + poly(x, 2) 254s nominal: ~contact 254s Df logLik AIC LRT Pr(>Chi) 254s -84.079 190.16 254s temp 3 -82.694 193.39 2.7693 0.4286 254s poly(x, 2) 6 -80.941 195.88 6.2762 0.3930 254s > scale_test(fm) 254s Tests of scale effects 254s 254s formula: rating ~ temp + poly(x, 2) 254s nominal: ~contact 254s Df logLik AIC LRT Pr(>Chi) 254s -84.079 190.16 254s temp 1 -84.020 192.04 0.11784 0.7314 254s poly(x, 2) 2 -83.314 192.63 1.53017 0.4653 254s > ## another combination: 254s > fm1 <- clm(SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ, 254s + scale=~PROD, 254s + nominal=~ DAY*GENDER, data=soup) 254s > fm1 254s formula: SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ 254s scale: ~PROD 254s nominal: ~DAY * GENDER 254s data: soup 254s 254s link threshold nobs logLik AIC niter max.grad cond.H 254s logit flexible 1847 -2657.84 5375.68 8(2) 3.50e-07 4.0e+03 254s 254s Coefficients: (1 not defined because of singularities) 254s PRODID2 PRODID3 PRODID4 PRODID5 254s 1.0780 1.5090 0.9482 1.4910 254s PRODID6 DAY2 SOUPTYPECanned SOUPTYPEDry-mix 254s 1.8174 NA -0.2337 0.1832 254s SOUPFREQ1-4/month SOUPFREQ<1/month 254s -0.0954 -0.1137 254s 254s log-scale coefficients: 254s PRODTest 254s 0.1427 254s 254s Threshold coefficients: 254s 1|2 2|3 3|4 4|5 5|6 254s (Intercept) -1.65979 -0.75912 -0.36903 0.02374 0.66929 254s DAY2 -0.22291 0.13711 0.16406 0.10279 0.23721 254s GENDERFemale 0.06531 0.06089 -0.01938 -0.13670 -0.01594 254s DAY2:GENDERFemale 0.36194 0.25429 0.25482 0.23375 0.05243 254s > nominal_test(fm1) 255s Tests of nominal effects 255s 255s formula: SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ 255s scale: ~PROD 255s nominal: ~DAY * GENDER 255s Df logLik AIC LRT Pr(>Chi) 255s -2657.8 5375.7 255s PRODID 20 -2644.7 5389.4 26.2387 0.1580707 255s SOUPTYPE 8 -2654.0 5384.1 7.5969 0.4738067 255s SOUPFREQ 8 -2644.6 5365.1 26.5587 0.0008423 *** 255s PROD 4 -2654.7 5377.5 6.2011 0.1846258 255s --- 255s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 255s > scale_test(fm1) 255s Tests of scale effects 255s 255s formula: SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ 255s scale: ~PROD 255s nominal: ~DAY * GENDER 255s Df logLik AIC LRT Pr(>Chi) 255s -2657.8 5375.7 255s PRODID 4 -2657.3 5382.5 1.1526 0.885842 255s DAY 1 -2655.9 5373.8 3.8544 0.049616 * 255s SOUPTYPE 2 -2657.6 5379.1 0.5416 0.762771 255s SOUPFREQ 2 -2652.7 5369.3 10.3447 0.005671 ** 255s --- 255s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 255s > 255s > ################################# 255s > 255s > 255s BEGIN TEST ranef.loading.R 255s 255s R version 4.4.3 (2025-02-28) -- "Trophy Case" 255s Copyright (C) 2025 The R Foundation for Statistical Computing 255s Platform: s390x-ibm-linux-gnu 255s 255s R is free software and comes with ABSOLUTELY NO WARRANTY. 255s You are welcome to redistribute it under certain conditions. 255s Type 'license()' or 'licence()' for distribution details. 255s 255s R is a collaborative project with many contributors. 255s Type 'contributors()' for more information and 255s 'citation()' on how to cite R or R packages in publications. 255s 255s Type 'demo()' for some demos, 'help()' for on-line help, or 255s 'help.start()' for an HTML browser interface to help. 255s Type 'q()' to quit R. 255s 256s > # check that ranef and VarCorr work even after loading ordinal: 256s > library(lme4) 256s Loading required package: Matrix 257s > fm1 <- lmer(Reaction ~ Days + (Days | Subject), data=sleepstudy) 257s > ranef(fm1) 257s $Subject 257s (Intercept) Days 257s 308 2.2585510 9.1989758 257s 309 -40.3987381 -8.6196806 257s 310 -38.9604090 -5.4488565 257s 330 23.6906196 -4.8143503 257s 331 22.2603126 -3.0699116 257s 332 9.0395679 -0.2721770 257s 333 16.8405086 -0.2236361 257s 334 -7.2326151 1.0745816 257s 335 -0.3336684 -10.7521652 257s 337 34.8904868 8.6282652 257s 349 -25.2102286 1.1734322 257s 350 -13.0700342 6.6142178 257s 351 4.5778642 -3.0152621 257s 352 20.8636782 3.5360011 257s 369 3.2754656 0.8722149 257s 370 -25.6129993 4.8224850 257s 371 0.8070461 -0.9881562 257s 372 12.3145921 1.2840221 257s 257s with conditional variances for “Subject” 257s > VarCorr(fm1) 257s Groups Name Std.Dev. Corr 257s Subject (Intercept) 24.7407 257s Days 5.9221 0.066 257s Residual 25.5918 257s > library(ordinal) 257s > ranef(fm1) 257s $Subject 257s (Intercept) Days 257s 308 2.2585510 9.1989758 257s 309 -40.3987381 -8.6196806 257s 310 -38.9604090 -5.4488565 257s 330 23.6906196 -4.8143503 257s 331 22.2603126 -3.0699116 257s 332 9.0395679 -0.2721770 257s 333 16.8405086 -0.2236361 257s 334 -7.2326151 1.0745816 257s 335 -0.3336684 -10.7521652 257s 337 34.8904868 8.6282652 257s 349 -25.2102286 1.1734322 257s 350 -13.0700342 6.6142178 257s 351 4.5778642 -3.0152621 257s 352 20.8636782 3.5360011 257s 369 3.2754656 0.8722149 257s 370 -25.6129993 4.8224850 257s 371 0.8070461 -0.9881562 257s 372 12.3145921 1.2840221 257s 257s with conditional variances for “Subject” 257s > VarCorr(fm1) 257s Groups Name Std.Dev. Corr 257s Subject (Intercept) 24.7407 257s Days 5.9221 0.066 257s Residual 25.5918 257s > 257s BEGIN TEST test-all.R 257s 257s R version 4.4.3 (2025-02-28) -- "Trophy Case" 257s Copyright (C) 2025 The R Foundation for Statistical Computing 257s Platform: s390x-ibm-linux-gnu 257s 257s R is free software and comes with ABSOLUTELY NO WARRANTY. 257s You are welcome to redistribute it under certain conditions. 257s Type 'license()' or 'licence()' for distribution details. 257s 257s R is a collaborative project with many contributors. 257s Type 'contributors()' for more information and 257s 'citation()' on how to cite R or R packages in publications. 257s 257s Type 'demo()' for some demos, 'help()' for on-line help, or 257s 'help.start()' for an HTML browser interface to help. 257s Type 'q()' to quit R. 257s 257s > 257s > if(require(testthat) && require(ordinal)) { 257s + test_check("ordinal") 257s + } 257s Loading required package: testthat 257s Loading required package: ordinal 263s [ FAIL 0 | WARN 0 | SKIP 0 | PASS 81 ] 263s > 263s BEGIN TEST test.clm.Theta.R 263s 263s R version 4.4.3 (2025-02-28) -- "Trophy Case" 263s Copyright (C) 2025 The R Foundation for Statistical Computing 263s Platform: s390x-ibm-linux-gnu 263s 263s R is free software and comes with ABSOLUTELY NO WARRANTY. 263s You are welcome to redistribute it under certain conditions. 263s Type 'license()' or 'licence()' for distribution details. 263s 263s R is a collaborative project with many contributors. 263s Type 'contributors()' for more information and 263s 'citation()' on how to cite R or R packages in publications. 263s 263s Type 'demo()' for some demos, 'help()' for on-line help, or 263s 'help.start()' for an HTML browser interface to help. 263s Type 'q()' to quit R. 263s 263s > library(ordinal) 264s > 264s > ################################# 264s > ## 1 categorical variable in nominal: 264s > fm <- clm(rating ~ temp, nominal=~contact, data=wine) 264s > fm$Theta 264s contact 1|2 2|3 3|4 4|5 264s 1 no -1.323043 1.2464435 3.550044 4.660247 264s 2 yes -2.938103 -0.2651238 1.875288 3.609624 264s > fm$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -1.323043 1.246444 3.550044 4.660247 264s contactyes -1.615059 -1.511567 -1.674756 -1.050623 264s > ## Threshold effects: 264s > fm <- clm(rating ~ temp, nominal=~contact, data=wine, 264s + threshold="symmetric") 264s > fm$Theta 264s contact 1|2 2|3 3|4 4|5 264s 1 no -1.054279 1.083892 3.383980 5.522152 264s 2 yes -2.360683 -0.356889 1.753317 3.757111 264s > fm$alpha.mat 264s central.1 central.2 spacing.1 264s (Intercept) 1.083892 3.383980 2.1381713 264s contactyes -1.440781 -1.630663 -0.1343777 264s > fm <- clm(rating ~ temp, nominal=~contact, data=wine, 264s + threshold="equidistant") 264s > fm$Theta 264s contact 1|2Warning message: 264s (1) Hessian is numerically singular: parameters are not uniquely determined 264s In addition: Absolute convergence criterion was met, but relative criterion was not met 264s 2|3 3|4 4|5 264s 1 no -1.089140 1.1176064 3.324353 5.531099 264s 2 yes -2.386361 -0.3365063 1.713348 3.763202 264s > fm$alpha.mat 264s threshold.1 spacing 264s (Intercept) -1.08914 2.2067465 264s contactyes -1.29722 -0.1568922 264s > ## Singular fit is still ok (with a warning, though) 264s > fm <- clm(rating ~ contact, nominal=~temp, data=wine) 264s > fm$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -1.265638 1.104045 3.765661 24.89643 264s tempwarm -21.095417 -2.153024 -2.873317 -22.55000 264s > fm$Theta 264s temp 1|2 2|3 3|4 4|5 264s 1 cold -1.265638 1.104045 3.7656606 24.896432 264s 2 warm -22.361055 -1.048979 0.8923431 2.346436 264s > 264s > ################################# 264s > ## 1 continuous variable: 264s > set.seed(123) 264s > x <- rnorm(nrow(wine), sd=1) 264s > fm <- clm(rating ~ temp, nominal=~ x, data=wine) 264s > fm$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -1.93392115 0.4251062 2.4798775 3.9190335 264s x 0.09463825 0.3805713 0.4261607 0.3809099 264s > fm$Theta 264s 1|2 2|3 3|4 4|5 264s 1 -1.933921 0.4251062 2.479878 3.919034 264s > fm <- clm(rating ~ temp, nominal=~ poly(x, 2), data=wine) 264s > fm$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -1.9310988 0.4469436 2.517523 4.094448 264s poly(x, 2)1 0.8763914 3.2908002 3.471603 4.422045 264s poly(x, 2)2 -0.3826811 0.2518184 -2.064209 5.810095 264s > fm$Theta 264s 1|2 2|3 3|4 4|5 264s 1 -1.931099 0.4469436 2.517523 4.094448 264s > 264s > ################################# 264s > ## 1 categorical + 1 continuous variable: 264s > set.seed(123) 264s > x <- rnorm(nrow(wine), sd=1) 264s > fm <- clm(rating ~ temp, nominal=~contact + x, data=wine) 264s > fm$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -1.279484 1.2782515 3.612766 4.7496630 264s contactyes -1.770377 -1.6715296 -1.647335 -0.9575417 264s x 0.300792 0.5330593 0.351517 0.3320371 264s > fm$Theta 264s contact 1|2 2|3 3|4 4|5 264s 1 no -1.279484 1.2782515 3.612766 4.749663 264s 2 yes -3.049860 -0.3932781 1.965431 3.792121 264s > fm <- clm(rating ~ temp, nominal=~contact + x, data=wine, 264s + threshold="symmetric") 264s > fm$alpha.mat 264s central.1 central.2 spacing.1 264s (Intercept) 1.1195535 3.4384752 2.134429723 264s contactyes -1.5864032 -1.5904314 -0.007568099 264s x 0.5069573 0.3485632 0.137951085 264s > fm$Theta 264s contact 1|2 2|3 3|4 4|5 264s 1 no -1.014876 1.1195535 3.438475 5.572905 264s 2 yes -2.593711 -0.4668497 1.848044 3.974905 264s > ################################# 264s > ### NOTE: To get the by-threshold nominal effects of continuous terms 264s > ## use: 264s > with(fm, t(apply(alpha.mat, 1, function(th) tJac %*% th))) 264s [,1] [,2] [,3] [,4] 264s (Intercept) -1.0148763 1.1195535 3.4384752 5.5729049 264s contactyes -1.5788351 -1.5864032 -1.5904314 -1.5979995 264s x 0.3690062 0.5069573 0.3485632 0.4865143 264s > ################################# 264s > ## Interactions: 264s > fm <- clm(rating ~ temp, nominal=~contact:x, data=wine) 264s > fm$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -1.9577944 0.5997213 2.6863244 4.1510613 264s contactno:x 0.1127629 0.7818026 0.4423216 0.9364319 264s contactyes:x 0.2129232 -0.2720801 0.3848893 0.1730418 264s > fm$Theta 264s 1|2 2|3 3|4 4|5 264s 1 -1.957794 0.5997213 2.686324 4.151061 264s > fm <- clm(rating ~ temp, nominal=~contact+x+contact:x, data=wine) 264s > fm$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -1.3000385 1.4056290 3.8340494 5.195521 264s contactyes -2.2801110 -1.5685386 -1.7308097 -1.318630 264s x 0.1790630 0.8754972 0.5140440 1.061857 264s contactyes:x 0.7541913 -0.8829449 -0.2203363 -1.055090 264s > fm$Theta 264s contact 1|2 2|3 3|4 4|5 264s 1 no -1.300039 1.4056290 3.834049 5.195521 264s 2 yes -3.580150 -0.1629096 2.103240 3.876891 264s > fm <- clm(rating ~ temp, nominal=~contact*x, data=wine) 264s > fm$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -1.3000385 1.4056290 3.8340494 5.195521 264s contactyes -2.2801110 -1.5685386 -1.7308097 -1.318630 264s x 0.1790630 0.8754972 0.5140440 1.061857 264s contactyes:x 0.7541913 -0.8829449 -0.2203363 -1.055090 264s > fm$Theta 264s contact 1|2 2|3 3|4 4|5 264s 1 no -1.300039 1.4056290 3.834049 5.195521 264s 2 yes -3.580150 -0.1629096 2.103240 3.876891 264s > ## polynomial terms: 264s > fm <- clm(rating ~ temp, nominal=~contact + poly(x, 2), data=wine) 264s > fm$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -1.2704762 1.3058436 3.635351 4.984803 264s contactyes -1.7725959 -1.6863567 -1.668402 -1.045016 264s poly(x, 2)1 2.4660191 4.4257770 3.395876 4.572499 264s poly(x, 2)2 -0.5079931 -0.4326472 -2.815490 5.853814 264s > fm$Theta 264s contact 1|2 2|3 3|4 4|5 264s 1 no -1.270476 1.3058436 3.635351 4.984803 264s 2 yes -3.043072 -0.3805131 1.966949 3.939787 264s > ## logical variables: (treated like numeric variables) 264s > wine$Con <- as.character(wine$contact) == "yes" 264s > fm <- clm(rating ~ temp, nominal=~Con, data=wine) 264s > fm$Theta 264s 1|2 2|3 3|4 4|5 264s 1 -1.323043 1.246444 3.550044 4.660247 264s > fm$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -1.323043 1.246444 3.550044 4.660247 264s ConTRUE -1.615059 -1.511567 -1.674756 -1.050623 264s > wine$Con.num <- 1 * wine$Con 264s > fm <- clm(rating ~ temp, nominal=~Con.num, data=wine) 264s > fm$Theta 264s 1|2 2|3 3|4 4|5 264s 1 -1.323043 1.246444 3.550044 4.660247 264s > fm$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -1.323043 1.246444 3.550044 4.660247 264s Con.num -1.615059 -1.511567 -1.674756 -1.050623 264s > ################################# 264s > ## Two continuous variables: 264s > set.seed(321) 264s > y <- rnorm(nrow(wine), sd=1) 264s > fm1 <- clm(rating ~ temp, nominal=~y + x, data=wine) 264s > fm1$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -2.0361734 0.4221202 2.4970718 3.92796873 264s y 0.4687950 0.1396038 0.3125431 0.08012751 264s x 0.1283933 0.3903469 0.4322374 0.37584062 264s > fm1$Theta 264s 1|2 2|3 3|4 4|5 264s 1 -2.036173 0.4221202 2.497072 3.927969 264s > ## summary(fm1) 264s > 264s > ################################# 264s > ## 1 categorical + 2 continuous variables: 264s > fm1 <- clm(rating ~ temp, nominal=~y + contact + x, data=wine) 264s > fm1$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -1.3789903 1.2645381 3.5778844 4.76356985 264s y 0.4385042 0.1049073 0.2439721 -0.01655843 264s contactyes -1.7688345 -1.6608152 -1.5801690 -0.98076349 264s x 0.3414184 0.5436276 0.3683201 0.33263316 264s > fm1$Theta 264s contact 1|2 2|3 3|4 4|5 264s 1 no -1.378990 1.2645381 3.577884 4.763570 264s 2 yes -3.147825 -0.3962771 1.997715 3.782806 264s > 264s > fm1 <- clm(rating ~ temp, nominal=~contact + x + contact:x + y, 264s + data=wine) 264s > summary(fm1) 264s formula: rating ~ temp 264s nominal: ~contact + x + contact:x + y 264s data: wine 264s 264s link threshold nobs logLik AIC niter max.grad cond.H 264s logit flexible 72 -81.86 205.72 7(0) 6.30e-12 9.3e+01 264s 264s Coefficients: 264s Estimate Std. Error z value Pr(>|z|) 264s tempwarm 2.8541 0.6159 4.634 3.58e-06 *** 264s --- 264s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 264s 264s Threshold coefficients: 264s Estimate Std. Error z value 264s 1|2.(Intercept) -1.40166 0.63306 -2.214 264s 2|3.(Intercept) 1.38723 0.49672 2.793 264s 3|4.(Intercept) 3.78725 0.71352 5.308 264s 4|5.(Intercept) 5.19478 1.07162 4.848 264s 1|2.contactyes -2.25974 1.68593 -1.340 264s 2|3.contactyes -1.54343 0.62658 -2.463 264s 3|4.contactyes -1.65472 0.68161 -2.428 264s 4|5.contactyes -1.34417 1.10192 -1.220 264s 1|2.x 0.21217 0.60781 0.349 264s 2|3.x 0.88433 0.41592 2.126 264s 3|4.x 0.47072 0.57857 0.814 264s 4|5.x 0.98582 0.94345 1.045 264s 1|2.y 0.41959 0.59889 0.701 264s 2|3.y 0.08377 0.27912 0.300 264s 3|4.y 0.27724 0.33118 0.837 264s 4|5.y -0.03370 0.59652 -0.056 264s 1|2.contactyes:x 0.71850 1.19479 0.601 264s 2|3.contactyes:x -0.89167 0.68974 -1.293 264s 3|4.contactyes:x -0.10843 0.74237 -0.146 264s 4|5.contactyes:x -0.98243 1.06343 -0.924 264s > fm1$Theta 264s contact 1|2 2|3 3|4 4|5 264s 1 no -1.401661 1.3872281 3.787248 5.194782 264s 2 yes -3.661402 -0.1562067 2.132530 3.850615 264s > fm1$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -1.4016606 1.38722808 3.7872478 5.19478152 264s contactyes -2.2597419 -1.54343480 -1.6547177 -1.34416691 264s x 0.2121750 0.88432858 0.4707237 0.98581604 264s y 0.4195947 0.08377343 0.2772447 -0.03369796 264s contactyes:x 0.7184952 -0.89166532 -0.1084271 -0.98242663 264s > fm1 <- clm(rating ~ temp, nominal=~contact*x + y, data=wine) 264s > fm1$Theta 264s contact 1|2 2|3 3|4 4|5 264s 1 no -1.401661 1.3872281 3.787248 5.194782 264s 2 yes -3.661402 -0.1562067 2.132530 3.850615 264s > fm1$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -1.4016606 1.38722808 3.7872478 5.19478152 264s contactyes -2.2597419 -1.54343480 -1.6547177 -1.34416691 264s x 0.2121750 0.88432858 0.4707237 0.98581604 264s y 0.4195947 0.08377343 0.2772447 -0.03369796 264s contactyes:x 0.7184952 -0.89166532 -0.1084271 -0.98242663 264s > t(fm1$alpha.mat) 264s (Intercept) contactyes x y contactyes:x 264s 1|2 -1.401661 -2.259742 0.2121750 0.41959467 0.7184952 264s 2|3 1.387228 -1.543435 0.8843286 0.08377343 -0.8916653 264s 3|4 3.787248 -1.654718 0.4707237 0.27724473 -0.1084271 264s 4|5 5.194782 -1.344167 0.9858160 -0.03369796 -0.9824266 264s > fm1 264s formula: rating ~ temp 264s nominal: ~contact * x + y 264s data: wine 264s 264s link threshold nobs logLik AIC niter max.grad cond.H 264s logit flexible 72 -81.86 205.72 7(0) 6.30e-12 9.3e+01 264s 264s Coefficients: 264s tempwarm 264s 2.854 264s 264s Threshold coefficients: 264s 1|2 2|3 3|4 4|5 264s (Intercept) -1.40166 1.38723 3.78725 5.19478 264s contactyes -2.25974 -1.54343 -1.65472 -1.34417 264s x 0.21217 0.88433 0.47072 0.98582 264s y 0.41959 0.08377 0.27724 -0.03370 264s contactyes:x 0.71850 -0.89167 -0.10843 -0.98243 264s > 264s > ################################# 264s > ## ordered factors (behaves like numerical variables): 264s > data(soup, package="ordinal") 264s > fm2 <- clm(SURENESS ~ 1, nominal=~PRODID + DAY, data=soup) 264s > fm2$Theta 264s PRODID DAY 1|2 2|3 3|4 4|5 5|6 264s 1 1 1 -1.541481 -0.5738506 -0.21399538 0.04222703 0.75684062 264s 2 2 1 -2.260759 -1.5442697 -1.21890789 -0.91689299 -0.24659733 264s 3 3 1 -2.662588 -1.8500284 -1.67612929 -1.15745279 -0.65265582 264s 4 4 1 -2.230317 -1.3875834 -1.10527201 -0.70760465 -0.16454916 264s 5 5 1 -2.291960 -1.8870049 -1.51852627 -1.32708454 -0.64222204 264s 6 6 1 -2.765844 -2.1222058 -1.93080891 -1.76177831 -0.87239437 264s 7 1 2 -1.497366 -0.2765643 0.08617449 0.27652240 0.97863135 264s 8 2 2 -2.216645 -1.2469835 -0.91873802 -0.68259762 -0.02480661 264s 9 3 2 -2.618473 -1.5527421 -1.37595942 -0.92315742 -0.43086509 264s 10 4 2 -2.186203 -1.0902972 -0.80510215 -0.47330927 0.05724157 264s 11 5 2 -2.247845 -1.5897187 -1.21835640 -1.09278917 -0.42043131 264s 12 6 2 -2.721729 -1.8249196 -1.63063905 -1.52748294 -0.65060365 264s > fm2$alpha.mat 264s 1|2 2|3 3|4 4|5 5|6 264s (Intercept) -1.54148084 -0.5738506 -0.2139954 0.04222703 0.7568406 264s PRODID2 -0.71927809 -0.9704192 -1.0049125 -0.95912001 -1.0034380 264s PRODID3 -1.12110698 -1.2761778 -1.4621339 -1.19967981 -1.4094964 264s PRODID4 -0.68883656 -0.8137329 -0.8912766 -0.74983167 -0.9213898 264s PRODID5 -0.75047874 -1.3131544 -1.3045309 -1.36931157 -1.3990627 264s PRODID6 -1.22436292 -1.5483553 -1.7168135 -1.80400534 -1.6292350 264s DAY2 0.04411439 0.2972862 0.3001699 0.23429537 0.2217907 264s > prodid <- factor(soup$PRODID, ordered=TRUE) 264s > fm2 <- clm(SURENESS ~ 1, nominal=~prodid + DAY, data=soup) 264s > fm2$alpha.mat 264s 1|2 2|3 3|4 4|5 5|6 264s (Intercept) -2.29215806 -1.5608238 -1.2772733 -0.9714310 -0.3035963 264s prodid.L -0.69121817 -0.9929406 -1.0651956 -1.1714141 -1.0571728 264s prodid.Q 0.28234300 0.3165731 0.3424949 0.1207237 0.3905959 264s prodid.C -0.56889235 -0.5360906 -0.6536897 -0.5924148 -0.5462885 264s prodid^4 -0.08220340 0.2121409 0.0953785 0.2423256 0.1732012 264s prodid^5 0.20500444 0.3017272 0.3458281 0.2989342 0.3294562 264s DAY2 0.04411439 0.2972862 0.3001699 0.2342954 0.2217907 264s > fm2$Theta 264s DAY 1|2 2|3 3|4 4|5 5|6 264s 1 1 -2.292158 -1.560824 -1.2772733 -0.9714310 -0.30359635 264s 2 2 -2.248044 -1.263538 -0.9771034 -0.7371357 -0.08180562 264s > fm2 <- clm(SURENESS ~ 1, nominal=~prodid, data=soup) 264s > fm2$alpha.mat 264s 1|2 2|3 3|4 4|5 5|6 264s (Intercept) -2.2615449 -1.4231189 -1.13844940 -0.8610163 -0.20025662 264s prodid.L -0.6802192 -1.0171675 -1.08713192 -1.1713363 -1.05578526 264s prodid.Q 0.2551357 0.3521163 0.37511177 0.1651463 0.43182970 264s prodid.C -0.6064464 -0.5635065 -0.68182671 -0.6050149 -0.55490977 264s prodid^4 -0.1115795 0.1036958 -0.01443457 0.1577696 0.09355651 264s prodid^5 0.2349647 0.4222560 0.46856405 0.3867234 0.41280490 264s > fm2$Theta 264s 1|2 2|3 3|4 4|5 5|6 264s 1 -2.261545 -1.423119 -1.138449 -0.8610163 -0.2002566 264s > ################################# 264s > ## Aliased Coefficients: 264s > ## 264s > ## Example where the interaction in the nominal effects is aliased (by 264s > ## design). Here the two Theta matrices coincide. The alpha.mat 264s > ## matrices are similar except one has an extra row with NAs: 264s > soup2 <- soup 264s > levels(soup2$DAY) 264s [1] "1" "2" 264s > levels(soup2$GENDER) 264s [1] "Male" "Female" 264s > xx <- with(soup2, DAY == "2" & GENDER == "Female") 264s > ## Model with additive nominal effects: 264s > fm8 <- clm(SURENESS ~ PRODID, nominal= ~ DAY + GENDER, data=soup2, subset=!xx) 264s > fm8$alpha.mat 264s 1|2 2|3 3|4 4|5 5|6 264s (Intercept) -1.5296912 -0.68765358 -0.3255117394 0.03773041 0.629325973 264s DAY2 -0.2553049 0.08584421 0.1101987830 0.05149732 0.168514829 264s GENDERFemale 0.0790841 0.07464904 -0.0001589362 -0.11045608 -0.005418789 264s > fm8$Theta 264s DAY GENDER 1|2 2|3 3|4 4|5 5|6 264s 1 1 Male -1.529691 -0.6876536 -0.3255117 0.03773041 0.6293260 264s 2 2 Male -1.784996 -0.6018094 -0.2153130 0.08922773 0.7978408 264s 3 1 Female -1.450607 -0.6130045 -0.3256707 -0.07272568 0.6239072 264s 4 2 Female -1.705912 -0.5271603 -0.2154719 -0.02122835 0.7924220 264s > ## Model with non-additive, but aliased nominal effects: 264s > fm9 <- clm(SURENESS ~ PRODID, nominal= ~ DAY * GENDER, data=soup2, subset=!xx) 264s > fm9$alpha.mat 264s 1|2 2|3 3|4 4|5 5|6 264s (Intercept) -1.5296912 -0.68765358 -0.3255117394 0.03773041 0.629325973 264s DAY2 -0.2553049 0.08584421 0.1101987830 0.05149732 0.168514829 264s GENDERFemale 0.0790841 0.07464904 -0.0001589362 -0.11045608 -0.005418789 264s DAY2:GENDERFemale NA NA NA NA NA 264s > fm9$Theta 264s DAY GENDER 1|2 2|3 3|4 4|5 5|6 264s 1 1 Male -1.529691 -0.6876536 -0.3255117 0.03773041 0.6293260 264s 2 2 Male -1.784996 -0.6018094 -0.2153130 0.08922773 0.7978408 264s 3 1 Female -1.450607 -0.6130045 -0.3256707 -0.07272568 0.6239072 264s 4 2 Female -1.705912 -0.5271603 -0.2154719 -0.02122835 0.7924220 264s > 264s > stopEqual <- function(x, y, ca=FALSE) 264s + stopifnot(isTRUE(all.equal(x, y, check.attributes=ca))) 264s > 264s > stopEqual(fm8$alpha.mat, fm9$alpha.mat[1:3, ]) 264s > stopEqual(fm8$Theta, fm9$Theta) 264s > stopEqual(logLik(fm8), logLik(fm9)) 264s > 264s > ################################# 264s > ## Weights: 264s > set.seed(12345) 264s > wts <- runif(nrow(soup)) 264s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE + DAY, data=soup, weights=wts) 264s > fm2$Theta 264s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 264s 1 Self-made 1 -1.957136 -1.2051740 -0.8829317 -0.6651699 -0.03270025 264s 2 Canned 1 -1.665918 -0.9408556 -0.6818962 -0.4277315 0.14356406 264s 3 Dry-mix 1 -2.180024 -1.2221288 -1.1502087 -0.8113657 -0.24840514 264s 4 Self-made 2 -1.988269 -0.9456030 -0.5614139 -0.3852570 0.23978932 264s 5 Canned 2 -1.697051 -0.6812846 -0.3603783 -0.1478186 0.41605363 264s 6 Dry-mix 2 -2.211157 -0.9625577 -0.8286909 -0.5314528 0.02408443 264s > 264s > ## Offset (correctly gives and error) 264s > fm2 <- try(clm(SURENESS ~ 1, nominal=~SOUPTYPE + DAY + offset(wts), 264s + data=soup), silent=TRUE) 264s > stopifnot(inherits(fm2, "try-error")) 264s > 264s > ################################# 264s > ### Other (misc) examples: 264s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE + DAY, data=soup) 264s > fm2$Theta 264s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 264s 1 Self-made 1 -2.040111 -1.2615146 -0.9302684 -0.6740629 -0.05003069 264s 2 Canned 1 -1.816274 -1.0347697 -0.7305192 -0.4563265 0.15972072 264s 3 Dry-mix 1 -2.313198 -1.3029029 -1.1328903 -0.8076982 -0.23529457 264s 4 Self-made 2 -1.956698 -0.9371883 -0.5968669 -0.4131354 0.21403949 264s 5 Canned 2 -1.732861 -0.7104435 -0.3971177 -0.1953990 0.42379090 264s 6 Dry-mix 2 -2.229785 -0.9785767 -0.7994888 -0.5467707 0.02877561 264s > fm2 264s formula: SURENESS ~ 1 264s nominal: ~SOUPTYPE + DAY 264s data: soup 264s 264s link threshold nobs logLik AIC niter max.grad cond.H 264s logit flexible 1847 -2758.02 5556.03 6(2) 1.74e-11 8.7e+02 264s 264s Threshold coefficients: 264s 1|2 2|3 3|4 4|5 5|6 264s (Intercept) -2.04011 -1.26151 -0.93027 -0.67406 -0.05003 264s SOUPTYPECanned 0.22384 0.22674 0.19975 0.21774 0.20975 264s SOUPTYPEDry-mix -0.27309 -0.04139 -0.20262 -0.13364 -0.18526 264s DAY2 0.08341 0.32433 0.33340 0.26093 0.26407 264s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE * DAY, data=soup) 264s > fm2$Theta 264s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 264s 1 Self-made 1 -2.062794 -1.3083328 -0.9935434 -0.7187896 -0.05107493 264s 2 Canned 1 -1.757074 -0.9398212 -0.6286087 -0.3721287 0.15415068 264s 3 Dry-mix 1 -2.369525 -1.3618033 -1.1700713 -0.8661663 -0.23795864 264s 4 Self-made 2 -1.945910 -0.9005649 -0.5459555 -0.3731219 0.21392690 264s 5 Canned 2 -1.775759 -0.7985077 -0.4924765 -0.2776317 0.43428555 264s 6 Dry-mix 2 -2.182299 -0.9257695 -0.7649729 -0.4964369 0.02702867 264s > fm2 264s formula: SURENESS ~ 1 264s nominal: ~SOUPTYPE * DAY 264s data: soup 264s 264s link threshold nobs logLik AIC niter max.grad cond.H 264s logit flexible 1847 -2755.60 5571.21 6(2) 1.75e-11 4.9e+03 264s Warning message: 264s an intercept is needed and assumed in 'nominal' 264s 264s Threshold coefficients: 264s 1|2 2|3 3|4 4|5 5|6 264s (Intercept) -2.063e+00 -1.308e+00 -9.935e-01 -7.188e-01 -5.107e-02 264s SOUPTYPECanned 3.057e-01 3.685e-01 3.649e-01 3.467e-01 2.052e-01 264s SOUPTYPEDry-mix -3.067e-01 -5.347e-02 -1.765e-01 -1.474e-01 -1.869e-01 264s DAY2 1.169e-01 4.078e-01 4.476e-01 3.457e-01 2.650e-01 264s SOUPTYPECanned:DAY2 -1.356e-01 -2.665e-01 -3.115e-01 -2.512e-01 1.513e-02 264s SOUPTYPEDry-mix:DAY2 7.034e-02 2.827e-02 -4.249e-02 2.406e-02 -1.452e-05 264s > fm2$alpha.mat 264s 1|2 2|3 3|4 4|5 264s (Intercept) -2.06279431 -1.30833282 -0.99354336 -0.71878961 264s SOUPTYPECanned 0.30572040 0.36851159 0.36493470 0.34666092 264s SOUPTYPEDry-mix -0.30673027 -0.05347052 -0.17652789 -0.14737673 264s DAY2 0.11688416 0.40776793 0.44758789 0.34566775 264s SOUPTYPECanned:DAY2 -0.13556938 -0.26645440 -0.31145572 -0.25117080 264s SOUPTYPEDry-mix:DAY2 0.07034149 0.02826594 -0.04248955 0.02406171 264s 5|6 264s (Intercept) -5.107493e-02 264s SOUPTYPECanned 2.052256e-01 264s SOUPTYPEDry-mix -1.868837e-01 264s DAY2 2.650018e-01 264s SOUPTYPECanned:DAY2 1.513304e-02 264s SOUPTYPEDry-mix:DAY2 -1.451666e-05 264s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE * DAY, data=soup, 264s + threshold="symmetric") 264s > fm2$Theta 264s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 264s 1 Self-made 1 -2.023473 -1.3261580 -1.0328445 -0.7395310 -0.04221610 264s 2 Canned 1 -1.650803 -1.0121961 -0.7301243 -0.4480525 0.19055466 264s 3 Dry-mix 1 -2.214507 -1.4643357 -1.2132431 -0.9621504 -0.21197912 264s 4 Self-made 2 -1.757994 -1.0009894 -0.7422397 -0.4834900 0.27351461 264s 5 Canned 2 -1.673970 -0.8581393 -0.5997040 -0.3412687 0.47456211 264s 6 Dry-mix 2 -1.899340 -1.1167968 -0.9013722 -0.6859476 0.09659551 264s > fm2$alpha.mat 264s central spacing.1 spacing.2 264s (Intercept) -1.03284450 0.293313471 0.99062841 264s SOUPTYPECanned 0.30272022 -0.011241697 -0.06994946 264s SOUPTYPEDry-mix -0.18039855 -0.042220836 0.01063552 264s DAY2 0.29060480 -0.034563797 0.02512591 264s SOUPTYPECanned:DAY2 -0.16018453 0.010927306 0.12846128 264s SOUPTYPEDry-mix:DAY2 0.02126607 -0.001104241 -0.02842214 264s > 264s > ################################# 264s > ### Check correctness of Theta matrix when intercept is removed in 264s > ### nominal formula: 264s > ### December 25th 2014, RHBC 264s > fm1 <- clm(rating ~ temp, nominal=~contact-1, data=wine) 264s > fm2 <- clm(rating ~ temp, nominal=~contact, data=wine) 264s > stopifnot(isTRUE(all.equal(fm1$Theta, fm2$Theta))) 264s > stopifnot(isTRUE(all.equal(fm1$logLik, fm2$logLik))) 264s > wine2 <- wine 264s > wine2$contact <- relevel(wine2$contact, "yes") 264s > fm3 <- clm(rating ~ temp, nominal=~contact, data=wine2) 264s > stopifnot(isTRUE(all.equal(coef(fm1, na.rm=TRUE), coef(fm3)))) 264s > ################################# 264s > 264s > 264s BEGIN TEST test.clm.convergence.R 265s 265s R version 4.4.3 (2025-02-28) -- "Trophy Case" 265s Copyright (C) 2025 The R Foundation for Statistical Computing 265s Platform: s390x-ibm-linux-gnu 265s 265s R is free software and comes with ABSOLUTELY NO WARRANTY. 265s You are welcome to redistribute it under certain conditions. 265s Type 'license()' or 'licence()' for distribution details. 265s 265s R is a collaborative project with many contributors. 265s Type 'contributors()' for more information and 265s 'citation()' on how to cite R or R packages in publications. 265s 265s Type 'demo()' for some demos, 'help()' for on-line help, or 265s 'help.start()' for an HTML browser interface to help. 265s Type 'q()' to quit R. 265s 265s > library(ordinal) 265s > 265s > 265s > ## Testing that errors in chol() are caught soon enough: 265s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 265s > wine2 <- subset(wine, subset=(!1:nrow(wine) %in% cy)) 265s > wine2[c(9, 15, 46), "rating"] <- NA 265s > fm1 <- clm(rating ~ temp, scale=~contact, nominal=~contact, 265s + data=wine2) 265s Warning message: 265s (1) Hessian is numerically singular: parameters are not uniquely determined 265s In addition: Absolute convergence criterion was met, but relative criterion was not met 265s > fm1 <- try(clm(rating ~ temp, scale=~contact, nominal=~contact, 265s + data=wine2, control=list(gradTol=1e-12)), silent=TRUE) 265s > fm2 <- try(clm(rating ~ temp, scale=~contact, nominal=~contact, 265s + data=wine2, control=list(gradTol=1e-15)), silent=TRUE) 265s Warning message: 265s (1) Hessian is numerically singular: parameters are not uniquely determined 265s In addition: Absolute convergence criterion was met, but relative criterion was not met 265s > ## These gave errors in version 2014.11-12. 265s > stopifnot(!inherits(fm1, "try-error")) 265s > stopifnot(!inherits(fm2, "try-error")) 265s > summary(fm1) 265s Warning message: 265s (-1) Model failed to converge with max|grad| = 3.74003e-09 (tol = 1e-15) 265s In addition: step factor reduced below minimum 265s formula: rating ~ temp 265s scale: ~contact 265s nominal: ~contact 265s data: wine2 265s 265s link threshold nobs logLik AIC niter max.grad cond.H 265s logit flexible 51 -60.44 140.87 62(38) 7.12e-14 1.5e+17 265s 265s Coefficients: 265s Estimate Std. Error z value Pr(>|z|) 265s tempwarm 2.306 NA NA NA 266s 266s log-scale coefficients: 266s Estimate Std. Error z value Pr(>|z|) 266s contactyes -0.07128 NA NA NA 266s 266s Threshold coefficients: 266s Estimate Std. Error z value 266s 1|2.(Intercept) -1.354 NA NA 266s 2|3.(Intercept) 1.092 NA NA 266s 3|4.(Intercept) 3.469 NA NA 266s 4|5.(Intercept) 5.066 NA NA 266s 1|2.contactyes -30.565 NA NA 266s 2|3.contactyes -1.425 NA NA 266s 3|4.contactyes -1.808 NA NA 266s 4|5.contactyes -1.870 NA NA 266s (3 observations deleted due to missingness) 266s > summary(fm2) 266s formula: rating ~ temp 266s scale: ~contact 266s nominal: ~contact 266s data: wine2 266s 266s link threshold nobs logLik AIC niter max.grad cond.H 266s logit flexible 51 -60.44 140.87 92(76) 3.74e-09 1.2e+16 266s 266s Coefficients: 266s Estimate Std. Error z value Pr(>|z|) 266s tempwarm 2.3060 0.7713 2.99 0.00279 ** 266s --- 266s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 266s 266s log-scale coefficients: 266s Estimate Std. Error z value Pr(>|z|) 266s contactyes -7.137e-02 1.635e+04 0 1 266s 266s Threshold coefficients: 266s Estimate Std. Error z value 266s 1|2.(Intercept) -1.354e+00 5.707e-01 -2.373 266s 2|3.(Intercept) 1.092e+00 5.251e-01 2.080 266s 3|4.(Intercept) 3.469e+00 7.982e-01 4.346 266s 4|5.(Intercept) 5.066e+00 1.193e+00 4.246 266s 1|2.contactyes -3.917e+01 2.138e+09 0.000 266s 2|3.contactyes -1.425e+00 4.314e+04 0.000 266s 3|4.contactyes -1.808e+00 1.055e+04 0.000 266s 4|5.contactyes -1.870e+00 1.455e+04 0.000 266s (3 observations deleted due to missingness) 266s > 266s > ## Error in convergence.clm() due to bad evaluation of model 266s > ## environment with update(object, doFit=FALSE): 266s > wine3 <- wine 266s > set.seed(1234) 266s > wts <- runif(nrow(wine3), 0, 2) 266s > fm3 <- clm(rating ~ temp + contact, data=wine3, 266s + weights=wts) 266s > c0 <- convergence(fm3) 266s > set.seed(1234) 266s > fm3 <- clm(rating ~ temp + contact, data=wine3, 266s + weights=runif(nrow(wine3), 0, 2)) 266s > c1 <- convergence(fm3) 266s > c0$info$logLik.Error 266s [1] "<1e-10" 266s > c1$info$logLik.Error 266s [1] "<1e-10" 266s > all.equal(c0$info$logLik.Error, c1$info$logLik.Error) 266s [1] TRUE 266s > ## In version 2014.11-14: 266s > ## > wine3 <- wine 266s > ## > set.seed(1234) 266s > ## > wts <- runif(nrow(wine3), 0, 2) 266s > ## > fm3 <- clm(rating ~ temp + contact, data=wine3, 266s > ## + weights=wts) 266s > ## > c0 <- convergence(fm3) 266s > ## > set.seed(1234) 266s > ## > fm3 <- clm(rating ~ temp + contact, data=wine3, 266s > ## + weights=runif(nrow(wine3), 0, 2)) 266s > ## > c1 <- convergence(fm3) 266s > ## > c0$info$logLik.Error 266s > ## [1] "<1e-10" 266s > ## > c1$info$logLik.Error 266s > ## [1] "4.80e+00" 266s > ## > all.equal(c0$info$logLik.Error, c1$info$logLik.Error) 266s > ## [1] "1 string mismatch" 266s > stopifnot(c0$info$logLik.Error == 266s + c1$info$logLik.Error) 266s > 266s BEGIN TEST test.clm.flex.link.R 266s 266s R version 4.4.3 (2025-02-28) -- "Trophy Case" 266s Copyright (C) 2025 The R Foundation for Statistical Computing 266s Platform: s390x-ibm-linux-gnu 266s 266s R is free software and comes with ABSOLUTELY NO WARRANTY. 266s You are welcome to redistribute it under certain conditions. 266s Type 'license()' or 'licence()' for distribution details. 266s 266s R is a collaborative project with many contributors. 266s Type 'contributors()' for more information and 266s 'citation()' on how to cite R or R packages in publications. 266s 266s Type 'demo()' for some demos, 'help()' for on-line help, or 266s 'help.start()' for an HTML browser interface to help. 266s Type 'q()' to quit R. 266s 266s > # test.clm.flex.link.R 266s > 266s > library(ordinal) 266s > 266s > fm <- clm(rating ~ contact + temp, data=wine, link="log-gamma") 266s Changing to 'nlminb' optimizer for flexible link function 266s > fm 266s Warning message: 266s (-1) Model failed to converge with max|grad| = 9.9099e-05 (tol = 1e-06) 266s formula: rating ~ contact + temp 266s data: wine 266s 266s link threshold nobs logLik AIC niter max.grad cond.H 266s log-gamma flexible 72 -85.72 185.44 27(179) 9.91e-05 5.9e+01 266s 266s Coefficients: 266s contactyes tempwarm 266s 0.8614 1.5072 266s 266s Link coefficient: 266s lambda 266s 0.1615 266s 266s Threshold coefficients: 266s 1|2 2|3 3|4 4|5 266s -0.8798 0.6678 1.9807 2.8593 266s > summary(fm) 266s formula: rating ~ contact + temp 266s data: wine 266s 266s link threshold nobs logLik AIC niter max.grad cond.H 266s log-gamma flexible 72 -85.72 185.44 27(179) 9.91e-05 5.9e+01 266s 266s Coefficients: 266s Estimate Std. Error z value Pr(>|z|) 266s contactyes 0.8614 0.2675 3.220 0.00128 ** 266s tempwarm 1.5072 0.2947 5.114 3.16e-07 *** 266s --- 266s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 266s 266s Link coefficients: 266s Estimate Std. Error z value Pr(>|z|) 266s lambda 0.1615 0.5752 0.281 0.779 266s 266s Threshold coefficients: 266s Estimate Std. Error z value 266s 1|2 -0.8798 0.5003 -1.759 266s 2|3 0.6678 0.3450 1.936 266s 3|4 1.9807 0.3826 5.177 266s 4|5 2.8593 0.4656 6.141 266s > vcov(fm) 266s 1|2 2|3 3|4 4|5 contactyes 266s 1|2 0.25029667 0.12858124 0.11888120 0.14341730 0.03339111 266s 2|3 0.12858124 0.11899385 0.10688715 0.12363922 0.04117758 266s 3|4 0.11888120 0.10688715 0.14635447 0.15493865 0.05320442 266s 4|5 0.14341730 0.12363922 0.15493865 0.21676904 0.06051103 266s contactyes 0.03339111 0.04117758 0.05320442 0.06051103 0.07156735 266s tempwarm 0.00707258 0.03006561 0.05390802 0.06549176 0.01159715 266s lambda -0.23173315 -0.13979171 -0.12509774 -0.15581154 -0.01157951 266s tempwarm lambda 266s 1|2 0.00707258 -0.23173315 266s 2|3 0.03006561 -0.13979171 266s 3|4 0.05390802 -0.12509774 266s 4|5 0.06549176 -0.15581154 266s contactyes 0.01159715 -0.01157951 266s tempwarm 0.08687099 0.01970691 266s lambda 0.01970691 0.33082448 266s > logLik(fm) 266s 'log Lik.' -85.72141 (df=7) 266s > extractAIC(fm) 266s [1] 7.0000 185.4428 266s > fm2 <- update(fm, link="probit") 266s > anova(fm, fm2) 267s Likelihood ratio tests of cumulative link models: 267s 267s formula: link: threshold: 267s fm2 rating ~ contact + temp probit flexible 267s fm rating ~ contact + temp log-gamma flexible 267s 267s no.par AIC logLik LR.stat df Pr(>Chisq) 267s fm2 6 183.52 -85.761 267s fm 7 185.44 -85.721 0.0795 1 0.778 267s > head(model.matrix(fm)$X) 267s (Intercept) contactyes tempwarm 267s 1 1 0 0 267s 2 1 0 0 267s 3 1 1 0 267s 4 1 1 0 267s 5 1 0 1 267s 6 1 0 1 267s > head(model.frame(fm)) 267s rating contact temp 267s 1 2 no cold 267s 2 3 no cold 267s 3 3 yes cold 267s 4 4 yes cold 267s 5 4 no warm 267s 6 4 no warm 267s > coef(fm) 267s 1|2 2|3 3|4 4|5 contactyes tempwarm lambda 267s -0.8797774 0.6678307 1.9806826 2.8593125 0.8614400 1.5071959 0.1614741 267s > coef(summary(fm)) 267s Estimate Std. Error z value Pr(>|z|) 267s 1|2 -0.8797774 0.5002966 -1.7585116 7.866049e-02 267s 2|3 0.6678307 0.3449548 1.9359945 5.286838e-02 267s 3|4 1.9806826 0.3825630 5.1774020 2.249971e-07 267s 4|5 2.8593125 0.4655846 6.1413379 8.182930e-10 267s contactyes 0.8614400 0.2675208 3.2200868 1.281518e-03 267s tempwarm 1.5071959 0.2947388 5.1136658 3.159661e-07 267s lambda 0.1614741 0.5751734 0.2807398 7.789100e-01 267s > nobs(fm) 267s [1] 72 267s > terms(fm) 267s rating ~ contact + temp 267s attr(,"variables") 267s list(rating, contact, temp) 267s attr(,"factors") 267s contact temp 267s rating 0 0 267s contact 1 0 267s temp 0 1 267s attr(,"term.labels") 267s [1] "contact" "temp" 267s attr(,"order") 267s [1] 1 1 267s attr(,"intercept") 267s [1] 1 267s attr(,"response") 267s [1] 1 267s attr(,".Environment") 267s 267s attr(,"predvars") 267s list(rating, contact, temp) 267s attr(,"dataClasses") 267s rating contact temp 267s "ordered" "factor" "factor" 267s > # profile(fm) # not implemented 267s > confint(fm) 267s 2.5 % 97.5 % 267s 1|2 -1.860340647 0.1007859 267s 2|3 -0.008268392 1.3439298 267s 3|4 1.230872843 2.7304924 267s 4|5 1.946783401 3.7718416 267s contactyes 0.337108995 1.3857711 267s tempwarm 0.929518433 2.0848735 267s lambda -0.965845152 1.2887933 267s > 267s > predict(fm, se=TRUE, interval = TRUE) 267s $fit 267s [1] 0.55792544 0.21565445 0.44140778 0.09846706 0.22428321 0.22428321 267s [7] 0.29090567 0.29090567 0.21042288 0.55792544 0.05388914 0.44140778 267s [13] 0.20737472 0.48129483 0.29090567 0.33832254 0.55792544 0.21565445 267s [19] 0.44140778 0.39099052 0.07269587 0.07269587 0.33832254 0.33832254 267s [25] 0.21565445 0.55792544 0.44140778 0.39099052 0.48129483 0.20737472 267s [31] 0.29090567 0.31272339 0.55792544 0.21565445 0.09846706 0.44140778 267s [37] 0.48129483 0.48129483 0.31272339 0.31272339 0.21565445 0.55792544 267s [43] 0.44140778 0.39099052 0.20737472 0.22428321 0.29090567 0.33832254 267s [49] 0.21042288 0.21042288 0.39099052 0.39099052 0.20737472 0.48129483 267s [55] 0.05636253 0.31272339 0.55792544 0.55792544 0.39099052 0.44140778 267s [61] 0.48129483 0.48129483 0.31272339 0.33832254 0.21042288 0.55792544 267s [67] 0.44140778 0.39099052 0.48129483 0.20737472 0.33832254 0.33832254 267s 267s $se.fit 267s [1] 0.09164058 0.09494135 0.08777656 0.05464347 0.08112461 0.08112461 267s [7] 0.13494788 0.13494788 0.13693811 0.09164058 0.04809909 0.08777656 267s [13] 0.09512593 0.07373113 0.13494788 0.08236628 0.09164058 0.09494135 267s [19] 0.08777656 0.09756681 0.06362571 0.06362571 0.08236628 0.08236628 267s [25] 0.09494135 0.09164058 0.08777656 0.09756681 0.07373113 0.09512593 267s [31] 0.13494788 0.09451059 0.09164058 0.09494135 0.05464347 0.08777656 267s [37] 0.07373113 0.07373113 0.09451059 0.09451059 0.09494135 0.09164058 267s [43] 0.08777656 0.09756681 0.09512593 0.08112461 0.13494788 0.08236628 267s [49] 0.13693811 0.13693811 0.09756681 0.09756681 0.09512593 0.07373113 267s [55] 0.03866211 0.09451059 0.09164058 0.09164058 0.09756681 0.08777656 267s [61] 0.07373113 0.07373113 0.09451059 0.08236628 0.13693811 0.09164058 267s [67] 0.08777656 0.09756681 0.07373113 0.09512593 0.08236628 0.08236628 267s 267s $lwr 267s [1] 0.378604421 0.083839589 0.282278454 0.031650565 0.103885179 0.103885179 267s [7] 0.102183449 0.102183449 0.050316476 0.378604421 0.008885132 0.282278454 267s [13] 0.077621510 0.342154616 0.102183449 0.199101468 0.378604421 0.083839589 267s [19] 0.282278454 0.223352983 0.012177666 0.012177666 0.199101468 0.199101468 267s [25] 0.083839589 0.378604421 0.282278454 0.223352983 0.342154616 0.077621510 267s [31] 0.102183449 0.161206608 0.378604421 0.083839589 0.031650565 0.282278454 267s [37] 0.342154616 0.342154616 0.161206608 0.161206608 0.083839589 0.378604421 267s [43] 0.282278454 0.223352983 0.077621510 0.103885179 0.102183449 0.199101468 267s [49] 0.050316476 0.050316476 0.223352983 0.223352983 0.077621510 0.342154616 267s [55] 0.014165414 0.161206608 0.378604421 0.378604421 0.223352983 0.282278454 267s [61] 0.342154616 0.342154616 0.161206608 0.199101468 0.050316476 0.378604421 267s [67] 0.282278454 0.223352983 0.342154616 0.077621510 0.199101468 0.199101468 267s 267s $upr 267s [1] 0.7233159 0.4523801 0.6135565 0.2673887 0.4189772 0.4189772 0.5965756 267s [8] 0.5965756 0.5727401 0.7233159 0.2657272 0.6135565 0.4485489 0.6233979 267s [15] 0.5965756 0.5125880 0.7233159 0.4523801 0.6135565 0.5890239 0.3326787 267s [22] 0.3326787 0.5125880 0.5125880 0.4523801 0.7233159 0.6135565 0.5890239 267s [29] 0.6233979 0.4485489 0.5965756 0.5186019 0.7233159 0.4523801 0.2673887 267s [36] 0.6135565 0.6233979 0.6233979 0.5186019 0.5186019 0.4523801 0.7233159 267s [43] 0.6135565 0.5890239 0.4485489 0.4189772 0.5965756 0.5125880 0.5727401 267s [50] 0.5727401 0.5890239 0.5890239 0.4485489 0.6233979 0.1988990 0.5186019 267s [57] 0.7233159 0.7233159 0.5890239 0.6135565 0.6233979 0.6233979 0.5186019 267s [64] 0.5125880 0.5727401 0.7233159 0.6135565 0.5890239 0.6233979 0.4485489 267s [71] 0.5125880 0.5125880 267s 267s > predict(fm, type="class") 267s $fit 267s [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 267s [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 267s Levels: 1 2 3 4 5 267s 267s > newData <- expand.grid(temp = c("cold", "warm"), 267s + contact = c("no", "yes")) 267s > 267s > ## Predicted probabilities in all five response categories for each of 267s > ## the four cases in newData: 267s > predict(fm, newdata=newData, type="prob") 267s Profile intervals not available for models with flexible link function: 267s reporting Wald intervals instead 267s Changing to 'nlminb' optimizer for flexible link function 267s Warning message: 267s (-1) Model failed to converge with max|grad| = 1.21388e-05 (tol = 1e-06) 267s $fit 267s 1 2 3 4 5 267s 1 0.210422883 0.55792544 0.2156544 0.01517801 0.0008192111 267s 2 0.014351371 0.20737472 0.4812948 0.22428321 0.0726958744 267s 3 0.053889141 0.39099052 0.4414078 0.09846706 0.0152454933 267s 4 0.001685878 0.05636253 0.3127234 0.33832254 0.2909056651 267s 267s > predict(fm, newdata=newData, type="class") 267s $fit 267s [1] 2 3 3 4 267s Levels: 1 2 3 4 5 267s 267s > 267s > predict(fm, newdata=newData, type="prob", se.fit = TRUE, interval = TRUE) 267s $fit 267s 1 2 3 4 5 267s 1 0.210422883 0.55792544 0.2156544 0.01517801 0.0008192111 267s 2 0.014351371 0.20737472 0.4812948 0.22428321 0.0726958744 267s 3 0.053889141 0.39099052 0.4414078 0.09846706 0.0152454933 267s 4 0.001685878 0.05636253 0.3127234 0.33832254 0.2909056651 267s 267s $se.fit 267s 1 2 3 4 5 267s 1 0.136938110 0.09164058 0.09494135 0.01696529 0.002047363 267s 2 0.016247015 0.09512593 0.07373113 0.08112461 0.063625711 267s 3 0.048099092 0.09756681 0.08777656 0.05464347 0.019268560 267s 4 0.002046575 0.03866211 0.09451059 0.08236628 0.134947885 267s 267s $lwr 267s 1 2 3 4 5 267s 1 0.050316476 0.37860442 0.08383959 0.001663553 6.091052e-06 267s 2 0.001530524 0.07762151 0.34215462 0.103885179 1.217767e-02 267s 3 0.008885132 0.22335298 0.28227845 0.031650565 1.249665e-03 267s 4 0.000155750 0.01416541 0.16120661 0.199101468 1.021834e-01 267s 267s $upr 267s 1 2 3 4 5 267s 1 0.57274013 0.7233159 0.4523801 0.1247616 0.09939055 267s 2 0.12150065 0.4485489 0.6233979 0.4189772 0.33267865 267s 3 0.26572719 0.5890239 0.6135565 0.2673887 0.16075952 267s 4 0.01797808 0.1988990 0.5186019 0.5125880 0.59657563 267s 267s > 267s > 267s > ## Aranda-Ordaz link: 267s > fm <- clm(rating ~ contact + temp, data=wine, link="Aranda-Ordaz") 267s > fm 267s formula: rating ~ contact + temp 267s data: wine 267s 267s link threshold nobs logLik AIC niter max.grad cond.H 267s Aranda-Ordaz flexible 72 -86.34 186.68 32(214) 1.21e-05 3.9e+02 267s 267s Coefficients: 267s contactyes tempwarm 267s 1.193 2.076 267s 267s Link coefficient: 267s lambda 267s 0.4994 267s 267s Threshold coefficients: 267s 1|2 2|3 3|4 4|5 267s -1.5284 0.7669 2.6021 3.7962 267s > summary(fm) 267s formula: rating ~ contact + temp 267s data: wine 267s 267s link threshold nobs logLik AIC niter max.grad cond.H 267s Aranda-Ordaz flexible 72 -86.34 186.68 32(214) 1.21e-05 3.9e+02 267s 267s Coefficients: 267s Estimate Std. Error z value Pr(>|z|) 267s contactyes 1.1927 0.6526 1.828 0.0676 . 267s tempwarm 2.0758 0.8196 2.533 0.0113 * 267s --- 267s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 267s 267s Link coefficients: 267s Estimate Std. Error z value Pr(>|z|) 267s lambda 0.4994 0.7840 0.637 0.524 267s 267s Threshold coefficients: 267s Estimate Std. Error z value 267s 1|2 -1.5284 0.5775 -2.647 267s 2|3 0.7669 0.8234 0.931 267s 3|4 2.6021 1.4335 1.815 267s 4|5 3.7962 1.9674 1.930 267s > vcov(fm) 267s 1|2 2|3 3|4 4|5 contactyes tempwarm 267s 1|2 0.3335060 0.2983831 0.4851478 0.6557867 0.2132245 0.2586680 267s 2|3 0.2983831 0.6780281 1.1261332 1.5330566 0.4699073 0.5953101 267s 3|4 0.4851478 1.1261332 2.0550131 2.7755711 0.8214407 1.0831426 267s 4|5 0.6557867 1.5330566 2.7755711 3.8705149 1.1194947 1.4831338 267s contactyes 0.2132245 0.4699073 0.8214407 1.1194947 0.4259337 0.3965114 267s tempwarm 0.2586680 0.5953101 1.0831426 1.4831338 0.3965114 0.6717718 267s lambda 0.2424390 0.5895695 1.0675177 1.4810300 0.4153800 0.5471764 267s lambda 267s 1|2 0.2424390 267s 2|3 0.5895695 267s 3|4 1.0675177 267s 4|5 1.4810300 267s contactyes 0.4153800 267s tempwarm 0.5471764 267s lambda 0.6146953 267s > logLik(fm) 267s 'log Lik.' -86.34171 (df=7) 267s > extractAIC(fm) 267s [1] 7.0000 186.6834 267s > fm2 <- update(fm, link="logit") 267s > anova(fm, fm2) 267s Likelihood ratio tests of cumulative link models: 267s 267s formula: link: threshold: 267s fm2 rating ~ contact + temp logit flexible 267s fm rating ~ contact + temp Aranda-Ordaz flexible 267s 267s no.par AIC logLik LR.stat df Pr(>Chisq) 267s fm2 6 184.98 -86.492 267s fm 7 186.68 -86.342 0.3004 1 0.5836 267s > head(model.matrix(fm)$X) 267s (Intercept) contactyes tempwarm 267s 1 1 0 0 267s 2 1 0 0 267s 3 1 1 0 267s 4 1 1 0 267s 5 1 0 1 267s 6 1 0 1 267s > head(model.frame(fm)) 267s rating contact temp 267s 1 2 no cold 267s 2 3 no cold 267s 3 3 yes cold 267s 4 4 yes cold 267s 5 4 no warm 267s 6 4 no warm 267s > coef(fm) 267s 1|2 2|3 3|4 4|5 contactyes tempwarm lambda 267s -1.5283880 0.7668896 2.6021283 3.7962201 1.1927250 2.0757935 0.4994416 267s > coef(summary(fm)) 267s Estimate Std. Error z value Pr(>|z|) 267s 1|2 -1.5283880 0.5774998 -2.6465602 0.008131504 267s 2|3 0.7668896 0.8234246 0.9313416 0.351676870 267s 3|4 2.6021283 1.4335317 1.8151871 0.069495154 267s 4|5 3.7962201 1.9673624 1.9295988 0.053656573 267s contactyes 1.1927250 0.6526360 1.8275501 0.067617093 267s tempwarm 2.0757935 0.8196168 2.5326389 0.011320750 267s lambda 0.4994416 0.7840251 0.6370225 0.524110192 267s > nobs(fm) 267s [1] 72 267s > terms(fm) 267s rating ~ contact + temp 267s attr(,"variables") 267s list(rating, contact, temp) 267s attr(,"factors") 267s contact temp 267s rating 0 0 267s contact 1 0 267s temp 0 1 267s attr(,"term.labels") 267s [1] "contact" "temp" 267s attr(,"order") 267s [1] 1 1 267s attr(,"intercept") 267s [1] 1 267s attr(,"response") 267s [1] 1 267s attr(,".Environment") 267s 267s attr(,"predvars") 267s list(rating, contact, temp) 267s attr(,"dataClasses") 267s rating contact temp 267s "ordered" "factor" "factor" 267s > # profile(fm) # not implemented 267s > confint(fm) 267s 2.5 % 97.5 % 267s 1|2 -2.66026679 -0.3965092 267s 2|3 -0.84699296 2.3807722 267s 3|4 -0.20754218 5.4117988 267s 4|5 -0.05973942 7.6521796 267s contactyes -0.08641803 2.4718680 267s tempwarm 0.46937402 3.6822130 267s lambda -1.03721931 2.0361025 267s > 267s > predict(fm, se=TRUE, interval = TRUE) 267s $fit 267s [1] 0.58209325 0.21518048 0.46054752 0.09103830 0.22383773 0.22383773 267s [7] 0.29286879 0.29286879 0.18610442 0.58209325 0.06269201 0.46054752 267s [13] 0.19716621 0.48293293 0.29286879 0.34021076 0.58209325 0.21518048 267s [19] 0.46054752 0.36913989 0.06939859 0.06939859 0.34021076 0.34021076 267s [25] 0.21518048 0.58209325 0.46054752 0.36913989 0.48293293 0.19716621 267s [31] 0.29286879 0.28974268 0.58209325 0.21518048 0.09103830 0.46054752 267s [37] 0.48293293 0.48293293 0.28974268 0.28974268 0.21518048 0.58209325 267s [43] 0.46054752 0.36913989 0.19716621 0.22383773 0.29286879 0.34021076 267s [49] 0.18610442 0.18610442 0.36913989 0.36913989 0.19716621 0.48293293 267s [55] 0.06897334 0.28974268 0.58209325 0.58209325 0.36913989 0.46054752 267s [61] 0.48293293 0.48293293 0.28974268 0.34021076 0.18610442 0.58209325 267s [67] 0.46054752 0.36913989 0.48293293 0.19716621 0.34021076 0.34021076 267s 267s $se.fit 267s [1] 0.14151187 0.09458707 0.10284385 0.06173008 0.06089158 0.06089158 267s [7] 0.17401315 0.17401315 0.08458285 0.14151187 0.03342713 0.10284385 267s [13] 0.06151483 0.16022476 0.17401315 0.14317218 0.14151187 0.09458707Profile intervals not available for models with flexible link function: 267s reporting Wald intervals instead 267s 267s [19] 0.10284385 0.09671233 0.16165491 0.16165491 0.14317218 0.14317218 267s [25] 0.09458707 0.14151187 0.10284385 0.09671233 0.16022476 0.06151483 267s [31] 0.17401315 0.08680258 0.14151187 0.09458707 0.06173008 0.10284385 267s [37] 0.16022476 0.16022476 0.08680258 0.08680258 0.09458707 0.14151187 267s [43] 0.10284385 0.09671233 0.06151483 0.06089158 0.17401315 0.14317218 267s [49] 0.08458285 0.08458285 0.09671233 0.09671233 0.06151483 0.16022476 267s [55] 0.03861752 0.08680258 0.14151187 0.14151187 0.09671233 0.10284385 267s [61] 0.16022476 0.16022476 0.08680258 0.14317218 0.08458285 0.14151187 267s [67] 0.10284385 0.09671233 0.16022476 0.06151483 0.14317218 0.14317218 267s 267s $lwr 267s [1] 0.308147105 0.083805034 0.274985966 0.022684752 0.126708383 0.126708383 267s [7] 0.073894276 0.073894276 0.071094501 0.308147105 0.021463145 0.274985966 267s [13] 0.102866209 0.209838511 0.073894276 0.128702471 0.308147105 0.083805034 267s [19] 0.274985966 0.205891005 0.000551725 0.000551725 0.128702471 0.128702471 267s [25] 0.083805034 0.308147105 0.274985966 0.205891005 0.209838511 0.102866209 267s [31] 0.073894276 0.151441083 0.308147105 0.083805034 0.022684752 0.274985966 267s [37] 0.209838511 0.209838511 0.151441083 0.151441083 0.083805034 0.308147105 267s [43] 0.274985966 0.205891005 0.102866209 0.126708383 0.073894276 0.128702471 267s [49] 0.071094501 0.071094501 0.205891005 0.205891005 0.102866209 0.209838511 267s [55] 0.022286640 0.151441083 0.308147105 0.308147105 0.205891005 0.274985966 267s [61] 0.209838511 0.209838511 0.151441083 0.128702471 0.071094501 0.308147105 267s [67] 0.274985966 0.205891005 0.209838511 0.102866209 0.128702471 0.128702471 267s 267s $upr 267s [1] 0.8132915 0.4511025 0.6577298 0.3017604 0.3643579 0.3643579 0.6825185 267s [8] 0.6825185 0.4058734 0.8132915 0.1694071 0.6577298 0.3446985 0.7666175 267s [15] 0.6825185 0.6428533 0.8132915 0.4511025 0.6577298 0.5690698 0.9097002 267s [22] 0.9097002 0.6428533 0.6428533 0.4511025 0.8132915 0.6577298 0.5690698 267s [29] 0.7666175 0.3446985 0.6825185 0.4825258 0.8132915 0.4511025 0.3017604 267s [36] 0.6577298 0.7666175 0.7666175 0.4825258 0.4825258 0.4511025 0.8132915 267s [43] 0.6577298 0.5690698 0.3446985 0.3643579 0.6825185 0.6428533 0.4058734 267s [50] 0.4058734 0.5690698 0.5690698 0.3446985 0.7666175 0.1940499 0.4825258 267s [57] 0.8132915 0.8132915 0.5690698 0.6577298 0.7666175 0.7666175 0.4825258 267s [64] 0.6428533 0.4058734 0.8132915 0.6577298 0.5690698 0.7666175 0.3446985 267s [71] 0.6428533 0.6428533 267s 267s > predict(fm, type="class") 267s $fit 267s [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 267s [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 267s Levels: 1 2 3 4 5 267s 267s > newData <- expand.grid(temp = c("cold", "warm"), 267s + contact = c("no", "yes")) 267s > 267s > ## Predicted probabilities in all five response categories for each of 267s > ## the four cases in newData: 267s > predict(fm, newdata=newData, type="prob") 267s $fit 267s 1 2 3 4 5 267s 1 0.186104423 0.58209325 0.2151805 0.01478353 0.001838317 267s 2 0.026664532 0.19716621 0.4829329 0.22383773 0.069398592 267s 3 0.062692007 0.36913989 0.4605475 0.09103830 0.016582284 267s 4 0.008204432 0.06897334 0.2897427 0.34021076 0.292868788 267s 267s > predict(fm, newdata=newData, type="class") 267s $fit 267s [1] 2 3 3 4 267s Levels: 1 2 3 4 5 267s 267s > 267s > predict(fm, newdata=newData, type="prob", se.fit = TRUE, interval = TRUE) 267s $fit 267s 1 2 3 4 5 267s 1 0.186104423 0.58209325 0.2151805 0.01478353 0.001838317 267s 2 0.026664532 0.19716621 0.4829329 0.22383773 0.069398592 267s 3 0.062692007 0.36913989 0.4605475 0.09103830 0.016582284 267s 4 0.008204432 0.06897334 0.2897427 0.34021076 0.292868788 267s 267s $se.fit 267s 1 2 3 4 5 267s 1 0.084582846 0.14151187 0.09458707 0.05105461 0.04225889 267s 2 0.018013151 0.06151483 0.16022476 0.06089158 0.16165491 267s 3 0.033427135 0.09671233 0.10284385 0.06173008 0.09203687 267s 4 0.009189042 0.03861752 0.08680258 0.14317218 0.17401315 267s 267s $lwr 267s 1 2 3 4 5 267s 1 0.071094501 0.30814710 0.08380503 1.557844e-05 4.591077e-23 267s 2 0.006979909 0.10286621 0.20983851 1.267084e-01 5.517250e-04 267s 3 0.021463145 0.20589100 0.27498597 2.268475e-02 2.647331e-07 267s 4 0.000903636 0.02228664 0.15144108 1.287025e-01 7.389428e-02 267s 267s $upr 267s 1 2 3 4 5 267s 1 0.40587337 0.8132915 0.4511025 0.9352883 1.0000000 267s 2 0.09647029 0.3446985 0.7666175 0.3643579 0.9097002 267s 3 0.16940715 0.5690698 0.6577298 0.3017604 0.9990698 267s 4 0.07033825 0.1940499 0.4825258 0.6428533 0.6825185 267s 267s > 267s > ######################################################################## 267s > ### Models with scale + flex link (or cauchit link) 267s > ######################################################################## 267s > 267s > fm <- clm(SURENESS ~ PRODID, scale=~PROD, data = soup, link="Aranda-Ordaz") 267s Changing to 'nlminb' optimizer for flexible link function 267s Warning message: 267s (-1) Model failed to converge with max|grad| = 0.000374096 (tol = 1e-06) 267s > summary(fm) 267s formula: SURENESS ~ PRODID 267s scale: ~PROD 267s data: soup 267s 267s link threshold nobs logLik AIC niter max.grad cond.H 267s Aranda-Ordaz flexible 1847 -2674.65 5373.30 57(719) 3.74e-04 9.0e+03 267s 267s Coefficients: 267s Estimate Std. Error z value Pr(>|z|) 267s PRODID2 1.3604 0.4137 3.289 0.001007 ** 267s PRODID3 2.2066 0.6659 3.314 0.000921 *** 267s PRODID4 1.2553 0.4086 3.072 0.002124 ** 267s PRODID5 1.9820 0.5886 3.367 0.000759 *** 267s PRODID6 2.4715 0.7713 3.204 0.001355 ** 267s --- 267s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 267s 267s log-scale coefficients: 267s Estimate Std. Error z value Pr(>|z|) 267s PRODTest 0.2807 0.1553 1.808 0.0706 . 267s --- 267s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 267s 267s Link coefficients: 267s Estimate Std. Error z value Pr(>|z|) 267s lambda 2.063 1.136 1.816 0.0693 . 267s --- 267s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 267s 267s Threshold coefficients: 267s Estimate Std. Error z value 267s 1|2 -1.3927 0.1491 -9.344 267s 2|3 -0.1449 0.3533 -0.410 267s 3|4 0.3051 0.4699 0.649 267s 4|5 0.6733 0.5802 1.160 267s 5|6 1.7210 0.9594 1.794 267s > 267s > fm <- clm(SURENESS ~ PRODID, scale=~PROD, data = soup, link="log-gamma") 267s Changing to 'nlminb' optimizer for flexible link function 269s > summary(fm) 269s formula: SURENESS ~ PRODID 269s scale: ~PROD 269s data: soup 269s 269s link threshold nobs logLik AIC niter max.grad cond.H 269s log-gamma flexible 1847 -2676.84 5377.68 90(1050) 3.34e-03 8.9e+03 269s 269s Coefficients: 269s Estimate Std. Error z value Pr(>|z|) 269s PRODID2 0.62877 0.09223 6.818 9.26e-12 *** 269s PRODID3 1.02758 0.13449 7.640 2.16e-14 *** 269s PRODID4 0.59157 0.11435 5.173 2.30e-07 *** 269s PRODID5 0.91937 0.12977 7.085 1.39e-12 *** 269s PRODID6 1.13202 0.13927 8.128 4.35e-16 *** 269s --- 269s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 269s 269s log-scale coefficients: 269s Estimate Std. Error z value Pr(>|z|) 269s PRODTest 0.09065 0.18402 0.493 0.622 269s 269s Link coefficients: 269s Estimate Std. Error z value Pr(>|z|) 269s lambda 0.475 0.703 0.676 0.499 269s 269s Threshold coefficients: 269s Estimate Std. Error z value 269s 1|2 -1.15651 0.45764 -2.527 269s 2|3 -0.47330 0.29569 -1.601 269s 3|4 -0.24746 0.26538 -0.932 269s 4|5 -0.07225 0.24982 -0.289 269s 5|6 0.37912 0.24130 1.571 269s > 269s > fm <- clm(SURENESS ~ PRODID, scale=~PROD, data = soup, link="cauchit") 269s Warning message: 269s (-1) Model failed to converge with max|grad| = 0.00334059 (tol = 1e-06) 269s > summary(fm) 269s formula: SURENESS ~ PRODID 269s scale: ~PROD 269s data: soup 269s 269s link threshold nobs logLik AIC niter max.grad cond.H 269s cauchit flexible 1847 -2679.34 5380.67 11(1) 3.10e-07 3.0e+02 269s 269s Coefficients: 269s Estimate Std. Error z value Pr(>|z|) 269s PRODID2 0.70550 0.09611 7.341 2.12e-13 *** 269s PRODID3 1.06186 0.13882 7.649 2.02e-14 *** 269s PRODID4 0.66876 0.11911 5.614 1.97e-08 *** 269s PRODID5 1.01135 0.13277 7.617 2.59e-14 *** 269s PRODID6 1.12784 0.14159 7.966 1.64e-15 *** 269s --- 269s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 269s 269s log-scale coefficients: 269s Estimate Std. Error z value Pr(>|z|) 269s PRODTest -0.20801 0.09524 -2.184 0.029 * 269s --- 269s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 269s 269s Threshold coefficients: 269s Estimate Std. Error z value 269s 1|2 -1.70920 0.14977 -11.412 269s 2|3 -0.36737 0.06302 -5.830 269s 3|4 -0.06736 0.05734 -1.175 269s 4|5 0.14657 0.05708 2.568 269s 5|6 0.67063 0.07072 9.483 269s > 269s > ######################################################################## 269s > ### clm.fit 269s > ######################################################################## 269s > 269s > ## Example with log-gamma: 269s > fm1 <- clm(rating ~ contact + temp, data=wine, link="log-gamma") 269s Changing to 'nlminb' optimizer for flexible link function 269s > summary(fm1) 269s formula: rating ~ contact + temp 269s Warning message: 269s (-1) Model failed to converge with max|grad| = 9.9099e-05 (tol = 1e-06) 269s data: wine 269s 269s link threshold nobs logLik AIC niter max.grad cond.H 269s log-gamma flexible 72 -85.72 185.44 27(179) 9.91e-05 5.9e+01 269s 269s Coefficients: 269s Estimate Std. Error z value Pr(>|z|) 269s contactyes 0.8614 0.2675 3.220 0.00128 ** 269s tempwarm 1.5072 0.2947 5.114 3.16e-07 *** 269s --- 269s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 269s 269s Link coefficients: 269s Estimate Std. Error z value Pr(>|z|) 269s lambda 0.1615 0.5752 0.281 0.779 269s 269s Threshold coefficients: 269s Estimate Std. Error z value 269s 1|2 -0.8798 0.5003 -1.759 269s 2|3 0.6678 0.3450 1.936 269s 3|4 1.9807 0.3826 5.177 269s 4|5 2.8593 0.4656 6.141 269s > ## get the model frame containing y and X: 269s > mf1 <- update(fm1, method="design") 269s > names(mf1) 269s [1] "y" "y.levels" "X" "offset" "terms" "contrasts" 269s [7] "xlevels" "weights" "doFit" "control" "link" "threshold" 269s [13] "start" "formulas" 269s > res <- clm.fit(mf1$y, mf1$X, link="log-gamma") ## invoking the factor method 269s Changing to 'nlminb' optimizer for flexible link function 269s > coef(res) 269s 1|2 2|3 3|4 4|5 contactyes tempwarm lambda 269s -0.8797774 0.6678307 1.9806826 2.8593125 0.8614400 1.5071959 0.1614741 269s > stopifnot(all.equal(coef(res), coef(fm1))) 269s > 269s > Warning message: 269s (-1) Model failed to converge with max|grad| = 9.9099e-05 (tol = 1e-06) 269s ## Example with Aranda-Ordaz: 269s > fm1 <- clm(rating ~ contact + temp, data=wine, link="Aranda-Ordaz") 269s > mf1 <- update(fm1, method="design") 269s Changing to 'nlminb' optimizer for flexible link function 269s Warning message: 269s (-1) Model failed to converge with max|grad| = 1.21388e-05 (tol = 1e-06) 269s > res <- clm.fit(mf1$y, mf1$X, link="Aranda") ## invoking the factor method 269s Changing to 'nlminb' optimizer for flexible link function 269s > stopifnot(all.equal(coef(res), coef(fm1))) 269s > 269s Warning message: 269s (-1) Model failed to converge with max|grad| = 1.21388e-05 (tol = 1e-06) 269s > 269s BEGIN TEST test.clm.model.matrix.R 269s 269s R version 4.4.3 (2025-02-28) -- "Trophy Case" 269s Copyright (C) 2025 The R Foundation for Statistical Computing 269s Platform: s390x-ibm-linux-gnu 269s 269s R is free software and comes with ABSOLUTELY NO WARRANTY. 269s You are welcome to redistribute it under certain conditions. 269s Type 'license()' or 'licence()' for distribution details. 269s 269s R is a collaborative project with many contributors. 269s Type 'contributors()' for more information and 269s 'citation()' on how to cite R or R packages in publications. 269s 269s Type 'demo()' for some demos, 'help()' for on-line help, or 269s 'help.start()' for an HTML browser interface to help. 269s Type 'q()' to quit R. 269s 269s > library(ordinal) 270s > ## source("test.clm.model.matrix.R") 270s > 270s > ## library(devtools) 270s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 270s > ## clean_dll(pkg = r2path) 270s > ## load_all(r2path) 270s > 270s > ## Check that get_clmDesign works in standard setting: 270s > fm1 <- clm(rating ~ temp, scale=~contact, nominal=~contact, data=wine) 270s > contr <- c(fm1$contrasts, fm1$S.contrasts, fm1$nom.contrasts) 270s > XX <- ordinal:::get_clmDesign(fm1$model, terms(fm1, "all"), contrasts=contr) 270s > XX2 <- update(fm1, method="design") 270s > (keep <- intersect(names(XX), names(XX2))) 270s [1] "y" "y.levels" "X" "offset" 270s [5] "terms" "contrasts" "xlevels" "weights" 270s [9] "S" "S.terms" "S.off" "S.contrasts" 270s [13] "S.xlevels" "NOM" "nom.terms" "nom.contrasts" 270s [17] "nom.xlevels" 270s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 270s + XX[keep], XX2[keep])) 270s y y.levels X offset terms 270s Warning message: 270s (1) Hessian is numerically singular: parameters are not uniquely determined 270s In addition: Absolute convergence criterion was met, but relative criterion was not met 270s TRUE TRUE TRUE TRUE TRUE 270s contrasts xlevels weights S S.terms 270s TRUE TRUE TRUE TRUE TRUE 270s S.off S.contrasts S.xlevels NOM nom.terms 270s TRUE TRUE TRUE TRUE TRUE 270s nom.contrasts nom.xlevels 270s TRUE TRUE 270s > stopifnot(all(test)) 270s > 270s > ## Check that get_clmDesign works with singular fit and NAs: 270s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 270s > wine2 <- subset(wine, subset=(!1:nrow(wine) %in% cy)) 270s > wine2[c(9, 15, 46), "rating"] <- NA 270s > fm1 <- clm(rating ~ temp, scale=~contact, nominal=~contact, 270s + data=wine2) 270s > contr <- c(fm1$contrasts, fm1$S.contrasts, fm1$nom.contrasts) 270s > XX <- ordinal:::get_clmDesign(fm1$model, terms(fm1, "all"), contrasts=contr) 270s > XX2 <- update(fm1, method="design") 270s > (keep <- intersect(names(XX), names(XX2))) 270s [1] "y" "y.levels" "X" "offset" 270s [5] "terms" "contrasts" "xlevels" "na.action" 270s [9] "weights" "S" "S.terms" "S.off" 270s [13] "S.contrasts" "S.xlevels" "NOM" "nom.terms" 270s [17] "nom.contrasts" "nom.xlevels" 270s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 270s + XX[keep], XX2[keep])) 270s y y.levels X offset terms 270s TRUE TRUE TRUE TRUE TRUE 270s contrasts xlevels na.action weights S 270s TRUE TRUE TRUE TRUE TRUE 270s S.terms S.off S.contrasts S.xlevels NOM 270s TRUE TRUE TRUE TRUE TRUE 270s nom.terms nom.contrasts nom.xlevels 270s TRUE TRUE TRUE 270s > stopifnot(all(test)) 270s > 270s > ## In this situation update and get_clmRho give the same results: 270s > wine2 <- wine 270s > fm1 <- clm(rating ~ temp + contact, data=wine2) ## OK 270s > rho1 <- ordinal:::get_clmRho.clm(fm1) 270s > l1 <- as.list(rho1) 270s > l2 <- as.list(update(fm1, doFit=FALSE)) 270s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 270s + Warning messages: 270s 1: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 270s non-list contrasts argument ignored 270s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 270s non-list contrasts argument ignored 270s Warning messages: 270s 1: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 270s non-list contrasts argument ignored 270s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 270s non-list contrasts argument ignored 270s Warning messages: 270s 1: variable 'contact' is absent: its contrasts will be ignored 270s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 270s non-list contrasts argument ignored 270s Warning messages: 270s 1: variable 'contact' is absent: its contrasts will be ignored 270s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 270s non-list contrasts argument ignored 270s Warning messages: 270s 1: variable 'temp' is absent: its contrasts will be ignored 270s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 270s non-list contrasts argument ignored 270s 3: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 270s non-list contrasts argument ignored 270s Warning message: 270s variable 'temp' is absent: its contrasts will be ignored 270s l1, l2[names(l1)])) 270s nlambda link gfun dfun pfun par clm.hess clm.grad 270s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 270s clm.nll wts fitted has.scale sigma k Soff S 270s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 270s n.psi o2 o1 B2 B1 270s TRUE TRUE TRUE TRUE TRUE 270s > stopifnot(all(test)) 270s > ## If we modify the data (or other subset, weights, formulae, etc.) 270s > ## used in the model call, the results from update no longer correspond 270s > ## to the elements of the fitted model object. get_clmRho gets it 270s > ## right on the other hand: 270s > wine2[10:13, "rating"] <- NA 270s > l3 <- as.list(ordinal:::get_clmRho.clm(fm1)) 270s > l4 <- as.list(update(fm1, doFit=FALSE)) 270s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 270s + l1, l3)) 270s nlambda link gfun dfun pfun par clm.hess clm.grad 270s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 270s clm.nll wts fitted has.scale sigma k Soff S 270s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 270s n.psi o2 o1 B2 B1 270s TRUE TRUE TRUE TRUE TRUE 270s > stopifnot(all(test)) ## same 270s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 270s + l3, l4[names(l3)])) 270s nlambda link gfun dfun pfun par clm.hess clm.grad 270s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 270s clm.nll wts fitted has.scale sigma k Soff S 270s TRUE FALSE FALSE TRUE FALSE TRUE FALSE TRUE 270s n.psi o2 o1 B2 B1 270s TRUE FALSE FALSE FALSE FALSE 270s > stopifnot(sum(!test) == 8) ## not all the same anymore! 270s > ## In conclusion l1, l2, and l3 are identical. l4 is different. 270s > 270s > ################################# 270s > ## Test that checkContrasts give appropriate warnings: 270s > contr <- c(temp="contr.sum", contact="contr.sum") 270s > fm1 <- clm(rating ~ temp + contact, scale=~contact, data=wine) ## OK 270s > fm1 <- clm(rating ~ temp + contact, scale=~contact, data=wine, 270s + contrasts=contr) ## OK 270s > fm1 <- clm(rating ~ temp, scale=~contact, data=wine, 270s + contrasts=contr) ## OK 270s > ## These should give warnings: 270s > fm1 <- clm(rating ~ temp, contrasts=c(contact="contr.sum"), data=wine) 270s > fm1 <- clm(rating ~ temp, contrasts=contr, data=wine) 270s > fm1 <- clm(rating ~ 1, scale=~contact, contrasts=c(temp="contr.sum"), 270s + data=wine) 270s > fm1 <- clm(rating ~ 1, scale=~contact, contrasts=list(temp="contr.sum"), 270s + data=wine) 270s > 270s > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 270s > ordinal:::checkContrasts(fm0$S.terms, fm0$contrasts) 270s Warning message: 270s variable 'temp' is absent: its contrasts will be ignored 270s > ordinal:::checkContrasts(fm0$S.terms, fm0$S.contrasts) 270s > ordinal:::checkContrasts(fm0$terms, fm0$contrasts) 270s > ordinal:::checkContrasts(fm0$terms, fm0$S.contrasts) 270s > 270s > ################################# 270s > ## Check that clm and model.matrix respects contrast settings: 270s > options("contrasts" = c("contr.treatment", "contr.poly")) 270s > fm0 <- clm(rating ~ temp + contact, data=wine) 270s > options("contrasts" = c("contr.sum", "contr.poly")) 270s > fm1 <- clm(rating ~ temp + contact, data=wine) 270s > stopifnot(all(model.matrix(fm0)$X[, 2] %in% c(0, 1))) 270s > stopifnot(all(model.matrix(fm1)$X[, 2] %in% c(1, -1))) 270s > 270s > ################################# 270s > ## Check that model.matrix results do not depend on global contrast 270s > ## setting: 270s > options("contrasts" = c("contr.sum", "contr.poly")) 270s > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 270s > MM <- model.matrix(fm0) 270s > options("contrasts" = c("contr.treatment", "contr.poly")) 270s > MM2 <- model.matrix(fm0) 270s > for(x in MM) print(head(x)) 270s (Intercept) temp1 contact1 270s 1 1 1 1 270s 2 1 1 1 270s 3 1 1 -1 270s 4 1 1 -1 270s 5 1 -1 1 270s 6 1 -1 1 270s (Intercept) contact1 270s 1 1 1 270s 2 1 1 270s 3 1 -1 270s 4 1 -1 270s 5 1 1 270s 6 1 1 270s > for(x in MM2) print(head(x)) 270s (Intercept) temp1 contact1 270s 1 1 1 1 270s 2 1 1 1 270s 3 1 1 -1 270s 4 1 1 -1 270s 5 1 -1 1 270s 6 1 -1 1 270s (Intercept) contact1 270s 1 1 1 270s 2 1 1 270s 3 1 -1 270s 4 1 -1 270s 5 1 1 270s 6 1 1 270s > stopifnot(all(mapply(all.equal, MM, MM2))) 270s > 270s > ################################# 270s > ## This gave a warning before getContrasts was implemented: 270s > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 270s > MM <- model.matrix(fm0) 270s > ## > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 270s > ## > MM <- model.matrix(fm0) 270s > ## Warning message: 270s > ## In model.matrix.default(res$S.terms, data = fullmf, contrasts.arg = getContrasts(res$S.terms, : 270s > ## variable 'temp' is absent, its contrast will be ignored 270s > for(x in MM) print(head(x)) 270s (Intercept) tempwarm contactyes 270s 1 1 0 0 270s 2 1 0 0 270s 3 1 0 1 270s 4 1 0 1 270s 5 1 1 0 270s 6 1 1 0 270s (Intercept) contactyes 270s 1 1 0 270s 2 1 0 270s 3 1 1 270s 4 1 1 270s 5 1 0 270s 6 1 0 270s > 270s > 270s BEGIN TEST test.clm.predict.R 270s 270s R version 4.4.3 (2025-02-28) -- "Trophy Case" 270s Copyright (C) 2025 The R Foundation for Statistical Computing 270s Platform: s390x-ibm-linux-gnu 270s 270s R is free software and comes with ABSOLUTELY NO WARRANTY. 270s You are welcome to redistribute it under certain conditions. 270s Type 'license()' or 'licence()' for distribution details. 270s 270s R is a collaborative project with many contributors. 270s Type 'contributors()' for more information and 270s 'citation()' on how to cite R or R packages in publications. 270s 270s Type 'demo()' for some demos, 'help()' for on-line help, or 270s 'help.start()' for an HTML browser interface to help. 270s Type 'q()' to quit R. 270s 270s > library(ordinal) 271s > ## source("test.clm.predict.R") 271s > 271s > ## library(devtools) 271s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 271s > ## clean_dll(pkg = r2path) 271s > ## load_all(r2path) 271s > 271s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 271s > options("contrasts" = c("contr.treatment", "contr.poly")) 271s > getOption("contrasts") 271s [1] "contr.treatment" "contr.poly" 271s > 271s > ## Example model 271s > 271s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine) 271s > summary(wine1.clm) 271s formula: rating ~ temp * contact 271s data: wine 271s subset: -cy 271s 271s link threshold nobs logLik AIC niter max.grad cond.H 271s logit flexible 54 -65.47 142.93 6(0) 2.80e-12 2.9e+01 271s 271s Coefficients: (1 not defined because of singularities) 271s Estimate Std. Error z value Pr(>|z|) 271s tempwarm 2.2892 0.7192 3.183 0.00146 ** 271s contactyes 1.6505 0.6698 2.464 0.01374 * 271s tempwarm:contactyes NA NA NA NA 271s --- 271s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 271s 271s Threshold coefficients: 271s Estimate Std. Error z value 271s 1|2 -1.3971 0.5728 -2.439 271s 2|3 1.1349 0.5262 2.157 271s 3|4 3.3351 0.6987 4.774 271s 4|5 4.7924 0.7996 5.994 271s > names(wine1.clm) 271s [1] "aliased" "alpha" "beta" "call" 271s [5] "coefficients" "cond.H" "contrasts" "control" 271s [9] "convergence" "df.residual" "edf" "fitted.values" 271s [13] "formula" "formulas" "gradient" "Hessian" 271s [17] "info" "link" "logLik" "maxGradient" 271s [21] "message" "model" "n" "niter" 271s [25] "nobs" "start" "terms" "Theta" 271s [29] "threshold" "tJac" "vcov" "xlevels" 271s [33] "y" "y.levels" 271s > 271s > wine.clm <- clm(rating~temp*contact, data=wine) 271s > summary(wine.clm) 271s formula: rating ~ temp * contact 271s data: wine 271s 271s link threshold nobs logLik AIC niter max.grad cond.H 271s logit flexible 72 -86.42 186.83 6(0) 5.22e-12 5.1e+01 271s 271s Coefficients: 271s Estimate Std. Error z value Pr(>|z|) 271s tempwarm 2.3212 0.7009 3.311 0.000928 *** 271s contactyes 1.3475 0.6604 2.041 0.041300 * 271s tempwarm:contactyes 0.3595 0.9238 0.389 0.697129 271s --- 271s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 271s 271s Threshold coefficients: 271s Estimate Std. Error z value 271s 1|2 -1.4113 0.5454 -2.588 271s 2|3 1.1436 0.5097 2.244 271s 3|4 3.3771 0.6382 5.292 271s 4|5 4.9420 0.7509 6.581 271s > names(wine.clm) 271s [1] "aliased" "alpha" "beta" "call" 271s [5] "coefficients" "cond.H" "contrasts" "control" 271s [9] "convergence" "df.residual" "edf" "fitted.values" 271s [13] "formula" "formulas" "gradient" "Hessian" 271s [17] "info" "link" "logLik" "maxGradient" 271s [21] "message" "model" "n" "niter" 271s [25] "nobs" "start" "terms" "Theta" 271s [29] "threshold" "tJac" "vcov" "xlevels" 271s [33] "y" "y.levels" 271s > ## Make sure the same elements are present with a rank deficient model 271s > ## fit: 271s > stopifnot(all(names(wine1.clm) == names(wine.clm))) 271s > 271s > ## With treatment contrasts: 271s > options("contrasts" = c("contr.treatment", "contr.poly")) 271s > wine.clm <- clm(rating~temp*contact, data=wine) 271s > coef(summary(wine.clm)) 271s Estimate Std. Error z value Pr(>|z|) 271s 1|2 -1.4112620 0.5453532 -2.5877943 9.659266e-03 271s 2|3 1.1435537 0.5096555 2.2437776 2.484671e-02 271s 3|4 3.3770825 0.6381617 5.2918913 1.210578e-07 271s 4|5 4.9419823 0.7509113 6.5813133 4.663108e-11 271s tempwarm 2.3211843 0.7009479 3.3114931 9.279953e-04 271s contactyes 1.3474604 0.6603557 2.0405072 4.129984e-02 271s tempwarm:contactyes 0.3595489 0.9238188 0.3891985 6.971293e-01 271s > head(model.matrix(wine.clm)$X) 271s (Intercept) tempwarm contactyes tempwarm:contactyes 271s 1 1 0 0 0 271s 2 1 0 0 0 271s 3 1 0 1 0 271s 4 1 0 1 0 271s 5 1 1 0 0 271s 6 1 1 0 0 271s > wine.clm$contrasts 271s $temp 271s [1] "contr.treatment" 271s 271s $contact 271s [1] "contr.treatment" 271s 271s > head(pred1 <- predict(wine.clm)$fit) 271s [1] 0.56229641 0.20864908 0.43467309 0.08938852 0.19028226 0.19028226 271s > 271s > ## With sum contrasts: 271s > options("contrasts" = c("contr.sum", "contr.poly")) 271s > wine.clm <- clm(rating~temp*contact, data=wine) 271s > coef(summary(wine.clm)) 271s Estimate Std. Error z value Pr(>|z|) 271s 1|2 -3.33547153 0.5253364 -6.3492103 2.164231e-10 271s 2|3 -0.78065590 0.2945538 -2.6503003 8.042025e-03 271s 3|4 1.45287292 0.3367529 4.3143590 1.600667e-05 271s 4|5 3.01777269 0.4813097 6.2699186 3.612370e-10 271s temp1 -1.25047935 0.2641023 -4.7348292 2.192396e-06 271s contact1 -0.76361743 0.2380971 -3.2071683 1.340485e-03 271s temp1:contact1 0.08988722 0.2309547 0.3891985 6.971293e-01 271s > head(model.matrix(wine.clm)$X) 271s (Intercept) temp1 contact1 temp1:contact1 271s 1 1 1 1 1 271s 2 1 1 1 1 271s 3 1 1 -1 -1 271s 4 1 1 -1 -1 271s 5 1 -1 1 -1 271s 6 1 -1 1 -1 271s > wine.clm$contrasts 271s $temp 271s [1] "contr.sum" 271s 271s $contact 271s [1] "contr.sum" 271s 271s > head(pred2 <- predict(wine.clm)$fit) 271s [1] 0.56229641 0.20864908 0.43467309 0.08938852 0.19028226 0.19028226 271s > 271s > ## Mixture of sum and treatment contrasts: 271s > options("contrasts" = c("contr.treatment", "contr.poly")) 271s > wine.clm <- clm(rating~temp*contact, data=wine, 271s + contrasts=list(temp="contr.sum")) 271s > coef(summary(wine.clm)) 271s Estimate Std. Error z value Pr(>|z|) 271s 1|2 -2.57185410 0.5227165 -4.92016984 8.646915e-07 271s 2|3 -0.01703847 0.3611634 -0.04717662 9.623725e-01 271s 3|4 2.21649036 0.4529312 4.89365773 9.897892e-07 271s 4|5 3.78139013 0.5957919 6.34683010 2.197966e-10 271s temp1 -1.16059213 0.3504740 -3.31149309 9.279953e-04 271s contactyes 1.52723487 0.4761942 3.20716830 1.340485e-03 271s temp1:contactyes -0.17977444 0.4619094 -0.38919847 6.971293e-01 271s > head(model.matrix(wine.clm)$X) 271s (Intercept) temp1 contactyes temp1:contactyes 271s 1 1 1 0 0 271s 2 1 1 0 0 271s 3 1 1 1 1 271s 4 1 1 1 1 271s 5 1 -1 0 0 271s 6 1 -1 0 0 271s > wine.clm$contrasts 271s $temp 271s [1] "contr.sum" 271s 271s $contact 271s [1] "contr.treatment" 271s 271s > head(pred3 <- predict(wine.clm)$fit) 271s [1] 0.56229641 0.20864908 0.43467309 0.08938852 0.19028226 0.19028226 271s > 271s > stopifnot(isTRUE(all.equal(pred1, pred2))) 271s > stopifnot(isTRUE(all.equal(pred1, pred3))) 271s > 271s > ################################# 271s > ### Now for a rank deficient fit: 271s > ################################# 271s > 271s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 271s > options("contrasts" = c("contr.treatment", "contr.poly")) 271s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine) 271s > coef(summary(wine1.clm)) 271s Estimate Std. Error z value Pr(>|z|) 271s 1|2 -1.397134 0.5727918 -2.439164 1.472127e-02 271s 2|3 1.134907 0.5261653 2.156940 3.101038e-02 271s 3|4 3.335090 0.6986647 4.773521 1.810331e-06 271s 4|5 4.792428 0.7995580 5.993846 2.049352e-09 271s tempwarm 2.289221 0.7191705 3.183140 1.456870e-03 271s contactyes 1.650538 0.6698484 2.464047 1.373782e-02 271s tempwarm:contactyes NA NA NA NA 271s > attributes(model.matrix(wine1.clm)$X)$contrasts 271s $temp 271s [1] "contr.treatment" 271s 271s $contact 271s [1] "contr.treatment" 271s 271s > wine1.clm$contrasts 271s $temp 271s [1] "contr.treatment" 271s 271s $contact 271s [1] "contr.treatment" 271s 271s > head(pred4 <- predict(wine1.clm)$fit) 271s [1] 0.5584719 0.2088699 0.1843854 0.1843854 0.2988733 0.2988733 271s > 271s > options("contrasts" = c("contr.sum", "contr.poly")) 271s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine) 271s > attributes(model.matrix(wine1.clm)$X)$contrasts 271s $temp 271s [1] "contr.sum" 271s 271s $contact 271s [1] "contr.sum" 271s 271s > options("contrasts" = c("contr.treatment", "contr.poly")) 271s > attributes(model.matrix(wine1.clm)$X)$contrasts 271s $temp 271s [1] "contr.sum" 271s 271s $contact 271s [1] "contr.sum" 271s 271s > ## Notice that the contrasts change in the attributes of the fit!!! 271s > coef(summary(wine1.clm)) 271s Estimate Std. Error z value Pr(>|z|) 271s 1|2 -3.3670128 0.6149672 -5.475110 4.372411e-08 271s 2|3 -0.8349725 0.4231096 -1.973419 4.844787e-02 271s 3|4 1.3652108 0.4310181 3.167409 1.538037e-03 271s 4|5 2.8225483 0.5190089 5.438343 5.377826e-08 271s temp1 -1.1446104 0.3595853 -3.183140 1.456870e-03 271s contact1 -0.8252689 0.3349242 -2.464047 1.373782e-02 271s temp1:contact1 NA NA NA NA 271s > wine1.clm$contrasts 271s $temp 271s [1] "contr.sum" 271s 271s $contact 271s [1] "contr.sum" 271s 271s > head(pred5 <- predict(wine1.clm)$fit) 271s [1] 0.5584719 0.2088699 0.1843854 0.1843854 0.2988733 0.2988733 271s > 271s > head(cbind(pred4, pred5)) 271s pred4 pred5 271s [1,] 0.5584719 0.5584719 271s [2,] 0.2088699 0.2088699 271s [3,] 0.1843854 0.1843854 271s [4,] 0.1843854 0.1843854 271s [5,] 0.2988733 0.2988733 271s [6,] 0.2988733 0.2988733 271s > stopifnot(isTRUE(all.equal(pred4, pred5))) 271s > 271s > options("contrasts" = c("contr.treatment", "contr.poly")) 271s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine, 271s + contrasts=list(temp="contr.sum")) 271s > coef(summary(wine1.clm)) 271s Estimate Std. Error z value Pr(>|z|) 271s 1|2 -2.54174387 0.5792622 -4.38789851 1.144512e-05 271s 2|3 -0.00970353 0.3737929 -0.02595964 9.792895e-01 271s 3|4 2.19047975 0.4965589 4.41131906 1.027428e-05 271s 4|5 3.64781729 0.6257007 5.82997171 5.543677e-09 271s temp1 -1.14461036 0.3595853 -3.18314035 1.456870e-03 271s contactyes 1.65053789 0.6698484 2.46404685 1.373782e-02 271s temp1:contactyes NA NA NA NA 271s > head(model.matrix(wine1.clm)$X) 271s (Intercept) temp1 contactyes temp1:contactyes 271s 1 1 1 0 0 271s 2 1 1 0 0 271s 5 1 -1 0 0 271s 6 1 -1 0 0 271s 7 1 -1 1 -1 271s 8 1 -1 1 -1 271s > attributes(model.matrix(wine1.clm)$X)$contrasts 271s $temp 271s [1] "contr.sum" 271s 271s $contact 271s [1] "contr.treatment" 271s 271s > wine1.clm$contrasts 271s $temp 271s [1] "contr.sum" 271s 271s $contact 271s [1] "contr.treatment" 271s 271s > head(pred6 <- predict(wine1.clm)$fit) 271s [1] 0.5584719 0.2088699 0.1843854 0.1843854 0.2988733 0.2988733 271s > 271s > head(cbind(pred4, pred5, pred6)) 271s pred4 pred5 pred6 271s [1,] 0.5584719 0.5584719 0.5584719 271s [2,] 0.2088699 0.2088699 0.2088699 271s [3,] 0.1843854 0.1843854 0.1843854 271s [4,] 0.1843854 0.1843854 0.1843854 271s [5,] 0.2988733 0.2988733 0.2988733 271s [6,] 0.2988733 0.2988733 0.2988733 271s > stopifnot(isTRUE(all.equal(pred4, pred6))) 271s > ################################################################## 271s > 271s > ## Compare equality of fitted values for models with different contrasts: 271s > options("contrasts" = c("contr.treatment", "contr.poly")) 271s > fm1 <- clm(rating ~ temp + contact, data=wine) 271s > fitted(fm1) 271s [1] 0.57064970 0.19229094 0.44305990 0.09582084 0.20049402 0.20049402 271s [7] 0.27378469 0.27378469 0.20679013 0.57064970 0.05354601 0.44305990 271s [13] 0.20141572 0.50157554 0.27378469 0.36359581 0.57064970 0.19229094 271s [19] 0.44305990 0.37764614 0.07562701 0.07562701 0.36359581 0.36359581 271s [25] 0.19229094 0.57064970 0.44305990 0.37764614 0.50157554 0.20141572 271s [31] 0.27378469 0.30420994 0.57064970 0.19229094 0.09582084 0.44305990 271s [37] 0.50157554 0.50157554 0.30420994 0.30420994 0.19229094 0.57064970 271s [43] 0.44305990 0.37764614 0.20141572 0.20049402 0.27378469 0.36359581 271s [49] 0.20679013 0.20679013 0.37764614 0.37764614 0.20141572 0.50157554 271s [55] 0.05380128 0.30420994 0.57064970 0.57064970 0.37764614 0.44305990 271s [61] 0.50157554 0.50157554 0.30420994 0.36359581 0.20679013 0.57064970 271s [67] 0.44305990 0.37764614 0.50157554 0.20141572 0.36359581 0.36359581 271s > options("contrasts" = c("contr.sum", "contr.poly")) 271s > fm2 <- clm(rating ~ temp + contact, data=wine) 271s > fitted(fm2) 271s [1] 0.57064970 0.19229094 0.44305990 0.09582084 0.20049402 0.20049402 271s [7] 0.27378469 0.27378469 0.20679013 0.57064970 0.05354601 0.44305990 271s [13] 0.20141572 0.50157554 0.27378469 0.36359581 0.57064970 0.19229094 271s [19] 0.44305990 0.37764614 0.07562701 0.07562701 0.36359581 0.36359581 271s [25] 0.19229094 0.57064970 0.44305990 0.37764614 0.50157554 0.20141572 271s [31] 0.27378469 0.30420994 0.57064970 0.19229094 0.09582084 0.44305990 271s [37] 0.50157554 0.50157554 0.30420994 0.30420994 0.19229094 0.57064970 271s [43] 0.44305990 0.37764614 0.20141572 0.20049402 0.27378469 0.36359581 271s [49] 0.20679013 0.20679013 0.37764614 0.37764614 0.20141572 0.50157554 271s [55] 0.05380128 0.30420994 0.57064970 0.57064970 0.37764614 0.44305990 271s [61] 0.50157554 0.50157554 0.30420994 0.36359581 0.20679013 0.57064970 271s [67] 0.44305990 0.37764614 0.50157554 0.20141572 0.36359581 0.36359581 271s > options("contrasts" = c("contr.treatment", "contr.poly")) 271s > fm3 <- clm(rating ~ temp + contact, data=wine, 271s + contrasts=list(contact="contr.sum")) 271s > fitted(fm3) 271s [1] 0.57064970 0.19229094 0.44305990 0.09582084 0.20049402 0.20049402 271s [7] 0.27378469 0.27378469 0.20679013 0.57064970 0.05354601 0.44305990 271s [13] 0.20141572 0.50157554 0.27378469 0.36359581 0.57064970 0.19229094 271s [19] 0.44305990 0.37764614 0.07562701 0.07562701 0.36359581 0.36359581 271s [25] 0.19229094 0.57064970 0.44305990 0.37764614 0.50157554 0.20141572 271s [31] 0.27378469 0.30420994 0.57064970 0.19229094 0.09582084 0.44305990 271s [37] 0.50157554 0.50157554 0.30420994 0.30420994 0.19229094 0.57064970 271s [43] 0.44305990 0.37764614 0.20141572 0.20049402 0.27378469 0.36359581 271s [49] 0.20679013 0.20679013 0.37764614 0.37764614 0.20141572 0.50157554 271s [55] 0.05380128 0.30420994 0.57064970 0.57064970 0.37764614 0.44305990 271s [61] 0.50157554 0.50157554 0.30420994 0.36359581 0.20679013 0.57064970 271s [67] 0.44305990 0.37764614 0.50157554 0.20141572 0.36359581 0.36359581 271s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm2)))) 271s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm3)))) 271s > 271s > ################################################################## 271s > ## Compare equality of fitted values for models with different 271s > ## contrasts in face of aliased coefficients: 271s > options("contrasts" = c("contr.treatment", "contr.poly")) 271s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 271s > Wine <- subset(wine, subset=!(temp == "cold" & contact == "yes")) 271s > fm1 <- clm(rating ~ temp + contact, data=Wine) 271s > options("contrasts" = c("contr.sum", "contr.poly")) 271s > fm2 <- clm(rating ~ temp + contact, data=Wine) 271s > options("contrasts" = c("contr.treatment", "contr.poly")) 271s > fm3 <- clm(rating ~ temp + contact, data=Wine, 271s + contrasts=list(contact="contr.sum")) 271s > 271s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm2)))) 271s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm3)))) 271s > stopifnot(isTRUE(all.equal(predict(fm1)$fit, predict(fm2)$fit))) 271s > stopifnot(isTRUE(all.equal(predict(fm1)$fit, predict(fm3)$fit))) 271s > 271s > ################################# 271s > ## Does this also happen if the wine data has changed? 271s > options("contrasts" = c("contr.treatment", "contr.poly")) 271s > Wine <- subset(wine, subset=!(temp == "cold" & contact == "yes")) 271s > fm1 <- clm(rating ~ temp + contact, data=Wine) 271s > fit1 <- fitted(fm1) 271s > pred1 <- predict(fm1)$fit 271s > Wine <- wine 271s > pred2 <- predict(fm1)$fit 271s > stopifnot(isTRUE(all.equal(fit1, pred1))) 271s > stopifnot(isTRUE(all.equal(fit1, pred2))) 271s > 271s > ## What if weights, say, is an expression? 271s > ## Notice that updating the model object changes it: 271s > set.seed(123) 271s > fm1 <- clm(rating ~ temp + contact, data=wine, 271s + weights=runif(nrow(wine), .5, 1.5)) 271s > fm2 <- update(fm1) 271s > stopifnot(isTRUE(all.equal(fitted(fm1), predict(fm1)$fit))) 271s > stopifnot(!isTRUE(all.equal(fitted(fm1), fitted(fm2)))) 271s > 271s > ################################# 271s > ## Test equality of fits and predictions of models with: 271s > ## 'x + I(x^2)' and 'poly(x, 2)': 271s > ## December 25th 2014, RHBC. 271s > data(wine) 271s > set.seed(1) 271s > x <- rnorm(nrow(wine), sd=2) + as.numeric(wine$rating) 271s > range(x) 271s [1] -1.429400 7.803236 271s > 271s > ## Comparison of 'x + I(x^2)' and 'poly(x, 2)': 271s > fm3 <- clm(rating ~ temp + x + I(x^2), data=wine) 271s > fm4 <- clm(rating ~ temp + poly(x, 2), data=wine) 271s > ## Same model fits, but different parameterizations: 271s > stopifnot( 271s + !isTRUE(all.equal(coef(fm3), coef(fm4), check.names=FALSE)) 271s + ) 271s > stopifnot(isTRUE(all.equal(logLik(fm3), logLik(fm4)))) 271s > newData <- expand.grid(temp = levels(wine$temp), 271s + x=seq(-1, 7, 3)) 271s > predict(fm3, newdata=newData)$fit 271s 1 2 3 4 5 271s 1 0.206057293 0.56152859 0.2029812 0.0245885 0.004844463 271s 2 0.036289668 0.28766182 0.5031703 0.1404155 0.032462707 271s 3 0.147105364 0.53988789 0.2693657 0.0363691 0.007271946 271s 4 0.024413857 0.21711772 0.5192073 0.1912002 0.048060899 271s 5 0.035397238 0.28292433 0.5050762 0.1433185 0.033283705 271s 6 0.005296054 0.05815716 0.3400568 0.4047024 0.191787585 271s > predict(fm4, newdata=newData)$fit 271s 1 2 3 4 5 271s 1 0.206057293 0.56152859 0.2029812 0.0245885 0.004844463 271s 2 0.036289668 0.28766182 0.5031703 0.1404155 0.032462707 271s 3 0.147105364 0.53988789 0.2693657 0.0363691 0.007271946 271s 4 0.024413857 0.21711772 0.5192073 0.1912002 0.048060899 271s 5 0.035397238 0.28292433 0.5050762 0.1433185 0.033283705 271s 6 0.005296054 0.05815716 0.3400568 0.4047024 0.191787585 271s > stopifnot(isTRUE(all.equal(fitted(fm3), fitted(fm4)))) 271s > stopifnot(isTRUE( 271s + all.equal(predict(fm3, newdata=newData)$fit, 271s + predict(fm4, newdata=newData)$fit))) 271s > ################################# 271s > 271s BEGIN TEST test.clm.profile.R 271s 271s R version 4.4.3 (2025-02-28) -- "Trophy Case" 271s Copyright (C) 2025 The R Foundation for Statistical Computing 271s Platform: s390x-ibm-linux-gnu 271s 271s R is free software and comes with ABSOLUTELY NO WARRANTY. 271s You are welcome to redistribute it under certain conditions. 271s Type 'license()' or 'licence()' for distribution details. 271s 271s R is a collaborative project with many contributors. 271s Type 'contributors()' for more information and 271s 'citation()' on how to cite R or R packages in publications. 271s 271s Type 'demo()' for some demos, 'help()' for on-line help, or 271s 'help.start()' for an HTML browser interface to help. 271s Type 'q()' to quit R. 271s 271s > library(ordinal) 272s > 272s > ## Testing that the profile remains the same - that the model object 272s > ## is not 'distorted' by update(object/fitted, doFit=FALSE) 272s > set.seed(1234) 272s > wts <- runif(nrow(wine), 0, 2) 272s > fm3 <- clm(rating ~ temp + contact, data=wine, 272s + weights=wts) 272s > pr <- profile(fm3) 272s > 272s > set.seed(1234) 272s > fm3 <- clm(rating ~ temp + contact, data=wine, 272s + weights=runif(nrow(wine), 0, 2)) 272s > pr3 <- profile(fm3) 272s > ## > set.seed(1234) 272s > ## > fm3 <- clm(rating ~ temp + contact, data=wine, 272s > ## + weights=runif(nrow(wine), 0, 2)) 272s > ## > pr3 <- profile(fm3) 272s > ## Warning messages: 272s > ## 1: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 272s > ## profile may be unreliable for tempwarm because only 1 272s > ## steps were taken down 272s > ## 2: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 272s > ## profile may be unreliable for tempwarm because only 1 272s > ## steps were taken up 272s > ## 3: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 272s > ## profile may be unreliable for contactyes because only 1 272s > ## steps were taken down 272s > ## 4: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 272s > ## profile may be unreliable for contactyes because only 1 272s > ## steps were taken up 272s > ## 272s > stopifnot(isTRUE(all.equal(pr, pr3, check.attributes=FALSE))) 272s > stopifnot( 272s + isTRUE(all.equal(pr$tempwarm[, "lroot"], pr3$tempwarm[, "lroot"])), 272s + isTRUE(all.equal(pr$contactyes[, "lroot"], pr3$contactyes[, "lroot"]))) 272s > 272s BEGIN TEST test.clm.single.anova.R 272s 272s R version 4.4.3 (2025-02-28) -- "Trophy Case" 272s Copyright (C) 2025 The R Foundation for Statistical Computing 272s Platform: s390x-ibm-linux-gnu 272s 272s R is free software and comes with ABSOLUTELY NO WARRANTY. 272s You are welcome to redistribute it under certain conditions. 272s Type 'license()' or 'licence()' for distribution details. 272s 272s R is a collaborative project with many contributors. 272s Type 'contributors()' for more information and 272s 'citation()' on how to cite R or R packages in publications. 272s 272s Type 'demo()' for some demos, 'help()' for on-line help, or 272s 'help.start()' for an HTML browser interface to help. 272s Type 'q()' to quit R. 272s 272s > # test.clm.single.anova.R 272s > 272s > library(ordinal) 273s > 273s > # WRE says "using if(requireNamespace("pkgname")) is preferred, if possible." 273s > # even in tests: 273s > assertError <- function(expr, ...) 273s + if(requireNamespace("tools")) tools::assertError(expr, ...) else invisible() 273s > assertWarning <- function(expr, ...) 273s + if(requireNamespace("tools")) tools::assertWarning(expr, ...) else invisible() 273s > 273s > fm <- clm(rating ~ temp * contact, scale=~contact, data=wine) 273s > 273s > anova(fm, type="I") 273s Type I Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 17.1046 3.538e-05 *** 273s contact 1 9.1574 0.002477 ** 273s temp:contact 1 0.1097 0.740512 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > anova(fm, type="II") 273s Type II Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 17.1046 3.538e-05 *** 273s contact 1 9.1574 0.002477 ** 273s temp:contact 1 0.1097 0.740512 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > anova(fm, type="III") 273s Type III Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 9.5681 0.00198 ** 273s contact 1 4.1830 0.04083 * 273s temp:contact 1 0.1097 0.74051 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > anova(fm, type=1) 273s Type I Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 17.1046 3.538e-05 *** 273s contact 1 9.1574 0.002477 ** 273s temp:contact 1 0.1097 0.740512 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > anova(fm, type=2) 273s Type II Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 17.1046 3.538e-05 *** 273s contact 1 9.1574 0.002477 ** 273s temp:contact 1 0.1097 0.740512 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > anova(fm, type=3) 273s Type III Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 9.5681 0.00198 ** 273s contact 1 4.1830 0.04083 * 273s temp:contact 1 0.1097 0.74051 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > anova(fm, type="1") 273s Type I Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 17.1046 3.538e-05 *** 273s contact 1 9.1574 0.002477 ** 273s temp:contact 1 0.1097 0.740512 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > anova(fm, type="2") 273s Type II Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 17.1046 3.538e-05 *** 273s contact 1 9.1574 0.002477 ** 273s temp:contact 1 0.1097 0.740512 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > anova(fm, type="3") 273s Type III Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 9.5681 0.00198 ** 273s contact 1 4.1830 0.04083 * 273s temp:contact 1 0.1097 0.74051 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > anova(fm, type="marginal") 273s Marginal Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 9.5681 0.00198 ** 273s contact 1 4.1830 0.04083 * 273s temp:contact 1 0.1097 0.74051 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > 273s > # Nominal effects: 273s > fm <- clm(rating ~ temp, nominal=~contact, data=wine) 273s > anova(fm) 273s Type I Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 22.166 2.501e-06 *** 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > 273s > # Flexible links: 273s > fm1 <- clm(rating ~ temp + contact, link="log-gamma", data=wine) 273s Changing to 'nlminb' optimizer for flexible link function 273s > anova(fm1, type=1) 273s Warning message: 273s Type I Analysis of Deviance Table with Wald chi-square tests 273s 273s (-1) Model failed to converge with max|grad| = 9.92664e-05 (tol = 1e-06) 273s Df Chisq Pr(>Chisq) 273s temp 1 26.150 3.16e-07 *** 273s contact 1 10.369 0.001282 ** 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > anova(fm1, type=2) 273s Type II Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 26.150 3.16e-07 *** 273s contact 1 10.369 0.001282 ** 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > anova(fm1, type=3) 273s Type III Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 26.150 3.16e-07 *** 273s contact 1 10.369 0.001282 ** 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > 273s > # Equivalence of tests irrespective of contrasts: 273s > fm1 <- clm(SURENESS ~ PRODID * SOUPFREQ, data=soup) 273s > # summary(fm1) 273s > (an1 <- anova(fm1, type=3)) 273s Type III Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s PRODID 5 72.5901 2.959e-14 *** 273s SOUPFREQ 2 1.8132 0.4039 273s PRODID:SOUPFREQ 10 8.5837 0.5720 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > fm2 <- clm(SURENESS ~ PRODID * SOUPFREQ, data=soup, 273s + contrasts = list(SOUPFREQ = "contr.sum", PRODID = "contr.SAS")) 273s > # summary(fm2) 273s > anova(fm1, fm2) 273s Likelihood ratio tests of cumulative link models: 273s 273s formula: link: threshold: 273s fm1 SURENESS ~ PRODID * SOUPFREQ logit flexible 273s fm2 SURENESS ~ PRODID * SOUPFREQ logit flexible 273s 273s no.par AIC logLik LR.stat df Pr(>Chisq) 273s fm1 22 5388 -2672 273s fm2 22 5388 -2672 0 0 273s > (an2 <- anova(fm2, type=3)) 273s Type III Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s PRODID 5 72.5901 2.959e-14 *** 273s SOUPFREQ 2 1.8132 0.4039 273s PRODID:SOUPFREQ 10 8.5837 0.5720 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > stopifnot( 273s + isTRUE(all.equal(an1, an2, check.attributes=FALSE)) 273s + ) 273s > 273s > 273s > # Aliased coefficients: 273s > fm1 <- clm(SURENESS ~ PRODID * DAY, data=soup) 273s > anova(fm1, type=1) 273s Type I Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s PRODID 5 185.2017 < 2e-16 *** 273s DAY 1 4.1131 0.04255 * 273s PRODID:DAY 4 5.1186 0.27534 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > anova(fm1, type=2) 273s Type II Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s PRODID 5 181.5967 < 2e-16 *** 273s DAY 1 4.1131 0.04255 * 273s PRODID:DAY 4 5.1186 0.27534Missing cells for: PRODID3:DAY2. 273s Interpret type III hypotheses with care. 273s 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > anova(fm1, type=3) 273s Type III Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s PRODID 5 76.3722 4.81e-15 *** 273s DAY 1 10.1485 0.001444 ** 273s PRODID:DAY 4 5.1186 0.275344 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > 273s > # Aliased term (due to nominal effects): 273s > fm <- clm(rating ~ temp * contact, nominal=~contact, data=wine) 273s > anova(fm, type=1) 273s Type I Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 22.066 2.634e-06 *** 273s contact 273s temp:contact 1 0.250 0.6171 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > anova(fm, type=2) 273s Type II Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 22.066 2.634e-06 *** 273s contact 273s temp:contact 1 0.250 0.6171 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > anova(fm, type=3) 273s Type III Analysis of Deviance Table with Wald chi-square tests 273s 273s Df Chisq Pr(>Chisq) 273s temp 1 9.6335 0.001911 ** 273s contact 273s temp:contact 1 0.2500 0.617071 273s --- 273s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 273s > 273s > # model with all NA in vcov(object): 273s > fm <- clm(rating ~ temp * contact, nominal=~contact, scale=~contact, data=wine) 274s Warning message: 274s (1) Hessian is numerically singular: parameters are not uniquely determined 274s In addition: Absolute and relative convergence criteria were met 274s Loading required namespace: tools 274s > assertError(anova(fm, type=1)) # error 274s > assertError(anova(fm, type=2)) # error 274s > assertError(anova(fm, type=3)) # error 274s > all(is.na(vcov(fm))) 274s [1] TRUE 274s > 274s BEGIN TEST test.general.R 274s 274s R version 4.4.3 (2025-02-28) -- "Trophy Case" 274s Copyright (C) 2025 The R Foundation for Statistical Computing 274s Platform: s390x-ibm-linux-gnu 274s 274s R is free software and comes with ABSOLUTELY NO WARRANTY. 274s You are welcome to redistribute it under certain conditions. 274s Type 'license()' or 'licence()' for distribution details. 274s 274s R is a collaborative project with many contributors. 274s Type 'contributors()' for more information and 274s 'citation()' on how to cite R or R packages in publications. 274s 274s Type 'demo()' for some demos, 'help()' for on-line help, or 274s 'help.start()' for an HTML browser interface to help. 274s Type 'q()' to quit R. 274s 274s > 274s > txt <- citation("ordinal") 274s > stopifnot(as.logical(grep("year", txt))) 274s > 274s BEGIN TEST test.makeThresholds.R 274s 274s R version 4.4.3 (2025-02-28) -- "Trophy Case" 274s Copyright (C) 2025 The R Foundation for Statistical Computing 274s Platform: s390x-ibm-linux-gnu 274s 274s R is free software and comes with ABSOLUTELY NO WARRANTY. 274s You are welcome to redistribute it under certain conditions. 274s Type 'license()' or 'licence()' for distribution details. 274s 274s R is a collaborative project with many contributors. 274s Type 'contributors()' for more information and 274s 'citation()' on how to cite R or R packages in publications. 274s 274s Type 'demo()' for some demos, 'help()' for on-line help, or 274s 'help.start()' for an HTML browser interface to help. 274s Type 'q()' to quit R. 274s 274s > # test.makeThresholds.R 274s > 274s > library(ordinal) 275s > 275s > # Prvious bug which is now fixed: 275s > res <- ordinal:::makeThresholds(letters[1:3], "symmetric") 275s > stopifnot(length(res$alpha.names) == res$nalpha) 275s > # length(res$alpha.names) used to be 4 275s > 275s > # Real data example: 275s > wine <- within(wine, { 275s + rating_comb3b <- rating 275s + levels(rating_comb3b) <- c("1-2", "1-2", "3", "4-5", "4-5") 275s + }) 275s > wine$rating_comb3b[1] <- "4-5" # Need to remove the zero here to avoid inf MLE 275s > ftable(rating_comb3b ~ temp + contact, data=wine) 275s rating_comb3b 1-2 3 4-5 275s temp contact 275s cold no 12 5 1 275s yes 8 8 2 275s warm no 5 8 5 275s yes 1 5 12 275s > 275s > fm.comb3_c <- clm(rating_comb3b ~ contact, #scale=~contact, 275s + threshold = "symmetric", data=wine) # no error 275s > 275s BEGIN TEST test.sign.R 275s 275s R version 4.4.3 (2025-02-28) -- "Trophy Case" 275s Copyright (C) 2025 The R Foundation for Statistical Computing 275s Platform: s390x-ibm-linux-gnu 275s 275s R is free software and comes with ABSOLUTELY NO WARRANTY. 275s You are welcome to redistribute it under certain conditions. 275s Type 'license()' or 'licence()' for distribution details. 275s 275s R is a collaborative project with many contributors. 275s Type 'contributors()' for more information and 275s 'citation()' on how to cite R or R packages in publications. 275s 275s Type 'demo()' for some demos, 'help()' for on-line help, or 275s 'help.start()' for an HTML browser interface to help. 275s Type 'q()' to quit R. 275s 275s > # test.sign.R 275s > 275s > # Test the use of sign.location and sign.nominal in clm.control(): 275s > 275s > library(ordinal) 276s > 276s > fm1 <- clm(rating ~ temp + contact, data=wine) 276s > fm2 <- clm(rating ~ temp + contact, data=wine, 276s + sign.location="positive") 276s > # dput(names(fm1)) 276s > keep <- c("aliased", "alpha", "cond.H", 276s + "contrasts", "convergence", "df.residual", "edf", 276s + "fitted.values", "formula", "formulas", "gradient", 276s + "info", "link", "logLik", "maxGradient", "message", "model", 276s + "n", "niter", "nobs", "start", "terms", "Theta", "threshold", 276s + "tJac", "xlevels", "y", "y.levels") 276s > check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1[keep], fm2[keep]) 276s > stopifnot(all(check)) 276s > stopifnot(isTRUE(all.equal( 276s + fm1$beta, - fm2$beta 276s + ))) 276s > 276s > fm1 <- clm(rating ~ temp, nominal=~ contact, data=wine) 276s > fm2 <- clm(rating ~ temp, nominal=~ contact, data=wine, 276s + sign.nominal="negative") 276s > keep <- c("aliased", "beta", "cond.H", 276s + "contrasts", "convergence", "df.residual", "edf", 276s + "fitted.values", "formula", "formulas", "gradient", 276s + "info", "link", "logLik", "maxGradient", "message", "model", 276s + "n", "niter", "nobs", "start", "terms", "Theta", "threshold", 276s + "tJac", "xlevels", "y", "y.levels") 276s > # check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1, fm2) 276s > check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1[keep], fm2[keep]) 276s > stopifnot(all(check)) 276s > stopifnot(isTRUE(all.equal( 276s + fm1$alpha[5:8], -fm2$alpha[5:8] 276s + ))) 276s > 276s > 276s > fm1 <- clm(rating ~ temp, nominal=~ contact, data=wine) 276s > fm2 <- clm(rating ~ temp, nominal=~ contact, data=wine, 276s + sign.nominal="negative", sign.location="positive") 276s > keep <- c("aliased", "cond.H", 276s + "contrasts", "convergence", "df.residual", "edf", 276s + "fitted.values", "formula", "formulas", "gradient", 276s + "info", "link", "logLik", "maxGradient", "message", "model", 276s + "n", "niter", "nobs", "start", "terms", "Theta", "threshold", 276s + "tJac", "xlevels", "y", "y.levels") 276s > # check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1, fm2) 276s > check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1[keep], fm2[keep]) 276s > stopifnot(all(check)) 276s > stopifnot( 276s + isTRUE(all.equal(fm1$alpha[5:8], -fm2$alpha[5:8])), 276s + isTRUE(all.equal(fm1$beta, -fm2$beta)) 276s + ) 276s > 276s > # Check predict method: 276s > newData <- with(wine, expand.grid(temp=levels(temp), contact=levels(contact))) 276s > (p1 <- predict(fm1, newdata=newData)) 276s $fit 276s 1 2 3 4 5 276s 1 0.210312404 0.56637121 0.1953950 0.0185460 0.009375394 276s 2 0.020998377 0.19781391 0.5182972 0.1577343 0.105156202 276s 3 0.050301839 0.38380275 0.4329644 0.1065821 0.026348960 276s 4 0.004247588 0.05393811 0.2862121 0.4040930 0.251509196 276s 276s > (p2 <- predict(fm2, newdata=newData)) 276s $fit 276s 1 2 3 4 5 276s 1 0.210312404 0.56637121 0.1953950 0.0185460 0.009375394 276s 2 0.020998377 0.19781391 0.5182972 0.1577343 0.105156202 276s 3 0.050301839 0.38380275 0.4329644 0.1065821 0.026348960 276s 4 0.004247588 0.05393811 0.2862121 0.4040930 0.251509196 276s 276s > stopifnot(isTRUE(all.equal(p1, p2))) 276s > 276s > stopifnot(isTRUE( 276s + all.equal(predict(fm1, newdata=wine, se=TRUE, interval=TRUE), 276s + predict(fm2, newdata=wine, se=TRUE, interval=TRUE)) 276s + )) 276s > 276s > # Check profile and confint methods: 276s > confint.default(fm1) 276s 2.5 % 97.5 % 276s 1|2.(Intercept) -2.4250844 -0.2210024 276s 2|3.(Intercept) 0.3158056 2.1770814 276s 3|4.(Intercept) 2.2642614 4.8358258 276s 4|5.(Intercept) 2.9738888 6.3466053 276s 1|2.contactyes -3.8921464 0.6620280 276s 2|3.contactyes -2.6692032 -0.3539315 276s 3|4.contactyes -2.9464535 -0.4030579 276s 4|5.contactyes -2.8077520 0.7065061 276s tempwarm 1.4703720 3.5677176 276s > confint.default(fm2) 276s 2.5 % 97.5 % 276s 1|2.(Intercept) -2.4250844 -0.2210024 276s 2|3.(Intercept) 0.3158056 2.1770814 276s 3|4.(Intercept) 2.2642614 4.8358258 276s 4|5.(Intercept) 2.9738888 6.3466053 276s 1|2.contactyes -0.6620280 3.8921464 276s 2|3.contactyes 0.3539315 2.6692032 276s 3|4.contactyes 0.4030579 2.9464535 276s 4|5.contactyes -0.7065061 2.8077520 276s tempwarm -3.5677176 -1.4703720 276s > 276s > stopifnot( 276s + isTRUE(all.equal(confint(fm1), -confint(fm2)[, 2:1, drop=FALSE], 276s + check.attributes=FALSE)) 276s + ) 276s > 276s > fm1 <- clm(rating ~ temp + contact, data=wine) 276s > fm2 <- clm(rating ~ temp + contact, data=wine, 276s + sign.location="positive") 276s > pr1 <- profile(fm1) 276s > pr2 <- profile(fm2) 276s > stopifnot( 276s + isTRUE(all.equal(confint(fm1), - confint(fm2)[, 2:1], check.attributes=FALSE)) 276s + ) 276s > 276s > 276s BEGIN TEST test0weights.R 276s 276s R version 4.4.3 (2025-02-28) -- "Trophy Case" 276s Copyright (C) 2025 The R Foundation for Statistical Computing 276s Platform: s390x-ibm-linux-gnu 276s 276s R is free software and comes with ABSOLUTELY NO WARRANTY. 276s You are welcome to redistribute it under certain conditions. 276s Type 'license()' or 'licence()' for distribution details. 276s 276s R is a collaborative project with many contributors. 276s Type 'contributors()' for more information and 276s 'citation()' on how to cite R or R packages in publications. 276s 276s Type 'demo()' for some demos, 'help()' for on-line help, or 276s 'help.start()' for an HTML browser interface to help. 276s Type 'q()' to quit R. 276s 276s > library(ordinal) 277s > options(contrasts = c("contr.treatment", "contr.poly")) 277s > ## library(devtools) 277s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 277s > ## clean_dll(pkg = r2path) 277s > ## load_all(r2path) 277s > 277s > ## one zero weight: 277s > data(wine, package="ordinal") 277s > wts <- rep(1, nrow(wine)) 277s > wine$rating 277s [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 277s [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 277s Levels: 1 < 2 < 3 < 4 < 5 277s > wts[1] <- 0 277s > fm1 <- clm(rating ~ contact + temp, data=wine, weights=wts) 277s > fm1 277s formula: rating ~ contact + temp 277s data: wine 277s 277s link threshold nobs logLik AIC niter max.grad cond.H 277s logit flexible 71 -85.92 183.84 6(0) 3.44e-12 2.7e+01 277s 277s Coefficients: 277s contactyes tempwarm 277s 1.511 2.482 277s 277s Threshold coefficients: 277s 1|2 2|3 3|4 4|5 277s -1.295 1.220 3.437 4.975 277s > fm1$n ## 72 277s [1] 72 277s > fm1$nobs ## 71 277s [1] 71 277s > confint(fm1) 277s 2.5 % 97.5 % 277s contactyes 0.5951066 2.478924 277s tempwarm 1.4856829 3.577621 277s > plot(profile(fm1)) 277s > plot(slice(fm1), 5) 277s > convergence(fm1) 277s nobs logLik niter max.grad cond.H logLik.Error 277s 71 -85.92 6(0) 3.44e-12 2.7e+01 <1e-10 277s 277s Estimate Std.Err Gradient Error Cor.Dec Sig.Dig 277s 1|2 -1.295 0.5220 7.57e-13 7.84e-14 12 13 277s 2|3 1.220 0.4436 2.65e-12 -1.27e-13 12 13 277s 3|4 3.437 0.6014 -3.44e-12 -7.18e-13 11 12 277s 4|5 4.975 0.7341 -5.44e-14 -7.00e-13 11 12 277s contactyes 1.511 0.4785 1.54e-13 -1.96e-13 12 13 277s tempwarm 2.482 0.5303 -4.01e-13 -4.94e-13 12 13 277s 277s Eigen values of Hessian: 277s 21.7419 18.5476 10.4115 5.2426 4.0755 0.8013 277s 277s Convergence message from clm: 277s (0) successful convergence 277s In addition: Absolute and relative convergence criteria were met 277s 277s > drop1(fm1, test="Chi") 277s Single term deletions 277s 277s Model: 277s rating ~ contact + temp 277s Df AIC LRT Pr(>Chi) 277s 183.84 277s contact 1 192.54 10.698 0.001072 ** 277s temp 1 208.07 26.234 3.024e-07 *** 277s --- 277s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 277s > add1(fm1, scope=~.^2, test="Chi") 277s Single term additions 277s 277s Model: 277s rating ~ contact + temp 277s Df AIC LRT Pr(>Chi) 277s 183.84 277s contact:temp 1 185.66 0.18256 0.6692 277s > ## clm_anova(fm1) 277s > pred <- predict(fm1, newdata=wine) ## OK 277s > step.fm1 <- step(fm1, trace=0) 277s > fitted(fm1) 277s [1] 0.19683278 0.44514183 0.09677403 0.20147980 0.20147980 0.27261558 277s [7] 0.27261558 0.21497073 0.55705124 0.05699435 0.44514183 0.19814731 277s [13] 0.50160837 0.27261558 0.36288756 0.55705124 0.19683278 0.44514183 277s [19] 0.37073110 0.07640020 0.07640020 0.36288756 0.36288756 0.19683278 277s [25] 0.55705124 0.44514183 0.37073110 0.50160837 0.19814731 0.27261558 277s [31] 0.30572865 0.55705124 0.19683278 0.09677403 0.44514183 0.50160837 277s [37] 0.50160837 0.30572865 0.30572865 0.19683278 0.55705124 0.44514183 277s [43] 0.37073110 0.19814731 0.20147980 0.27261558 0.36288756 0.21497073 277s [49] 0.21497073 0.37073110 0.37073110 0.19814731 0.50160837 0.05374460 277s [55] 0.30572865 0.55705124 0.55705124 0.37073110 0.44514183 0.50160837 277s [61] 0.50160837 0.30572865 0.36288756 0.21497073 0.55705124 0.44514183 277s [67] 0.37073110 0.50160837 0.19814731 0.36288756 0.36288756 277s > dim(model.matrix(fm1)$X) 277s [1] 72 3 277s > dim(model.matrix(fm1, "B")$B1) 277s [1] 71 6 277s > mf <- update(fm1, method="model.frame") 277s > str(mf) 277s 'data.frame': 72 obs. of 4 variables: 277s $ rating : Ord.factor w/ 5 levels "1"<"2"<"3"<"4"<..: 2 3 3 4 4 4 5 5 1 2 ... 277s $ contact : Factor w/ 2 levels "no","yes": 1 1 2 2 1 1 2 2 1 1 ... 277s $ temp : Factor w/ 2 levels "cold","warm": 1 1 1 1 2 2 2 2 1 1 ... 277s $ (weights): num 0 1 1 1 1 1 1 1 1 1 ... 277s - attr(*, "terms")=Classes 'terms', 'formula' language rating ~ contact + temp 277s .. ..- attr(*, "variables")= language list(rating, contact, temp) 277s .. ..- attr(*, "factors")= int [1:3, 1:2] 0 1 0 0 0 1 277s .. .. ..- attr(*, "dimnames")=List of 2 277s .. .. .. ..$ : chr [1:3] "rating" "contact" "temp" 277s .. .. .. ..$ : chr [1:2] "contact" "temp" 277s .. ..- attr(*, "term.labels")= chr [1:2] "contact" "temp" 277s .. ..- attr(*, "order")= int [1:2] 1 1 277s .. ..- attr(*, "intercept")= int 1 277s .. ..- attr(*, "response")= int 1 277s .. ..- attr(*, ".Environment")= 277s .. ..- attr(*, "predvars")= language list(rating, contact, temp) 277s .. ..- attr(*, "dataClasses")= Named chr [1:4] "ordered" "factor" "factor" "numeric" 277s .. .. ..- attr(*, "names")= chr [1:4] "rating" "contact" "temp" "(weights)" 277s > wts <- mf$wts 277s > dim(model.matrix(fm1)$X[wts > 0, , drop=FALSE]) 277s [1] 0 3 277s > 277s > fm1b <- clm(rating ~ temp, scale=~contact, data=wine, weights=wts) 277s > summary(fm1b) 277s formula: rating ~ temp 277s scale: ~contact 277s data: wine 277s 277s link threshold nobs logLik AIC niter max.grad cond.H 277s logit flexible 72 -91.92 195.83 8(0) 1.57e-09 5.6e+01 277s 277s Coefficients: 277s Estimate Std. Error z value Pr(>|z|) 277s tempwarm 2.1690 0.5527 3.924 8.69e-05 *** 277s --- 277s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 277s 277s log-scale coefficients: 277s Estimate Std. Error z value Pr(>|z|) 277s contactyes -0.1222 0.2775 -0.44 0.66 277s 277s Threshold coefficients: 277s Estimate Std. Error z value 277s 1|2 -1.8957 0.4756 -3.986 277s 2|3 0.3668 0.3442 1.066 277s 3|4 2.2483 0.5932 3.790 277s 4|5 3.5393 0.8336 4.246 277s > pr <- profile(fm1b) 277s > confint(pr) 277s 2.5 % 97.5 % 277s tempwarm 1.2122036 3.4033767 277s sca.contactyes -0.6721766 0.4156449 277s > plot(pr, 1) 277s > fm1c <- clm(rating ~ temp, nominal=~contact, data=wine, weights=wts) 277s > summary(fm1c) 277s formula: rating ~ temp 277s nominal: ~contact 277s data: wine 277s 277s link threshold nobs logLik AIC niter max.grad cond.H 277s logit flexible 72 -86.21 190.42 6(0) 1.64e-10 4.8e+01 277s 277s Coefficients: 277s Estimate Std. Error z value Pr(>|z|) 277s tempwarm 2.519 0.535 4.708 2.5e-06 *** 277s --- 277s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 277s 277s Threshold coefficients: 277s Estimate Std. Error z value 277s 1|2.(Intercept) -1.3230 0.5623 -2.353 277s 2|3.(Intercept) 1.2464 0.4748 2.625 277s 3|4.(Intercept) 3.5500 0.6560 5.411 277s 4|5.(Intercept) 4.6602 0.8604 5.416 277s 1|2.contactyes -1.6151 1.1618 -1.390 277s 2|3.contactyes -1.5116 0.5906 -2.559 277s 3|4.contactyes -1.6748 0.6488 -2.581 277s 4|5.contactyes -1.0506 0.8965 -1.172 277s > pr <- profile(fm1c) 277s > confint(pr) 277s 2.5 % 97.5 % 277s tempwarm 1.516862 3.629098 277s > plot(pr, 1) 277s > 277s > ## nominal.test(fm1) 277s > ## scale.test(fm1) 277s > 277s > ## zero out an entire response category: 277s > wts2 <- 1 * with(wine, rating != "2") 277s > fm2 <- clm(rating ~ contact + temp, data=wine, weights=wts2) 277s > fm2 277s formula: rating ~ contact + temp 277s data: wine 277s 277s link threshold nobs logLik AIC niter max.grad cond.H 277s logit flexible 50 -46.76 103.52 7(0) 3.55e-13 4.2e+01 277s 277s Coefficients: 277s contactyes tempwarm 277s 1.593 3.062 277s 277s Threshold coefficients: 277s 1|3 3|4 4|5 277s -0.5173 3.6238 5.3657 277s > fm2$n ## 72 277s [1] 72 277s > fm2$nobs ## 50 277s [1] 50 277s > ## Dimension of X and B1, B2 differ: 277s > dim(model.matrix(fm2)$X) 277s [1] 72 3 277s > dim(model.matrix(fm2, "B")$B1) 277s [1] 50 5 277s > ## Cannot directly evaluate predictions on the original data: 277s > try(predict(fm2, newdata=wine), silent=TRUE)[1] 277s [1] "Error in predict.clm(fm2, newdata = wine) : \n response factor 'rating' has new levels\n" 277s > confint(fm2) 277s 2.5 % 97.5 % 277s contactyes 0.4216272 2.876550 277s tempwarm 1.5970977 5.026527 277s > profile(fm2) 277s $contactyes 277s lroot par.vals.1|3 par.vals.3|4 par.vals.4|5 par.vals.contactyes 277s 1 3.4747852 -1.448538968 2.255543944 3.804439509 -0.447374822 277s 2 3.0276372 -1.308493024 2.407453551 3.967827135 -0.192380808 277s 3 2.5822211 -1.174976592 2.565043880 4.140537415 0.062613207 277s 4 2.1395315 -1.048101582 2.728199207 4.322490592 0.317607222 277s 5 1.7005507 -0.927983229 2.896810974 4.513576014 0.572601236 277s 6 1.2662317 -0.814738724 3.070776301 4.713647671 0.827595251 277s 7 0.8374817 -0.708483160 3.249996208 4.922519451 1.082589265 277s 8 0.4151468 -0.609322477 3.434373593 5.139960291 1.337583280 277s 9 0.0000000 -0.517343412 3.623810880 5.365689290 1.592577294 277s 10 -0.4072702 -0.432600941 3.818207180 5.599370818 1.847571309 277s 11 -0.8060673 -0.355104205 4.017454848 5.840609731 2.102565323 277s 12 -1.1958918 -0.284802472 4.221435388 6.088946911 2.357559338 277s 13 -1.5763436 -0.221573075 4.430015019 6.343855637 2.612553352 277s 14 -1.9471215 -0.165213368 4.643040370 6.604739566 2.867547367 277s 15 -2.3080198 -0.115438462 4.860335061 6.870933284 3.122541381 277s 16 -2.6589228 -0.071885700 5.081697900 7.141706504 3.377535396 277s 17 -2.9997972 -0.034125762 5.306903276 7.416272839 3.632529410 277s 18 -3.3306833 -0.001679093 5.535703885 7.693803770 3.887523425 277s par.vals.tempwarm 277s 1 2.840981986 277s 2 2.848907417 277s 3 2.863086150 277s 4 2.883227511 277s 5 2.909025226 277s 6 2.940155181 277s 7 2.976272850 277s 8 3.017010511 277s 9 3.061974244 277s 10 3.110740675 277s 11 3.162853507 277s 12 3.217819929 277s 13 3.275107380 277s 14 3.334141312 277s 15 3.394304942 277s 16 3.454942107 277s 17 3.515364293 277s 18 3.574862708 277s 277s $tempwarm 277s lroot par.vals.1|3 par.vals.3|4 par.vals.4|5 par.vals.contactyes 277s 1 3.4300164 -1.3083735 1.7272573 3.1899360 1.3296606 277s 2 2.8813858 -1.1550431 1.9737448 3.4740817 1.3627908 277s 3 2.3491188 -1.0148529 2.2280703 3.7683888 1.3992293 277s 4 1.8354355 -0.8881411 2.4904988 4.0722937 1.4379639 277s 5 1.3422735 -0.7751174 2.7612331 4.3850175 1.4778669 277s 6 0.8712358 -0.6758159 3.0403898 4.7055883 1.5177348 277s 7 0.4235444 -0.5900448 3.3279674 5.0328829 1.5563515 277s 8 0.0000000 -0.5173434 3.6238109 5.3656893 1.5925773 277s 9 -0.3990485 -0.4569595 3.9275814 5.7027863 1.6254526 277s 10 -0.7737184 -0.4078590 4.2387443 6.0430310 1.6542958 277s 11 -1.1245809 -0.3687765 4.5565843 6.3854348 1.6787668 277s 12 -1.4526173 -0.3383014 4.8802522 6.7292117 1.6988730 277s 13 -1.7591420 -0.3149843 5.2088333 7.0737893 1.7149136 277s 14 -2.0457031 -0.2974396 5.5414220 7.4187857 1.7273842 277s 15 -2.3139760 -0.2844232 5.8771833 7.7639689 1.7368704 277s 16 -2.5656664 -0.2748765 6.2153929 8.1092106 1.7439599 277s 17 -2.8024328 -0.2679376 6.5554528 8.4544482 1.7491850 277s 18 -3.0258332 -0.2629290 6.8968876 8.7996559 1.7529951 277s 19 -3.2372944 -0.2593326 7.2393314 9.1448275 1.7557514 277s 20 -3.4380992 -0.2567600 7.5825083 9.4899654 1.7577335 277s par.vals.tempwarm 277s 1 0.6468007 277s 2 0.9918255 277s 3 1.3368503 277s 4 1.6818751 277s 5 2.0268999 277s 6 2.3719247 277s 7 2.7169495 277s 8 3.0619742 277s 9 3.4069990 277s 10 3.7520238 277s 11 4.0970486 277s 12 4.4420734 277s 13 4.7870982 277s 14 5.1321230 277s 15 5.4771478 277s 16 5.8221726 277s 17 6.1671974 277s 18 6.5122222 277s 19 6.8572470 277s 20 7.2022718 277s 277s attr(,"original.fit") 277s formula: rating ~ contact + temp 277s data: wine 277s 277s link threshold nobs logLik AIC niter max.grad cond.H 277s logit flexible 50 -46.76 103.52 7(0) 3.55e-13 4.2e+01 277s 277s Coefficients: 277s contactyes tempwarm 277s 1.593 3.062 277s 277s Threshold coefficients: 277s 1|3 3|4 4|5 277s -0.5173 3.6238 5.3657 277s attr(,"class") 277s [1] "profile.clm" 277s > plot(slice(fm2), 5) 277s > step.fm2 <- step(fm2, trace=0) 277s > fitted(fm2) 277s [1] 0.60053892 0.77590129 0.09349820 0.27230685 0.27230685 0.32934749 277s [7] 0.32934749 0.37347364 0.10813631 0.77590129 0.60973967 0.32934749 277s [13] 0.40771198 0.60053892 0.77590129 0.09081575 0.09081575 0.40771198 277s [19] 0.40771198 0.60053892 0.77590129 0.60973967 0.32934749 0.25729874 277s [25] 0.60053892 0.09349820 0.77590129 0.60973967 0.60973967 0.25729874 277s [31] 0.25729874 0.60053892 0.77590129 0.27230685 0.32934749 0.40771198 277s [37] 0.37347364 0.37347364 0.60973967 0.25729874 0.77590129 0.60973967 277s [43] 0.60973967 0.25729874 0.40771198 0.37347364 0.77590129 0.60973967 277s [49] 0.40771198 0.40771198 277s > ## Scale and nominal effects: 277s > fm2b <- clm(rating ~ temp, scale=~contact, data=wine, weights=wts2) 277s > summary(fm2b) 277s formula: rating ~ temp 277s scale: ~contact 277s data: wine 277s 277s link threshold nobs logLik AIC niter max.grad cond.H 277s logit flexible 50 -50.35 110.71 9(0) 2.51e-08 1.2e+02 277s 277s Coefficients: 277s Estimate Std. Error z value Pr(>|z|) 277s tempwarm 2.667 1.059 2.519 0.0118 * 277s --- 277s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 277s 277s log-scale coefficients: 277s Estimate Std. Error z value Pr(>|z|) 277s contactyes -0.09812 0.38836 -0.253 0.801 277s 277s Threshold coefficients: 277s Estimate Std. Error z value 277s 1|3 -1.2009 0.5033 -2.386 277s 3|4 2.3219 1.0427 2.227 277s 4|5 3.7986 1.3876 2.738 277s > pr <- profile(fm2b) 277s > confint(pr) 277s 2.5 % 97.5 % 277s tempwarm 1.1319929 6.0851931 277s sca.contactyes -0.8403892 0.7190847 277s > plot(pr, 1) 277s > fm2c <- clm(rating ~ temp, nominal=~contact, data=wine, weights=wts2) 277s > summary(fm2c) 277s formula: rating ~ temp 277s nominal: ~contact 277s data: wine 277s 277s link threshold nobs logLik AIC niter max.grad cond.H 277s logit flexible 50 -46.36 106.72 7(0) 1.22e-12 4.8e+01 277s 277s Coefficients: 277s Estimate Std. Error z value Pr(>|z|) 277s tempwarm 3.1100 0.8529 3.646 0.000266 *** 277s --- 277s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 277s 277s Threshold coefficients: 277s Estimate Std. Error z value 277s 1|3.(Intercept) -0.4250 0.6381 -0.666 277s 3|4.(Intercept) 3.6911 0.9505 3.883 277s 4|5.(Intercept) 4.8968 1.1001 4.451 277s 1|3.contactyes -1.8993 1.2128 -1.566 277s 3|4.contactyes -1.7003 0.7432 -2.288 277s 4|5.contactyes -0.9153 0.9243 -0.990 277s > pr <- profile(fm2c) 277s > confint(pr) 277s 2.5 % 97.5 % 277s tempwarm 1.623761 5.102185 277s > plot(pr, 1) 277s > pred <- predict(fm2c, newdata=wine[!names(wine) %in% "rating"]) 277s > pred <- predict(fm2b, newdata=wine[!names(wine) %in% "rating"]) 277s > 277s > ## nominal.test(fm2) 277s > ## scale.test(fm2) 277s > 277s > ## Different data sets (error): 277s > try(anova(fm1, fm2), silent=TRUE)[1] ## OK 277s [1] "Error in anova.clm(fm1, fm2) : \n models were not all fitted to the same dataset\n" 277s > 277s > ## Test clm.fit: 277s > wts2 <- 1 * with(wine, rating != "2") 277s > mf2 <- update(fm2, method="design") 277s > fm3 <- with(mf2, clm.fit(y, X, weights=wts)) 277s > 277s > ################################# 277s > 277s BEGIN TEST testAnova.clm2.R 277s 277s R version 4.4.3 (2025-02-28) -- "Trophy Case" 277s Copyright (C) 2025 The R Foundation for Statistical Computing 277s Platform: s390x-ibm-linux-gnu 277s 277s R is free software and comes with ABSOLUTELY NO WARRANTY. 277s You are welcome to redistribute it under certain conditions. 277s Type 'license()' or 'licence()' for distribution details. 277s 277s R is a collaborative project with many contributors. 277s Type 'contributors()' for more information and 277s 'citation()' on how to cite R or R packages in publications. 277s 277s Type 'demo()' for some demos, 'help()' for on-line help, or 277s 'help.start()' for an HTML browser interface to help. 277s Type 'q()' to quit R. 277s 277s > library(ordinal) 278s > options(contrasts = c("contr.treatment", "contr.poly")) 278s > 278s > ## More manageable data set: 278s > (tab26 <- with(soup, table("Product" = PROD, "Response" = SURENESS))) 278s Response 278s Product 1 2 3 4 5 6 278s Ref 132 161 65 41 121 219 278s Test 96 99 50 57 156 650 278s > dimnames(tab26)[[2]] <- c("Sure", "Not Sure", "Guess", "Guess", "Not Sure", "Sure") 278s > dat26 <- expand.grid(sureness = as.factor(1:6), prod = c("Ref", "Test")) 278s > dat26$wghts <- c(t(tab26)) 278s > m1 <- clm(sureness ~ prod, scale = ~prod, data = dat26, 278s + weights = wghts, link = "logit") 278s > 278s > ## anova 278s > m2 <- update(m1, scale = ~1) 278s > anova(m1, m2) 278s Likelihood ratio tests of cumulative link models: 278s 278s formula: scale: link: threshold: 278s m2 sureness ~ prod ~1 logit flexible 278s m1 sureness ~ prod ~prod logit flexible 278s 278s no.par AIC logLik LR.stat df Pr(>Chisq) 278s m2 6 5392.7 -2690.3 278s m1 7 5389.5 -2687.7 5.1749 1 0.02292 * 278s --- 278s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 278s > mN1 <- clm(sureness ~ 1, nominal = ~prod, data = dat26, 278s + link = "logit") 278s > anova(m1, mN1) 278s Likelihood ratio tests of cumulative link models: 278s 278s formula: nominal: scale: link: threshold: 278s m1 sureness ~ prod ~1 ~prod logit flexible 278s mN1 sureness ~ 1 ~prod ~1 logit flexible 278s 278s no.par AIC logLik LR.stat df Pr(>Chisq) 278s m1 7 5389.489 -2687.745 278s mN1 10 63.002 -21.501 5332.5 3 < 2.2e-16 *** 278s --- 278s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 278s > anova(m1, m2, mN1) 278s Likelihood ratio tests of cumulative link models: 278s 278s formula: nominal: scale: link: threshold: 278s m2 sureness ~ prod ~1 ~1 logit flexible 278s m1 sureness ~ prod ~1 ~prod logit flexible 278s mN1 sureness ~ 1 ~prod ~1 logit flexible 278s 278s no.par AIC logLik LR.stat df Pr(>Chisq) 278s m2 6 5392.664 -2690.332 278s m1 7 5389.489 -2687.745 5.1749 1 0.02292 * 278s mN1 10 63.002 -21.501 5332.4869 3 < 2e-16 *** 278s --- 278s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 278s > 278s > ## dropterm 278s > if(require(MASS)) { 278s + dropterm(m1, test = "Chi") 278s + mB1 <- clm(SURENESS ~ PROD + GENDER + SOUPTYPE, 278s + scale = ~ COLD, data = soup, link = "probit") 278s + dropterm(mB1, test = "Chi") # or 278s + 278s + ## addterm 278s + addterm(mB1, scope = ~.^2, test = "Chi") 278s + ## addterm(mB1, scope = ~ . + AGEGROUP + SOUPFREQ, 278s + ## test = "Chi", which = "location") 278s + ## addterm(mB1, scope = ~ . + GENDER + SOUPTYPE, 278s + ## test = "Chi", which = "scale") 278s + 278s + ## Fit model from polr example: 278s + ## data(housing, package = "MASS") 278s + 278s + fm1 <- clm(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) 278s + ## addterm(fm1, ~ Infl + Type + Cont, test= "Chisq", which = "scale") 278s + dropterm(fm1, test = "Chisq") 278s + fm2 <- update(fm1, scale =~ Cont) 278s + fm3 <- update(fm1, formula =~.-Cont, nominal =~ Cont) 278s + anova(fm1, fm2, fm3) 278s + } 278s Loading required package: MASS 279s Likelihood ratio tests of cumulative link models: 279s 279s formula: nominal: scale: link: threshold: 279s fm1 Sat ~ Infl + Type + Cont ~1 ~1 logit flexible 279s fm2 Sat ~ Infl + Type + Cont ~1 ~Cont logit flexible 279s fm3 Sat ~ Infl + Type ~Cont ~1 logit flexible 279s 279s no.par AIC logLik LR.stat df Pr(>Chisq) 279s fm1 8 3495.1 -1739.6 279s fm2 9 3491.5 -1736.7 5.6559 1 0.0174 * 279s fm3 9 3494.7 -1738.4 -3.2113 0 279s --- 279s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 279s > 279s > 279s BEGIN TEST testCLM.R 279s 279s R version 4.4.3 (2025-02-28) -- "Trophy Case" 279s Copyright (C) 2025 The R Foundation for Statistical Computing 279s Platform: s390x-ibm-linux-gnu 279s 279s R is free software and comes with ABSOLUTELY NO WARRANTY. 279s You are welcome to redistribute it under certain conditions. 279s Type 'license()' or 'licence()' for distribution details. 279s 279s R is a collaborative project with many contributors. 279s Type 'contributors()' for more information and 279s 'citation()' on how to cite R or R packages in publications. 279s 279s Type 'demo()' for some demos, 'help()' for on-line help, or 279s 'help.start()' for an HTML browser interface to help. 279s Type 'q()' to quit R. 279s 279s > library(ordinal) 279s > options(contrasts = c("contr.treatment", "contr.poly")) 279s > ## library(devtools) 279s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 279s > ## clean_dll(pkg = r2path) 279s > ## load_all(r2path) 280s > 280s > ## More manageable data set: 280s > data(soup, package="ordinal") 280s > (tab26 <- with(soup, table("Product" = PROD, "Response" = SURENESS))) 280s Response 280s Product 1 2 3 4 5 6 280s Ref 132 161 65 41 121 219 280s Test 96 99 50 57 156 650 280s > dimnames(tab26)[[2]] <- c("Sure", "Not Sure", "Guess", "Guess", "Not Sure", "Sure") 280s > dat26 <- expand.grid(sureness = as.factor(1:6), prod = c("Ref", "Test")) 280s > dat26$wghts <- c(t(tab26)) 280s > m1 <- clm(sureness ~ prod, scale = ~prod, data = dat26, 280s + weights = wghts, link = "logit") 280s > ## print, summary, vcov, logLik, AIC: 280s > m1 280s formula: sureness ~ prod 280s scale: ~prod 280s data: dat26 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 280s 280s Coefficients: 280s prodTest 280s 1.296 280s 280s log-scale coefficients: 280s prodTest 280s 0.148 280s 280s Threshold coefficients: 280s 1|2 2|3 3|4 4|5 5|6 280s -1.4913 -0.4522 -0.1072 0.1634 0.8829 280s > summary(m1) 280s formula: sureness ~ prod 280s scale: ~prod 280s data: dat26 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s prodTest 1.296 0.119 10.89 <2e-16 *** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s prodTest 0.1480 0.0651 2.273 0.023 * 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.49126 0.09215 -16.183 280s 2|3 -0.45218 0.07182 -6.296 280s 3|4 -0.10721 0.06995 -1.533 280s 4|5 0.16337 0.07025 2.325 280s 5|6 0.88291 0.07957 11.096 280s > vcov(m1) 280s 1|2 2|3 3|4 4|5 5|6 280s 1|2 0.0084917417 0.0046258673 0.0038492096 0.003316006 0.002036170 280s 2|3 0.0046258673 0.0051586967 0.0044974099 0.004099300 0.003352323 280s 3|4 0.0038492096 0.0044974099 0.0048935739 0.004528181 0.003948048 280s 4|5 0.0033160059 0.0040993002 0.0045281811 0.004935721 0.004489054 280s 5|6 0.0020361699 0.0033523229 0.0039480481 0.004489054 0.006331523 280s prodTest 0.0009111749 0.0031074167 0.0039832831 0.004738959 0.007064828 280s prodTest -0.0024312129 -0.0007825923 -0.0001820514 0.000338977 0.001989991 280s prodTest prodTest 280s 1|2 0.0009111749 -0.0024312129 280s 2|3 0.0031074167 -0.0007825923 280s 3|4 0.0039832831 -0.0001820514 280s 4|5 0.0047389591 0.0003389770 280s 5|6 0.0070648284 0.0019899912 280s prodTest 0.0141687135 0.0045752922 280s prodTest 0.0045752922 0.0042385585 280s > 280s > logLik(m1) 280s 'log Lik.' -2687.745 (df=7) 280s > ll.m1 <- structure(-2687.74456343981, df = 7L, nobs = 1847, 280s + class = "logLik") 280s > stopifnot(all.equal(logLik(m1), ll.m1)) 280s > 280s > AIC(m1) 280s [1] 5389.489 280s > 280s > coef(m1) 280s 1|2 2|3 3|4 4|5 5|6 prodTest prodTest 280s -1.4912570 -0.4521846 -0.1072083 0.1633653 0.8829135 1.2958776 0.1479862 280s > cm1 <- c(-1.49125702755587, -0.45218462707814, -0.107208315524318, 0.163365282774162, 280s + 0.88291347877514, 1.29587762626394, 0.147986162902775) 280s > stopifnot(all.equal(as.vector(coef(m1)), cm1)) 280s > 280s > coef(summary(m1)) 280s Estimate Std. Error z value Pr(>|z|) 280s 1|2 -1.4912570 0.09215065 -16.182817 6.667319e-59 280s 2|3 -0.4521846 0.07182407 -6.295726 3.059652e-10 280s 3|4 -0.1072083 0.06995408 -1.532553 1.253861e-01 280s 4|5 0.1633653 0.07025469 2.325329 2.005437e-02 280s 5|6 0.8829135 0.07957087 11.095938 1.312749e-28 280s prodTest 1.2958776 0.11903241 10.886763 1.332938e-27 280s prodTest 0.1479862 0.06510421 2.273066 2.302222e-02 280s > csm1 <- structure(c(-1.49125702755587, -0.45218462707814, -0.107208315524318, 280s + 0.163365282774162, 0.88291347877514, 1.29587762626394, 0.147986162902775, 280s + 0.0921506468161812, 0.0718240681909781, 0.069954084652323, 0.0702546879687391, 280s + 0.0795708692869622, 0.119032405993894, 0.065104213008022, -16.1828167145758, 280s + -6.2957256316336, -1.53255261729392, 2.32532927691394, 11.0959385851501, 280s + 10.8867632762999, 2.27306584421104, 6.66732036748908e-59, 3.05965144996025e-10, 280s + 0.125386123756898, 0.0200543599621069, 1.31274723412040e-28, 280s + 1.33293711602276e-27, 0.0230222123418036), .Dim = c(7L, 4L), .Dimnames = list( 280s + c("1|2", "2|3", "3|4", "4|5", "5|6", "prodTest", "prodTest" 280s + ), c("Estimate", "Std. Error", "z value", "Pr(>|z|)"))) 280s > stopifnot(all.equal(coef(summary(m1)), csm1)) 280s > 280s > ## link functions: 280s > m2 <- update(m1, link = "probit") 280s > m3 <- update(m1, link = "cloglog") 280s > 280s > m4 <- update(m1, link = "loglog") 280s > m5 <- update(m1, link = "cauchit", start = coef(m1)) 280s > ## m6 <- update(m1, link = "Aranda-Ordaz", lambda = 1) 280s > ## m7 <- update(m1, link = "Aranda-Ordaz") 280s > ## m8 <- update(m1, link = "log-gamma", lambda = 1) 280s > ## m9 <- update(m1, link = "log-gamma") 280s > ## nominal effects: 280s > mN1 <- clm(sureness ~ 1, nominal = ~ prod, data = dat26, 280s + weights = wghts) 280s > anova(m1, mN1) 280s Likelihood ratio tests of cumulative link models: 280s 280s formula: nominal: scale: link: threshold: 280s m1 sureness ~ prod ~1 ~prod logit flexible 280s mN1 sureness ~ 1 ~prod ~1 logit flexible 280s 280s no.par AIC logLik LR.stat df Pr(>Chisq) 280s m1 7 5389.5 -2687.7 280s mN1 10 5390.1 -2685.1 5.3755 3 0.1463 280s > ## optimizer / method: 280s > update(m1, scale = ~ 1, method = "Newton") 280s formula: sureness ~ prod 280s scale: ~1 280s data: dat26 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1847 -2690.33 5392.66 6(1) 3.21e-12 1.1e+02 280s 280s Coefficients: 280s prodTest 280s 1.144 280s 280s Threshold coefficients: 280s 1|2 2|3 3|4 4|5 5|6 280s -1.4050 -0.4247 -0.1013 0.1508 0.8126 280s > update(m1, scale = ~ 1, method = "ucminf") 280s formula: sureness ~ prod 280s scale: ~1 280s data: dat26 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1847 -2690.33 5392.66 19(0) 1.26e-08 1.1e+02 280s 280s Coefficients: 280s prodTest 280s 1.144 280s 280s Threshold coefficients: 280s 1|2 2|3 3|4 4|5 5|6 280s -1.4050 -0.4247 -0.1013 0.1508 0.8126 280s > update(m1, scale = ~ 1, method = "nlminb") 280s formula: sureness ~ prod 280s scale: ~1 280s data: dat26 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1847 -2690.33 5392.66 56(43) 4.13e-03 1.1e+02 280s 280s Coefficients: 280s prodTest 280s 1.144 280s 280s Threshold coefficients: 280s 1|2 2|3 3|4 4|5 5|6 280s -1.4050 -0.4247 -0.1013 0.1508 0.8126 280s > update(m1, scale = ~ 1, method = "optim") 280s formula: sureness ~ prod 280s scale: ~1 280s data: dat26 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1847 -2690.33 5392.66 44(12) 4.73e-03 1.1e+02 280s 280s Coefficients: 280s prodTest 280s 1.144 280s 280s Threshold coefficients: 280s 1|2 2|3 3|4 4|5 5|6 280s -1.4050 -0.4247 -0.1013 0.1508 0.8126 280s > update(m1, scale = ~ 1, method = "model.frame") 280s sureness prod (weights) 280s 1 1 Ref 132 280s 2 2 Ref 161 280s 3 3 Ref 65 280s 4 4 Ref 41 280s 5 5 Ref 121 280s 6 6 Ref 219 280s 7 1 Test 96 280s 8 2 Test 99 280s 9 3 Test 50 280s 10 4 Test 57 280s 11 5 Test 156 280s 12 6 Test 650 280s > update(m1, ~.-prod, scale = ~ 1, 280s + nominal = ~ prod, method = "model.frame") 280s sureness prod (weights) 280s 1 1 Ref 132 280s 2 2 Ref 161 280s 3 3 Ref 65 280s 4 4 Ref 41 280s 5 5 Ref 121 280s 6 6 Ref 219 280s 7 1 Test 96 280s 8 2 Test 99 280s 9 3 Test 50 280s 10 4 Test 57 280s 11 5 Test 156 280s 12 6 Test 650 280s > ## threshold functions 280s > mT1 <- update(m1, threshold = "symmetric") 280s > mT2 <- update(m1, threshold = "equidistant") 280s > anova(m1, mT1, mT2) 280s Likelihood ratio tests of cumulative link models: 280s 280s formula: scale: link: threshold: 280s mT2 sureness ~ prod ~prod logit equidistant 280s mT1 sureness ~ prod ~prod logit symmetric 280s m1 sureness ~ prod ~prod logit flexible 280s 280s no.par AIC logLik LR.stat df Pr(>Chisq) 280s mT2 4 5585.6 -2788.8 280s mT1 5 5407.8 -2698.9 179.806 1 < 2.2e-16 *** 280s m1 7 5389.5 -2687.7 22.271 2 1.459e-05 *** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s > 280s > ## Extend example from polr in package MASS: 280s > ## Fit model from polr example: 280s > if(require(MASS)) { 280s + fm1 <- clm(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) 280s + fm1 280s + summary(fm1) 280s + ## With probit link: 280s + summary(update(fm1, link = "probit")) 280s + ## Allow scale to depend on Cont-variable 280s + summary(fm2 <- update(fm1, scale =~ Cont)) 280s + summary(fm3 <- update(fm1, location =~.-Cont, nominal =~ Cont)) 280s + summary(fm4 <- update(fm2, location =~.-Cont, nominal =~ Cont)) 280s + anova(fm1, fm2, fm3, fm4) 280s + ## which seems to improve the fit 280s + } 280s Warning message: 280s (-1) Model failed to converge with max|grad| = 0.00413248 (tol = 1e-06) 280s Warning message: 280s (-1) Model failed to converge with max|grad| = 0.00472568 (tol = 1e-06) 280s Loading required package: MASS 280s Likelihood ratio tests of cumulative link models: 280s 280s formula: nominal: scale: link: threshold: 280s fm1 Sat ~ Infl + Type + Cont ~1 ~1 logit flexible 280s fm2 Sat ~ Infl + Type + Cont ~1 ~Cont logit flexible 280s fm3 Sat ~ Infl + Type + Cont ~Cont Warning message: 280s (1) Hessian is numerically singular: parameters are not uniquely determined 280s In addition: Absolute convergence criterion was met, but relative criterion was not met 280s Warning message: 280s In summary.clm(fm1, corr = 1) : Correlation matrix is unavailable 280s ~1 logit flexible 280s fm4 Sat ~ Infl + Type + Cont ~Cont ~Cont logit flexible 280s 280s no.par AIC logLik LR.stat df Pr(>Chisq) 280s fm1 8 3495.1 -1739.6 280s fm2 9 3491.5 -1736.7 5.6559 1 0.01740 * 280s fm3 9 3494.7 -1738.4 -3.2113 0 280s fm4 10 3492.5 -1736.2 4.2190 1 0.03997 * 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s > 280s > ################################# 280s > ## Better handling of ill-defined variance-covariance matrix of the 280s > ## parameters in summary methods for clm and clmm objects: 280s > dat26.2 <- data.frame(sureness = as.factor(1:12), 280s + prod = rep(c("One", "Two", "Three"),each=4)) 280s > fm1 <- clm(sureness ~ prod, ~prod, data = dat26.2) 280s > fm1 280s formula: sureness ~ prod 280s scale: ~prod 280s data: dat26.2 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 12 -16.64 63.27 33(14) 6.18e-07 2.0e+12 280s 280s Coefficients: 280s prodThree prodTwo 280s 90.72 46.65 280s 280s log-scale coefficients: 280s prodThree prodTwo 280s -0.11719 -0.09167 280s 280s Threshold coefficients: 280s 1|2 2|3 3|4 4|5 5|6 6|7 7|8 280s -1.099e+00 8.725e-16 1.099e+00 2.441e+01 4.564e+01 4.665e+01 4.765e+01 280s 8|9 9|10 10|11 11|12 280s 6.888e+01 8.975e+01 9.072e+01 9.170e+01 280s > summary(fm1) 280s formula: sureness ~ prod 280s scale: ~prod 280s data: dat26.2 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 12 -16.64 63.27 33(14) 6.18e-07 2.0e+12 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s prodThree 90.72 NA NA NA 280s prodTwo 46.65 NA NA NA 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s prodThree -0.11719 NA NA NA 280s prodTwo -0.09167 NA NA NA 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.099e+00 NA NA 280s 2|3 8.725e-16 NA NA 280s 3|4 1.099e+00 NA NA 280s 4|5 2.441e+01 NA NA 280s 5|6 4.564e+01 NA NA 280s 6|7 4.665e+01 NA NA 280s 7|8 4.765e+01 NA NA 280s 8|9 6.888e+01 NA NA 280s 9|10 8.975e+01 NA NA 280s 10|11 9.072e+01 NA NA 280s 11|12 9.170e+01 NA NA 280s > summary(fm1, corr = 1) 280s formula: sureness ~ prod 280s scale: ~prod 280s data: dat26.2 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 12 -16.64 63.27 33(14) 6.18e-07 2.0e+12 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s prodThree 90.72 NA NA NA 280s prodTwo 46.65 NA NA NA 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s prodThree -0.11719 NA NA NA 280s prodTwo -0.09167 NA NA NA 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.099e+00 NA NA 280s 2|3 8.725e-16 NA NA 280s 3|4 1.099e+00 NA NA 280s 4|5 2.441e+01 NA NA 280s 5|6 4.564e+01 NA NA 280s 6|7 4.665e+01 NA NA 280s 7|8 4.765e+01 NA NA 280s 8|9 6.888e+01 NA NA 280s 9|10 8.975e+01 NA NA 280s 10|11 9.072e+01 NA NA 280s 11|12 9.170e+01 NA NA 280s > ## fm1$Hessian 280s > ## sl1 <- slice(fm1, 13) 280s > ## fitted(fm1) 280s > ## convergence(fm1) 280s > ## eigen(fm1$Hessian)$values 280s > ## sqrt(diag(solve(fm1$Hessian))) 280s > ## sqrt(diag(ginv(fm1$Hessian))) 280s > 280s > ################################# 280s > ## Missing values: 280s > ## Bug-report from Jonathan Williams 280s > ## , 18 March 2010 12:42 280s > data(soup, package = "ordinal") 280s > soup$SURENESS[10] <- NA 280s > c1a <- clm(ordered(SURENESS)~PROD, data=soup); summary(c1a) 280s formula: ordered(SURENESS) ~ PROD 280s data: soup 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1846 -2688.71 5389.43 6(1) 2.87e-12 1.1e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 1.14251 0.08931 12.79 <2e-16 *** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.40460 0.08174 -17.184 280s 2|3 -0.42733 0.06965 -6.135 280s 3|4 -0.10357 0.06884 -1.505 280s 4|5 0.14862 0.06898 2.155 280s 5|6 0.81063 0.07185 11.282 280s (1 observation deleted due to missingness) 280s > c2a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup) 280s > summary(c2a) 280s formula: ordered(SURENESS) ~ PROD 280s scale: ~PROD 280s data: soup 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1846 -2686.16 5386.32 8(1) 4.81e-07 1.0e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 1.293 0.119 10.87 <2e-16 *** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 0.14711 0.06514 2.258 0.0239 * 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.49041 0.09219 -16.166 280s 2|3 -0.45478 0.07189 -6.326 280s 3|4 -0.10961 0.07000 -1.566 280s 4|5 0.16104 0.07029 2.291 280s 5|6 0.88052 0.07959 11.064 280s (1 observation deleted due to missingness) 280s > c3a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup) 280s > summary(c3a) 280s formula: ordered(SURENESS) ~ 1 280s scale: ~PROD 280s data: soup 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1846 -2769.95 5551.91 10(1) 9.20e-13 6.9e+01 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest -0.15478 0.06683 -2.316 0.0206 * 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.85565 0.08111 -22.878 280s 2|3 -0.98626 0.05260 -18.752 280s 3|4 -0.70743 0.04676 -15.129 280s 4|5 -0.49243 0.04393 -11.208 280s 5|6 0.06504 0.04653 1.398 280s (1 observation deleted due to missingness) 280s > data(soup, package = "ordinal") 280s > soup$PROD[1] <- NA 280s > c1a <- clm(ordered(SURENESS)~PROD, data=soup) 280s > summary(c1a) 280s formula: ordered(SURENESS) ~ PROD 280s data: soup 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1846 -2689.15 5390.30 6(1) 2.85e-12 1.1e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 1.14774 0.08932 12.85 <2e-16 *** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.40278 0.08171 -17.167 280s 2|3 -0.42216 0.06962 -6.064 280s 3|4 -0.09849 0.06882 -1.431 280s 4|5 0.15373 0.06898 2.229 280s 5|6 0.81613 0.07188 11.353 280s (1 observation deleted due to missingness) 280s > c2a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup) 280s > summary(c2a) 280s formula: ordered(SURENESS) ~ PROD 280s scale: ~PROD 280s data: soup 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1846 -2686.51 5387.03 8(1) 5.41e-07 1.0e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 1.3009 0.1192 10.91 <2e-16 *** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 0.1494 0.0651 2.295 0.0217 * 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.48982 0.09217 -16.163 280s 2|3 -0.44981 0.07186 -6.260 280s 3|4 -0.10441 0.07000 -1.492 280s 4|5 0.16655 0.07031 2.369 280s 5|6 0.88740 0.07969 11.136 280s (1 observation deleted due to missingness) 280s > c3a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup) 280s > summary(c3a) 280s formula: ordered(SURENESS) ~ 1 280s scale: ~PROD 280s data: soup 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1846 -2771.22 5554.43 10(1) 7.39e-13 6.9e+01 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest -0.15330 0.06689 -2.292 0.0219 * 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.85700 0.08108 -22.903 280s 2|3 -0.98437 0.05252 -18.742 280s 3|4 -0.70562 0.04673 -15.100 280s 4|5 -0.49061 0.04395 -11.163 280s 5|6 0.06723 0.04667 1.441 280s (1 observation deleted due to missingness) 280s > soup$SURENESS[10] <- NA 280s > c1a <- clm(ordered(SURENESS)~PROD, data=soup) 280s > summary(c1a) 280s formula: ordered(SURENESS) ~ PROD 280s data: soup 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1845 -2687.53 5387.07 6(1) 2.82e-12 1.1e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 1.14581 0.08934 12.82 <2e-16 *** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.40237 0.08175 -17.155 280s 2|3 -0.42475 0.06968 -6.096 280s 3|4 -0.10080 0.06887 -1.464 280s 4|5 0.15158 0.06902 2.196 280s 5|6 0.81421 0.07191 11.322 280s (2 observations deleted due to missingness) 280s > c2a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup) 280s > summary(c2a) 280s formula: ordered(SURENESS) ~ PROD 280s scale: ~PROD 280s data: soup 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1845 -2684.93 5383.86 8(1) 5.12e-07 1.0e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 1.2979 0.1192 10.89 <2e-16 *** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 0.14853 0.06514 2.28 0.0226 * 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.48896 0.09222 -16.147 280s 2|3 -0.45241 0.07192 -6.290 280s 3|4 -0.10681 0.07004 -1.525 280s 4|5 0.16422 0.07034 2.335 280s 5|6 0.88500 0.07970 11.104 280s (2 observations deleted due to missingness) 280s > c3a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup) 280s > summary(c3a) 280s formula: ordered(SURENESS) ~ 1 280s scale: ~PROD 280s data: soup 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1845 -2769.23 5550.46 10(1) 1.07e-12 6.9e+01 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest -0.15410 0.06688 -2.304 0.0212 * 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.85563 0.08111 -22.877 280s 2|3 -0.98586 0.05259 -18.745 280s 3|4 -0.70689 0.04676 -15.116 280s 4|5 -0.49176 0.04395 -11.188 280s 5|6 0.06616 0.04661 1.419 280s (2 observations deleted due to missingness) 280s > 280s > ## na.actions: 280s > c4a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 280s + na.action=na.omit) 280s > summary(c4a) 280s formula: ordered(SURENESS) ~ PROD 280s scale: ~PROD 280s data: soup 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1845 -2684.93 5383.86 8(1) 5.12e-07 1.0e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 1.2979 0.1192 10.89 <2e-16 *** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 0.14853 0.06514 2.28 0.0226 * 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.48896 0.09222 -16.147 280s 2|3 -0.45241 0.07192 -6.290 280s 3|4 -0.10681 0.07004 -1.525 280s 4|5 0.16422 0.07034 2.335 280s 5|6 0.88500 0.07970 11.104 280s (2 observations deleted due to missingness) 280s > 280s > tC1 <- try(clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 280s + na.action=na.fail), silent = TRUE) 280s > stopifnot(inherits(tC1, "try-error")) 280s > 280s > c4a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 280s + na.action=na.exclude) 280s > summary(c4a) 280s formula: ordered(SURENESS) ~ PROD 280s scale: ~PROD 280s data: soup 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1845 -2684.93 5383.86 8(1) 5.12e-07 1.0e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 1.2979 0.1192 10.89 <2e-16 *** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 0.14853 0.06514 2.28 0.0226 * 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.48896 0.09222 -16.147 280s 2|3 -0.45241 0.07192 -6.290 280s 3|4 -0.10681 0.07004 -1.525 280s 4|5 0.16422 0.07034 2.335 280s 5|6 0.88500 0.07970 11.104 280s (2 observations deleted due to missingness) 280s > 280s > tC2 <- try(clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 280s + na.action=na.pass), silent = TRUE) 280s > stopifnot(inherits(tC2, "try-error")) 280s > 280s > ## Subset: 280s > data(soup, package="ordinal") 280s > c4a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 280s + subset = 1:100) 280s > c4a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup, 280s + subset = 1:100) 280s > c4a <- clm(ordered(SURENESS)~PROD, data=soup, 280s + subset = 1:100) 280s > c4a <- clm(ordered(SURENESS)~1, data=soup, 280s + subset = 1:100) 280s > 280s > ## Offset: 280s > data(soup, package = "ordinal") 280s > set.seed(290980) 280s > offs <- runif(nrow(soup)) 280s > c4a <- clm(ordered(SURENESS)~PROD + offset(offs), 280s + scale = ~PROD, data=soup, subset = 1:100) 280s > summary(c4a) 280s formula: ordered(SURENESS) ~ PROD + offset(offs) 280s scale: ~PROD 280s data: soup 280s subset: 1:100 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 100 -139.58 293.17 9(2) 1.41e-07 2.0e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 2.4410 0.7091 3.443 0.000576 *** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 0.5105 0.2671 1.911 0.056 . 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.0470 0.4019 -2.605 280s 2|3 0.4213 0.3106 1.356 280s 3|4 0.5488 0.3106 1.767 280s 4|5 0.9217 0.3162 2.915 280s 5|6 2.0775 0.4062 5.114 280s > 280s > c4a <- clm(ordered(SURENESS)~PROD + offset(offs), 280s + scale = ~PROD + offset(offs), data=soup, subset = 1:100) 280s > summary(c4a) 280s formula: ordered(SURENESS) ~ PROD + offset(offs) 280s scale: ~PROD + offset(offs) 280s data: soup 280s subset: 1:100 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 100 -143.12 300.24 9(2) 5.32e-09 1.9e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 3.344 1.020 3.277 0.00105 ** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 0.4412 0.2753 1.603 0.109 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -2.09797 0.62565 -3.353 280s 2|3 0.06671 0.46874 0.142 280s 3|4 0.25559 0.46525 0.549 280s 4|5 0.80178 0.46743 1.715 280s 5|6 2.46041 0.59193 4.157 280s > 280s > off2 <- offs 280s > c4a <- clm(ordered(SURENESS)~PROD + offset(offs), 280s + scale = ~PROD + offset(off2), data=soup, subset = 1:100) 280s > summary(c4a) 280s formula: ordered(SURENESS) ~ PROD + offset(offs) 280s scale: ~PROD + offset(off2) 280s data: soup 280s subset: 1:100 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 100 -143.12 300.24 9(2) 5.32e-09 1.9e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 3.344 1.020 3.277 0.00105 ** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 0.4412 0.2753 1.603 0.109 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -2.09797 0.62565 -3.353 280s 2|3 0.06671 0.46874 0.142 280s 3|4 0.25559 0.46525 0.549 280s 4|5 0.80178 0.46743 1.715 280s 5|6 2.46041 0.59193 4.157 280s > 280s > c4a <- clm(ordered(SURENESS)~PROD, 280s + scale = ~PROD + offset(offs), data=soup, subset = 1:100) 280s > summary(c4a) 280s formula: ordered(SURENESS) ~ PROD 280s scale: ~PROD + offset(offs) 280s data: soup 280s subset: 1:100 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 100 -142.15 298.31 10(2) 7.69e-10 1.8e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 3.283 1.016 3.231 0.00123 ** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 0.4263 0.2801 1.522 0.128 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -2.4698 0.6308 -3.915 280s 2|3 -0.2916 0.4668 -0.625 280s 3|4 -0.1005 0.4628 -0.217 280s 4|5 0.4484 0.4638 0.967 280s 5|6 2.1036 0.5864 3.587 280s > 280s > ## data as matrix: 280s > dat26M <- as.matrix(dat26) 280s > m1 <- clm(sureness ~ prod, scale = ~prod, data = dat26, 280s + weights = wghts, link = "logit") 280s > summary(m1) 280s formula: sureness ~ prod 280s scale: ~prod 280s data: dat26 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s prodTest 1.296 0.119 10.89 <2e-16 *** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s prodTest 0.1480 0.0651 2.273 0.023 * 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.49126 0.09215 -16.183 280s 2|3 -0.45218 0.07182 -6.296 280s 3|4 -0.10721 0.06995 -1.533 280s 4|5 0.16337 0.07025 2.325 280s 5|6 0.88291 0.07957 11.096 280s > 280s > ## data in enclosing environment: 280s > attach(soup) 280s > m1 <- clm(SURENESS ~ PROD, scale = ~PROD) 280s > summary(m1) 280s formula: SURENESS ~ PROD 280s scale: ~PROD 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 1.296 0.119 10.89 <2e-16 *** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s PRODTest 0.1480 0.0651 2.273 0.023 * 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -1.49126 0.09215 -16.183 280s 2|3 -0.45218 0.07182 -6.296 280s 3|4 -0.10721 0.06995 -1.533 280s 4|5 0.16337 0.07025 2.325 280s 5|6 0.88291 0.07957 11.096 280s > detach(soup) 280s > 280s > ################################################################## 280s > ### Parameter estimates were not correct with large scale effects due 280s > ### to end cut-points being \pm 100. This is not enough for 280s > ### location-scale model, but seems to be for location only models. 280s > ### Bug report from Ioannis Kosmidis : 280s > 280s > ### A 2x3 contigency table that will give a large estimated value of 280s > ### zeta 280s > x <- rep(0:1, each = 3) 280s > response <- factor(rep(c(1, 2, 3), times = 2)) 280s > freq <- c(1, 11, 1, 13, 1, 14) 280s > totals <- rep(tapply(freq, x, sum), each = 3) 280s > Dat <- data.frame(response, x, freq) 280s > 280s > ### Fitting a cumulative link model with dispersion effects 280s > modClm <- clm(response ~ x, scale = ~ x, weights = freq, data = Dat, 280s + control = clm.control(grtol = 1e-10, convTol = 1e-10)) 280s > summary(modClm) 280s formula: response ~ x 280s scale: ~x 280s data: Dat 280s 280s link threshold nobs logLik AIC niter max.grad cond.H 280s logit flexible 41 -29.98 67.96 10(3) 9.23e-10 2.4e+02 280s 280s Coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s x 2.485 13.168 0.189 0.85 280s 280s log-scale coefficients: 280s Estimate Std. Error z value Pr(>|z|) 280s x 3.548 1.023 3.468 0.000524 *** 280s --- 280s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 280s 280s Threshold coefficients: 280s Estimate Std. Error z value 280s 1|2 -2.485 1.041 -2.387 280s 2|3 2.485 1.041 2.387 280s > ### The maximized log-likelihood for this saturated model should be 280s > sum(freq*log(freq/totals)) 280s [1] -29.97808 280s > # > sum(freq*log(freq/totals)) 280s > # [1] -29.97808 280s > ### but apparently clm fails to maximixe the log-likelihood 280s > modClm$logLik 280s [1] -29.97808 280s > # > modClm$logLik 280s > # [1] -30.44452 280s > stopifnot(isTRUE(all.equal(sum(freq*log(freq/totals)), modClm$logLik))) 280s > 280s > ### The estimates reported by clm are 280s > coef(modClm) 280s 1|2 2|3 x x 280s -2.484907 2.484907 2.484907 3.547588 280s > coef.res <- structure(c(-2.48490664104217, 2.48490665578163, 280s + 2.48490659188594, 280s + 3.54758796387530), .Names = c("1|2", "2|3", 280s + "x", "x")) 280s > stopifnot(isTRUE(all.equal(coef.res, coef(modClm)))) 280s > # > modClm$coefficients 280s > # 1|2 2|3 x x 280s > # -2.297718 2.297038 1.239023 2.834285 280s > ### while they should be (from my own software) 280s > # 1|2 2|3 x disp.x 280s > #-2.484907 2.484907 2.484907 3.547588 280s > convergence(modClm) 280s nobs logLik niter max.grad cond.H logLik.Error 280s 41 -29.98 10(3) 9.23e-10 2.4e+02 <1e-10 280s 280s Estimate Std.Err Gradient Error Cor.Dec Sig.Dig 280s 1|2 -2.485 1.041 3.50e-10 5.32e-10 8 9 280s 2|3 2.485 1.041 -1.60e-10 -5.32e-10 8 9 280s x 2.485 13.168 -1.90e-10 -3.54e-08 7 8 280s x 3.548 1.023 -9.23e-10 -1.55e-09 8 9 280s 280s Eigen values of Hessian: 280s 1.374792 0.855786 0.785151 0.005766 280s 280s Convergence message from clm: 280s (0) successful convergence 280s In addition: Absolute and relative convergence criteria were met 280s 280s > 280s > ################################################################## 280s > 280s autopkgtest [18:19:15]: test run-unit-test: -----------------------] 281s run-unit-test PASS 281s autopkgtest [18:19:16]: test run-unit-test: - - - - - - - - - - results - - - - - - - - - - 281s autopkgtest [18:19:16]: test pkg-r-autopkgtest: preparing testbed 415s autopkgtest [18:21:30]: testbed dpkg architecture: s390x 415s autopkgtest [18:21:30]: testbed apt version: 2.9.33 416s autopkgtest [18:21:31]: @@@@@@@@@@@@@@@@@@@@ test bed setup 416s autopkgtest [18:21:31]: testbed release detected to be: plucky 416s autopkgtest [18:21:31]: updating testbed package index (apt update) 417s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [126 kB] 417s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 417s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 417s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 417s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [99.7 kB] 417s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.8 kB] 417s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [379 kB] 417s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x Packages [113 kB] 417s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x c-n-f Metadata [1824 B] 417s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted s390x c-n-f Metadata [116 B] 417s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe s390x Packages [320 kB] 418s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/universe s390x c-n-f Metadata [13.4 kB] 418s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse s390x Packages [3776 B] 418s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse s390x c-n-f Metadata [240 B] 418s Fetched 1073 kB in 1s (1095 kB/s) 418s Reading package lists... 419s Reading package lists... 419s Building dependency tree... 419s Reading state information... 419s Calculating upgrade... 419s Calculating upgrade... 419s The following packages were automatically installed and are no longer required: 419s libnsl2 libpython3.12-minimal libpython3.12-stdlib libpython3.12t64 419s linux-headers-6.11.0-8 linux-headers-6.11.0-8-generic 419s linux-modules-6.11.0-8-generic linux-tools-6.11.0-8 419s linux-tools-6.11.0-8-generic 419s Use 'sudo apt autoremove' to remove them. 419s The following packages will be upgraded: 419s pinentry-curses python3-jinja2 strace 420s 3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 420s Need to get 652 kB of archives. 420s After this operation, 27.6 kB of additional disk space will be used. 420s Get:1 http://ftpmaster.internal/ubuntu plucky/main s390x strace s390x 6.13+ds-1ubuntu1 [500 kB] 420s Get:2 http://ftpmaster.internal/ubuntu plucky/main s390x pinentry-curses s390x 1.3.1-2ubuntu3 [42.9 kB] 420s Get:3 http://ftpmaster.internal/ubuntu plucky/main s390x python3-jinja2 all 3.1.5-2ubuntu1 [109 kB] 420s Fetched 652 kB in 1s (1071 kB/s) 420s (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 ... 81428 files and directories currently installed.) 420s Preparing to unpack .../strace_6.13+ds-1ubuntu1_s390x.deb ... 420s Unpacking strace (6.13+ds-1ubuntu1) over (6.11-0ubuntu1) ... 420s Preparing to unpack .../pinentry-curses_1.3.1-2ubuntu3_s390x.deb ... 420s Unpacking pinentry-curses (1.3.1-2ubuntu3) over (1.3.1-2ubuntu2) ... 420s Preparing to unpack .../python3-jinja2_3.1.5-2ubuntu1_all.deb ... 420s Unpacking python3-jinja2 (3.1.5-2ubuntu1) over (3.1.5-2) ... 420s Setting up pinentry-curses (1.3.1-2ubuntu3) ... 420s Setting up python3-jinja2 (3.1.5-2ubuntu1) ... 421s Setting up strace (6.13+ds-1ubuntu1) ... 421s Processing triggers for man-db (2.13.0-1) ... 421s Reading package lists... 421s Building dependency tree... 421s Reading state information... 421s Solving dependencies... 421s The following packages will be REMOVED: 421s libnsl2* libpython3.12-minimal* libpython3.12-stdlib* libpython3.12t64* 421s linux-headers-6.11.0-8* linux-headers-6.11.0-8-generic* 421s linux-modules-6.11.0-8-generic* linux-tools-6.11.0-8* 421s linux-tools-6.11.0-8-generic* 422s 0 upgraded, 0 newly installed, 9 to remove and 5 not upgraded. 422s After this operation, 167 MB disk space will be freed. 422s (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 ... 81428 files and directories currently installed.) 422s Removing linux-tools-6.11.0-8-generic (6.11.0-8.8) ... 422s Removing linux-tools-6.11.0-8 (6.11.0-8.8) ... 422s Removing libpython3.12t64:s390x (3.12.9-1) ... 422s Removing libpython3.12-stdlib:s390x (3.12.9-1) ... 422s Removing libnsl2:s390x (1.3.0-3build3) ... 422s Removing libpython3.12-minimal:s390x (3.12.9-1) ... 422s Removing linux-headers-6.11.0-8-generic (6.11.0-8.8) ... 422s Removing linux-headers-6.11.0-8 (6.11.0-8.8) ... 423s Removing linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 423s Processing triggers for libc-bin (2.41-1ubuntu1) ... 423s (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 ... 56328 files and directories currently installed.) 423s Purging configuration files for libpython3.12-minimal:s390x (3.12.9-1) ... 423s Purging configuration files for linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 423s autopkgtest [18:21:38]: upgrading testbed (apt dist-upgrade and autopurge) 423s Reading package lists... 423s Building dependency tree... 423s Reading state information... 423s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 423s Starting 2 pkgProblemResolver with broken count: 0 423s Done 424s Entering ResolveByKeep 424s 424s Calculating upgrade... 424s The following packages will be upgraded: 424s libc-bin libc-dev-bin libc6 libc6-dev locales 424s 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 424s Need to get 9512 kB of archives. 424s After this operation, 8192 B of additional disk space will be used. 424s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc6-dev s390x 2.41-1ubuntu2 [1678 kB] 425s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc-dev-bin s390x 2.41-1ubuntu2 [24.3 kB] 425s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc6 s390x 2.41-1ubuntu2 [2892 kB] 426s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc-bin s390x 2.41-1ubuntu2 [671 kB] 426s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x locales all 2.41-1ubuntu2 [4246 kB] 427s Preconfiguring packages ... 427s Fetched 9512 kB in 3s (3095 kB/s) 427s (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 ... 56326 files and directories currently installed.) 427s Preparing to unpack .../libc6-dev_2.41-1ubuntu2_s390x.deb ... 427s Unpacking libc6-dev:s390x (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 427s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu2_s390x.deb ... 427s Unpacking libc-dev-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 427s Preparing to unpack .../libc6_2.41-1ubuntu2_s390x.deb ... 427s Unpacking libc6:s390x (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 428s Setting up libc6:s390x (2.41-1ubuntu2) ... 428s (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 ... 56326 files and directories currently installed.) 428s Preparing to unpack .../libc-bin_2.41-1ubuntu2_s390x.deb ... 428s Unpacking libc-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 428s Setting up libc-bin (2.41-1ubuntu2) ... 428s (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 ... 56326 files and directories currently installed.) 428s Preparing to unpack .../locales_2.41-1ubuntu2_all.deb ... 428s Unpacking locales (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 428s Setting up locales (2.41-1ubuntu2) ... 428s Generating locales (this might take a while)... 429s en_US.UTF-8... done 429s Generation complete. 429s Setting up libc-dev-bin (2.41-1ubuntu2) ... 429s Setting up libc6-dev:s390x (2.41-1ubuntu2) ... 429s Processing triggers for man-db (2.13.0-1) ... 430s Processing triggers for systemd (257.3-1ubuntu3) ... 431s Reading package lists... 431s Building dependency tree... 431s Reading state information... 431s Starting pkgProblemResolver with broken count: 0 431s Starting 2 pkgProblemResolver with broken count: 0 431s Done 431s Solving dependencies... 431s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 431s autopkgtest [18:21:46]: rebooting testbed after setup commands that affected boot 454s Reading package lists... 454s Building dependency tree... 454s Reading state information... 454s Starting pkgProblemResolver with broken count: 0 454s Starting 2 pkgProblemResolver with broken count: 0 454s Done 454s The following NEW packages will be installed: 454s build-essential cpp cpp-14 cpp-14-s390x-linux-gnu cpp-s390x-linux-gnu 454s dctrl-tools fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-mono 454s g++ g++-14 g++-14-s390x-linux-gnu g++-s390x-linux-gnu gcc gcc-14 454s gcc-14-s390x-linux-gnu gcc-s390x-linux-gnu gfortran gfortran-14 454s gfortran-14-s390x-linux-gnu gfortran-s390x-linux-gnu icu-devtools libasan8 454s libblas-dev libblas3 libbz2-dev libcairo2 libcc1-0 libdatrie1 libdeflate-dev 454s libdeflate0 libfontconfig1 libfreetype6 libgcc-14-dev libgfortran-14-dev 454s libgfortran5 libgomp1 libgraphite2-3 libharfbuzz0b libice6 libicu-dev 454s libisl23 libitm1 libjbig0 libjpeg-dev libjpeg-turbo8 libjpeg-turbo8-dev 454s libjpeg8 libjpeg8-dev liblapack-dev liblapack3 liblzma-dev libmpc3 454s libncurses-dev libnlopt0 libpango-1.0-0 libpangocairo-1.0-0 454s libpangoft2-1.0-0 libpaper-utils libpaper2 libpcre2-16-0 libpcre2-32-0 454s libpcre2-dev libpcre2-posix3 libpixman-1-0 libpkgconf3 libpng-dev 454s libreadline-dev libsharpyuv0 libsm6 libstdc++-14-dev libtcl8.6 libthai-data 454s libthai0 libtiff6 libtirpc-dev libtk8.6 libubsan1 libwebp7 libxcb-render0 454s libxcb-shm0 libxft2 libxrender1 libxss1 libxt6t64 littler pkg-r-autopkgtest 454s pkgconf pkgconf-bin r-base-core r-base-dev r-cran-boot r-cran-brio 454s r-cran-callr r-cran-cli r-cran-crayon r-cran-desc r-cran-diffobj 454s r-cran-digest r-cran-evaluate r-cran-fs r-cran-glue r-cran-jsonlite 454s r-cran-lattice r-cran-lifecycle r-cran-littler r-cran-lme4 r-cran-magrittr 454s r-cran-mass r-cran-matrix r-cran-minqa r-cran-nlme r-cran-nloptr r-cran-nnet 454s r-cran-numderiv r-cran-ordinal r-cran-pkgbuild r-cran-pkgkitten 454s r-cran-pkgload r-cran-praise r-cran-processx r-cran-ps r-cran-r6 454s r-cran-rbibutils r-cran-rcpp r-cran-rcppeigen r-cran-rdpack 454s r-cran-reformulas r-cran-rlang r-cran-rprojroot r-cran-statmod 454s r-cran-testthat r-cran-ucminf r-cran-waldo r-cran-withr r-cran-xtable unzip 454s x11-common xdg-utils zip zlib1g-dev 454s 0 upgraded, 142 newly installed, 0 to remove and 0 not upgraded. 454s Need to get 155 MB of archives. 454s After this operation, 427 MB of additional disk space will be used. 454s Get:1 http://ftpmaster.internal/ubuntu plucky/main s390x libisl23 s390x 0.27-1 [704 kB] 455s Get:2 http://ftpmaster.internal/ubuntu plucky/main s390x libmpc3 s390x 1.3.1-1build2 [57.8 kB] 455s Get:3 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-14-s390x-linux-gnu s390x 14.2.0-17ubuntu3 [9572 kB] 457s Get:4 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-14 s390x 14.2.0-17ubuntu3 [1028 B] 457s Get:5 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [5556 B] 457s Get:6 http://ftpmaster.internal/ubuntu plucky/main s390x cpp s390x 4:14.2.0-1ubuntu1 [22.4 kB] 457s Get:7 http://ftpmaster.internal/ubuntu plucky/main s390x libcc1-0 s390x 15-20250222-0ubuntu1 [49.2 kB] 457s Get:8 http://ftpmaster.internal/ubuntu plucky/main s390x libgomp1 s390x 15-20250222-0ubuntu1 [152 kB] 457s Get:9 http://ftpmaster.internal/ubuntu plucky/main s390x libitm1 s390x 15-20250222-0ubuntu1 [31.2 kB] 457s Get:10 http://ftpmaster.internal/ubuntu plucky/main s390x libasan8 s390x 15-20250222-0ubuntu1 [2970 kB] 457s Get:11 http://ftpmaster.internal/ubuntu plucky/main s390x libubsan1 s390x 15-20250222-0ubuntu1 [1212 kB] 457s Get:12 http://ftpmaster.internal/ubuntu plucky/main s390x libgcc-14-dev s390x 14.2.0-17ubuntu3 [1037 kB] 458s Get:13 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-14-s390x-linux-gnu s390x 14.2.0-17ubuntu3 [18.7 MB] 461s Get:14 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-14 s390x 14.2.0-17ubuntu3 [526 kB] 461s Get:15 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [1204 B] 461s Get:16 http://ftpmaster.internal/ubuntu plucky/main s390x gcc s390x 4:14.2.0-1ubuntu1 [5004 B] 461s Get:17 http://ftpmaster.internal/ubuntu plucky/main s390x libstdc++-14-dev s390x 14.2.0-17ubuntu3 [2611 kB] 462s Get:18 http://ftpmaster.internal/ubuntu plucky/main s390x g++-14-s390x-linux-gnu s390x 14.2.0-17ubuntu3 [11.0 MB] 464s Get:19 http://ftpmaster.internal/ubuntu plucky/main s390x g++-14 s390x 14.2.0-17ubuntu3 [21.8 kB] 464s Get:20 http://ftpmaster.internal/ubuntu plucky/main s390x g++-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [956 B] 464s Get:21 http://ftpmaster.internal/ubuntu plucky/main s390x g++ s390x 4:14.2.0-1ubuntu1 [1080 B] 464s Get:22 http://ftpmaster.internal/ubuntu plucky/main s390x build-essential s390x 12.10ubuntu1 [4930 B] 464s Get:23 http://ftpmaster.internal/ubuntu plucky/main s390x dctrl-tools s390x 2.24-3build3 [106 kB] 464s Get:24 http://ftpmaster.internal/ubuntu plucky/main s390x libfreetype6 s390x 2.13.3+dfsg-1 [431 kB] 464s Get:25 http://ftpmaster.internal/ubuntu plucky/main s390x fonts-dejavu-mono all 2.37-8 [502 kB] 464s Get:26 http://ftpmaster.internal/ubuntu plucky/main s390x fonts-dejavu-core all 2.37-8 [835 kB] 464s Get:27 http://ftpmaster.internal/ubuntu plucky/main s390x fontconfig-config s390x 2.15.0-2ubuntu1 [37.5 kB] 464s Get:28 http://ftpmaster.internal/ubuntu plucky/main s390x libfontconfig1 s390x 2.15.0-2ubuntu1 [150 kB] 464s Get:29 http://ftpmaster.internal/ubuntu plucky/main s390x fontconfig s390x 2.15.0-2ubuntu1 [191 kB] 464s Get:30 http://ftpmaster.internal/ubuntu plucky/main s390x libgfortran5 s390x 15-20250222-0ubuntu1 [620 kB] 464s Get:31 http://ftpmaster.internal/ubuntu plucky/main s390x libgfortran-14-dev s390x 14.2.0-17ubuntu3 [654 kB] 464s Get:32 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran-14-s390x-linux-gnu s390x 14.2.0-17ubuntu3 [10.3 MB] 466s Get:33 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran-14 s390x 14.2.0-17ubuntu3 [13.6 kB] 466s Get:34 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [1012 B] 466s Get:35 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran s390x 4:14.2.0-1ubuntu1 [1160 B] 466s Get:36 http://ftpmaster.internal/ubuntu plucky/main s390x icu-devtools s390x 76.1-1ubuntu2 [225 kB] 466s Get:37 http://ftpmaster.internal/ubuntu plucky/main s390x libblas3 s390x 3.12.1-2 [252 kB] 466s Get:38 http://ftpmaster.internal/ubuntu plucky/main s390x libblas-dev s390x 3.12.1-2 [254 kB] 466s Get:39 http://ftpmaster.internal/ubuntu plucky/main s390x libbz2-dev s390x 1.0.8-6 [39.1 kB] 466s Get:40 http://ftpmaster.internal/ubuntu plucky/main s390x libpixman-1-0 s390x 0.44.0-3 [201 kB] 466s Get:41 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-render0 s390x 1.17.0-2 [17.0 kB] 466s Get:42 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-shm0 s390x 1.17.0-2 [5862 B] 466s Get:43 http://ftpmaster.internal/ubuntu plucky/main s390x libxrender1 s390x 1:0.9.10-1.1build1 [20.4 kB] 466s Get:44 http://ftpmaster.internal/ubuntu plucky/main s390x libcairo2 s390x 1.18.2-2 [580 kB] 466s Get:45 http://ftpmaster.internal/ubuntu plucky/main s390x libdatrie1 s390x 0.2.13-3build1 [20.6 kB] 466s Get:46 http://ftpmaster.internal/ubuntu plucky/main s390x libdeflate0 s390x 1.23-1 [46.1 kB] 466s Get:47 http://ftpmaster.internal/ubuntu plucky/main s390x libdeflate-dev s390x 1.23-1 [52.2 kB] 466s Get:48 http://ftpmaster.internal/ubuntu plucky/main s390x libgraphite2-3 s390x 1.3.14-2ubuntu1 [79.8 kB] 466s Get:49 http://ftpmaster.internal/ubuntu plucky/main s390x libharfbuzz0b s390x 10.2.0-1 [538 kB] 466s Get:50 http://ftpmaster.internal/ubuntu plucky/main s390x x11-common all 1:7.7+23ubuntu3 [21.7 kB] 466s Get:51 http://ftpmaster.internal/ubuntu plucky/main s390x libice6 s390x 2:1.1.1-1 [45.4 kB] 466s Get:52 http://ftpmaster.internal/ubuntu plucky/main s390x libicu-dev s390x 76.1-1ubuntu2 [12.2 MB] 468s Get:53 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg-turbo8 s390x 2.1.5-3ubuntu2 [147 kB] 468s Get:54 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg-turbo8-dev s390x 2.1.5-3ubuntu2 [281 kB] 468s Get:55 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg8 s390x 8c-2ubuntu11 [2146 B] 468s Get:56 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg8-dev s390x 8c-2ubuntu11 [1484 B] 468s Get:57 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg-dev s390x 8c-2ubuntu11 [1484 B] 468s Get:58 http://ftpmaster.internal/ubuntu plucky/main s390x liblapack3 s390x 3.12.1-2 [2971 kB] 468s Get:59 http://ftpmaster.internal/ubuntu plucky/main s390x liblapack-dev s390x 3.12.1-2 [5967 kB] 469s Get:60 http://ftpmaster.internal/ubuntu plucky/main s390x libncurses-dev s390x 6.5+20250216-2 [407 kB] 469s Get:61 http://ftpmaster.internal/ubuntu plucky/main s390x libthai-data all 0.1.29-2build1 [158 kB] 469s Get:62 http://ftpmaster.internal/ubuntu plucky/main s390x libthai0 s390x 0.1.29-2build1 [20.7 kB] 469s Get:63 http://ftpmaster.internal/ubuntu plucky/main s390x libpango-1.0-0 s390x 1.56.2-1 [253 kB] 469s Get:64 http://ftpmaster.internal/ubuntu plucky/main s390x libpangoft2-1.0-0 s390x 1.56.2-1 [50.2 kB] 469s Get:65 http://ftpmaster.internal/ubuntu plucky/main s390x libpangocairo-1.0-0 s390x 1.56.2-1 [28.2 kB] 469s Get:66 http://ftpmaster.internal/ubuntu plucky/main s390x libpaper2 s390x 2.2.5-0.3 [17.2 kB] 469s Get:67 http://ftpmaster.internal/ubuntu plucky/main s390x libpaper-utils s390x 2.2.5-0.3 [15.3 kB] 469s Get:68 http://ftpmaster.internal/ubuntu plucky/main s390x libpcre2-16-0 s390x 10.45-1 [259 kB] 469s Get:69 http://ftpmaster.internal/ubuntu plucky/main s390x libpcre2-32-0 s390x 10.45-1 [245 kB] 469s Get:70 http://ftpmaster.internal/ubuntu plucky/main s390x libpcre2-posix3 s390x 10.45-1 [7080 B] 469s Get:71 http://ftpmaster.internal/ubuntu plucky/main s390x libpcre2-dev s390x 10.45-1 [899 kB] 470s Get:72 http://ftpmaster.internal/ubuntu plucky/main s390x libpkgconf3 s390x 1.8.1-4 [31.2 kB] 470s Get:73 http://ftpmaster.internal/ubuntu plucky/main s390x zlib1g-dev s390x 1:1.3.dfsg+really1.3.1-1ubuntu1 [898 kB] 470s Get:74 http://ftpmaster.internal/ubuntu plucky/main s390x libpng-dev s390x 1.6.47-1 [278 kB] 470s Get:75 http://ftpmaster.internal/ubuntu plucky/main s390x libreadline-dev s390x 8.2-6 [187 kB] 470s Get:76 http://ftpmaster.internal/ubuntu plucky/main s390x libsharpyuv0 s390x 1.5.0-0.1 [16.7 kB] 470s Get:77 http://ftpmaster.internal/ubuntu plucky/main s390x libsm6 s390x 2:1.2.4-1 [18.4 kB] 470s Get:78 http://ftpmaster.internal/ubuntu plucky/main s390x libtcl8.6 s390x 8.6.16+dfsg-1 [1034 kB] 470s Get:79 http://ftpmaster.internal/ubuntu plucky/main s390x libjbig0 s390x 2.1-6.1ubuntu2 [33.1 kB] 470s Get:80 http://ftpmaster.internal/ubuntu plucky/main s390x libwebp7 s390x 1.5.0-0.1 [210 kB] 470s Get:81 http://ftpmaster.internal/ubuntu plucky/main s390x libtiff6 s390x 4.5.1+git230720-4ubuntu4 [217 kB] 470s Get:82 http://ftpmaster.internal/ubuntu plucky/main s390x libxft2 s390x 2.3.6-1build1 [49.6 kB] 470s Get:83 http://ftpmaster.internal/ubuntu plucky/main s390x libxss1 s390x 1:1.2.3-1build3 [7396 B] 470s Get:84 http://ftpmaster.internal/ubuntu plucky/main s390x libtk8.6 s390x 8.6.16-1 [830 kB] 470s Get:85 http://ftpmaster.internal/ubuntu plucky/main s390x libxt6t64 s390x 1:1.2.1-1.2build1 [184 kB] 470s Get:86 http://ftpmaster.internal/ubuntu plucky/main s390x zip s390x 3.0-14ubuntu2 [187 kB] 470s Get:87 http://ftpmaster.internal/ubuntu plucky/main s390x unzip s390x 6.0-28ubuntu6 [186 kB] 470s Get:88 http://ftpmaster.internal/ubuntu plucky/main s390x xdg-utils all 1.2.1-2ubuntu1 [66.0 kB] 470s Get:89 http://ftpmaster.internal/ubuntu plucky/universe s390x r-base-core s390x 4.4.3-1 [28.6 MB] 474s Get:90 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-littler s390x 0.3.20-2 [95.0 kB] 474s Get:91 http://ftpmaster.internal/ubuntu plucky/universe s390x littler all 0.3.20-2 [2554 B] 474s Get:92 http://ftpmaster.internal/ubuntu plucky/main s390x liblzma-dev s390x 5.6.4-1 [183 kB] 474s Get:93 http://ftpmaster.internal/ubuntu plucky/main s390x pkgconf-bin s390x 1.8.1-4 [21.5 kB] 474s Get:94 http://ftpmaster.internal/ubuntu plucky/main s390x pkgconf s390x 1.8.1-4 [16.7 kB] 474s Get:95 http://ftpmaster.internal/ubuntu plucky/main s390x libtirpc-dev s390x 1.3.4+ds-1.3 [196 kB] 474s Get:96 http://ftpmaster.internal/ubuntu plucky/universe s390x r-base-dev all 4.4.3-1 [4176 B] 474s Get:97 http://ftpmaster.internal/ubuntu plucky/universe s390x pkg-r-autopkgtest all 20231212ubuntu1 [6448 B] 474s Get:98 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-boot all 1.3-31-1 [635 kB] 474s Get:99 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-brio s390x 1.1.5-1 [38.6 kB] 474s Get:100 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-ps s390x 1.9.0-1 [408 kB] 475s Get:101 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-r6 all 2.6.1-1 [101 kB] 475s Get:102 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-processx s390x 3.8.6-1 [364 kB] 475s Get:103 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-callr all 3.7.6-1 [458 kB] 475s Get:104 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-cli s390x 3.6.4-1 [1379 kB] 476s Get:105 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-crayon all 1.5.3-1 [165 kB] 476s Get:106 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-desc all 1.4.3-1 [359 kB] 476s Get:107 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-diffobj s390x 0.3.5-1 [1115 kB] 476s Get:108 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-digest s390x 0.6.37-1 [205 kB] 476s Get:109 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-evaluate all 1.0.3-1 [114 kB] 476s Get:110 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-fs s390x 1.6.5+dfsg-1 [245 kB] 476s Get:111 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-glue s390x 1.8.0-1 [164 kB] 476s Get:112 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-jsonlite s390x 1.9.1+dfsg-1 [447 kB] 476s Get:113 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-lattice s390x 0.22-6-1 [1340 kB] 476s Get:114 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-rlang s390x 1.1.5-1 [1713 kB] 477s Get:115 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-lifecycle all 1.0.4+dfsg-1 [110 kB] 477s Get:116 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-matrix s390x 1.7-3-1 [4449 kB] 478s Get:117 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-mass s390x 7.3-64-1 [1113 kB] 478s Get:118 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-nlme s390x 3.1.167-1 [2323 kB] 479s Get:119 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-pkgkitten all 0.2.4-1 [27.2 kB] 479s Get:120 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-rcpp s390x 1.0.14-1 [2003 kB] 479s Get:121 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-minqa s390x 1.2.8-1 [139 kB] 479s Get:122 http://ftpmaster.internal/ubuntu plucky/universe s390x libnlopt0 s390x 2.7.1-6ubuntu3 [227 kB] 479s Get:123 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-nloptr s390x 2.1.1-1 [252 kB] 479s Get:124 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-rbibutils s390x 2.3-1 [1041 kB] 479s Get:125 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-rdpack all 2.6.2-1syncable1 [756 kB] 479s Get:126 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-reformulas all 0.4.0-1 [91.5 kB] 479s Get:127 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-rcppeigen s390x 0.3.4.0.2-1 [1429 kB] 480s Get:128 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-statmod s390x 1.5.0-1 [294 kB] 480s Get:129 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-lme4 s390x 1.1-36-1 [4141 kB] 481s Get:130 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-magrittr s390x 2.0.3-1 [154 kB] 481s Get:131 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-nnet s390x 7.3-20-1 [116 kB] 481s Get:132 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-numderiv all 2016.8-1.1-3 [115 kB] 481s Get:133 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-ucminf s390x 1.2.2-1 [35.8 kB] 481s Get:134 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-ordinal s390x 2023.12-4.1-1 [1269 kB] 481s Get:135 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-pkgbuild all 1.4.6-1 [213 kB] 481s Get:136 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-rprojroot all 2.0.4-2 [125 kB] 481s Get:137 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-withr all 3.0.2+dfsg-1 [214 kB] 481s Get:138 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-pkgload all 1.4.0-1 [247 kB] 481s Get:139 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-praise all 1.0.0-4build1 [20.3 kB] 481s Get:140 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-waldo all 0.6.1-2 [150 kB] 481s Get:141 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-testthat s390x 3.2.3-1 [1641 kB] 481s Get:142 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-xtable all 1:1.8-4-2 [689 kB] 482s Preconfiguring packages ... 482s Fetched 155 MB in 27s (5686 kB/s) 482s Selecting previously unselected package libisl23:s390x. 482s (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 ... 56326 files and directories currently installed.) 482s Preparing to unpack .../000-libisl23_0.27-1_s390x.deb ... 482s Unpacking libisl23:s390x (0.27-1) ... 482s Selecting previously unselected package libmpc3:s390x. 482s Preparing to unpack .../001-libmpc3_1.3.1-1build2_s390x.deb ... 482s Unpacking libmpc3:s390x (1.3.1-1build2) ... 482s Selecting previously unselected package cpp-14-s390x-linux-gnu. 482s Preparing to unpack .../002-cpp-14-s390x-linux-gnu_14.2.0-17ubuntu3_s390x.deb ... 482s Unpacking cpp-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 482s Selecting previously unselected package cpp-14. 482s Preparing to unpack .../003-cpp-14_14.2.0-17ubuntu3_s390x.deb ... 482s Unpacking cpp-14 (14.2.0-17ubuntu3) ... 482s Selecting previously unselected package cpp-s390x-linux-gnu. 482s Preparing to unpack .../004-cpp-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 482s Unpacking cpp-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 482s Selecting previously unselected package cpp. 482s Preparing to unpack .../005-cpp_4%3a14.2.0-1ubuntu1_s390x.deb ... 482s Unpacking cpp (4:14.2.0-1ubuntu1) ... 482s Selecting previously unselected package libcc1-0:s390x. 482s Preparing to unpack .../006-libcc1-0_15-20250222-0ubuntu1_s390x.deb ... 482s Unpacking libcc1-0:s390x (15-20250222-0ubuntu1) ... 482s Selecting previously unselected package libgomp1:s390x. 482s Preparing to unpack .../007-libgomp1_15-20250222-0ubuntu1_s390x.deb ... 482s Unpacking libgomp1:s390x (15-20250222-0ubuntu1) ... 482s Selecting previously unselected package libitm1:s390x. 482s Preparing to unpack .../008-libitm1_15-20250222-0ubuntu1_s390x.deb ... 482s Unpacking libitm1:s390x (15-20250222-0ubuntu1) ... 482s Selecting previously unselected package libasan8:s390x. 482s Preparing to unpack .../009-libasan8_15-20250222-0ubuntu1_s390x.deb ... 482s Unpacking libasan8:s390x (15-20250222-0ubuntu1) ... 482s Selecting previously unselected package libubsan1:s390x. 482s Preparing to unpack .../010-libubsan1_15-20250222-0ubuntu1_s390x.deb ... 482s Unpacking libubsan1:s390x (15-20250222-0ubuntu1) ... 482s Selecting previously unselected package libgcc-14-dev:s390x. 482s Preparing to unpack .../011-libgcc-14-dev_14.2.0-17ubuntu3_s390x.deb ... 482s Unpacking libgcc-14-dev:s390x (14.2.0-17ubuntu3) ... 482s Selecting previously unselected package gcc-14-s390x-linux-gnu. 482s Preparing to unpack .../012-gcc-14-s390x-linux-gnu_14.2.0-17ubuntu3_s390x.deb ... 482s Unpacking gcc-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 483s Selecting previously unselected package gcc-14. 483s Preparing to unpack .../013-gcc-14_14.2.0-17ubuntu3_s390x.deb ... 483s Unpacking gcc-14 (14.2.0-17ubuntu3) ... 483s Selecting previously unselected package gcc-s390x-linux-gnu. 483s Preparing to unpack .../014-gcc-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 483s Unpacking gcc-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 483s Selecting previously unselected package gcc. 483s Preparing to unpack .../015-gcc_4%3a14.2.0-1ubuntu1_s390x.deb ... 483s Unpacking gcc (4:14.2.0-1ubuntu1) ... 483s Selecting previously unselected package libstdc++-14-dev:s390x. 483s Preparing to unpack .../016-libstdc++-14-dev_14.2.0-17ubuntu3_s390x.deb ... 483s Unpacking libstdc++-14-dev:s390x (14.2.0-17ubuntu3) ... 483s Selecting previously unselected package g++-14-s390x-linux-gnu. 483s Preparing to unpack .../017-g++-14-s390x-linux-gnu_14.2.0-17ubuntu3_s390x.deb ... 483s Unpacking g++-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 483s Selecting previously unselected package g++-14. 483s Preparing to unpack .../018-g++-14_14.2.0-17ubuntu3_s390x.deb ... 483s Unpacking g++-14 (14.2.0-17ubuntu3) ... 483s Selecting previously unselected package g++-s390x-linux-gnu. 483s Preparing to unpack .../019-g++-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 483s Unpacking g++-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 483s Selecting previously unselected package g++. 483s Preparing to unpack .../020-g++_4%3a14.2.0-1ubuntu1_s390x.deb ... 483s Unpacking g++ (4:14.2.0-1ubuntu1) ... 483s Selecting previously unselected package build-essential. 483s Preparing to unpack .../021-build-essential_12.10ubuntu1_s390x.deb ... 483s Unpacking build-essential (12.10ubuntu1) ... 483s Selecting previously unselected package dctrl-tools. 483s Preparing to unpack .../022-dctrl-tools_2.24-3build3_s390x.deb ... 483s Unpacking dctrl-tools (2.24-3build3) ... 483s Selecting previously unselected package libfreetype6:s390x. 483s Preparing to unpack .../023-libfreetype6_2.13.3+dfsg-1_s390x.deb ... 483s Unpacking libfreetype6:s390x (2.13.3+dfsg-1) ... 483s Selecting previously unselected package fonts-dejavu-mono. 483s Preparing to unpack .../024-fonts-dejavu-mono_2.37-8_all.deb ... 483s Unpacking fonts-dejavu-mono (2.37-8) ... 483s Selecting previously unselected package fonts-dejavu-core. 483s Preparing to unpack .../025-fonts-dejavu-core_2.37-8_all.deb ... 483s Unpacking fonts-dejavu-core (2.37-8) ... 483s Selecting previously unselected package fontconfig-config. 483s Preparing to unpack .../026-fontconfig-config_2.15.0-2ubuntu1_s390x.deb ... 483s Unpacking fontconfig-config (2.15.0-2ubuntu1) ... 483s Selecting previously unselected package libfontconfig1:s390x. 483s Preparing to unpack .../027-libfontconfig1_2.15.0-2ubuntu1_s390x.deb ... 483s Unpacking libfontconfig1:s390x (2.15.0-2ubuntu1) ... 483s Selecting previously unselected package fontconfig. 483s Preparing to unpack .../028-fontconfig_2.15.0-2ubuntu1_s390x.deb ... 483s Unpacking fontconfig (2.15.0-2ubuntu1) ... 483s Selecting previously unselected package libgfortran5:s390x. 483s Preparing to unpack .../029-libgfortran5_15-20250222-0ubuntu1_s390x.deb ... 483s Unpacking libgfortran5:s390x (15-20250222-0ubuntu1) ... 483s Selecting previously unselected package libgfortran-14-dev:s390x. 483s Preparing to unpack .../030-libgfortran-14-dev_14.2.0-17ubuntu3_s390x.deb ... 483s Unpacking libgfortran-14-dev:s390x (14.2.0-17ubuntu3) ... 483s Selecting previously unselected package gfortran-14-s390x-linux-gnu. 483s Preparing to unpack .../031-gfortran-14-s390x-linux-gnu_14.2.0-17ubuntu3_s390x.deb ... 483s Unpacking gfortran-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 483s Selecting previously unselected package gfortran-14. 483s Preparing to unpack .../032-gfortran-14_14.2.0-17ubuntu3_s390x.deb ... 483s Unpacking gfortran-14 (14.2.0-17ubuntu3) ... 483s Selecting previously unselected package gfortran-s390x-linux-gnu. 483s Preparing to unpack .../033-gfortran-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 483s Unpacking gfortran-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 483s Selecting previously unselected package gfortran. 483s Preparing to unpack .../034-gfortran_4%3a14.2.0-1ubuntu1_s390x.deb ... 483s Unpacking gfortran (4:14.2.0-1ubuntu1) ... 483s Selecting previously unselected package icu-devtools. 483s Preparing to unpack .../035-icu-devtools_76.1-1ubuntu2_s390x.deb ... 483s Unpacking icu-devtools (76.1-1ubuntu2) ... 483s Selecting previously unselected package libblas3:s390x. 483s Preparing to unpack .../036-libblas3_3.12.1-2_s390x.deb ... 483s Unpacking libblas3:s390x (3.12.1-2) ... 483s Selecting previously unselected package libblas-dev:s390x. 483s Preparing to unpack .../037-libblas-dev_3.12.1-2_s390x.deb ... 483s Unpacking libblas-dev:s390x (3.12.1-2) ... 483s Selecting previously unselected package libbz2-dev:s390x. 483s Preparing to unpack .../038-libbz2-dev_1.0.8-6_s390x.deb ... 483s Unpacking libbz2-dev:s390x (1.0.8-6) ... 483s Selecting previously unselected package libpixman-1-0:s390x. 483s Preparing to unpack .../039-libpixman-1-0_0.44.0-3_s390x.deb ... 483s Unpacking libpixman-1-0:s390x (0.44.0-3) ... 483s Selecting previously unselected package libxcb-render0:s390x. 483s Preparing to unpack .../040-libxcb-render0_1.17.0-2_s390x.deb ... 483s Unpacking libxcb-render0:s390x (1.17.0-2) ... 483s Selecting previously unselected package libxcb-shm0:s390x. 483s Preparing to unpack .../041-libxcb-shm0_1.17.0-2_s390x.deb ... 483s Unpacking libxcb-shm0:s390x (1.17.0-2) ... 483s Selecting previously unselected package libxrender1:s390x. 483s Preparing to unpack .../042-libxrender1_1%3a0.9.10-1.1build1_s390x.deb ... 483s Unpacking libxrender1:s390x (1:0.9.10-1.1build1) ... 483s Selecting previously unselected package libcairo2:s390x. 483s Preparing to unpack .../043-libcairo2_1.18.2-2_s390x.deb ... 483s Unpacking libcairo2:s390x (1.18.2-2) ... 483s Selecting previously unselected package libdatrie1:s390x. 483s Preparing to unpack .../044-libdatrie1_0.2.13-3build1_s390x.deb ... 483s Unpacking libdatrie1:s390x (0.2.13-3build1) ... 483s Selecting previously unselected package libdeflate0:s390x. 483s Preparing to unpack .../045-libdeflate0_1.23-1_s390x.deb ... 483s Unpacking libdeflate0:s390x (1.23-1) ... 483s Selecting previously unselected package libdeflate-dev:s390x. 483s Preparing to unpack .../046-libdeflate-dev_1.23-1_s390x.deb ... 483s Unpacking libdeflate-dev:s390x (1.23-1) ... 483s Selecting previously unselected package libgraphite2-3:s390x. 483s Preparing to unpack .../047-libgraphite2-3_1.3.14-2ubuntu1_s390x.deb ... 483s Unpacking libgraphite2-3:s390x (1.3.14-2ubuntu1) ... 483s Selecting previously unselected package libharfbuzz0b:s390x. 483s Preparing to unpack .../048-libharfbuzz0b_10.2.0-1_s390x.deb ... 483s Unpacking libharfbuzz0b:s390x (10.2.0-1) ... 483s Selecting previously unselected package x11-common. 483s Preparing to unpack .../049-x11-common_1%3a7.7+23ubuntu3_all.deb ... 483s Unpacking x11-common (1:7.7+23ubuntu3) ... 483s Selecting previously unselected package libice6:s390x. 483s Preparing to unpack .../050-libice6_2%3a1.1.1-1_s390x.deb ... 483s Unpacking libice6:s390x (2:1.1.1-1) ... 483s Selecting previously unselected package libicu-dev:s390x. 483s Preparing to unpack .../051-libicu-dev_76.1-1ubuntu2_s390x.deb ... 483s Unpacking libicu-dev:s390x (76.1-1ubuntu2) ... 484s Selecting previously unselected package libjpeg-turbo8:s390x. 484s Preparing to unpack .../052-libjpeg-turbo8_2.1.5-3ubuntu2_s390x.deb ... 484s Unpacking libjpeg-turbo8:s390x (2.1.5-3ubuntu2) ... 484s Selecting previously unselected package libjpeg-turbo8-dev:s390x. 484s Preparing to unpack .../053-libjpeg-turbo8-dev_2.1.5-3ubuntu2_s390x.deb ... 484s Unpacking libjpeg-turbo8-dev:s390x (2.1.5-3ubuntu2) ... 484s Selecting previously unselected package libjpeg8:s390x. 484s Preparing to unpack .../054-libjpeg8_8c-2ubuntu11_s390x.deb ... 484s Unpacking libjpeg8:s390x (8c-2ubuntu11) ... 484s Selecting previously unselected package libjpeg8-dev:s390x. 484s Preparing to unpack .../055-libjpeg8-dev_8c-2ubuntu11_s390x.deb ... 484s Unpacking libjpeg8-dev:s390x (8c-2ubuntu11) ... 484s Selecting previously unselected package libjpeg-dev:s390x. 484s Preparing to unpack .../056-libjpeg-dev_8c-2ubuntu11_s390x.deb ... 484s Unpacking libjpeg-dev:s390x (8c-2ubuntu11) ... 484s Selecting previously unselected package liblapack3:s390x. 484s Preparing to unpack .../057-liblapack3_3.12.1-2_s390x.deb ... 484s Unpacking liblapack3:s390x (3.12.1-2) ... 484s Selecting previously unselected package liblapack-dev:s390x. 484s Preparing to unpack .../058-liblapack-dev_3.12.1-2_s390x.deb ... 484s Unpacking liblapack-dev:s390x (3.12.1-2) ... 484s Selecting previously unselected package libncurses-dev:s390x. 484s Preparing to unpack .../059-libncurses-dev_6.5+20250216-2_s390x.deb ... 484s Unpacking libncurses-dev:s390x (6.5+20250216-2) ... 484s Selecting previously unselected package libthai-data. 484s Preparing to unpack .../060-libthai-data_0.1.29-2build1_all.deb ... 484s Unpacking libthai-data (0.1.29-2build1) ... 484s Selecting previously unselected package libthai0:s390x. 484s Preparing to unpack .../061-libthai0_0.1.29-2build1_s390x.deb ... 484s Unpacking libthai0:s390x (0.1.29-2build1) ... 484s Selecting previously unselected package libpango-1.0-0:s390x. 484s Preparing to unpack .../062-libpango-1.0-0_1.56.2-1_s390x.deb ... 484s Unpacking libpango-1.0-0:s390x (1.56.2-1) ... 484s Selecting previously unselected package libpangoft2-1.0-0:s390x. 484s Preparing to unpack .../063-libpangoft2-1.0-0_1.56.2-1_s390x.deb ... 484s Unpacking libpangoft2-1.0-0:s390x (1.56.2-1) ... 484s Selecting previously unselected package libpangocairo-1.0-0:s390x. 484s Preparing to unpack .../064-libpangocairo-1.0-0_1.56.2-1_s390x.deb ... 484s Unpacking libpangocairo-1.0-0:s390x (1.56.2-1) ... 484s Selecting previously unselected package libpaper2:s390x. 484s Preparing to unpack .../065-libpaper2_2.2.5-0.3_s390x.deb ... 484s Unpacking libpaper2:s390x (2.2.5-0.3) ... 484s Selecting previously unselected package libpaper-utils. 484s Preparing to unpack .../066-libpaper-utils_2.2.5-0.3_s390x.deb ... 484s Unpacking libpaper-utils (2.2.5-0.3) ... 484s Selecting previously unselected package libpcre2-16-0:s390x. 484s Preparing to unpack .../067-libpcre2-16-0_10.45-1_s390x.deb ... 484s Unpacking libpcre2-16-0:s390x (10.45-1) ... 484s Selecting previously unselected package libpcre2-32-0:s390x. 484s Preparing to unpack .../068-libpcre2-32-0_10.45-1_s390x.deb ... 484s Unpacking libpcre2-32-0:s390x (10.45-1) ... 484s Selecting previously unselected package libpcre2-posix3:s390x. 484s Preparing to unpack .../069-libpcre2-posix3_10.45-1_s390x.deb ... 484s Unpacking libpcre2-posix3:s390x (10.45-1) ... 484s Selecting previously unselected package libpcre2-dev:s390x. 484s Preparing to unpack .../070-libpcre2-dev_10.45-1_s390x.deb ... 484s Unpacking libpcre2-dev:s390x (10.45-1) ... 484s Selecting previously unselected package libpkgconf3:s390x. 484s Preparing to unpack .../071-libpkgconf3_1.8.1-4_s390x.deb ... 484s Unpacking libpkgconf3:s390x (1.8.1-4) ... 484s Selecting previously unselected package zlib1g-dev:s390x. 484s Preparing to unpack .../072-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_s390x.deb ... 484s Unpacking zlib1g-dev:s390x (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 484s Selecting previously unselected package libpng-dev:s390x. 484s Preparing to unpack .../073-libpng-dev_1.6.47-1_s390x.deb ... 484s Unpacking libpng-dev:s390x (1.6.47-1) ... 484s Selecting previously unselected package libreadline-dev:s390x. 484s Preparing to unpack .../074-libreadline-dev_8.2-6_s390x.deb ... 484s Unpacking libreadline-dev:s390x (8.2-6) ... 484s Selecting previously unselected package libsharpyuv0:s390x. 484s Preparing to unpack .../075-libsharpyuv0_1.5.0-0.1_s390x.deb ... 484s Unpacking libsharpyuv0:s390x (1.5.0-0.1) ... 484s Selecting previously unselected package libsm6:s390x. 484s Preparing to unpack .../076-libsm6_2%3a1.2.4-1_s390x.deb ... 484s Unpacking libsm6:s390x (2:1.2.4-1) ... 484s Selecting previously unselected package libtcl8.6:s390x. 484s Preparing to unpack .../077-libtcl8.6_8.6.16+dfsg-1_s390x.deb ... 484s Unpacking libtcl8.6:s390x (8.6.16+dfsg-1) ... 484s Selecting previously unselected package libjbig0:s390x. 484s Preparing to unpack .../078-libjbig0_2.1-6.1ubuntu2_s390x.deb ... 484s Unpacking libjbig0:s390x (2.1-6.1ubuntu2) ... 484s Selecting previously unselected package libwebp7:s390x. 484s Preparing to unpack .../079-libwebp7_1.5.0-0.1_s390x.deb ... 484s Unpacking libwebp7:s390x (1.5.0-0.1) ... 484s Selecting previously unselected package libtiff6:s390x. 484s Preparing to unpack .../080-libtiff6_4.5.1+git230720-4ubuntu4_s390x.deb ... 484s Unpacking libtiff6:s390x (4.5.1+git230720-4ubuntu4) ... 484s Selecting previously unselected package libxft2:s390x. 484s Preparing to unpack .../081-libxft2_2.3.6-1build1_s390x.deb ... 484s Unpacking libxft2:s390x (2.3.6-1build1) ... 484s Selecting previously unselected package libxss1:s390x. 484s Preparing to unpack .../082-libxss1_1%3a1.2.3-1build3_s390x.deb ... 484s Unpacking libxss1:s390x (1:1.2.3-1build3) ... 484s Selecting previously unselected package libtk8.6:s390x. 484s Preparing to unpack .../083-libtk8.6_8.6.16-1_s390x.deb ... 484s Unpacking libtk8.6:s390x (8.6.16-1) ... 484s Selecting previously unselected package libxt6t64:s390x. 484s Preparing to unpack .../084-libxt6t64_1%3a1.2.1-1.2build1_s390x.deb ... 484s Unpacking libxt6t64:s390x (1:1.2.1-1.2build1) ... 484s Selecting previously unselected package zip. 484s Preparing to unpack .../085-zip_3.0-14ubuntu2_s390x.deb ... 484s Unpacking zip (3.0-14ubuntu2) ... 484s Selecting previously unselected package unzip. 484s Preparing to unpack .../086-unzip_6.0-28ubuntu6_s390x.deb ... 484s Unpacking unzip (6.0-28ubuntu6) ... 484s Selecting previously unselected package xdg-utils. 484s Preparing to unpack .../087-xdg-utils_1.2.1-2ubuntu1_all.deb ... 484s Unpacking xdg-utils (1.2.1-2ubuntu1) ... 484s Selecting previously unselected package r-base-core. 484s Preparing to unpack .../088-r-base-core_4.4.3-1_s390x.deb ... 484s Unpacking r-base-core (4.4.3-1) ... 485s Selecting previously unselected package r-cran-littler. 485s Preparing to unpack .../089-r-cran-littler_0.3.20-2_s390x.deb ... 485s Unpacking r-cran-littler (0.3.20-2) ... 485s Selecting previously unselected package littler. 485s Preparing to unpack .../090-littler_0.3.20-2_all.deb ... 485s Unpacking littler (0.3.20-2) ... 485s Selecting previously unselected package liblzma-dev:s390x. 485s Preparing to unpack .../091-liblzma-dev_5.6.4-1_s390x.deb ... 485s Unpacking liblzma-dev:s390x (5.6.4-1) ... 485s Selecting previously unselected package pkgconf-bin. 485s Preparing to unpack .../092-pkgconf-bin_1.8.1-4_s390x.deb ... 485s Unpacking pkgconf-bin (1.8.1-4) ... 485s Selecting previously unselected package pkgconf:s390x. 485s Preparing to unpack .../093-pkgconf_1.8.1-4_s390x.deb ... 485s Unpacking pkgconf:s390x (1.8.1-4) ... 485s Selecting previously unselected package libtirpc-dev:s390x. 485s Preparing to unpack .../094-libtirpc-dev_1.3.4+ds-1.3_s390x.deb ... 485s Unpacking libtirpc-dev:s390x (1.3.4+ds-1.3) ... 485s Selecting previously unselected package r-base-dev. 485s Preparing to unpack .../095-r-base-dev_4.4.3-1_all.deb ... 485s Unpacking r-base-dev (4.4.3-1) ... 485s Selecting previously unselected package pkg-r-autopkgtest. 485s Preparing to unpack .../096-pkg-r-autopkgtest_20231212ubuntu1_all.deb ... 485s Unpacking pkg-r-autopkgtest (20231212ubuntu1) ... 485s Selecting previously unselected package r-cran-boot. 485s Preparing to unpack .../097-r-cran-boot_1.3-31-1_all.deb ... 485s Unpacking r-cran-boot (1.3-31-1) ... 485s Selecting previously unselected package r-cran-brio. 485s Preparing to unpack .../098-r-cran-brio_1.1.5-1_s390x.deb ... 485s Unpacking r-cran-brio (1.1.5-1) ... 485s Selecting previously unselected package r-cran-ps. 485s Preparing to unpack .../099-r-cran-ps_1.9.0-1_s390x.deb ... 485s Unpacking r-cran-ps (1.9.0-1) ... 485s Selecting previously unselected package r-cran-r6. 485s Preparing to unpack .../100-r-cran-r6_2.6.1-1_all.deb ... 485s Unpacking r-cran-r6 (2.6.1-1) ... 485s Selecting previously unselected package r-cran-processx. 485s Preparing to unpack .../101-r-cran-processx_3.8.6-1_s390x.deb ... 485s Unpacking r-cran-processx (3.8.6-1) ... 485s Selecting previously unselected package r-cran-callr. 485s Preparing to unpack .../102-r-cran-callr_3.7.6-1_all.deb ... 485s Unpacking r-cran-callr (3.7.6-1) ... 485s Selecting previously unselected package r-cran-cli. 485s Preparing to unpack .../103-r-cran-cli_3.6.4-1_s390x.deb ... 485s Unpacking r-cran-cli (3.6.4-1) ... 485s Selecting previously unselected package r-cran-crayon. 485s Preparing to unpack .../104-r-cran-crayon_1.5.3-1_all.deb ... 485s Unpacking r-cran-crayon (1.5.3-1) ... 485s Selecting previously unselected package r-cran-desc. 485s Preparing to unpack .../105-r-cran-desc_1.4.3-1_all.deb ... 485s Unpacking r-cran-desc (1.4.3-1) ... 485s Selecting previously unselected package r-cran-diffobj. 485s Preparing to unpack .../106-r-cran-diffobj_0.3.5-1_s390x.deb ... 485s Unpacking r-cran-diffobj (0.3.5-1) ... 485s Selecting previously unselected package r-cran-digest. 485s Preparing to unpack .../107-r-cran-digest_0.6.37-1_s390x.deb ... 485s Unpacking r-cran-digest (0.6.37-1) ... 485s Selecting previously unselected package r-cran-evaluate. 485s Preparing to unpack .../108-r-cran-evaluate_1.0.3-1_all.deb ... 485s Unpacking r-cran-evaluate (1.0.3-1) ... 485s Selecting previously unselected package r-cran-fs. 485s Preparing to unpack .../109-r-cran-fs_1.6.5+dfsg-1_s390x.deb ... 485s Unpacking r-cran-fs (1.6.5+dfsg-1) ... 485s Selecting previously unselected package r-cran-glue. 485s Preparing to unpack .../110-r-cran-glue_1.8.0-1_s390x.deb ... 485s Unpacking r-cran-glue (1.8.0-1) ... 485s Selecting previously unselected package r-cran-jsonlite. 485s Preparing to unpack .../111-r-cran-jsonlite_1.9.1+dfsg-1_s390x.deb ... 485s Unpacking r-cran-jsonlite (1.9.1+dfsg-1) ... 485s Selecting previously unselected package r-cran-lattice. 485s Preparing to unpack .../112-r-cran-lattice_0.22-6-1_s390x.deb ... 485s Unpacking r-cran-lattice (0.22-6-1) ... 485s Selecting previously unselected package r-cran-rlang. 485s Preparing to unpack .../113-r-cran-rlang_1.1.5-1_s390x.deb ... 485s Unpacking r-cran-rlang (1.1.5-1) ... 485s Selecting previously unselected package r-cran-lifecycle. 485s Preparing to unpack .../114-r-cran-lifecycle_1.0.4+dfsg-1_all.deb ... 485s Unpacking r-cran-lifecycle (1.0.4+dfsg-1) ... 485s Selecting previously unselected package r-cran-matrix. 485s Preparing to unpack .../115-r-cran-matrix_1.7-3-1_s390x.deb ... 485s Unpacking r-cran-matrix (1.7-3-1) ... 485s Selecting previously unselected package r-cran-mass. 485s Preparing to unpack .../116-r-cran-mass_7.3-64-1_s390x.deb ... 485s Unpacking r-cran-mass (7.3-64-1) ... 485s Selecting previously unselected package r-cran-nlme. 485s Preparing to unpack .../117-r-cran-nlme_3.1.167-1_s390x.deb ... 485s Unpacking r-cran-nlme (3.1.167-1) ... 485s Selecting previously unselected package r-cran-pkgkitten. 485s Preparing to unpack .../118-r-cran-pkgkitten_0.2.4-1_all.deb ... 485s Unpacking r-cran-pkgkitten (0.2.4-1) ... 485s Selecting previously unselected package r-cran-rcpp. 485s Preparing to unpack .../119-r-cran-rcpp_1.0.14-1_s390x.deb ... 485s Unpacking r-cran-rcpp (1.0.14-1) ... 485s Selecting previously unselected package r-cran-minqa. 485s Preparing to unpack .../120-r-cran-minqa_1.2.8-1_s390x.deb ... 485s Unpacking r-cran-minqa (1.2.8-1) ... 485s Selecting previously unselected package libnlopt0:s390x. 485s Preparing to unpack .../121-libnlopt0_2.7.1-6ubuntu3_s390x.deb ... 485s Unpacking libnlopt0:s390x (2.7.1-6ubuntu3) ... 485s Selecting previously unselected package r-cran-nloptr. 485s Preparing to unpack .../122-r-cran-nloptr_2.1.1-1_s390x.deb ... 485s Unpacking r-cran-nloptr (2.1.1-1) ... 485s Selecting previously unselected package r-cran-rbibutils. 485s Preparing to unpack .../123-r-cran-rbibutils_2.3-1_s390x.deb ... 485s Unpacking r-cran-rbibutils (2.3-1) ... 485s Selecting previously unselected package r-cran-rdpack. 485s Preparing to unpack .../124-r-cran-rdpack_2.6.2-1syncable1_all.deb ... 485s Unpacking r-cran-rdpack (2.6.2-1syncable1) ... 485s Selecting previously unselected package r-cran-reformulas. 485s Preparing to unpack .../125-r-cran-reformulas_0.4.0-1_all.deb ... 485s Unpacking r-cran-reformulas (0.4.0-1) ... 485s Selecting previously unselected package r-cran-rcppeigen. 485s Preparing to unpack .../126-r-cran-rcppeigen_0.3.4.0.2-1_s390x.deb ... 485s Unpacking r-cran-rcppeigen (0.3.4.0.2-1) ... 485s Selecting previously unselected package r-cran-statmod. 485s Preparing to unpack .../127-r-cran-statmod_1.5.0-1_s390x.deb ... 485s Unpacking r-cran-statmod (1.5.0-1) ... 485s Selecting previously unselected package r-cran-lme4. 485s Preparing to unpack .../128-r-cran-lme4_1.1-36-1_s390x.deb ... 485s Unpacking r-cran-lme4 (1.1-36-1) ... 485s Selecting previously unselected package r-cran-magrittr. 485s Preparing to unpack .../129-r-cran-magrittr_2.0.3-1_s390x.deb ... 485s Unpacking r-cran-magrittr (2.0.3-1) ... 485s Selecting previously unselected package r-cran-nnet. 485s Preparing to unpack .../130-r-cran-nnet_7.3-20-1_s390x.deb ... 485s Unpacking r-cran-nnet (7.3-20-1) ... 485s Selecting previously unselected package r-cran-numderiv. 485s Preparing to unpack .../131-r-cran-numderiv_2016.8-1.1-3_all.deb ... 485s Unpacking r-cran-numderiv (2016.8-1.1-3) ... 485s Selecting previously unselected package r-cran-ucminf. 485s Preparing to unpack .../132-r-cran-ucminf_1.2.2-1_s390x.deb ... 485s Unpacking r-cran-ucminf (1.2.2-1) ... 485s Selecting previously unselected package r-cran-ordinal. 485s Preparing to unpack .../133-r-cran-ordinal_2023.12-4.1-1_s390x.deb ... 485s Unpacking r-cran-ordinal (2023.12-4.1-1) ... 485s Selecting previously unselected package r-cran-pkgbuild. 485s Preparing to unpack .../134-r-cran-pkgbuild_1.4.6-1_all.deb ... 485s Unpacking r-cran-pkgbuild (1.4.6-1) ... 485s Selecting previously unselected package r-cran-rprojroot. 485s Preparing to unpack .../135-r-cran-rprojroot_2.0.4-2_all.deb ... 485s Unpacking r-cran-rprojroot (2.0.4-2) ... 485s Selecting previously unselected package r-cran-withr. 485s Preparing to unpack .../136-r-cran-withr_3.0.2+dfsg-1_all.deb ... 485s Unpacking r-cran-withr (3.0.2+dfsg-1) ... 485s Selecting previously unselected package r-cran-pkgload. 485s Preparing to unpack .../137-r-cran-pkgload_1.4.0-1_all.deb ... 485s Unpacking r-cran-pkgload (1.4.0-1) ... 485s Selecting previously unselected package r-cran-praise. 485s Preparing to unpack .../138-r-cran-praise_1.0.0-4build1_all.deb ... 485s Unpacking r-cran-praise (1.0.0-4build1) ... 485s Selecting previously unselected package r-cran-waldo. 485s Preparing to unpack .../139-r-cran-waldo_0.6.1-2_all.deb ... 485s Unpacking r-cran-waldo (0.6.1-2) ... 485s Selecting previously unselected package r-cran-testthat. 485s Preparing to unpack .../140-r-cran-testthat_3.2.3-1_s390x.deb ... 485s Unpacking r-cran-testthat (3.2.3-1) ... 485s Selecting previously unselected package r-cran-xtable. 485s Preparing to unpack .../141-r-cran-xtable_1%3a1.8-4-2_all.deb ... 485s Unpacking r-cran-xtable (1:1.8-4-2) ... 486s Setting up libgraphite2-3:s390x (1.3.14-2ubuntu1) ... 486s Setting up libpixman-1-0:s390x (0.44.0-3) ... 486s Setting up libsharpyuv0:s390x (1.5.0-0.1) ... 486s Setting up libncurses-dev:s390x (6.5+20250216-2) ... 486s Setting up libxrender1:s390x (1:0.9.10-1.1build1) ... 486s Setting up libdatrie1:s390x (0.2.13-3build1) ... 486s Setting up libxcb-render0:s390x (1.17.0-2) ... 486s Setting up unzip (6.0-28ubuntu6) ... 486s Setting up x11-common (1:7.7+23ubuntu3) ... 486s Setting up libdeflate0:s390x (1.23-1) ... 486s Setting up libnlopt0:s390x (2.7.1-6ubuntu3) ... 486s Setting up libxcb-shm0:s390x (1.17.0-2) ... 486s Setting up libreadline-dev:s390x (8.2-6) ... 486s Setting up libgomp1:s390x (15-20250222-0ubuntu1) ... 486s Setting up libjbig0:s390x (2.1-6.1ubuntu2) ... 486s Setting up libpcre2-16-0:s390x (10.45-1) ... 486s Setting up zip (3.0-14ubuntu2) ... 486s Setting up libpcre2-32-0:s390x (10.45-1) ... 486s Setting up libblas3:s390x (3.12.1-2) ... 486s update-alternatives: using /usr/lib/s390x-linux-gnu/blas/libblas.so.3 to provide /usr/lib/s390x-linux-gnu/libblas.so.3 (libblas.so.3-s390x-linux-gnu) in auto mode 486s Setting up libtirpc-dev:s390x (1.3.4+ds-1.3) ... 486s Setting up libpkgconf3:s390x (1.8.1-4) ... 486s Setting up libfreetype6:s390x (2.13.3+dfsg-1) ... 486s Setting up fonts-dejavu-mono (2.37-8) ... 486s Setting up libmpc3:s390x (1.3.1-1build2) ... 486s Setting up libtcl8.6:s390x (8.6.16+dfsg-1) ... 486s Setting up icu-devtools (76.1-1ubuntu2) ... 486s Setting up fonts-dejavu-core (2.37-8) ... 486s Setting up pkgconf-bin (1.8.1-4) ... 486s Setting up libjpeg-turbo8:s390x (2.1.5-3ubuntu2) ... 486s Setting up libgfortran5:s390x (15-20250222-0ubuntu1) ... 486s Setting up libwebp7:s390x (1.5.0-0.1) ... 486s Setting up liblzma-dev:s390x (5.6.4-1) ... 486s Setting up libubsan1:s390x (15-20250222-0ubuntu1) ... 486s Setting up zlib1g-dev:s390x (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 486s Setting up libpcre2-posix3:s390x (10.45-1) ... 486s Setting up libasan8:s390x (15-20250222-0ubuntu1) ... 486s Setting up libharfbuzz0b:s390x (10.2.0-1) ... 486s Setting up libthai-data (0.1.29-2build1) ... 486s Setting up libxss1:s390x (1:1.2.3-1build3) ... 486s Setting up libpaper2:s390x (2.2.5-0.3) ... 486s Setting up libisl23:s390x (0.27-1) ... 486s Setting up libdeflate-dev:s390x (1.23-1) ... 486s Setting up libicu-dev:s390x (76.1-1ubuntu2) ... 486s Setting up xdg-utils (1.2.1-2ubuntu1) ... 486s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 486s Setting up libcc1-0:s390x (15-20250222-0ubuntu1) ... 486s Setting up libblas-dev:s390x (3.12.1-2) ... 486s update-alternatives: using /usr/lib/s390x-linux-gnu/blas/libblas.so to provide /usr/lib/s390x-linux-gnu/libblas.so (libblas.so-s390x-linux-gnu) in auto mode 486s Setting up dctrl-tools (2.24-3build3) ... 486s Setting up libitm1:s390x (15-20250222-0ubuntu1) ... 486s Setting up libbz2-dev:s390x (1.0.8-6) ... 486s Setting up libjpeg8:s390x (8c-2ubuntu11) ... 486s Setting up libice6:s390x (2:1.1.1-1) ... 486s Setting up libjpeg-turbo8-dev:s390x (2.1.5-3ubuntu2) ... 486s Setting up liblapack3:s390x (3.12.1-2) ... 486s update-alternatives: using /usr/lib/s390x-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/s390x-linux-gnu/liblapack.so.3 (liblapack.so.3-s390x-linux-gnu) in auto mode 486s Setting up libpcre2-dev:s390x (10.45-1) ... 486s Setting up fontconfig-config (2.15.0-2ubuntu1) ... 486s Setting up libpng-dev:s390x (1.6.47-1) ... 486s Setting up libpaper-utils (2.2.5-0.3) ... 486s Setting up pkgconf:s390x (1.8.1-4) ... 486s Setting up libthai0:s390x (0.1.29-2build1) ... 486s Setting up liblapack-dev:s390x (3.12.1-2) ... 486s update-alternatives: using /usr/lib/s390x-linux-gnu/lapack/liblapack.so to provide /usr/lib/s390x-linux-gnu/liblapack.so (liblapack.so-s390x-linux-gnu) in auto mode 486s Setting up cpp-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 486s Setting up cpp-14 (14.2.0-17ubuntu3) ... 486s Setting up libtiff6:s390x (4.5.1+git230720-4ubuntu4) ... 486s Setting up libfontconfig1:s390x (2.15.0-2ubuntu1) ... 486s Setting up libgcc-14-dev:s390x (14.2.0-17ubuntu3) ... 486s Setting up libjpeg8-dev:s390x (8c-2ubuntu11) ... 486s Setting up libstdc++-14-dev:s390x (14.2.0-17ubuntu3) ... 486s Setting up libsm6:s390x (2:1.2.4-1) ... 486s Setting up libgfortran-14-dev:s390x (14.2.0-17ubuntu3) ... 486s Setting up fontconfig (2.15.0-2ubuntu1) ... 488s Regenerating fonts cache... done. 488s Setting up libxft2:s390x (2.3.6-1build1) ... 488s Setting up cpp-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 488s Setting up libtk8.6:s390x (8.6.16-1) ... 488s Setting up libpango-1.0-0:s390x (1.56.2-1) ... 488s Setting up libjpeg-dev:s390x (8c-2ubuntu11) ... 488s Setting up libcairo2:s390x (1.18.2-2) ... 488s Setting up gcc-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 488s Setting up gcc-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 488s Setting up libxt6t64:s390x (1:1.2.1-1.2build1) ... 488s Setting up g++-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 488s Setting up cpp (4:14.2.0-1ubuntu1) ... 488s Setting up libpangoft2-1.0-0:s390x (1.56.2-1) ... 488s Setting up libpangocairo-1.0-0:s390x (1.56.2-1) ... 488s Setting up gfortran-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 488s Setting up g++-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 488s Setting up gcc-14 (14.2.0-17ubuntu3) ... 488s Setting up r-base-core (4.4.3-1) ... 488s Creating config file /etc/R/Renviron with new version 488s Setting up r-cran-crayon (1.5.3-1) ... 488s Setting up r-cran-lattice (0.22-6-1) ... 488s Setting up r-cran-ps (1.9.0-1) ... 488s Setting up r-cran-nlme (3.1.167-1) ... 488s Setting up r-cran-statmod (1.5.0-1) ... 488s Setting up r-cran-nnet (7.3-20-1) ... 488s Setting up g++-14 (14.2.0-17ubuntu3) ... 488s Setting up r-cran-r6 (2.6.1-1) ... 488s Setting up r-cran-pkgkitten (0.2.4-1) ... 488s Setting up gfortran-14 (14.2.0-17ubuntu3) ... 488s Setting up r-cran-numderiv (2016.8-1.1-3) ... 488s Setting up r-cran-magrittr (2.0.3-1) ... 488s Setting up r-cran-littler (0.3.20-2) ... 488s Setting up r-cran-fs (1.6.5+dfsg-1) ... 488s Setting up r-cran-rcpp (1.0.14-1) ... 488s Setting up r-cran-brio (1.1.5-1) ... 488s Setting up r-cran-nloptr (2.1.1-1) ... 488s Setting up r-cran-boot (1.3-31-1) ... 488s Setting up r-cran-diffobj (0.3.5-1) ... 488s Setting up r-cran-rlang (1.1.5-1) ... 488s Setting up littler (0.3.20-2) ... 488s Setting up gfortran-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 488s Setting up r-cran-withr (3.0.2+dfsg-1) ... 488s Setting up r-cran-processx (3.8.6-1) ... 488s Setting up r-cran-praise (1.0.0-4build1) ... 488s Setting up r-cran-digest (0.6.37-1) ... 488s Setting up r-cran-evaluate (1.0.3-1) ... 488s Setting up r-cran-mass (7.3-64-1) ... 488s Setting up r-cran-glue (1.8.0-1) ... 488s Setting up r-cran-xtable (1:1.8-4-2) ... 488s Setting up r-cran-cli (3.6.4-1) ... 488s Setting up r-cran-rbibutils (2.3-1) ... 488s Setting up r-cran-lifecycle (1.0.4+dfsg-1) ... 488s Setting up r-cran-rprojroot (2.0.4-2) ... 488s Setting up gcc (4:14.2.0-1ubuntu1) ... 488s Setting up r-cran-jsonlite (1.9.1+dfsg-1) ... 488s Setting up r-cran-ucminf (1.2.2-1) ... 488s Setting up r-cran-waldo (0.6.1-2) ... 488s Setting up r-cran-matrix (1.7-3-1) ... 488s Setting up g++ (4:14.2.0-1ubuntu1) ... 488s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 488s Setting up build-essential (12.10ubuntu1) ... 488s Setting up r-cran-rcppeigen (0.3.4.0.2-1) ... 488s Setting up r-cran-minqa (1.2.8-1) ... 488s Setting up r-cran-callr (3.7.6-1) ... 488s Setting up r-cran-ordinal (2023.12-4.1-1) ... 488s Setting up r-cran-desc (1.4.3-1) ... 488s Setting up r-cran-rdpack (2.6.2-1syncable1) ... 488s Setting up gfortran (4:14.2.0-1ubuntu1) ... 488s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 488s 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 488s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 488s 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 488s Setting up r-cran-pkgbuild (1.4.6-1) ... 488s Setting up r-cran-reformulas (0.4.0-1) ... 488s Setting up r-cran-pkgload (1.4.0-1) ... 488s Setting up r-base-dev (4.4.3-1) ... 488s Setting up r-cran-lme4 (1.1-36-1) ... 488s Setting up r-cran-testthat (3.2.3-1) ... 488s Setting up pkg-r-autopkgtest (20231212ubuntu1) ... 488s Processing triggers for libc-bin (2.41-1ubuntu2) ... 488s Processing triggers for man-db (2.13.0-1) ... 489s Processing triggers for install-info (7.1.1-1) ... 491s autopkgtest [18:22:46]: test pkg-r-autopkgtest: /usr/share/dh-r/pkg-r-autopkgtest 491s autopkgtest [18:22:46]: test pkg-r-autopkgtest: [----------------------- 491s Test: Try to load the R library ordinal 492s 492s R version 4.4.3 (2025-02-28) -- "Trophy Case" 492s Copyright (C) 2025 The R Foundation for Statistical Computing 492s Platform: s390x-ibm-linux-gnu 492s 492s R is free software and comes with ABSOLUTELY NO WARRANTY. 492s You are welcome to redistribute it under certain conditions. 492s Type 'license()' or 'licence()' for distribution details. 492s 492s R is a collaborative project with many contributors. 492s Type 'contributors()' for more information and 492s 'citation()' on how to cite R or R packages in publications. 492s 492s Type 'demo()' for some demos, 'help()' for on-line help, or 492s 'help.start()' for an HTML browser interface to help. 492s Type 'q()' to quit R. 492s 492s > library('ordinal') 492s > 492s > 492s Other tests are currently unsupported! 492s They will be progressively added. 493s autopkgtest [18:22:48]: test pkg-r-autopkgtest: -----------------------] 493s autopkgtest [18:22:48]: test pkg-r-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 493s pkg-r-autopkgtest PASS 493s autopkgtest [18:22:48]: @@@@@@@@@@@@@@@@@@@@ summary 493s run-unit-test PASS 493s pkg-r-autopkgtest PASS 500s nova [W] Using flock in prodstack6-s390x 500s Creating nova instance adt-plucky-s390x-r-cran-ordinal-20250315-181434-juju-7f2275-prod-proposed-migration-environment-2-f0d52814-2753-46c3-95ec-fd0dc2fa95db from image adt/ubuntu-plucky-s390x-server-20250315.img (UUID 3d3557fa-fd0f-4bba-9b89-8d5964e09f61)... 500s nova [W] Timed out waiting for 1311deb3-0ea8-4497-a553-d84c7db73c46 to get deleted. 500s nova [W] Using flock in prodstack6-s390x 500s flock: timeout while waiting to get lock 500s Creating nova instance adt-plucky-s390x-r-cran-ordinal-20250315-181434-juju-7f2275-prod-proposed-migration-environment-2-f0d52814-2753-46c3-95ec-fd0dc2fa95db from image adt/ubuntu-plucky-s390x-server-20250315.img (UUID 3d3557fa-fd0f-4bba-9b89-8d5964e09f61)... 500s nova [W] Timed out waiting for 17632e20-a273-4313-af83-8552bde7aa1a to get deleted.