0s autopkgtest [18:52:32]: starting date and time: 2025-05-03 18:52:32+0000 0s autopkgtest [18:52:32]: git checkout: 9986aa8c Merge branch 'skia/fix_network_interface' into 'ubuntu/production' 0s autopkgtest [18:52:32]: host juju-7f2275-prod-proposed-migration-environment-23; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.bhffetx_/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:nlme --apt-upgrade r-cran-ordinal --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=nlme/3.1.168-1 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor builder-cpu2-ram4-disk20 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-23@bos03-8.secgroup --name adt-questing-amd64-r-cran-ordinal-20250503-185232-juju-7f2275-prod-proposed-migration-environment-23-e9e3372d-3898-4be5-93a3-aad03b3b45e8 --image adt/ubuntu-questing-amd64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-23 --net-id=net_prod-proposed-migration-amd64 -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 48s autopkgtest [18:53:20]: testbed dpkg architecture: amd64 48s autopkgtest [18:53:20]: testbed apt version: 3.0.0 49s autopkgtest [18:53:21]: @@@@@@@@@@@@@@@@@@@@ test bed setup 49s autopkgtest [18:53:21]: testbed release detected to be: None 50s autopkgtest [18:53:22]: updating testbed package index (apt update) 50s Get:1 http://ftpmaster.internal/ubuntu questing-proposed InRelease [110 kB] 50s Hit:2 http://ftpmaster.internal/ubuntu questing InRelease 50s Hit:3 http://ftpmaster.internal/ubuntu questing-updates InRelease 50s Hit:4 http://ftpmaster.internal/ubuntu questing-security InRelease 50s Get:5 http://ftpmaster.internal/ubuntu questing-proposed/main Sources [149 kB] 51s Get:6 http://ftpmaster.internal/ubuntu questing-proposed/multiverse Sources [33.7 kB] 51s Get:7 http://ftpmaster.internal/ubuntu questing-proposed/universe Sources [1442 kB] 51s Get:8 http://ftpmaster.internal/ubuntu questing-proposed/main amd64 Packages [203 kB] 51s Get:9 http://ftpmaster.internal/ubuntu questing-proposed/main i386 Packages [146 kB] 51s Get:10 http://ftpmaster.internal/ubuntu questing-proposed/universe i386 Packages [576 kB] 51s Get:11 http://ftpmaster.internal/ubuntu questing-proposed/universe amd64 Packages [1424 kB] 51s Get:12 http://ftpmaster.internal/ubuntu questing-proposed/multiverse i386 Packages [23.1 kB] 51s Get:13 http://ftpmaster.internal/ubuntu questing-proposed/multiverse amd64 Packages [48.6 kB] 51s Fetched 4155 kB in 1s (3755 kB/s) 52s Reading package lists... 52s autopkgtest [18:53:24]: upgrading testbed (apt dist-upgrade and autopurge) 53s Reading package lists... 53s Building dependency tree... 53s Reading state information... 53s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 53s Starting 2 pkgProblemResolver with broken count: 0 53s Done 54s Entering ResolveByKeep 54s 54s Calculating upgrade... 54s The following packages will be upgraded: 54s cloud-init cloud-init-base debianutils libmbim-glib4 libmbim-proxy 54s libnftnl11 libqmi-glib5 libqmi-proxy libsepol2 python3-lazr.restfulclient 54s sos 54s 11 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 54s Need to get 2693 kB of archives. 54s After this operation, 104 kB disk space will be freed. 54s Get:1 http://ftpmaster.internal/ubuntu questing/main amd64 debianutils amd64 5.22 [93.0 kB] 55s Get:2 http://ftpmaster.internal/ubuntu questing/main amd64 libsepol2 amd64 3.8.1-1 [327 kB] 55s Get:3 http://ftpmaster.internal/ubuntu questing/main amd64 libnftnl11 amd64 1.2.9-1 [69.1 kB] 55s Get:4 http://ftpmaster.internal/ubuntu questing/main amd64 cloud-init-base all 25.2~1g7a0265d3-0ubuntu1 [619 kB] 55s Get:5 http://ftpmaster.internal/ubuntu questing/main amd64 libmbim-proxy amd64 1.32.0-1 [6276 B] 55s Get:6 http://ftpmaster.internal/ubuntu questing/main amd64 libmbim-glib4 amd64 1.32.0-1 [233 kB] 55s Get:7 http://ftpmaster.internal/ubuntu questing/main amd64 libqmi-proxy amd64 1.36.0-1 [6220 B] 55s Get:8 http://ftpmaster.internal/ubuntu questing/main amd64 libqmi-glib5 amd64 1.36.0-1 [920 kB] 55s Get:9 http://ftpmaster.internal/ubuntu questing/main amd64 python3-lazr.restfulclient all 0.14.6-3 [51.0 kB] 55s Get:10 http://ftpmaster.internal/ubuntu questing/main amd64 sos all 4.9.1-1 [367 kB] 55s Get:11 http://ftpmaster.internal/ubuntu questing/main amd64 cloud-init all 25.2~1g7a0265d3-0ubuntu1 [2106 B] 55s Preconfiguring packages ... 55s Fetched 2693 kB in 1s (4049 kB/s) 56s (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 ... 80514 files and directories currently installed.) 56s Preparing to unpack .../debianutils_5.22_amd64.deb ... 56s Unpacking debianutils (5.22) over (5.21) ... 56s Setting up debianutils (5.22) ... 56s (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 ... 80514 files and directories currently installed.) 56s Preparing to unpack .../libsepol2_3.8.1-1_amd64.deb ... 56s Unpacking libsepol2:amd64 (3.8.1-1) over (3.7-1) ... 56s Setting up libsepol2:amd64 (3.8.1-1) ... 56s (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 ... 80514 files and directories currently installed.) 56s Preparing to unpack .../0-libnftnl11_1.2.9-1_amd64.deb ... 56s Unpacking libnftnl11:amd64 (1.2.9-1) over (1.2.8-1) ... 56s Preparing to unpack .../1-cloud-init-base_25.2~1g7a0265d3-0ubuntu1_all.deb ... 56s Unpacking cloud-init-base (25.2~1g7a0265d3-0ubuntu1) over (25.1.1-0ubuntu2) ... 56s Preparing to unpack .../2-libmbim-proxy_1.32.0-1_amd64.deb ... 56s Unpacking libmbim-proxy (1.32.0-1) over (1.31.2-0ubuntu4) ... 56s Preparing to unpack .../3-libmbim-glib4_1.32.0-1_amd64.deb ... 56s Unpacking libmbim-glib4:amd64 (1.32.0-1) over (1.31.2-0ubuntu4) ... 56s Preparing to unpack .../4-libqmi-proxy_1.36.0-1_amd64.deb ... 56s Unpacking libqmi-proxy (1.36.0-1) over (1.35.6-1) ... 56s Preparing to unpack .../5-libqmi-glib5_1.36.0-1_amd64.deb ... 56s Unpacking libqmi-glib5:amd64 (1.36.0-1) over (1.35.6-1) ... 57s Preparing to unpack .../6-python3-lazr.restfulclient_0.14.6-3_all.deb ... 57s Unpacking python3-lazr.restfulclient (0.14.6-3) over (0.14.6-2) ... 57s Preparing to unpack .../7-sos_4.9.1-1_all.deb ... 57s Unpacking sos (4.9.1-1) over (4.9.0-6) ... 57s Preparing to unpack .../8-cloud-init_25.2~1g7a0265d3-0ubuntu1_all.deb ... 57s Unpacking cloud-init (25.2~1g7a0265d3-0ubuntu1) over (25.1.1-0ubuntu2) ... 57s Setting up sos (4.9.1-1) ... 57s Setting up libnftnl11:amd64 (1.2.9-1) ... 57s Setting up cloud-init-base (25.2~1g7a0265d3-0ubuntu1) ... 59s Setting up python3-lazr.restfulclient (0.14.6-3) ... 59s Setting up libmbim-glib4:amd64 (1.32.0-1) ... 59s Setting up cloud-init (25.2~1g7a0265d3-0ubuntu1) ... 59s Setting up libmbim-proxy (1.32.0-1) ... 59s Setting up libqmi-glib5:amd64 (1.36.0-1) ... 59s Setting up libqmi-proxy (1.36.0-1) ... 59s Processing triggers for libc-bin (2.41-6ubuntu1) ... 59s Processing triggers for rsyslog (8.2412.0-2ubuntu2) ... 59s Processing triggers for man-db (2.13.0-1) ... 61s Reading package lists... 61s Building dependency tree... 61s Reading state information... 62s Starting pkgProblemResolver with broken count: 0 62s Starting 2 pkgProblemResolver with broken count: 0 62s Done 62s Solving dependencies... 62s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 62s autopkgtest [18:53:34]: rebooting testbed after setup commands that affected boot 86s autopkgtest [18:53:58]: testbed running kernel: Linux 6.14.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Sun Apr 6 15:05:05 UTC 2025 88s autopkgtest [18:54:00]: @@@@@@@@@@@@@@@@@@@@ apt-source r-cran-ordinal 90s Get:1 http://ftpmaster.internal/ubuntu questing/universe r-cran-ordinal 2023.12-4.1-1 (dsc) [2258 B] 90s Get:2 http://ftpmaster.internal/ubuntu questing/universe r-cran-ordinal 2023.12-4.1-1 (tar) [804 kB] 90s Get:3 http://ftpmaster.internal/ubuntu questing/universe r-cran-ordinal 2023.12-4.1-1 (diff) [3132 B] 90s gpgv: Signature made Wed Oct 9 23:44:36 2024 UTC 90s gpgv: using RSA key 73471499CC60ED9EEE805946C5BD6C8F2295D502 90s gpgv: issuer "plessy@debian.org" 90s gpgv: Can't check signature: No public key 90s dpkg-source: warning: cannot verify inline signature for ./r-cran-ordinal_2023.12-4.1-1.dsc: no acceptable signature found 90s autopkgtest [18:54:02]: testing package r-cran-ordinal version 2023.12-4.1-1 91s autopkgtest [18:54:03]: build not needed 92s autopkgtest [18:54:04]: test run-unit-test: preparing testbed 92s Reading package lists... 92s Building dependency tree... 92s Reading state information... 93s Starting pkgProblemResolver with broken count: 0 93s Starting 2 pkgProblemResolver with broken count: 0 93s Done 93s The following NEW packages will be installed: 93s fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-mono libblas3 93s libcairo2 libdatrie1 libdeflate0 libfontconfig1 libgfortran5 libgomp1 93s libgraphite2-3 libharfbuzz0b libice6 libjbig0 libjpeg-turbo8 libjpeg8 93s liblapack3 liblerc4 libnlopt0 libpango-1.0-0 libpangocairo-1.0-0 93s libpangoft2-1.0-0 libpaper-utils libpaper2 libpixman-1-0 libsharpyuv0 libsm6 93s libtcl8.6 libthai-data libthai0 libtiff6 libtk8.6 libwebp7 libxcb-render0 93s libxcb-shm0 libxft2 libxrender1 libxss1 libxt6t64 littler r-base-core 93s r-cran-boot r-cran-brio r-cran-callr r-cran-cli r-cran-crayon r-cran-desc 93s r-cran-diffobj r-cran-digest r-cran-evaluate r-cran-fs r-cran-glue 93s r-cran-jsonlite r-cran-lattice r-cran-lifecycle r-cran-littler r-cran-lme4 93s r-cran-magrittr r-cran-mass r-cran-matrix r-cran-minqa r-cran-nlme 93s r-cran-nloptr r-cran-nnet r-cran-numderiv r-cran-ordinal r-cran-pkgbuild 93s r-cran-pkgkitten r-cran-pkgload r-cran-praise r-cran-processx r-cran-ps 93s r-cran-r6 r-cran-rbibutils r-cran-rcpp r-cran-rcppeigen r-cran-rdpack 93s r-cran-reformulas r-cran-rlang r-cran-rprojroot r-cran-statmod 93s r-cran-testthat r-cran-ucminf r-cran-waldo r-cran-withr r-cran-xtable unzip 93s x11-common xdg-utils zip 93s 0 upgraded, 91 newly installed, 0 to remove and 0 not upgraded. 93s Need to get 73.9 MB of archives. 93s After this operation, 153 MB of additional disk space will be used. 93s Get:1 http://ftpmaster.internal/ubuntu questing/main amd64 fonts-dejavu-mono all 2.37-8 [502 kB] 94s Get:2 http://ftpmaster.internal/ubuntu questing/main amd64 fonts-dejavu-core all 2.37-8 [835 kB] 94s Get:3 http://ftpmaster.internal/ubuntu questing/main amd64 fontconfig-config amd64 2.15.0-2.2ubuntu1 [37.8 kB] 94s Get:4 http://ftpmaster.internal/ubuntu questing/main amd64 libfontconfig1 amd64 2.15.0-2.2ubuntu1 [164 kB] 94s Get:5 http://ftpmaster.internal/ubuntu questing/main amd64 fontconfig amd64 2.15.0-2.2ubuntu1 [180 kB] 94s Get:6 http://ftpmaster.internal/ubuntu questing/main amd64 libblas3 amd64 3.12.1-2 [359 kB] 94s Get:7 http://ftpmaster.internal/ubuntu questing/main amd64 libpixman-1-0 amd64 0.44.0-3 [427 kB] 94s Get:8 http://ftpmaster.internal/ubuntu questing/main amd64 libxcb-render0 amd64 1.17.0-2 [16.2 kB] 94s Get:9 http://ftpmaster.internal/ubuntu questing/main amd64 libxcb-shm0 amd64 1.17.0-2 [5758 B] 94s Get:10 http://ftpmaster.internal/ubuntu questing/main amd64 libxrender1 amd64 1:0.9.10-1.1build1 [19.0 kB] 94s Get:11 http://ftpmaster.internal/ubuntu questing/main amd64 libcairo2 amd64 1.18.4-1 [662 kB] 94s Get:12 http://ftpmaster.internal/ubuntu questing/main amd64 libdatrie1 amd64 0.2.13-3build1 [19.0 kB] 94s Get:13 http://ftpmaster.internal/ubuntu questing/main amd64 libdeflate0 amd64 1.23-2 [49.9 kB] 94s Get:14 http://ftpmaster.internal/ubuntu questing/main amd64 libgfortran5 amd64 15-20250404-0ubuntu1 [926 kB] 94s Get:15 http://ftpmaster.internal/ubuntu questing/main amd64 libgomp1 amd64 15-20250404-0ubuntu1 [151 kB] 94s Get:16 http://ftpmaster.internal/ubuntu questing/main amd64 libgraphite2-3 amd64 1.3.14-2ubuntu1 [73.1 kB] 94s Get:17 http://ftpmaster.internal/ubuntu questing/main amd64 libharfbuzz0b amd64 10.2.0-1 [543 kB] 94s Get:18 http://ftpmaster.internal/ubuntu questing/main amd64 x11-common all 1:7.7+23ubuntu4 [21.8 kB] 94s Get:19 http://ftpmaster.internal/ubuntu questing/main amd64 libice6 amd64 2:1.1.1-1 [44.1 kB] 94s Get:20 http://ftpmaster.internal/ubuntu questing/main amd64 libjpeg-turbo8 amd64 2.1.5-3ubuntu2 [179 kB] 94s Get:21 http://ftpmaster.internal/ubuntu questing/main amd64 libjpeg8 amd64 8c-2ubuntu11 [2148 B] 94s Get:22 http://ftpmaster.internal/ubuntu questing/main amd64 liblapack3 amd64 3.12.1-2 [3179 kB] 94s Get:23 http://ftpmaster.internal/ubuntu questing/main amd64 liblerc4 amd64 4.0.0+ds-5ubuntu1 [271 kB] 94s Get:24 http://ftpmaster.internal/ubuntu questing/main amd64 libthai-data all 0.1.29-2build1 [158 kB] 94s Get:25 http://ftpmaster.internal/ubuntu questing/main amd64 libthai0 amd64 0.1.29-2build1 [18.9 kB] 94s Get:26 http://ftpmaster.internal/ubuntu questing/main amd64 libpango-1.0-0 amd64 1.56.3-1 [256 kB] 94s Get:27 http://ftpmaster.internal/ubuntu questing/main amd64 libpangoft2-1.0-0 amd64 1.56.3-1 [52.9 kB] 94s Get:28 http://ftpmaster.internal/ubuntu questing/main amd64 libpangocairo-1.0-0 amd64 1.56.3-1 [29.1 kB] 94s Get:29 http://ftpmaster.internal/ubuntu questing/main amd64 libpaper2 amd64 2.2.5-0.3 [17.4 kB] 94s Get:30 http://ftpmaster.internal/ubuntu questing/main amd64 libpaper-utils amd64 2.2.5-0.3 [15.5 kB] 94s Get:31 http://ftpmaster.internal/ubuntu questing/main amd64 libsharpyuv0 amd64 1.5.0-0.1 [25.9 kB] 94s Get:32 http://ftpmaster.internal/ubuntu questing/main amd64 libsm6 amd64 2:1.2.4-1 [17.4 kB] 94s Get:33 http://ftpmaster.internal/ubuntu questing/main amd64 libtcl8.6 amd64 8.6.16+dfsg-1 [1086 kB] 94s Get:34 http://ftpmaster.internal/ubuntu questing/main amd64 libjbig0 amd64 2.1-6.1ubuntu2 [29.7 kB] 94s Get:35 http://ftpmaster.internal/ubuntu questing/main amd64 libwebp7 amd64 1.5.0-0.1 [378 kB] 94s Get:36 http://ftpmaster.internal/ubuntu questing/main amd64 libtiff6 amd64 4.7.0-3ubuntu1 [204 kB] 94s Get:37 http://ftpmaster.internal/ubuntu questing/main amd64 libxft2 amd64 2.3.6-1build1 [45.3 kB] 94s Get:38 http://ftpmaster.internal/ubuntu questing/main amd64 libxss1 amd64 1:1.2.3-1build3 [7204 B] 94s Get:39 http://ftpmaster.internal/ubuntu questing/main amd64 libtk8.6 amd64 8.6.16-1 [868 kB] 94s Get:40 http://ftpmaster.internal/ubuntu questing/main amd64 libxt6t64 amd64 1:1.2.1-1.2build1 [171 kB] 94s Get:41 http://ftpmaster.internal/ubuntu questing/main amd64 zip amd64 3.0-14ubuntu2 [185 kB] 94s Get:42 http://ftpmaster.internal/ubuntu questing/main amd64 unzip amd64 6.0-28ubuntu6 [181 kB] 94s Get:43 http://ftpmaster.internal/ubuntu questing/main amd64 xdg-utils all 1.2.1-2ubuntu1 [66.0 kB] 94s Get:44 http://ftpmaster.internal/ubuntu questing/universe amd64 r-base-core amd64 4.4.3-1 [28.9 MB] 95s Get:45 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-littler amd64 0.3.20-2 [96.6 kB] 95s Get:46 http://ftpmaster.internal/ubuntu questing/universe amd64 littler all 0.3.20-2 [2554 B] 95s Get:47 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-boot all 1.3-31-1 [635 kB] 95s Get:48 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-brio amd64 1.1.5-1 [39.0 kB] 95s Get:49 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-ps amd64 1.9.0-1 [408 kB] 95s Get:50 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-r6 all 2.6.1-1 [101 kB] 95s Get:51 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-processx amd64 3.8.6-1 [365 kB] 95s Get:52 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-callr all 3.7.6-1 [458 kB] 95s Get:53 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-cli amd64 3.6.4-1 [1394 kB] 95s Get:54 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-crayon all 1.5.3-1 [165 kB] 95s Get:55 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-desc all 1.4.3-1 [359 kB] 95s Get:56 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-diffobj amd64 0.3.5-1 [1117 kB] 95s Get:57 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-digest amd64 0.6.37-1 [200 kB] 95s Get:58 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-evaluate all 1.0.3-1 [114 kB] 95s Get:59 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-fs amd64 1.6.5+dfsg-1 [246 kB] 95s Get:60 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-glue amd64 1.8.0-1 [164 kB] 95s Get:61 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-jsonlite amd64 1.9.1+dfsg-1 [447 kB] 95s Get:62 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-lattice amd64 0.22-6-1 [1340 kB] 95s Get:63 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-rlang amd64 1.1.5-1 [1719 kB] 95s Get:64 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-lifecycle all 1.0.4+dfsg-1 [110 kB] 95s Get:65 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-matrix amd64 1.7-3-1 [4349 kB] 95s Get:66 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-mass amd64 7.3-65-1 [1116 kB] 95s Get:67 http://ftpmaster.internal/ubuntu questing-proposed/universe amd64 r-cran-nlme amd64 3.1.168-1 [2320 kB] 95s Get:68 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-pkgkitten all 0.2.4-1 [27.2 kB] 95s Get:69 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-rcpp amd64 1.0.14-1 [1998 kB] 95s Get:70 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-minqa amd64 1.2.8-1 [119 kB] 95s Get:71 http://ftpmaster.internal/ubuntu questing/universe amd64 libnlopt0 amd64 2.7.1-6ubuntu3 [251 kB] 95s Get:72 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-nloptr amd64 2.2.1-1 [251 kB] 95s Get:73 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-rbibutils amd64 2.3-1 [1023 kB] 95s Get:74 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-rdpack all 2.6.3-1 [636 kB] 95s Get:75 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-reformulas all 0.4.1-1 [128 kB] 95s Get:76 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-rcppeigen amd64 0.3.4.0.2-1 [1428 kB] 95s Get:77 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-statmod amd64 1.5.0-1 [295 kB] 95s Get:78 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-lme4 amd64 1.1-36-1 [4135 kB] 95s Get:79 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-magrittr amd64 2.0.3-1 [154 kB] 95s Get:80 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-nnet amd64 7.3-20-1 [116 kB] 95s Get:81 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-numderiv all 2016.8-1.1-3 [115 kB] 95s Get:82 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-ucminf amd64 1.2.2-1 [35.9 kB] 95s Get:83 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-ordinal amd64 2023.12-4.1-1 [1268 kB] 96s Get:84 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-pkgbuild all 1.4.6-1 [213 kB] 96s Get:85 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-rprojroot all 2.0.4-2 [125 kB] 96s Get:86 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-withr all 3.0.2+dfsg-1 [214 kB] 96s Get:87 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-pkgload all 1.4.0-1 [247 kB] 96s Get:88 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-praise all 1.0.0-4build1 [20.3 kB] 96s Get:89 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-waldo all 0.6.1-2 [150 kB] 96s Get:90 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-testthat amd64 3.2.3-1 [1651 kB] 96s Get:91 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-xtable all 1:1.8-4-2 [689 kB] 96s Preconfiguring packages ... 96s Fetched 73.9 MB in 3s (29.0 MB/s) 96s Selecting previously unselected package fonts-dejavu-mono. 96s (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 ... 80518 files and directories currently installed.) 96s Preparing to unpack .../00-fonts-dejavu-mono_2.37-8_all.deb ... 96s Unpacking fonts-dejavu-mono (2.37-8) ... 96s Selecting previously unselected package fonts-dejavu-core. 96s Preparing to unpack .../01-fonts-dejavu-core_2.37-8_all.deb ... 96s Unpacking fonts-dejavu-core (2.37-8) ... 96s Selecting previously unselected package fontconfig-config. 96s Preparing to unpack .../02-fontconfig-config_2.15.0-2.2ubuntu1_amd64.deb ... 97s Unpacking fontconfig-config (2.15.0-2.2ubuntu1) ... 97s Selecting previously unselected package libfontconfig1:amd64. 97s Preparing to unpack .../03-libfontconfig1_2.15.0-2.2ubuntu1_amd64.deb ... 97s Unpacking libfontconfig1:amd64 (2.15.0-2.2ubuntu1) ... 97s Selecting previously unselected package fontconfig. 97s Preparing to unpack .../04-fontconfig_2.15.0-2.2ubuntu1_amd64.deb ... 97s Unpacking fontconfig (2.15.0-2.2ubuntu1) ... 97s Selecting previously unselected package libblas3:amd64. 97s Preparing to unpack .../05-libblas3_3.12.1-2_amd64.deb ... 97s Unpacking libblas3:amd64 (3.12.1-2) ... 97s Selecting previously unselected package libpixman-1-0:amd64. 97s Preparing to unpack .../06-libpixman-1-0_0.44.0-3_amd64.deb ... 97s Unpacking libpixman-1-0:amd64 (0.44.0-3) ... 97s Selecting previously unselected package libxcb-render0:amd64. 97s Preparing to unpack .../07-libxcb-render0_1.17.0-2_amd64.deb ... 97s Unpacking libxcb-render0:amd64 (1.17.0-2) ... 97s Selecting previously unselected package libxcb-shm0:amd64. 97s Preparing to unpack .../08-libxcb-shm0_1.17.0-2_amd64.deb ... 97s Unpacking libxcb-shm0:amd64 (1.17.0-2) ... 97s Selecting previously unselected package libxrender1:amd64. 97s Preparing to unpack .../09-libxrender1_1%3a0.9.10-1.1build1_amd64.deb ... 97s Unpacking libxrender1:amd64 (1:0.9.10-1.1build1) ... 97s Selecting previously unselected package libcairo2:amd64. 97s Preparing to unpack .../10-libcairo2_1.18.4-1_amd64.deb ... 97s Unpacking libcairo2:amd64 (1.18.4-1) ... 97s Selecting previously unselected package libdatrie1:amd64. 97s Preparing to unpack .../11-libdatrie1_0.2.13-3build1_amd64.deb ... 97s Unpacking libdatrie1:amd64 (0.2.13-3build1) ... 97s Selecting previously unselected package libdeflate0:amd64. 97s Preparing to unpack .../12-libdeflate0_1.23-2_amd64.deb ... 97s Unpacking libdeflate0:amd64 (1.23-2) ... 97s Selecting previously unselected package libgfortran5:amd64. 97s Preparing to unpack .../13-libgfortran5_15-20250404-0ubuntu1_amd64.deb ... 97s Unpacking libgfortran5:amd64 (15-20250404-0ubuntu1) ... 97s Selecting previously unselected package libgomp1:amd64. 97s Preparing to unpack .../14-libgomp1_15-20250404-0ubuntu1_amd64.deb ... 97s Unpacking libgomp1:amd64 (15-20250404-0ubuntu1) ... 97s Selecting previously unselected package libgraphite2-3:amd64. 97s Preparing to unpack .../15-libgraphite2-3_1.3.14-2ubuntu1_amd64.deb ... 97s Unpacking libgraphite2-3:amd64 (1.3.14-2ubuntu1) ... 97s Selecting previously unselected package libharfbuzz0b:amd64. 97s Preparing to unpack .../16-libharfbuzz0b_10.2.0-1_amd64.deb ... 97s Unpacking libharfbuzz0b:amd64 (10.2.0-1) ... 97s Selecting previously unselected package x11-common. 97s Preparing to unpack .../17-x11-common_1%3a7.7+23ubuntu4_all.deb ... 97s Unpacking x11-common (1:7.7+23ubuntu4) ... 97s Selecting previously unselected package libice6:amd64. 97s Preparing to unpack .../18-libice6_2%3a1.1.1-1_amd64.deb ... 97s Unpacking libice6:amd64 (2:1.1.1-1) ... 97s Selecting previously unselected package libjpeg-turbo8:amd64. 97s Preparing to unpack .../19-libjpeg-turbo8_2.1.5-3ubuntu2_amd64.deb ... 97s Unpacking libjpeg-turbo8:amd64 (2.1.5-3ubuntu2) ... 97s Selecting previously unselected package libjpeg8:amd64. 97s Preparing to unpack .../20-libjpeg8_8c-2ubuntu11_amd64.deb ... 97s Unpacking libjpeg8:amd64 (8c-2ubuntu11) ... 97s Selecting previously unselected package liblapack3:amd64. 97s Preparing to unpack .../21-liblapack3_3.12.1-2_amd64.deb ... 97s Unpacking liblapack3:amd64 (3.12.1-2) ... 97s Selecting previously unselected package liblerc4:amd64. 97s Preparing to unpack .../22-liblerc4_4.0.0+ds-5ubuntu1_amd64.deb ... 97s Unpacking liblerc4:amd64 (4.0.0+ds-5ubuntu1) ... 97s Selecting previously unselected package libthai-data. 97s Preparing to unpack .../23-libthai-data_0.1.29-2build1_all.deb ... 97s Unpacking libthai-data (0.1.29-2build1) ... 97s Selecting previously unselected package libthai0:amd64. 97s Preparing to unpack .../24-libthai0_0.1.29-2build1_amd64.deb ... 97s Unpacking libthai0:amd64 (0.1.29-2build1) ... 97s Selecting previously unselected package libpango-1.0-0:amd64. 97s Preparing to unpack .../25-libpango-1.0-0_1.56.3-1_amd64.deb ... 97s Unpacking libpango-1.0-0:amd64 (1.56.3-1) ... 97s Selecting previously unselected package libpangoft2-1.0-0:amd64. 97s Preparing to unpack .../26-libpangoft2-1.0-0_1.56.3-1_amd64.deb ... 97s Unpacking libpangoft2-1.0-0:amd64 (1.56.3-1) ... 97s Selecting previously unselected package libpangocairo-1.0-0:amd64. 97s Preparing to unpack .../27-libpangocairo-1.0-0_1.56.3-1_amd64.deb ... 97s Unpacking libpangocairo-1.0-0:amd64 (1.56.3-1) ... 97s Selecting previously unselected package libpaper2:amd64. 97s Preparing to unpack .../28-libpaper2_2.2.5-0.3_amd64.deb ... 97s Unpacking libpaper2:amd64 (2.2.5-0.3) ... 97s Selecting previously unselected package libpaper-utils. 97s Preparing to unpack .../29-libpaper-utils_2.2.5-0.3_amd64.deb ... 97s Unpacking libpaper-utils (2.2.5-0.3) ... 97s Selecting previously unselected package libsharpyuv0:amd64. 97s Preparing to unpack .../30-libsharpyuv0_1.5.0-0.1_amd64.deb ... 97s Unpacking libsharpyuv0:amd64 (1.5.0-0.1) ... 97s Selecting previously unselected package libsm6:amd64. 97s Preparing to unpack .../31-libsm6_2%3a1.2.4-1_amd64.deb ... 97s Unpacking libsm6:amd64 (2:1.2.4-1) ... 98s Selecting previously unselected package libtcl8.6:amd64. 98s Preparing to unpack .../32-libtcl8.6_8.6.16+dfsg-1_amd64.deb ... 98s Unpacking libtcl8.6:amd64 (8.6.16+dfsg-1) ... 98s Selecting previously unselected package libjbig0:amd64. 98s Preparing to unpack .../33-libjbig0_2.1-6.1ubuntu2_amd64.deb ... 98s Unpacking libjbig0:amd64 (2.1-6.1ubuntu2) ... 98s Selecting previously unselected package libwebp7:amd64. 98s Preparing to unpack .../34-libwebp7_1.5.0-0.1_amd64.deb ... 98s Unpacking libwebp7:amd64 (1.5.0-0.1) ... 98s Selecting previously unselected package libtiff6:amd64. 98s Preparing to unpack .../35-libtiff6_4.7.0-3ubuntu1_amd64.deb ... 98s Unpacking libtiff6:amd64 (4.7.0-3ubuntu1) ... 98s Selecting previously unselected package libxft2:amd64. 98s Preparing to unpack .../36-libxft2_2.3.6-1build1_amd64.deb ... 98s Unpacking libxft2:amd64 (2.3.6-1build1) ... 98s Selecting previously unselected package libxss1:amd64. 98s Preparing to unpack .../37-libxss1_1%3a1.2.3-1build3_amd64.deb ... 98s Unpacking libxss1:amd64 (1:1.2.3-1build3) ... 98s Selecting previously unselected package libtk8.6:amd64. 98s Preparing to unpack .../38-libtk8.6_8.6.16-1_amd64.deb ... 98s Unpacking libtk8.6:amd64 (8.6.16-1) ... 98s Selecting previously unselected package libxt6t64:amd64. 98s Preparing to unpack .../39-libxt6t64_1%3a1.2.1-1.2build1_amd64.deb ... 98s Unpacking libxt6t64:amd64 (1:1.2.1-1.2build1) ... 98s Selecting previously unselected package zip. 98s Preparing to unpack .../40-zip_3.0-14ubuntu2_amd64.deb ... 98s Unpacking zip (3.0-14ubuntu2) ... 98s Selecting previously unselected package unzip. 98s Preparing to unpack .../41-unzip_6.0-28ubuntu6_amd64.deb ... 98s Unpacking unzip (6.0-28ubuntu6) ... 98s Selecting previously unselected package xdg-utils. 98s Preparing to unpack .../42-xdg-utils_1.2.1-2ubuntu1_all.deb ... 98s Unpacking xdg-utils (1.2.1-2ubuntu1) ... 98s Selecting previously unselected package r-base-core. 98s Preparing to unpack .../43-r-base-core_4.4.3-1_amd64.deb ... 98s Unpacking r-base-core (4.4.3-1) ... 98s Selecting previously unselected package r-cran-littler. 98s Preparing to unpack .../44-r-cran-littler_0.3.20-2_amd64.deb ... 98s Unpacking r-cran-littler (0.3.20-2) ... 98s Selecting previously unselected package littler. 98s Preparing to unpack .../45-littler_0.3.20-2_all.deb ... 98s Unpacking littler (0.3.20-2) ... 98s Selecting previously unselected package r-cran-boot. 98s Preparing to unpack .../46-r-cran-boot_1.3-31-1_all.deb ... 98s Unpacking r-cran-boot (1.3-31-1) ... 98s Selecting previously unselected package r-cran-brio. 98s Preparing to unpack .../47-r-cran-brio_1.1.5-1_amd64.deb ... 98s Unpacking r-cran-brio (1.1.5-1) ... 98s Selecting previously unselected package r-cran-ps. 98s Preparing to unpack .../48-r-cran-ps_1.9.0-1_amd64.deb ... 98s Unpacking r-cran-ps (1.9.0-1) ... 98s Selecting previously unselected package r-cran-r6. 98s Preparing to unpack .../49-r-cran-r6_2.6.1-1_all.deb ... 98s Unpacking r-cran-r6 (2.6.1-1) ... 98s Selecting previously unselected package r-cran-processx. 98s Preparing to unpack .../50-r-cran-processx_3.8.6-1_amd64.deb ... 98s Unpacking r-cran-processx (3.8.6-1) ... 98s Selecting previously unselected package r-cran-callr. 98s Preparing to unpack .../51-r-cran-callr_3.7.6-1_all.deb ... 98s Unpacking r-cran-callr (3.7.6-1) ... 98s Selecting previously unselected package r-cran-cli. 98s Preparing to unpack .../52-r-cran-cli_3.6.4-1_amd64.deb ... 98s Unpacking r-cran-cli (3.6.4-1) ... 99s Selecting previously unselected package r-cran-crayon. 99s Preparing to unpack .../53-r-cran-crayon_1.5.3-1_all.deb ... 99s Unpacking r-cran-crayon (1.5.3-1) ... 99s Selecting previously unselected package r-cran-desc. 99s Preparing to unpack .../54-r-cran-desc_1.4.3-1_all.deb ... 99s Unpacking r-cran-desc (1.4.3-1) ... 99s Selecting previously unselected package r-cran-diffobj. 99s Preparing to unpack .../55-r-cran-diffobj_0.3.5-1_amd64.deb ... 99s Unpacking r-cran-diffobj (0.3.5-1) ... 99s Selecting previously unselected package r-cran-digest. 99s Preparing to unpack .../56-r-cran-digest_0.6.37-1_amd64.deb ... 99s Unpacking r-cran-digest (0.6.37-1) ... 99s Selecting previously unselected package r-cran-evaluate. 99s Preparing to unpack .../57-r-cran-evaluate_1.0.3-1_all.deb ... 99s Unpacking r-cran-evaluate (1.0.3-1) ... 99s Selecting previously unselected package r-cran-fs. 99s Preparing to unpack .../58-r-cran-fs_1.6.5+dfsg-1_amd64.deb ... 99s Unpacking r-cran-fs (1.6.5+dfsg-1) ... 99s Selecting previously unselected package r-cran-glue. 99s Preparing to unpack .../59-r-cran-glue_1.8.0-1_amd64.deb ... 99s Unpacking r-cran-glue (1.8.0-1) ... 99s Selecting previously unselected package r-cran-jsonlite. 99s Preparing to unpack .../60-r-cran-jsonlite_1.9.1+dfsg-1_amd64.deb ... 99s Unpacking r-cran-jsonlite (1.9.1+dfsg-1) ... 99s Selecting previously unselected package r-cran-lattice. 99s Preparing to unpack .../61-r-cran-lattice_0.22-6-1_amd64.deb ... 99s Unpacking r-cran-lattice (0.22-6-1) ... 99s Selecting previously unselected package r-cran-rlang. 99s Preparing to unpack .../62-r-cran-rlang_1.1.5-1_amd64.deb ... 99s Unpacking r-cran-rlang (1.1.5-1) ... 99s Selecting previously unselected package r-cran-lifecycle. 99s Preparing to unpack .../63-r-cran-lifecycle_1.0.4+dfsg-1_all.deb ... 99s Unpacking r-cran-lifecycle (1.0.4+dfsg-1) ... 99s Selecting previously unselected package r-cran-matrix. 99s Preparing to unpack .../64-r-cran-matrix_1.7-3-1_amd64.deb ... 99s Unpacking r-cran-matrix (1.7-3-1) ... 99s Selecting previously unselected package r-cran-mass. 99s Preparing to unpack .../65-r-cran-mass_7.3-65-1_amd64.deb ... 99s Unpacking r-cran-mass (7.3-65-1) ... 99s Selecting previously unselected package r-cran-nlme. 99s Preparing to unpack .../66-r-cran-nlme_3.1.168-1_amd64.deb ... 99s Unpacking r-cran-nlme (3.1.168-1) ... 99s Selecting previously unselected package r-cran-pkgkitten. 99s Preparing to unpack .../67-r-cran-pkgkitten_0.2.4-1_all.deb ... 99s Unpacking r-cran-pkgkitten (0.2.4-1) ... 99s Selecting previously unselected package r-cran-rcpp. 99s Preparing to unpack .../68-r-cran-rcpp_1.0.14-1_amd64.deb ... 99s Unpacking r-cran-rcpp (1.0.14-1) ... 99s Selecting previously unselected package r-cran-minqa. 99s Preparing to unpack .../69-r-cran-minqa_1.2.8-1_amd64.deb ... 99s Unpacking r-cran-minqa (1.2.8-1) ... 99s Selecting previously unselected package libnlopt0:amd64. 99s Preparing to unpack .../70-libnlopt0_2.7.1-6ubuntu3_amd64.deb ... 99s Unpacking libnlopt0:amd64 (2.7.1-6ubuntu3) ... 99s Selecting previously unselected package r-cran-nloptr. 99s Preparing to unpack .../71-r-cran-nloptr_2.2.1-1_amd64.deb ... 99s Unpacking r-cran-nloptr (2.2.1-1) ... 99s Selecting previously unselected package r-cran-rbibutils. 99s Preparing to unpack .../72-r-cran-rbibutils_2.3-1_amd64.deb ... 99s Unpacking r-cran-rbibutils (2.3-1) ... 99s Selecting previously unselected package r-cran-rdpack. 99s Preparing to unpack .../73-r-cran-rdpack_2.6.3-1_all.deb ... 99s Unpacking r-cran-rdpack (2.6.3-1) ... 99s Selecting previously unselected package r-cran-reformulas. 99s Preparing to unpack .../74-r-cran-reformulas_0.4.1-1_all.deb ... 99s Unpacking r-cran-reformulas (0.4.1-1) ... 99s Selecting previously unselected package r-cran-rcppeigen. 99s Preparing to unpack .../75-r-cran-rcppeigen_0.3.4.0.2-1_amd64.deb ... 99s Unpacking r-cran-rcppeigen (0.3.4.0.2-1) ... 100s Selecting previously unselected package r-cran-statmod. 100s Preparing to unpack .../76-r-cran-statmod_1.5.0-1_amd64.deb ... 100s Unpacking r-cran-statmod (1.5.0-1) ... 100s Selecting previously unselected package r-cran-lme4. 100s Preparing to unpack .../77-r-cran-lme4_1.1-36-1_amd64.deb ... 100s Unpacking r-cran-lme4 (1.1-36-1) ... 100s Selecting previously unselected package r-cran-magrittr. 100s Preparing to unpack .../78-r-cran-magrittr_2.0.3-1_amd64.deb ... 100s Unpacking r-cran-magrittr (2.0.3-1) ... 100s Selecting previously unselected package r-cran-nnet. 100s Preparing to unpack .../79-r-cran-nnet_7.3-20-1_amd64.deb ... 100s Unpacking r-cran-nnet (7.3-20-1) ... 100s Selecting previously unselected package r-cran-numderiv. 100s Preparing to unpack .../80-r-cran-numderiv_2016.8-1.1-3_all.deb ... 100s Unpacking r-cran-numderiv (2016.8-1.1-3) ... 100s Selecting previously unselected package r-cran-ucminf. 100s Preparing to unpack .../81-r-cran-ucminf_1.2.2-1_amd64.deb ... 100s Unpacking r-cran-ucminf (1.2.2-1) ... 100s Selecting previously unselected package r-cran-ordinal. 100s Preparing to unpack .../82-r-cran-ordinal_2023.12-4.1-1_amd64.deb ... 100s Unpacking r-cran-ordinal (2023.12-4.1-1) ... 100s Selecting previously unselected package r-cran-pkgbuild. 100s Preparing to unpack .../83-r-cran-pkgbuild_1.4.6-1_all.deb ... 100s Unpacking r-cran-pkgbuild (1.4.6-1) ... 100s Selecting previously unselected package r-cran-rprojroot. 100s Preparing to unpack .../84-r-cran-rprojroot_2.0.4-2_all.deb ... 100s Unpacking r-cran-rprojroot (2.0.4-2) ... 100s Selecting previously unselected package r-cran-withr. 100s Preparing to unpack .../85-r-cran-withr_3.0.2+dfsg-1_all.deb ... 100s Unpacking r-cran-withr (3.0.2+dfsg-1) ... 100s Selecting previously unselected package r-cran-pkgload. 100s Preparing to unpack .../86-r-cran-pkgload_1.4.0-1_all.deb ... 100s Unpacking r-cran-pkgload (1.4.0-1) ... 100s Selecting previously unselected package r-cran-praise. 100s Preparing to unpack .../87-r-cran-praise_1.0.0-4build1_all.deb ... 100s Unpacking r-cran-praise (1.0.0-4build1) ... 100s Selecting previously unselected package r-cran-waldo. 100s Preparing to unpack .../88-r-cran-waldo_0.6.1-2_all.deb ... 100s Unpacking r-cran-waldo (0.6.1-2) ... 100s Selecting previously unselected package r-cran-testthat. 100s Preparing to unpack .../89-r-cran-testthat_3.2.3-1_amd64.deb ... 100s Unpacking r-cran-testthat (3.2.3-1) ... 100s Selecting previously unselected package r-cran-xtable. 100s Preparing to unpack .../90-r-cran-xtable_1%3a1.8-4-2_all.deb ... 100s Unpacking r-cran-xtable (1:1.8-4-2) ... 100s Setting up libgraphite2-3:amd64 (1.3.14-2ubuntu1) ... 100s Setting up libpixman-1-0:amd64 (0.44.0-3) ... 100s Setting up libsharpyuv0:amd64 (1.5.0-0.1) ... 100s Setting up liblerc4:amd64 (4.0.0+ds-5ubuntu1) ... 100s Setting up libxrender1:amd64 (1:0.9.10-1.1build1) ... 100s Setting up libdatrie1:amd64 (0.2.13-3build1) ... 100s Setting up libxcb-render0:amd64 (1.17.0-2) ... 100s Setting up unzip (6.0-28ubuntu6) ... 100s Setting up x11-common (1:7.7+23ubuntu4) ... 101s Setting up libdeflate0:amd64 (1.23-2) ... 101s Setting up libnlopt0:amd64 (2.7.1-6ubuntu3) ... 101s Setting up libxcb-shm0:amd64 (1.17.0-2) ... 101s Setting up libgomp1:amd64 (15-20250404-0ubuntu1) ... 101s Setting up libjbig0:amd64 (2.1-6.1ubuntu2) ... 101s Setting up zip (3.0-14ubuntu2) ... 101s Setting up libblas3:amd64 (3.12.1-2) ... 101s update-alternatives: using /usr/lib/x86_64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/x86_64-linux-gnu/libblas.so.3 (libblas.so.3-x86_64-linux-gnu) in auto mode 101s Setting up fonts-dejavu-mono (2.37-8) ... 101s Setting up libtcl8.6:amd64 (8.6.16+dfsg-1) ... 101s Setting up fonts-dejavu-core (2.37-8) ... 101s Setting up libjpeg-turbo8:amd64 (2.1.5-3ubuntu2) ... 101s Setting up libgfortran5:amd64 (15-20250404-0ubuntu1) ... 101s Setting up libwebp7:amd64 (1.5.0-0.1) ... 101s Setting up libharfbuzz0b:amd64 (10.2.0-1) ... 101s Setting up libthai-data (0.1.29-2build1) ... 101s Setting up libxss1:amd64 (1:1.2.3-1build3) ... 101s Setting up libpaper2:amd64 (2.2.5-0.3) ... 101s Setting up xdg-utils (1.2.1-2ubuntu1) ... 101s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 101s Setting up libjpeg8:amd64 (8c-2ubuntu11) ... 101s Setting up libice6:amd64 (2:1.1.1-1) ... 101s Setting up liblapack3:amd64 (3.12.1-2) ... 101s update-alternatives: using /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/x86_64-linux-gnu/liblapack.so.3 (liblapack.so.3-x86_64-linux-gnu) in auto mode 101s Setting up fontconfig-config (2.15.0-2.2ubuntu1) ... 101s Setting up libpaper-utils (2.2.5-0.3) ... 101s Setting up libthai0:amd64 (0.1.29-2build1) ... 101s Setting up libtiff6:amd64 (4.7.0-3ubuntu1) ... 101s Setting up libfontconfig1:amd64 (2.15.0-2.2ubuntu1) ... 101s Setting up libsm6:amd64 (2:1.2.4-1) ... 101s Setting up fontconfig (2.15.0-2.2ubuntu1) ... 103s Regenerating fonts cache... done. 103s Setting up libxft2:amd64 (2.3.6-1build1) ... 103s Setting up libtk8.6:amd64 (8.6.16-1) ... 103s Setting up libpango-1.0-0:amd64 (1.56.3-1) ... 103s Setting up libcairo2:amd64 (1.18.4-1) ... 103s Setting up libxt6t64:amd64 (1:1.2.1-1.2build1) ... 103s Setting up libpangoft2-1.0-0:amd64 (1.56.3-1) ... 103s Setting up libpangocairo-1.0-0:amd64 (1.56.3-1) ... 103s Setting up r-base-core (4.4.3-1) ... 103s Creating config file /etc/R/Renviron with new version 103s Setting up r-cran-crayon (1.5.3-1) ... 103s Setting up r-cran-lattice (0.22-6-1) ... 103s Setting up r-cran-ps (1.9.0-1) ... 103s Setting up r-cran-nlme (3.1.168-1) ... 103s Setting up r-cran-statmod (1.5.0-1) ... 103s Setting up r-cran-nnet (7.3-20-1) ... 103s Setting up r-cran-r6 (2.6.1-1) ... 103s Setting up r-cran-pkgkitten (0.2.4-1) ... 103s Setting up r-cran-numderiv (2016.8-1.1-3) ... 103s Setting up r-cran-magrittr (2.0.3-1) ... 103s Setting up r-cran-littler (0.3.20-2) ... 103s Setting up r-cran-fs (1.6.5+dfsg-1) ... 103s Setting up r-cran-rcpp (1.0.14-1) ... 103s Setting up r-cran-brio (1.1.5-1) ... 103s Setting up r-cran-nloptr (2.2.1-1) ... 103s Setting up r-cran-boot (1.3-31-1) ... 103s Setting up r-cran-diffobj (0.3.5-1) ... 103s Setting up r-cran-rlang (1.1.5-1) ... 103s Setting up littler (0.3.20-2) ... 103s Setting up r-cran-withr (3.0.2+dfsg-1) ... 103s Setting up r-cran-processx (3.8.6-1) ... 103s Setting up r-cran-praise (1.0.0-4build1) ... 103s Setting up r-cran-digest (0.6.37-1) ... 103s Setting up r-cran-evaluate (1.0.3-1) ... 103s Setting up r-cran-mass (7.3-65-1) ... 103s Setting up r-cran-glue (1.8.0-1) ... 103s Setting up r-cran-xtable (1:1.8-4-2) ... 103s Setting up r-cran-cli (3.6.4-1) ... 103s Setting up r-cran-rbibutils (2.3-1) ... 103s Setting up r-cran-lifecycle (1.0.4+dfsg-1) ... 103s Setting up r-cran-rprojroot (2.0.4-2) ... 103s Setting up r-cran-jsonlite (1.9.1+dfsg-1) ... 103s Setting up r-cran-ucminf (1.2.2-1) ... 103s Setting up r-cran-waldo (0.6.1-2) ... 103s Setting up r-cran-matrix (1.7-3-1) ... 103s Setting up r-cran-rcppeigen (0.3.4.0.2-1) ... 103s Setting up r-cran-minqa (1.2.8-1) ... 103s Setting up r-cran-callr (3.7.6-1) ... 103s Setting up r-cran-ordinal (2023.12-4.1-1) ... 103s Setting up r-cran-desc (1.4.3-1) ... 103s Setting up r-cran-rdpack (2.6.3-1) ... 103s Setting up r-cran-pkgbuild (1.4.6-1) ... 103s Setting up r-cran-reformulas (0.4.1-1) ... 103s Setting up r-cran-pkgload (1.4.0-1) ... 103s Setting up r-cran-lme4 (1.1-36-1) ... 103s Setting up r-cran-testthat (3.2.3-1) ... 103s Processing triggers for libc-bin (2.41-6ubuntu1) ... 103s Processing triggers for man-db (2.13.0-1) ... 105s Processing triggers for install-info (7.1.1-1) ... 106s autopkgtest [18:54:18]: test run-unit-test: [----------------------- 106s BEGIN TEST anova.R 106s 106s R version 4.4.3 (2025-02-28) -- "Trophy Case" 106s Copyright (C) 2025 The R Foundation for Statistical Computing 106s Platform: x86_64-pc-linux-gnu 106s 106s R is free software and comes with ABSOLUTELY NO WARRANTY. 106s You are welcome to redistribute it under certain conditions. 106s Type 'license()' or 'licence()' for distribution details. 106s 106s R is a collaborative project with many contributors. 106s Type 'contributors()' for more information and 106s 'citation()' on how to cite R or R packages in publications. 106s 106s Type 'demo()' for some demos, 'help()' for on-line help, or 106s 'help.start()' for an HTML browser interface to help. 106s Type 'q()' to quit R. 106s 106s > library(ordinal) 107s > data(wine) 107s > 107s > fm1 <- clm(rating ~ temp, data=wine) 107s > fmm1 <- clmm(rating ~ temp + (1|judge), data=wine) 107s > 107s > ## These now give identical printed results: 107s > ## Previously the printed model names were messed up when anova.clmm 107s > ## were called. 107s > anova(fm1, fmm1) 107s Likelihood ratio tests of cumulative link models: 107s 107s formula: link: threshold: 107s fm1 rating ~ temp logit flexible 107s fmm1 rating ~ temp + (1 | judge) logit flexible 107s 107s no.par AIC logLik LR.stat df Pr(>Chisq) 107s fm1 5 194.03 -92.013 107s fmm1 6 189.48 -88.739 6.5492 1 0.01049 * 107s --- 107s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 107s > anova(fmm1, fm1) 107s Likelihood ratio tests of cumulative link models: 107s 107s formula: link: threshold: 107s fm1 rating ~ temp logit flexible 107s fmm1 rating ~ temp + (1 | judge) logit flexible 107s 107s no.par AIC logLik LR.stat df Pr(>Chisq) 107s fm1 5 194.03 -92.013 107s fmm1 6 189.48 -88.739 6.5492 1 0.01049 * 107s --- 107s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 107s > 107s > ## Testing if 'test' and 'type' arguments are ignored properly: 107s > fm1 <- clm(rating ~ temp + contact, data=wine) 107s > fm2 <- clm(rating ~ temp, data=wine) 107s > anova(fm1, fm2, test="Chi") 107s Likelihood ratio tests of cumulative link models: 107s 107s formula: link: threshold: 107s fm2 rating ~ temp logit flexible 107s fm1 rating ~ temp + contact logit flexible 107s 107s no.par AIC logLik LR.stat df Pr(>Chisq) 107s fm2 5 194.03 -92.013 107s fm1 6 184.98 -86.492 11.043 1 0.0008902 *** 107s --- 107s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 107s > anova(fm1, fm2, type="Chi") 107s Likelihood ratio tests of cumulative link models: 107s 107s formula: link: threshold: 107s fm2 rating ~ temp logit flexible 107s fm1 rating ~ temp + contact logit flexible 107s 107s no.par AIC logLik LR.stat df Pr(>Chisq) 107s fm2 5 194.03 -92.013 107s fm1 6 184.98 -86.492 11.043 1 0.0008902 *** 107s --- 107s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 107s > anova(fm1, fm2) 107s Likelihood ratio tests of cumulative link models: 107s 107s formula: link: threshold: 107s fm2 rating ~ temp logit flexible 107s fm1 rating ~ temp + contact logit flexible 107s 107s no.par AIC logLik LR.stat df Pr(>Chisq) 107s fm2 5 194.03 -92.013 107s fm1 6 184.98 -86.492 11.043 1 0.0008902 *** 107s --- 107s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 107s > ## calling anova.clmm 107s > anova(fmm1, fm1, test="Chi") 107s Likelihood ratio tests of cumulative link models: 107s 107s formula: link: threshold: 107s fmm1 rating ~ temp + (1 | judge) logit flexible 107s fm1 rating ~ temp + contact logit flexible 107s 107s no.par AIC logLik LR.stat df Pr(>Chisq) 107s fmm1 6 189.48 -88.739 107s fm1 6 184.98 -86.492 4.4938 0 107s > anova(fmm1, fm1, type="Chi") 107s Likelihood ratio tests of cumulative link models: 107s 107s 'test' argument ignored in anova.clm 107s 107s 'test' argument ignored in anova.clm 107s 107s formula: link: threshold: 107s fmm1 rating ~ temp + (1 | judge) logit flexible 107s fm1 rating ~ temp + contact logit flexible 107s 107s no.par AIC logLik LR.stat df Pr(>Chisq) 107s fmm1 6 189.48 -88.739 107s fm1 6 184.98 -86.492 4.4938 0 107s > 107s > 107s BEGIN TEST clm.fit.R 107s 107s R version 4.4.3 (2025-02-28) -- "Trophy Case" 107s Copyright (C) 2025 The R Foundation for Statistical Computing 107s Platform: x86_64-pc-linux-gnu 107s 107s R is free software and comes with ABSOLUTELY NO WARRANTY. 107s You are welcome to redistribute it under certain conditions. 107s Type 'license()' or 'licence()' for distribution details. 107s 107s R is a collaborative project with many contributors. 107s Type 'contributors()' for more information and 107s 'citation()' on how to cite R or R packages in publications. 107s 107s Type 'demo()' for some demos, 'help()' for on-line help, or 107s 'help.start()' for an HTML browser interface to help. 107s Type 'q()' to quit R. 107s 107s > library(ordinal) 108s > data(wine) 108s > 108s > ## clm.fit with nominal and scale effects: 108s > 108s > ## get simple model: 108s > fm1 <- clm(rating ~ temp, scale=~temp, nominal=~ contact, 108s + data=wine, method="design") 108s > str(fm1, give.attr=FALSE) 108s List of 23 108s $ y : Ord.factor w/ 5 levels "1"<"2"<"3"<"4"<..: 2 3 3 4 4 4 5 5 1 2 ... 108s $ y.levels : chr [1:5] "1" "2" "3" "4" ... 108s $ X : num [1:72, 1:2] 1 1 1 1 1 1 1 1 1 1 ... 108s $ offset : num [1:72] 0 0 0 0 0 0 0 0 0 0 ... 108s $ terms :Classes 'terms', 'formula' language rating ~ temp 108s $ contrasts :List of 1 108s ..$ temp: chr "contr.treatment" 108s $ xlevels :List of 1 108s ..$ temp: chr [1:2] "cold" "warm" 108s $ weights : num [1:72] 1 1 1 1 1 1 1 1 1 1 ... 108s $ S : num [1:72, 1:2] 1 1 1 1 1 1 1 1 1 1 ... 108s $ S.terms :Classes 'terms', 'formula' language ~temp 108s $ S.off : num [1:72] 0 0 0 0 0 0 0 0 0 0 ... 108s $ S.contrasts :List of 1 108s ..$ temp: chr "contr.treatment" 108s $ S.xlevels :List of 1 108s ..$ temp: chr [1:2] "cold" "warm" 108s $ NOM : num [1:72, 1:2] 1 1 1 1 1 1 1 1 1 1 ... 108s $ nom.terms :Classes 'terms', 'formula' language ~contact 108s $ nom.contrasts:List of 1 108s ..$ contact: chr "contr.treatment" 108s $ nom.xlevels :List of 1 108s ..$ contact: chr [1:2] "no" "yes" 108s $ doFit : logi TRUE 108s $ control :List of 11 108s ..$ method : chr "design" 108s ..$ sign.location: chr "negative" 108s ..$ sign.nominal : chr "positive" 108s ..$ convergence : chr "warn" 108s ..$ trace : int 0 108s ..$ maxIter : int 100 108s ..$ gradTol : num 1e-06 108s ..$ relTol : num 1e-06 108s ..$ tol : num 1.49e-08 108s ..$ maxLineIter : int 15 108s ..$ maxModIter : int 5 108s $ link : chr "logit" 108s $ threshold : chr "flexible" 108s $ start : NULL 108s $ formulas :List of 4 108s ..$ formula :Class 'formula' language rating ~ temp 108s ..$ scale :Class 'formula' language ~temp 108s ..$ nominal :Class 'formula' language ~contact 108s ..$ fullForm:Class 'formula' language rating ~ temp + temp + contact 108s > fm1$control$method <- "Newton" 108s > res <- clm.fit(fm1) 108s > names(res) 108s [1] "aliased" "alpha" "alpha.mat" "beta" 108s [5] "coefficients" "cond.H" "convergence" "df.residual" 108s [9] "edf" "fitted.values" "gradient" "Hessian" 108s [13] "logLik" "maxGradient" "message" "n" 108s [17] "niter" "nobs" "Theta" "tJac" 108s [21] "vcov" "zeta" 108s > res$Theta 108s contact 1|2 2|3 3|4 4|5 108s 1 no -1.357136 1.2482871 3.839568 5.114111 108s 2 yes -2.969353 -0.2819631 1.959306 3.923477 108s > 108s > ## construct some weights and offsets: 108s > set.seed(1) 108s > off1 <- runif(length(fm1$y)) 108s > set.seed(1) 108s > off2 <- rnorm(length(fm1$y)) 108s > set.seed(1) 108s > wet <- runif(length(fm1$y)) 108s > 108s > ## Fit various models: 108s > fit <- clm.fit(fm1$y, fm1$X, fm1$S, fm1$NOM, weights=wet) 108s > Coef <- 108s + c(-0.905224120279548, 1.31043498891987, 3.34235590523008, 108s + 4.52389661722693, -3.03954652971192, -1.56922389038976, 108s + -1.75662549320839, -1.16845464236365, 2.52988580848393, 108s + -0.0261457032829033) 108s > stopifnot(all.equal(coef(fit), Coef, check.attributes=FALSE, tol=1e-6)) 108s > str(fit) 108s List of 20 108s $ aliased :List of 3 108s ..$ alpha:Warning message: 108s Cannot assess if all thresholds are increasing 108s Named logi [1:8] FALSE FALSE FALSE FALSE FALSE FALSE ... 108s .. ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s ..$ beta : Named logi FALSE 108s .. ..- attr(*, "names")= chr "tempwarm" 108s ..$ zeta : Named logi FALSE 108s .. ..- attr(*, "names")= chr "tempwarm" 108s $ alpha : Named num [1:8] -0.905 1.31 3.342 4.524 -3.04 ... 108s ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s $ beta : Named num 2.53 108s ..- attr(*, "names")= chr "tempwarm" 108s $ coefficients : Named num [1:10] -0.905 1.31 3.342 4.524 -3.04 ... 108s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s $ cond.H : num 161 108s $ convergence :List of 3 108s ..$ code : int 0 108s ..$ messages : chr "successful convergence" 108s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 108s $ df.residual : num 27 108s $ edf : int 10 108s $ fitted.values: num [1:72] 0.5 0.178 0.394 0.136 0.188 ... 108s $ gradient : Named num [1:10] 7.85e-15 2.69e-13 2.68e-13 -5.17e-13 3.75e-16 ... 108s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s $ Hessian : num [1:10, 1:10] 2.488 -1.01 0 0 0.207 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s $ logLik : num -44.9 108s $ maxGradient : num 8.91e-13 108s $ message : chr "Absolute and relative convergence criteria were met" 108s $ n : int 72 108s $ niter : Named num [1:2] 9 0 108s ..- attr(*, "names")= chr [1:2] "outer" "inner" 108s $ nobs : num 37 108s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s $ vcov : num [1:10, 1:10] 0.5338 0.1835 0.0254 -0.0626 -0.511 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s $ zeta : Named num -0.0261 108s ..- attr(*, "names")= chr "tempwarm" 108s - attr(*, "class")= chr "clm.fit" 108s > 108s > fit <- clm.fit(fm1$y, fm1$X, fm1$S, fm1$NOM, offset=off1) 108s > str(fit) 108s List of 20 108s $ aliased :List of 3 108s ..$ alpha: Named logi [1:8] FALSE FALSE FALSE FALSE FALSE FALSE ... 108s .. ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s ..$ beta : Named logi FALSE 108s .. ..- attr(*, "names")= chr "tempwarm" 108s ..$ zeta : Named logi FALSE 108s .. ..- attr(*, "names")= chr "tempwarm" 108s $ alpha : Named num [1:8] -0.864 1.746 4.342 5.615 -1.567 ... 108s ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s $ beta : Named num 2.7 108s ..- attr(*, "names")= chr "tempwarm" 108s $ coefficients : Named num [1:10] -0.864 1.746 4.342 5.615 -1.567 ... 108s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s $ cond.H : num 196 108s $ convergence :List of 3 108s ..$ code : int 0 108s ..$ messages : chr "successful convergence" 108s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 108s $ df.residual : num 62 108s $ edf : int 10 108s $ fitted.values: num [1:72] 0.57 0.183 0.452 0.145 0.135 ... 108s $ gradient : Named num [1:10] 2.19e-09 6.14e-08 5.92e-08 -1.23e-07 4.69e-10 ... 108s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s $ Hessian : num [1:10, 1:10] 4.48 -1.89 0 0 1.02 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s $ logLik : num -86.1 108s $ maxGradient : num 2.17e-07 108s $ message : chr "Absolute and relative convergence criteria were met" 108s $ n : int 72 108s $ niter : Named num [1:2] 8 0 108s ..- attr(*, "names")= chr [1:2] "outer" "inner" 108s $ nobs : num 72 108s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s $ vcov : num [1:10, 1:10] 0.33117 0.09074 0.00108 -0.04015 -0.31468 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s $ zeta : Named num 0.114 108s ..- attr(*, "names")=Warning message: 108s Cannot assess if all thresholds are increasing 108s chr "tempwarm" 108s - attr(*, "class")= chr "clm.fit" 108s > 108s > fit <- clm.fit(fm1$y, fm1$X, fm1$S, fm1$NOM, offset=off1, 108s + S.offset=off2) 108s > str(fit) 108s List of 20 108s $ aliased :List of 3 108s ..$ alpha: Named logi [1:8] FALSE FALSE FALSE FALSE FALSE FALSE ... 108s .. ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s ..$ beta : Named logi FALSE 108s .. ..- attr(*, "names")= chr "tempwarm" 108s ..$ zeta : Named logi FALSE 108s .. ..- attr(*, "names")= chr "tempwarm" 108s $ alpha : Named num [1:8] -0.585 1.951 3.24 4.18 -6.481 ... 108s ..- attr(*, "names")= chr [1:8] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s $ beta : Named num 2.12 108s ..- attr(*, "names")= chr "tempwarm" 108s $ coefficients : Named num [1:10] -0.585 1.951 3.24 4.18 -6.481 ... 108s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s $ cond.H : num 634 108s $ convergence :Warning message: 108s Cannot assess if all thresholds are increasing 108s List of 3 108s ..$ code : int 0 108s ..$ messages : chr "successful convergence" 108s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 108s $ df.residual : num 62 108s $ edf : int 10 108s $ fitted.values: num [1:72] 0.7899 0.1277 0.7 0.0888 0.1521 ... 108s $ gradient : Named num [1:10] 6.72e-12 8.06e-10 7.28e-10 -7.85e-10 1.15e-12 ... 108s ..- attr(*, "names")= chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s $ Hessian : num [1:10, 1:10] 4.126 -1.006 0 0 0.079 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s $ logLik : num -87.6 108s $ maxGradient : num 9.74e-10 108s $ message : chr "Absolute and relative convergence criteria were met" 108s $ n : int 72 108s $ niter : Named num [1:2] 13 0 108s ..- attr(*, "names")= chr [1:2] "outer" "inner" 108s $ nobs : num 72 108s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s $ vcov : num [1:10, 1:10] 0.2616 0.0523 0.0345 0.0236 -0.2449 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s .. ..$ : chr [1:10] "1|2.(Intercept)" "2|3.(Intercept)" "3|4.(Intercept)" "4|5.(Intercept)" ... 108s $ zeta : Named num -0.502 108s ..- attr(*, "names")= chr "tempwarm" 108s - attr(*, "class")= chr "clm.fit" 108s > 108s > fit <- clm.fit(fm1$y, fm1$X, fm1$S) 108s > str(fit) 108s List of 21 108s $ aliased :List of 3 108s ..$ alpha: Named logi [1:4] FALSE FALSE FALSE FALSE 108s .. ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s ..$ beta : Named logi FALSE 108s .. ..- attr(*, "names")= chr "tempwarm" 108s ..$ zeta : Named logi FALSE 108s .. ..- attr(*, "names")= chr "tempwarm" 108s $ alpha : Named num [1:4] -1.988 0.418 2.648 4.306 108s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s $ beta : Named num 2.51 108s ..- attr(*, "names")= chr "tempwarm" 108s $ coefficients : Named num [1:6] -1.988 0.418 2.648 4.306 2.512 ... 108s ..- attr(*, "names")= chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 108s $ cond.H : num 80.6 108s $ convergence :List of 3 108s ..$ code : int 0 108s ..$ messages : chr "successful convergence" 108s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 108s $ df.residual : num 66 108s $ edf : int 6 108s $ fitted.values: num [1:72] 0.4826 0.3308 0.3308 0.0528 0.2897 ... 108s $ gradient : Named num [1:6] 7.03e-09 6.91e-08 5.99e-07 -7.42e-07 2.76e-08 ... 108s ..- attr(*, "names")= chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 108s $ Hessian : num [1:6, 1:6] 4.8066 -2.4889 0 0 -0.0926 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 108s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 108s $ logLik : num -91.8 108s $ maxGradient : num 8.53e-07 108s $ message : chr "Absolute and relative convergence criteria were met" 108s $ n : int 72 108s $ niter : Named num [1:2] 8 0 108s ..- attr(*, "names")= chr [1:2] "outer" "inner" 108s $ nobs : num 72 108s $ Theta : num [1, 1:4] -1.988 0.418 2.648 4.306 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : NULL 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s $ vcov : num [1:6, 1:6] 0.2481 0.0622 0.0179 -0.0253 0.0197 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 108s .. ..$ : chr [1:6] "1|2" "2|3" "3|4" "4|5" ... 108s $ zeta : Named num 0.176 108s ..- attr(*, "names")= chr "tempwarm" 108s - attr(*, "class")= chr "clm.fit" 108s > 108s > fit <- clm.fit(fm1$y, fm1$X) 108s > str(fit) 108s List of 20 108s $ aliased :List of 2 108s ..$ alpha: Named logi [1:4] FALSE FALSE FALSE FALSE 108s .. ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s ..$ beta : Named logi FALSE 108s .. ..- attr(*, "names")= chr "tempwarm" 108s $ alpha : Named num [1:4] -1.936 0.435 2.432 3.827 108s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s $ beta : Named num 2.29 108s ..- attr(*, "names")= chr "tempwarm" 108s $ coefficients : Named num [1:5] -1.936 0.435 2.432 3.827 2.287 108s ..- attr(*, "names")= chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 108s $ cond.H : num 16.8 108s $ convergence :List of 3 108s ..$ code : int 0 108s ..$ messages : chr "successful convergence" 108s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 108s $ df.residual : num 67 108s $ edf : int 5 108s $ fitted.values: num [1:72] 0.481 0.3122 0.3122 0.0594 0.2871 ... 108s $ gradient : Named num [1:5] 4.07e-14 8.24e-14 -9.90e-14 6.66e-16 -2.22e-14 108s ..- attr(*, "names")= chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 108s $ Hessian : num [1:5, 1:5] 4.8983 -2.499 0 0 -0.0854 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 108s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 108s $ logLik : num -92 108s $ maxGradient : num 9.9e-14 108s $ message : chr "Absolute and relative convergence criteria were met" 108s $ n : int 72 108s $ niter : Named num [1:2] 6 0 108s ..- attr(*, "names")= chr [1:2] "outer" "inner" 108s $ nobs : num 72 108s $ Theta : num [1, 1:4] -1.936 0.435 2.432 3.827 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : NULL 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s $ vcov : num [1:5, 1:5] 0.2345 0.0577 0.0505 0.0512 0.0537 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 108s .. ..$ : chr [1:5] "1|2" "2|3" "3|4" "4|5" ... 108s - attr(*, "class")= chr "clm.fit" 108s > 108s > fit <- clm.fit(fm1$y) 108s > coef(fit) 108s 1|2 2|3 3|4 4|5 108s -2.5952547 -0.5108256 1.0258529 2.2284771 108s > str(fit) 108s List of 19 108s $ aliased :List of 2 108s ..$ alpha: Named logi [1:4] FALSE FALSE FALSE FALSE 108s .. ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s ..$ beta : Named logi(0) 108s .. ..- attr(*, "names")= chr(0) 108s $ alpha : Named num [1:4] -2.595 -0.511 1.026 2.228 108s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s $ coefficients : Named num [1:4] -2.595 -0.511 1.026 2.228 108s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s $ cond.H : num 8.38 108s $ convergence :List of 3 108s ..$ code : int 0 108s ..$ messages : chr "successful convergence" 108s ..$ alg.message: chr "Absolute and relative convergence criteria were met" 108s $ df.residual : num 68 108s $ edf : int 4 108s $ fitted.values: num [1:72] 0.306 0.361 0.361 0.167 0.167 ... 108s $ gradient : Named num [1:4] 7.23e-08 -5.51e-08 -1.72e-11 -4.86e-12 108s ..- attr(*, "names")= chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s $ Hessian : num [1:4, 1:4] 5.31 -3.57 0 0 -3.57 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s $ logLik : num -104 108s $ maxGradient : num 7.23e-08 108s $ message : chr "Absolute and relative convergence criteria were met" 108s $ n : int 72 108s $ niter : Named num [1:2] 5 0 108s ..- attr(*, "names")= chr [1:2] "outer" "inner" 108s $ nobs : num 72 108s $ Theta : num [1, 1:4] -2.595 -0.511 1.026 2.228 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : NULL 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s $ tJac : num [1:4, 1:4] 1 0 0 0 0 1 0 0 0 0 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s $ vcov : num [1:4, 1:4] 0.2149 0.0398 0.0203 0.0165 0.0398 ... 108s ..- attr(*, "dimnames")=List of 2 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s .. ..$ : chr [1:4] "1|2" "2|3" "3|4" "4|5" 108s - attr(*, "class")= chr "clm.fit" 108s > 108s > ## Remember: compare with corresponding .Rout file 108s > 108s BEGIN TEST clm.formula.R 108s 108s R version 4.4.3 (2025-02-28) -- "Trophy Case" 108s Copyright (C) 2025 The R Foundation for Statistical Computing 108s Platform: x86_64-pc-linux-gnu 108s 108s R is free software and comes with ABSOLUTELY NO WARRANTY. 108s You are welcome to redistribute it under certain conditions. 108s Type 'license()' or 'licence()' for distribution details. 108s 108s R is a collaborative project with many contributors. 108s Type 'contributors()' for more information and 108s 'citation()' on how to cite R or R packages in publications. 108s 108s Type 'demo()' for some demos, 'help()' for on-line help, or 108s 'help.start()' for an HTML browser interface to help. 108s Type 'q()' to quit R. 108s 109s > library(ordinal) 109s > ## library(devtools) 109s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 109s > ## clean_dll(pkg = r2path) 109s > ## load_all(r2path) 109s > 109s > ################################# 109s > ## Appropriate evaluation of formulas: 109s > 109s > ## These fail and give appropriate error messages: 109s > ## fm1 <- clm(rating ~ contact, scale=temp, data=wine) 109s > ## fm1 <- clm(rating ~ contact, scale=~Temp, data=wine) 109s > ## fm1 <- clm(rating ~ contact, scale="temp", data=wine) 109s > ## sca <- "temp" 109s > ## fm1 <- clm(rating ~ contact, scale=sca, data=wine) 109s > ## sca <- as.formula(sca) 109s > ## sca <- as.formula(temp) 109s > ## sca <- with(wine, as.formula(temp)) 109s > 109s > ## These all work as intended with no warnings or errors: 109s > fm1 <- clm(rating ~ contact, scale="~temp", data=wine) 109s > fm1 <- clm(rating ~ contact, scale=~temp, data=wine) 109s > sca <- "~temp" 109s > fm1 <- clm(rating ~ contact, scale=sca, data=wine) 109s > sca <- as.formula("~temp") 109s > fm1 <- clm(rating ~ contact, scale=sca, data=wine) 109s > fm1 <- clm(rating ~ contact, scale=as.formula(~temp), data=wine) 109s > fm1 <- clm(rating ~ contact, scale=as.formula("~temp"), data=wine) 109s > 109s > ################################# 109s > ## can evaluate if 'formula' is a character: 109s > f <- "rating ~ contact + temp" 109s > clm(f, data=wine) 109s formula: rating ~ contact + temp 109s data: wine 109s 109s link threshold nobs logLik AIC niter max.grad cond.H 109s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 109s 109s Coefficients: 109s contactyes tempwarm 109s 1.528 2.503 109s 109s Threshold coefficients: 109s 1|2 2|3 3|4 4|5 109s -1.344 1.251 3.467 5.006 109s > clm(as.formula(f), data=wine) 109s formula: rating ~ contact + temp 109s data: wine 109s 109s link threshold nobs logLik AIC niter max.grad cond.H 109s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 109s 109s Coefficients: 109s contactyes tempwarm 109s 1.528 2.503 109s 109s Threshold coefficients: 109s 1|2 2|3 3|4 4|5 109s -1.344 1.251 3.467 5.006 109s > 109s > ################################# 109s > 109s > ### finding variables in the environment of the formula: 109s > makeform <- function() { 109s + f1 <- as.formula(rating ~ temp + contact) 109s + rating <- wine$rating 109s + temp <- wine$temp 109s + contact <- wine$contact 109s + f1 109s + } 109s > ## 'makeform' makes are formula object in the environment of the 109s > ## function makeform: 109s > f1 <- makeform() 109s > f1 # print 109s rating ~ temp + contact 109s 109s > class(f1) 109s [1] "formula" 109s > ## If we give the data, we can evaluate the model: 109s > fm1 <- clm(f1, data=wine) 109s > ## We can also evaluate the model because the data are available in 109s > ## the environment associated with the formula: 109s > fm1 <- clm(f1) 109s > ## For instance, the 'rating' variable is not found in the Global 109s > ## environment; we have to evaluate the 'name' of 'rating' in the 109s > ## appropriate environment: 109s > (try(rating, silent=TRUE)) 109s [1] "Error : object 'rating' not found\n" 109s attr(,"class") 109s [1] "try-error" 109s attr(,"condition") 109s 109s > eval(as.name("rating"), envir=environment(f1)) 109s [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 109s [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 109s Levels: 1 < 2 < 3 < 4 < 5 109s > ## If instead we generate the formula in the Global environment where 109s > ## the variables are not found, we cannot evaluate the model: 109s > f2 <- as.formula(rating ~ temp + contact) 109s > (try(fm2 <- clm(f2), silent=TRUE)) 109s [1] "Error in eval(predvars, data, env) : object 'rating' not found\n" 109s attr(,"class") 109s [1] "try-error" 109s attr(,"condition") 109s 109s > environment(f2) <- environment(f1) 109s > fm2 <- clm(f2) 110s > 110s > 110s > ################################# 110s > ## Use of formula-objects in location, scale and nominal: 110s > ## Bug-report from Llus Marco Almagro 110s > ## 5 May 2010 17:58 110s > f <- formula(rating ~ temp) 110s > fs <- formula( ~ contact) 110s > m2 <- clm(f, scale = fs, data = wine) 110s > summary(m2) 110s formula: rating ~ temp 110s scale: ~contact 110s data: wine 110s 110s link threshold nobs logLik AIC niter max.grad cond.H 110s logit flexible 72 -91.92 195.83 8(0) 1.57e-09 5.6e+01 110s 110s Coefficients: 110s Estimate Std. Error z value Pr(>|z|) 110s tempwarm 2.1690 0.5527 3.924 8.69e-05 *** 110s --- 110s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 110s 110s log-scale coefficients: 110s Estimate Std. Error z value Pr(>|z|) 110s contactyes -0.1222 0.2775 -0.44 0.66 110s 110s Threshold coefficients: 110s Estimate Std. Error z value 110s 1|2 -1.8957 0.4756 -3.986 110s 2|3 0.3668 0.3442 1.066 110s 3|4 2.2483 0.5932 3.790 110s 4|5 3.5393 0.8336 4.246 110s > 110s > ################################# 110s > ## Other ways to construct formulas: 110s > set.seed(12345) 110s > y <- factor(sample(1:4,20,replace=TRUE)) 110s > x <- rnorm(20) 110s > data <- data.frame(y=y,x=x) 110s > rm(x, y) 110s > fit <- clm(data$y ~ data$x) 110s > fit 110s formula: data$y ~ data$x 110s 110s link threshold nobs logLik AIC niter max.grad cond.H 110s logit flexible 20 -25.37 58.74 5(0) 2.68e-09 8.4e+00 110s 110s Coefficients: 110s data$x 110s 0.2527 110s 110s Threshold coefficients: 110s 1|2 2|3 3|4 110s -2.18234 0.06059 0.92746 110s > fit <- clm(data[,1] ~ data[,2]) 110s > fit 110s formula: data[, 1] ~ data[, 2] 110s 110s link threshold nobs logLik AIC niter max.grad cond.H 110s logit flexible 20 -25.37 58.74 5(0) 2.68e-09 8.4e+00 110s 110s Coefficients: 110s data[, 2] 110s 0.2527 110s 110s Threshold coefficients: 110s 1|2 2|3 3|4 110s -2.18234 0.06059 0.92746 110s > ## This previously failed, but now works: 110s > fit <- clm(data$y ~ data$x, ~data$x) 110s > fit 110s formula: data$y ~ data$x 110s scale: ~data$x 110s 110s link threshold nobs logLik AIC niter max.grad cond.H 110s logit flexible 20 -25.32 60.64 7(0) 1.86e-09 9.7e+00 110s 110s Coefficients: 110s data$x 110s 0.2477 110s 110s log-scale coefficients: 110s data$x 110s -0.1136 110s 110s Threshold coefficients: 110s 1|2 2|3 3|4 110s -2.16950 0.07039 0.91381 110s > 110s > ################################# 110s > ## Evaluation within other functions: 110s > ## date: January 18th 2012. 110s > ## 110s > ## The problem was raised by Stefan Herzog (stefan.herzog@unibas.ch) 110s > ## January 12th 2012 in trying to make clm work with glmulti. 110s > 110s > fun.clm <- function(formula, data) 110s + ### This only works because clm via eclm.model.frame is careful to 110s + ### evaluate the 'formula' in the parent environment such it is not the 110s + ### character "formula" that is attempted evaluated. 110s + clm(formula, data = data) 110s > 110s > fun2.clm <- function(formula, data, weights, subset) { 110s + ### This should be the safe way to ensure evaluation of clm in the 110s + ### right environment. 110s + mc <- match.call() 110s + mc[[1]] <- as.name("clm") 110s + eval.parent(mc) 110s + } 110s > 110s > fun.clm(rating ~ temp + contact, data=wine) ## works 110s formula: rating ~ temp + contact 110s data: data 110s 110s link threshold nobs logLik AIC niter max.grad cond.H 110s logit flexible 72 -86.49 184.98 6(0) 4.02e-12 2.7e+01 110s 110s Coefficients: 110s tempwarm contactyes 110s 2.503 1.528 110s 110s Threshold coefficients: 110s 1|2 2|3 3|4 4|5 110s -1.344 1.251 3.467 5.006 110s > fun2.clm(rating ~ temp + contact, data=wine) ## works 110s formula: rating ~ temp + contact 110s data: wine 110s 110s link threshold nobs logLik AIC niter max.grad cond.H 110s logit flexible 72 -86.49 184.98 6(0) 4.02e-12 2.7e+01 110s 110s Coefficients: 110s tempwarm contactyes 110s 2.503 1.528 110s 110s Threshold coefficients: 110s 1|2 2|3 3|4 4|5 110s -1.344 1.251 3.467 5.006 110s > 110s > form1 <- "rating ~ temp + contact" 110s > fun.clm(form1, data=wine) ## works 110s formula: rating ~ temp + contact 110s data: data 110s 110s link threshold nobs logLik AIC niter max.grad cond.H 110s logit flexible 72 -86.49 184.98 6(0) 4.02e-12 2.7e+01 110s 110s Coefficients: 110s tempwarm contactyes 110s 2.503 1.528 110s 110s Threshold coefficients: 110s 1|2 2|3 3|4 4|5 110s -1.344 1.251 3.467 5.006 110s > fun2.clm(form1, data=wine) ## works 110s formula: rating ~ temp + contact 110s data: wine 110s 110s link threshold nobs logLik AIC niter max.grad cond.H 110s logit flexible 72 -86.49 184.98 6(0) 4.02e-12 2.7e+01 110s 110s Coefficients: 110s tempwarm contactyes 110s 2.503 1.528 110s 110s Threshold coefficients: 110s 1|2 2|3 3|4 4|5 110s -1.344 1.251 3.467 5.006 110s > 110s > form2 <- formula(rating ~ temp + contact) 110s > fun.clm(form2, data=wine) ## works 110s formula: rating ~ temp + contact 110s data: data 110s 110s link threshold nobs logLik AIC niter max.grad cond.H 110s logit flexible 72 -86.49 184.98 6(0) 4.02e-12 2.7e+01 110s 110s Coefficients: 110s tempwarm contactyes 110s 2.503 1.528 110s 110s Threshold coefficients: 110s 1|2 2|3 3|4 4|5 110s -1.344 1.251 3.467 5.006 110s > fun2.clm(form2, data=wine) ## works 110s formula: rating ~ temp + contact 110s data: wine 110s 110s link threshold nobs logLik AIC niter max.grad cond.H 110s logit flexible 72 -86.49 184.98 6(0) 4.02e-12 2.7e+01 110s 110s Coefficients: 110s tempwarm contactyes 110s 2.503 1.528 110s 110s Threshold coefficients: 110s 1|2 2|3 3|4 4|5 110s -1.344 1.251 3.467 5.006 110s > ## Notice that clm is not able to get the name of the data (wine) 110s > ## correct when using fun.clm. 110s > 110s > ################################# 110s > ## Evaluation of long formulas: no line breaking in getFullForm: 110s > data(soup, package="ordinal") 110s > 110s > rhs <- paste(names(soup)[c(3, 5:12)], collapse=" + ") 110s > Location <- as.formula(paste("SURENESS ~ ", rhs, sep=" ")) 110s > Scale <- as.formula("~ PROD") 110s > 110s > fm5 <- clm(Location, scale=Scale, data=soup) 110s > summary(fm5) 110s formula: 110s SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ + COLD + EASY + GENDER + AGEGROUP + LOCATION 110s scale: ~PROD 110s data: soup 110s 110s link threshold nobs logLik AIC niter max.grad cond.H 110s logit flexible 1847 -2651.65 5367.30 8(1) 4.65e-07 1.1e+04 110s 110s Coefficients: 110s Estimate Std. Error z value Pr(>|z|) 110s PRODID2 1.09324 0.14790 7.392 1.45e-13 *** 110s PRODID3 1.54233 0.21252 7.257 3.95e-13 *** 110s PRODID4 0.95602 0.18180 5.258 1.45e-07 *** 110s PRODID5 1.52404 0.20311 7.504 6.21e-14 *** 110s PRODID6 1.83964 0.21750 8.458 < 2e-16 *** 110s DAY2 -0.26999 0.10280 -2.626 0.00863 ** 110s SOUPTYPECanned -0.31340 0.11745 -2.668 0.00762 ** 110s SOUPTYPEDry-mix 0.22429 0.14295 1.569 0.11665 110s SOUPFREQ1-4/month -0.06459 0.10551 -0.612 0.54046 110s SOUPFREQ<1/month 0.03664 0.21310 0.172 0.86350 110s COLDYes 0.31373 0.14894 2.106 0.03517 * 110s EASY2 0.16689 0.55063 0.303 0.76182 110s EASY3 0.34765 0.50432 0.689 0.49061 110s EASY4 0.30008 0.48283 0.621 0.53428 110s EASY5 0.23492 0.47686 0.493 0.62226 110s EASY6 -0.03205 0.46993 -0.068 0.94562 110s EASY7 0.02823 0.46963 0.060 0.95208 110s EASY8 -0.04600 0.47066 -0.098 0.92215 110s EASY9 -0.04084 0.49595 -0.082 0.93437 110s EASY10 1.03641 0.60080 1.725 0.08452 . 110s GENDERFemale -0.05092 0.10738 -0.474 0.63534 110s AGEGROUP31-40 0.02098 0.14822 0.142 0.88745 110s AGEGROUP41-50 0.23712 0.15824 1.498 0.13401 110s AGEGROUP51-65 -0.13791 0.14393 -0.958 0.33798 110s LOCATIONRegion 2 -0.09641 0.13225 -0.729 0.46599 110s LOCATIONRegion 3 0.06062 0.11981 0.506 0.61290 110s --- 110s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 110s 110s log-scale coefficients: 110s Estimate Std. Error z value Pr(>|z|) 110s PRODTest 0.14545 0.06621 2.197 0.028 * 110s --- 110s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 110s 110s Threshold coefficients: 110s Estimate Std. Error z value 110s 1|2 -1.64700 0.49982 -3.295 110s 2|3 -0.58840 0.49681 -1.184 110s 3|4 -0.23496 0.49669 -0.473 110s 4|5 0.04394 0.49679 0.088 110s 5|6 0.78551 0.49869 1.575 110s > 110s > ################################# 110s > ## Check that "."-notation works in formula: 110s > ## December 25th 2014, RHBC 110s > data(wine) 110s > wine2 <- wine[c("rating", "contact", "temp")] 110s > str(wine2) 110s 'data.frame': 72 obs. of 3 variables: 110s $ rating : Ord.factor w/ 5 levels "1"<"2"<"3"<"4"<..: 2 3 3 4 4 4 5 5 1 2 ... 110s $ contact: Factor w/ 2 levels "no","yes": 1 1 2 2 1 1 2 2 1 1 ... 110s $ temp : Factor w/ 2 levels "cold","warm": 1 1 1 1 2 2 2 2 1 1 ... 110s > fm0 <- clm(rating ~ ., data=wine2) 110s > fm1 <- clm(rating ~ contact + temp, data=wine2) 110s > keep <- c("coefficients", "logLik", "info") 110s > fun <- function(x, y) stopifnot(isTRUE(all.equal(x, y))) 110s > mapply(fun, fm0[keep], fm1[keep]) 110s $coefficients 110s NULL 110s 110s $logLik 110s NULL 110s 110s $info 110s NULL 110s 110s > ################################# 110s > 110s BEGIN TEST clmm.R 110s 110s R version 4.4.3 (2025-02-28) -- "Trophy Case" 110s Copyright (C) 2025 The R Foundation for Statistical Computing 110s Platform: x86_64-pc-linux-gnu 110s 110s R is free software and comes with ABSOLUTELY NO WARRANTY. 110s You are welcome to redistribute it under certain conditions. 110s Type 'license()' or 'licence()' for distribution details. 110s 110s R is a collaborative project with many contributors. 110s Type 'contributors()' for more information and 110s 'citation()' on how to cite R or R packages in publications. 110s 110s Type 'demo()' for some demos, 'help()' for on-line help, or 110s 'help.start()' for an HTML browser interface to help. 110s Type 'q()' to quit R. 110s 110s > library(ordinal) 111s > data(wine) 111s > 111s > ################################# 111s > ## Estimation with a single simple RE term: 111s > ## Laplace: 111s > fmm1 <- clmm(rating ~ contact + temp + (1|judge), data=wine) 111s > summary(fmm1) 111s Cumulative Link Mixed Model fitted with the Laplace approximation 111s 111s formula: rating ~ contact + temp + (1 | judge) 111s data: wine 111s 111s link threshold nobs logLik AIC niter max.grad cond.H 111s logit flexible 72 -81.57 177.13 332(999) 1.04e-05 2.8e+01 111s 111s Random effects: 111s Groups Name Variance Std.Dev. 111s judge (Intercept) 1.279 1.131 111s Number of groups: judge 9 111s 111s Coefficients: 111s Estimate Std. Error z value Pr(>|z|) 111s contactyes 1.8349 0.5125 3.580 0.000344 *** 111s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 111s --- 111s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 111s 111s Threshold coefficients: 111s Estimate Std. Error z value 111s 1|2 -1.6237 0.6824 -2.379 111s 2|3 1.5134 0.6038 2.507 111s 3|4 4.2285 0.8090 5.227 111s 4|5 6.0888 0.9725 6.261 111s > ## GHQ: 111s > fmm.ghq <- clmm(rating ~ contact + temp + (1|judge), data=wine, 111s + nAGQ=-10) 111s > summary(fmm.ghq) 111s Cumulative Link Mixed Model fitted with the Gauss-Hermite 111s quadrature approximation with 10 quadrature points 111s 111s formula: rating ~ contact + temp + (1 | judge) 111s data: wine 111s 111s link threshold nobs logLik AIC niter max.grad cond.H 111s logit flexible 72 -81.53 177.06 304(3) 1.67e-05 2.8e+01 111s 111s Random effects: 111s Groups Name Variance Std.Dev. 111s judge (Intercept) 1.288 1.135 111s Number of groups: judge 9 111s 111s Coefficients: 111s Estimate Std. Error z value Pr(>|z|) 111s contactyes 1.8335 0.5122 3.580 0.000344 *** 111s tempwarm 3.0620 0.5951 5.145 2.67e-07 *** 111s --- 111s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 111s 111s Threshold coefficients: 111s Estimate Std. Error z value 111s 1|2 -1.6231 0.6829 -2.377 111s 2|3 1.5133 0.6045 2.503 111s 3|4 4.2277 0.8094 5.223 111s 4|5 6.0869 0.9726 6.258 111s > ## AGQ: 111s > fmm.agq <- clmm(rating ~ contact + temp + (1|judge), data=wine, 111s + nAGQ=10) 111s > summary(fmm.agq) 111s Cumulative Link Mixed Model fitted with the adaptive Gauss-Hermite 111s quadrature approximation with 10 quadrature points 111s 111s formula: rating ~ contact + temp + (1 | judge) 111s data: wine 111s 111s link threshold nobs logLik AIC niter max.grad cond.H 111s logit flexible 72 -81.53 177.06 304(915) 2.26e-05 2.8e+01 111s 111s Random effects: 111s Groups Name Variance Std.Dev. 111s judge (Intercept) 1.288 1.135 111s Number of groups: judge 9 111s 111s Coefficients: 111s Estimate Std. Error z value Pr(>|z|) 111s contactyes 1.8334 0.5122 3.580 0.000344 *** 111s tempwarm 3.0619 0.5951 5.145 2.67e-07 *** 111s --- 111s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 111s 111s Threshold coefficients: 111s Estimate Std. Error z value 111s 1|2 -1.6235 0.6834 -2.376 111s 2|3 1.5128 0.6044 2.503 111s 3|4 4.2271 0.8090 5.225 111s 4|5 6.0862 0.9719 6.262 111s > ## tests: 111s > ## Notice warning about Laplace with multiple REs when nAGQ != 1: 111s > fmm1 <- try(clmm(rating ~ contact + temp + (1|judge) + (1|bottle), 111s + data=wine, nAGQ=10)) 111s Error : Quadrature methods are not available with more than one random effects term 111s > stopifnot(inherits(fmm1, "try-error")) 111s > 111s > ################################# 111s > ## Estimation with several RE terms: 111s > data(soup, package="ordinal") 111s > fmm <- clmm(SURENESS ~ PROD + (1|RESP) + (1|PROD:RESP), data=soup, 111s + threshold="equidistant") 113s > summary(fmm) 113s Cumulative Link Mixed Model fitted with the Laplace approximation 113s 113s formula: SURENESS ~ PROD + (1 | RESP) + (1 | PROD:RESP) 113s data: soup 113s 113s link threshold nobs logLik AIC niter max.grad cond.H 113s logit equidistant 1847 -2766.32 5542.63 261(837) 1.55e-03 1.3e+02 113s 113s Random effects: 113s Groups Name Variance Std.Dev. 113s PROD:RESP (Intercept) 0.4069 0.6379 113s RESP (Intercept) 0.1308 0.3616 113s Number of groups: PROD:RESP 370, RESP 185 113s 113s Coefficients: 113s Estimate Std. Error z value Pr(>|z|) 113s PRODTest 1.2865 0.1156 11.12 <2e-16 *** 113s --- 113s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 113s 113s Threshold coefficients: 113s Estimate Std. Error z value 113s threshold.1 -1.35103 0.09526 -14.18 113s spacing 0.56472 0.01905 29.65 113s > 113s > ################################# 113s > 113s > ## Estimation with implicit intercept: 113s > fm1 <- clmm(rating ~ 1 + (1|judge), data = wine) 113s > fm2 <- clmm(rating ~ (1|judge), data = wine) 113s > fm3 <- clmm(rating ~ 0 + (1|judge), data = wine) 113s Warning message: 113s In getX(fullmf, fixedmf, contrasts) : an intercept is needed and assumed 113s > stopifnot(isTRUE(all.equal(coef(fm1), coef(fm2), tolerance=1e-5)), 113s + isTRUE(all.equal(coef(fm1), coef(fm3), tolerance=1e-5))) 113s > 113s BEGIN TEST clmm.control.R 113s 113s R version 4.4.3 (2025-02-28) -- "Trophy Case" 113s Copyright (C) 2025 The R Foundation for Statistical Computing 113s Platform: x86_64-pc-linux-gnu 113s 113s R is free software and comes with ABSOLUTELY NO WARRANTY. 113s You are welcome to redistribute it under certain conditions. 113s Type 'license()' or 'licence()' for distribution details. 113s 113s R is a collaborative project with many contributors. 113s Type 'contributors()' for more information and 113s 'citation()' on how to cite R or R packages in publications. 113s 113s Type 'demo()' for some demos, 'help()' for on-line help, or 113s 'help.start()' for an HTML browser interface to help. 113s Type 'q()' to quit R. 113s 113s > library(ordinal) 114s > data(wine) 114s > 114s > 114s > ### 3 options for specifying control arguments: 114s > ## 1) control is a simple list, e.g. list(trace=-1) 114s > ## 2) control is a call to clmm.control 114s > ## 3) control is an empty list; list() 114s > ## all in combination with extra control arguments. 114s > 114s > ordinal:::getCtrlArgs(clmm.control(), list(maxIter=200)) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 0 114s 114s $ctrl$maxIter 114s [1] 200 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 0 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > ordinal:::getCtrlArgs(list(), list(maxIter=200)) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 0 114s 114s $ctrl$maxIter 114s [1] 200 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 0 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > ordinal:::getCtrlArgs(list(), list(trace=-1)) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 1 114s 114s $ctrl$maxIter 114s [1] 50 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 1 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > ordinal:::getCtrlArgs(list(), list(trace=1)) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 0 114s 114s $ctrl$maxIter 114s [1] 50 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 1 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > ordinal:::getCtrlArgs(list(), list()) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 0 114s 114s $ctrl$maxIter 114s [1] 50 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 0 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > ordinal:::getCtrlArgs(list(maxIter=2), list()) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 0 114s 114s $ctrl$maxIter 114s [1] 2 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 0 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > 114s > ordinal:::getCtrlArgs(clmm.control(), list()) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 0 114s 114s $ctrl$maxIter 114s [1] 50 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 0 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > ordinal:::getCtrlArgs(clmm.control(maxIter=100), list(maxIter=200)) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 0 114s 114s $ctrl$maxIter 114s [1] 200 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 0 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > ordinal:::getCtrlArgs(clmm.control(maxIter=100), list(maxIter=200)) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 0 114s 114s $ctrl$maxIter 114s [1] 200 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 0 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > ordinal:::getCtrlArgs(clmm.control(), list(trace=1)) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 0 114s 114s $ctrl$maxIter 114s [1] 50 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 1 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > ordinal:::getCtrlArgs(clmm.control(), list(trace=-1)) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 1 114s 114s $ctrl$maxIter 114s [1] 50 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 1 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > ordinal:::getCtrlArgs(clmm.control(trace=1), list()) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 0 114s 114s $ctrl$maxIter 114s [1] 50 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 1 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > ordinal:::getCtrlArgs(clmm.control(trace=-1), list()) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 1 114s 114s $ctrl$maxIter 114s [1] 50 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 1 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > ordinal:::getCtrlArgs(clmm.control(trace=0), list()) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 0 114s 114s $ctrl$maxIter 114s [1] 50 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 0 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > ## Don't specify trace twice - surprising behavior might occur: 114s > ordinal:::getCtrlArgs(clmm.control(trace=1), list(trace=-1)) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 1 114s 114s $ctrl$maxIter 114s [1] 50 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 1 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > ordinal:::getCtrlArgs(clmm.control(trace=-1), list(trace=1)) 114s $method 114s [1] "nlminb" 114s 114s $useMatrix 114s [1] FALSE 114s 114s $ctrl 114s $ctrl$trace 114s [1] 1 114s 114s $ctrl$maxIter 114s [1] 50 114s 114s $ctrl$gradTol 114s [1] 1e-04 114s 114s $ctrl$maxLineIter 114s [1] 50 114s 114s $ctrl$innerCtrl 114s [1] "warnOnly" 114s 114s 114s $optCtrl 114s $optCtrl$trace 114s [1] 1 114s 114s 114s $checkRanef 114s [1] "warn" 114s 114s > 114s BEGIN TEST clmm.formula.R 114s 114s R version 4.4.3 (2025-02-28) -- "Trophy Case" 114s Copyright (C) 2025 The R Foundation for Statistical Computing 114s Platform: x86_64-pc-linux-gnu 114s 114s R is free software and comes with ABSOLUTELY NO WARRANTY. 114s You are welcome to redistribute it under certain conditions. 114s Type 'license()' or 'licence()' for distribution details. 114s 114s R is a collaborative project with many contributors. 114s Type 'contributors()' for more information and 114s 'citation()' on how to cite R or R packages in publications. 114s 114s Type 'demo()' for some demos, 'help()' for on-line help, or 114s 'help.start()' for an HTML browser interface to help. 114s Type 'q()' to quit R. 114s 114s > library(ordinal) 115s > data(wine) 115s > 115s > ################################# 115s > ## Appropriate evaluation of formulas: 115s > 115s > ## These all work as intended with no warnings or errors: 115s > fm1 <- clmm(rating ~ contact + (1|judge), data=wine) 115s > fm1 115s Cumulative Link Mixed Model fitted with the Laplace approximation 115s 115s formula: rating ~ contact + (1 | judge) 115s data: wine 115s 115s link threshold nobs logLik AIC niter max.grad 115s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 115s 115s Random effects: 115s Groups Name Variance Std.Dev. 115s judge (Intercept) 0.4428 0.6654 115s Number of groups: judge 9 115s 115s Coefficients: 115s contactyes 115s 1.3 115s 115s Thresholds: 115s 1|2 2|3 3|4 4|5 115s -2.28331 0.04325 1.86062 3.20298 115s > fm1 <- clmm("rating ~ contact + (1|judge)", data=wine) 115s > fm1 115s Cumulative Link Mixed Model fitted with the Laplace approximation 115s 115s formula: rating ~ contact + (1 | judge) 115s data: wine 115s 115s link threshold nobs logLik AIC niter max.grad 115s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 115s 115s Random effects: 115s Groups Name Variance Std.Dev. 115s judge (Intercept) 0.4428 0.6654 115s Number of groups: judge 9 115s 115s Coefficients: 115s contactyes 115s 1.3 115s 115s Thresholds: 115s 1|2 2|3 3|4 4|5 115s -2.28331 0.04325 1.86062 3.20298 115s > fm1 <- clmm(as.formula("rating ~ contact + (1|judge)"), data=wine) 115s > fm1 115s Cumulative Link Mixed Model fitted with the Laplace approximation 115s 115s formula: rating ~ contact + (1 | judge) 115s data: wine 115s 115s link threshold nobs logLik AIC niter max.grad 115s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 115s 115s Random effects: 115s Groups Name Variance Std.Dev. 115s judge (Intercept) 0.4428 0.6654 115s Number of groups: judge 9 115s 115s Coefficients: 115s contactyes 115s 1.3 115s 115s Thresholds: 115s 1|2 2|3 3|4 4|5 115s -2.28331 0.04325 1.86062 3.20298 115s > fm1 <- clmm(as.formula(rating ~ contact + (1|judge)), data=wine) 115s > fm1 115s Cumulative Link Mixed Model fitted with the Laplace approximation 115s 115s formula: rating ~ contact + (1 | judge) 115s data: wine 115s 115s link threshold nobs logLik AIC niter max.grad 115s logit flexible 72 -98.80 209.59 228(686) 3.67e-06 115s 115s Random effects: 115s Groups Name Variance Std.Dev. 115s judge (Intercept) 0.4428 0.6654 115s Number of groups: judge 9 115s 115s Coefficients: 115s contactyes 115s 1.3 115s 115s Thresholds: 115s 1|2 2|3 3|4 4|5 115s -2.28331 0.04325 1.86062 3.20298 115s > 115s > ################################# 115s > 115s > ### finding variables in the environment of the formula: 115s > makeform <- function() { 115s + f1 <- as.formula(rating ~ temp + contact + (1|judge)) 115s + rating <- wine$rating 115s + temp <- wine$temp 115s + contact <- wine$contact 115s + judge <- wine$judge 115s + f1 115s + } 115s > ## 'makeform' makes are formula object in the environment of the 115s > ## function makeform: 115s > f1 <- makeform() 115s > f1 # print 115s rating ~ temp + contact + (1 | judge) 115s 115s > class(f1) 115s [1] "formula" 115s > ## If we give the data, we can evaluate the model: 115s > fm1 <- clmm(f1, data=wine) 115s > ## We can also evaluate the model because the data are available in 115s > ## the environment associated with the formula: 115s > fm1 <- clmm(f1) 115s > ## For instance, the 'rating' variable is not found in the Global 115s > ## environment; we have to evaluate the 'name' of 'rating' in the 115s > ## appropriate environment: 115s > (try(rating, silent=TRUE)) 115s [1] "Error : object 'rating' not found\n" 115s attr(,"class") 115s [1] "try-error" 115s attr(,"condition") 115s 115s > eval(as.name("rating"), envir=environment(f1)) 115s [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 115s [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 115s Levels: 1 < 2 < 3 < 4 < 5 115s > ## If instead we generate the formula in the Global environment where 115s > ## the variables are not found, we cannot evaluate the model: 115s > f2 <- as.formula(rating ~ temp + contact + (1|judge)) 115s > (try(fm2 <- clmm(f2), silent=TRUE)) 115s [1] "Error in eval(predvars, data, env) : object 'rating' not found\n" 115s attr(,"class") 115s [1] "try-error" 115s attr(,"condition") 115s 115s > environment(f2) <- environment(f1) 115s > fm2 <- clmm(f2) 115s > 115s > ################################# 115s > ## Use of formula-objects 115s > f <- formula(rating ~ temp + contact + (1|judge)) 115s > m2 <- clmm(f, data = wine) 115s > summary(m2) 115s Cumulative Link Mixed Model fitted with the Laplace approximation 115s 115s formula: rating ~ temp + contact + (1 | judge) 115s data: wine 115s 115s link threshold nobs logLik AIC niter max.grad cond.H 115s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 2.8e+01 115s 115s Random effects: 115s Groups Name Variance Std.Dev. 115s judge (Intercept) 1.279 1.131 115s Number of groups: judge 9 115s 115s Coefficients: 115s Estimate Std. Error z value Pr(>|z|) 115s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 115s contactyes 1.8349 0.5125 3.580 0.000344 *** 115s --- 115s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 115s 115s Threshold coefficients: 115s Estimate Std. Error z value 115s 1|2 -1.6237 0.6824 -2.379 115s 2|3 1.5134 0.6038 2.507 115s 3|4 4.2285 0.8090 5.227 115s 4|5 6.0888 0.9725 6.261 115s > 115s > ################################# 115s > ## Other ways to construct formulas: 115s > set.seed(12345) 115s > y <- factor(sample(1:4,20,replace=TRUE)) 115s > x <- rnorm(20) 115s > b <- gl(5, 4, labels=letters[1:5]) 115s > data <- data.frame(y=y, x=x, b=b) 115s > rm(x, y, b) 115s > clmm(y ~ x + (1|b), data=data) 115s Cumulative Link Mixed Model fitted with the Laplace approximation 115s 115s formula: y ~ x + (1 | b) 115s data: data 115s 115s link threshold nobs logLik AIC niter max.grad 115s logit flexible 20 -25.37 60.74 338(288) 7.12e-08 115s 115s Random effects: 115s Groups Name Variance Std.Dev. 115s b (Intercept) 9.736e-09 9.867e-05 115s Number of groups: b 5 115s 115s Coefficients: 115s x 115s 0.2527 115s 115s Thresholds: 115s 1|2 2|3 3|4 115s -2.18234 0.06059 0.92746 115s > fit <- clmm(data$y ~ data$x + (1|data$b)) 115s > fit 115s Cumulative Link Mixed Model fitted with the Laplace approximation 115s 115s formula: data$y ~ data$x + (1 | data$b) 115s 115s link threshold nobs logLik AIC niter max.grad 115s logit flexible 20 -25.37 60.74 338(288) 7.12e-08 115s 115s Random effects: 115s Groups Name Variance Std.Dev. 115s data$b (Intercept) 9.736e-09 9.867e-05 115s Number of groups: data$b 5 115s 115s Coefficients: 115s data$x 115s 0.2527 115s 115s Thresholds: 115s 1|2 2|3 3|4 115s -2.18234 0.06059 0.92746 115s > fit <- clmm(data[, 1] ~ data[, 2] + (1|data[, 3])) 115s > fit 115s Cumulative Link Mixed Model fitted with the Laplace approximation 115s 115s formula: data[, 1] ~ data[, 2] + (1 | data[, 3]) 115s 115s link threshold nobs logLik AIC niter max.grad 115s logit flexible 20 -25.37 60.74 338(288) 7.12e-08 115s 115s Random effects: 115s Groups Name Variance Std.Dev. 115s data[, 3] (Intercept) 9.736e-09 9.867e-05 115s Number of groups: data[, 3] 5 115s 115s Coefficients: 115s data[, 2] 115s 0.2527 115s 115s Thresholds: 115s 1|2 2|3 3|4 115s -2.18234 0.06059 0.92746 115s > 115s > ################################# 115s > ## Evaluation within other functions: 115s > ## date: January 18th 2012. 115s > ## 115s > ## The problem was raised by Stefan Herzog (stefan.herzog@unibas.ch) 115s > ## January 12th 2012 in trying to make clmm work with glmulti. 115s > 115s > fun.clmm <- function(formula, data) 115s + ### This only works because clmm via eclmm.model.frame is careful to 115s + ### evaluate the 'formula' in the parent environment such it is not the 115s + ### character "formula" that is attempted evaluated. 115s + clmm(formula, data = data) 115s > 115s > fun2.clmm <- function(formula, data, weights, subset) { 115s + ### This should be the safe way to ensure evaluation of clmm in the 115s + ### right environment. 115s + mc <- match.call() 115s + mc[[1]] <- as.name("clmm") 115s + eval.parent(mc) 115s + } 115s > 115s > fun.clmm(rating ~ temp + contact + (1|judge), data=wine) ## works 115s Cumulative Link Mixed Model fitted with the Laplace approximation 115s 115s formula: rating ~ temp + contact + (1 | judge) 115s data: data 115s 115s link threshold nobs logLik AIC niter max.grad 115s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 115s 115s Random effects: 115s Groups Name Variance Std.Dev. 115s judge (Intercept) 1.279 1.131 115s Number of groups: judge 9 115s 115s Coefficients: 115s tempwarm contactyes 115s 3.063 1.835 115s 115s Thresholds: 115s 1|2 2|3 3|4 4|5 115s -1.624 1.513 4.229 6.089 115s > fun2.clmm(rating ~ temp + contact + (1|judge), data=wine) ## works 115s Cumulative Link Mixed Model fitted with the Laplace approximation 115s 115s formula: rating ~ temp + contact + (1 | judge) 115s data: wine 115s 115s link threshold nobs logLik AIC niter max.grad 115s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 115s 115s Random effects: 115s Groups Name Variance Std.Dev. 115s judge (Intercept) 1.279 1.131 115s Number of groups: judge 9 115s 115s Coefficients: 115s tempwarm contactyes 115s 3.063 1.835 115s 115s Thresholds: 115s 1|2 2|3 3|4 4|5 115s -1.624 1.513 4.229 6.089 115s > 115s > form1 <- "rating ~ temp + contact + (1|judge)" 115s > fun.clmm(form1, data=wine) ## works 116s Cumulative Link Mixed Model fitted with the Laplace approximation 116s 116s formula: rating ~ temp + contact + (1 | judge) 116s data: data 116s 116s link threshold nobs logLik AIC niter max.grad 116s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 116s 116s Random effects: 116s Groups Name Variance Std.Dev. 116s judge (Intercept) 1.279 1.131 116s Number of groups: judge 9 116s 116s Coefficients: 116s tempwarm contactyes 116s 3.063 1.835 116s 116s Thresholds: 116s 1|2 2|3 3|4 4|5 116s -1.624 1.513 4.229 6.089 116s > fun2.clmm(form1, data=wine) ## works 116s Cumulative Link Mixed Model fitted with the Laplace approximation 116s 116s formula: rating ~ temp + contact + (1 | judge) 116s data: wine 116s 116s link threshold nobs logLik AIC niter max.grad 116s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 116s 116s Random effects: 116s Groups Name Variance Std.Dev. 116s judge (Intercept) 1.279 1.131 116s Number of groups: judge 9 116s 116s Coefficients: 116s tempwarm contactyes 116s 3.063 1.835 116s 116s Thresholds: 116s 1|2 2|3 3|4 4|5 116s -1.624 1.513 4.229 6.089 116s > 116s > form2 <- formula(rating ~ temp + contact + (1|judge)) 116s > fun.clmm(form2, data=wine) ## works 116s Cumulative Link Mixed Model fitted with the Laplace approximation 116s 116s formula: rating ~ temp + contact + (1 | judge) 116s data: data 116s 116s link threshold nobs logLik AIC niter max.grad 116s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 116s 116s Random effects: 116s Groups Name Variance Std.Dev. 116s judge (Intercept) 1.279 1.131 116s Number of groups: judge 9 116s 116s Coefficients: 116s tempwarm contactyes 116s 3.063 1.835 116s 116s Thresholds: 116s 1|2 2|3 3|4 4|5 116s -1.624 1.513 4.229 6.089 116s > fun2.clmm(form2, data=wine) ## works 116s Cumulative Link Mixed Model fitted with the Laplace approximation 116s 116s formula: rating ~ temp + contact + (1 | judge) 116s data: wine 116s 116s link threshold nobs logLik AIC niter max.grad 116s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 116s 116s Random effects: 116s Groups Name Variance Std.Dev. 116s judge (Intercept) 1.279 1.131 116s Number of groups: judge 9 116s 116s Coefficients: 116s tempwarm contactyes 116s 3.063 1.835 116s 116s Thresholds: 116s 1|2 2|3 3|4 4|5 116s -1.624 1.513 4.229 6.089 116s > ## Notice that clmm is not able to get the name of the data (wine) 116s > ## correct when using fun.clmm. 116s > 116s > ################################# 116s > 116s > ## ## Example 2: using clmm function 116s > ## # 116s > ## ## Now I want to consider judge as a random effect to account for 116s > ## ## grouping structure of data 116s > ## mod2 <- clmm(rating ~ temp + contact + (1|judge), data=wine) 116s > ## 116s > ## ##Again, I started by using my own code to run all potential models: 116s > ## ## put names of all your variables in this vector: 116s > ## vl2 <- c("temp", "contact") 116s > ## ## generate list of possible combinations of variables: 116s > ## combos2 <- NULL 116s > ## for(i in 1:length(vl2)) { 116s > ## combos2 <- c(combos2, combn(vl2, i, simplify = F)) 116s > ## } 116s > ## ## create formulae and run models one by one, saving them as model1, 116s > ## ## model2 etc... 116s > ## for (i in 1:length(combos2)) { 116s > ## vs2 <- paste(combos2[[i]], collapse=" + ") 116s > ## f2 <- formula(paste("rating ~ ", vs2, "+(1|judge)", sep="")) 116s > ## print(f2) 116s > ## assign(paste("model", i, sep=""), clmm(f2, data=wine)) 116s > ## } 116s > ## summary(model1) # etc 116s > ## summary(model2) # etc 116s > ## summary(model3) # etc 116s > ## 116s > ## models <- vector("list", length(combos2)) 116s > ## for(i in 1:length(combos2)) { 116s > ## vs2 <- paste(combos2[[i]], collapse=" + ") 116s > ## f2 <- formula(paste("rating ~ ", vs2, "+(1|judge)", sep="")) 116s > ## print(f2) 116s > ## models[[i]] <- clmm(f2, data=wine) 116s > ## ## assign(paste("model", i, sep=""), clmm(f2, data=wine)) 116s > ## } 116s > ## 116s > ## ## Coefficients, AIC and BIC: 116s > ## lapply(models, function(m) coef(summary(m))) 116s > ## lapply(models, AIC) 116s > ## lapply(models, BIC) 116s > ## 116s > ## ## library(MuMIn) 116s > ## ## dd2 <- dredge(mod2) ## does not work 116s > ## ## ?dredge 116s > ## ## traceback() 116s > ## ## mod2$formula 116s > ## ## terms(as.formula(formula(mod2))) 116s > ## ## 116s > ## ## library(lme4) 116s > ## ## fmm1 <- lmer(response ~ temp + contact + (1|judge), data=wine) 116s > ## ## fmm1 116s > ## ## terms(as.formula(lme4:::formula(fmm1))) 116s > ## ## terms(as.formula(formula(fmm1))) 116s > 116s BEGIN TEST clmm.methods.R 116s 116s R version 4.4.3 (2025-02-28) -- "Trophy Case" 116s Copyright (C) 2025 The R Foundation for Statistical Computing 116s Platform: x86_64-pc-linux-gnu 116s 116s R is free software and comes with ABSOLUTELY NO WARRANTY. 116s You are welcome to redistribute it under certain conditions. 116s Type 'license()' or 'licence()' for distribution details. 116s 116s R is a collaborative project with many contributors. 116s Type 'contributors()' for more information and 116s 'citation()' on how to cite R or R packages in publications. 116s 116s Type 'demo()' for some demos, 'help()' for on-line help, or 116s 'help.start()' for an HTML browser interface to help. 116s Type 'q()' to quit R. 116s 116s > library(ordinal) 117s > data(wine) 117s > 117s > ################################# 117s > ## model.matrix method for clmm-objects: 117s > fmm1 <- clmm(rating ~ contact + temp + (1|judge), data=wine) 117s > mm <- model.matrix(fmm1) 117s > stopifnot(inherits(mm, "matrix"), 117s + dim(mm) == c(72, 3)) 117s > 117s > ################################# 117s > ## anova.clmm works even if formula does not have an environment: 117s > fmm1 <- clmm(rating ~ temp * contact + (1|judge), data = wine) 117s > fmm2 <- clmm(rating ~ temp + contact + (1|judge), data = wine) 117s > environment(fmm1$formula) <- NULL 117s > environment(fmm2$formula) <- NULL 117s > anova(fmm1, fmm2) 117s Likelihood ratio tests of cumulative link models: 117s 117s formula: link: threshold: 117s fmm2 rating ~ temp + contact + (1 | judge) logit flexible 117s fmm1 rating ~ temp * contact + (1 | judge) logit flexible 117s 117s no.par AIC logLik LR.stat df Pr(>Chisq) 117s fmm2 7 177.13 -81.565 117s fmm1 8 179.07 -81.536 0.0589 1 0.8082 117s > 117s > 117s > ################################# 117s > ## Test that ranef, condVar and VarCorr work as they are supposed to whether or 117s > ## not nlme and lme4 are loaded: 117s > 117s > fm <- clmm(rating ~ temp + contact + (1|judge), data = wine) 117s > fm 117s Cumulative Link Mixed Model fitted with the Laplace approximation 117s 117s formula: rating ~ temp + contact + (1 | judge) 117s data: wine 117s 117s link threshold nobs logLik AIC niter max.grad 117s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 117s 117s Random effects: 117s Groups Name Variance Std.Dev. 117s judge (Intercept) 1.279 1.131 117s Number of groups: judge 9 117s 117s Coefficients: 117s tempwarm contactyes 117s 3.063 1.835 117s 117s Thresholds: 117s 1|2 2|3 3|4 4|5 117s -1.624 1.513 4.229 6.089 117s > ranef(fm) 117s $judge 117s (Intercept) 117s 1 1.69617818 117s 2 -0.56578308 117s 3 0.96880828 117s 4 -0.05954989 117s 5 0.23051011 117s 6 0.47703864 117s 7 -1.91097339 117s 8 -0.27294385 117s 9 -0.55467576 117s 117s > VarCorr(fm) 117s $judge 117s (Intercept) 117s (Intercept) 1.279461 117s attr(,"stddev") 117s (Intercept) 117s 1.131133 117s 117s > condVar(fm) 117s $judge 117s (Intercept) 117s 1 0.3067453 117s 2 0.3779358 117s 3 0.3545529 117s 4 0.3651870 117s 5 0.3566066 117s 6 0.3485475 117s 7 0.3435693 117s 8 0.3050453 117s 9 0.3183194 117s 117s > summary(fm) 117s Cumulative Link Mixed Model fitted with the Laplace approximation 117s 117s formula: rating ~ temp + contact + (1 | judge) 117s data: wine 117s 117s link threshold nobs logLik AIC niter max.grad cond.H 117s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 2.8e+01 117s 117s Random effects: 117s Groups Name Variance Std.Dev. 117s judge (Intercept) 1.279 1.131 117s Number of groups: judge 9 117s 117s Coefficients: 117s Estimate Std. Error z value Pr(>|z|) 117s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 117s contactyes 1.8349 0.5125 3.580 0.000344 *** 117s --- 117s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 117s 117s Threshold coefficients: 117s Estimate Std. Error z value 117s 1|2 -1.6237 0.6824 -2.379 117s 2|3 1.5134 0.6038 2.507 117s 3|4 4.2285 0.8090 5.227 117s 4|5 6.0888 0.9725 6.261 117s > 117s > library(nlme) 117s > ranef(fm) 117s $judge 117s Loading required package: Matrix 117s (Intercept) 117s 1 1.69617818 117s 2 -0.56578308 117s 3 0.96880828 117s 4 -0.05954989 117s 5 0.23051011 117s 6 0.47703864 117s 7 -1.91097339 117s 8 -0.27294385 117s 9 -0.55467576 117s 117s > VarCorr(fm) 117s $judge 117s (Intercept) 117s (Intercept) 1.279461 117s attr(,"stddev") 117s (Intercept) 117s 1.131133 117s 117s > condVar(fm) 117s $judge 117s (Intercept) 117s 1 0.3067453 117s 2 0.3779358 117s 3 0.3545529 117s 4 0.3651870 117s 5 0.3566066 117s 6 0.3485475 117s 7 0.3435693 117s 8 0.3050453 117s 9 0.3183194 117s 117s > library(lme4) 117s 117s Attaching package: ‘lme4’ 117s 117s The following object is masked from ‘package:nlme’: 117s 117s lmList 117s 117s > ranef(fm) 117s $judge 117s (Intercept) 117s 1 1.69617818 117s 2 -0.56578308 117s 3 0.96880828 117s 4 -0.05954989 117s 5 0.23051011 117s 6 0.47703864 117s 7 -1.91097339 117s 8 -0.27294385 117s 9 -0.55467576 117s 117s > VarCorr(fm) 117s $judge 117s (Intercept) 117s (Intercept) 1.279461 117s attr(,"stddev") 117s (Intercept) 117s 1.131133 117s 117s > condVar(fm) 117s $judge 117s (Intercept) 117s 1 0.3067453 117s 2 0.3779358 117s 3 0.3545529 117s 4 0.3651870 117s 5 0.3566066 117s 6 0.3485475 117s 7 0.3435693 117s 8 0.3050453 117s 9 0.3183194 117s 117s > fm1 <- lmer(Reaction ~ Days + (Days | Subject), data=sleepstudy) 117s > ranef(fm1) 117s $Subject 117s (Intercept) Days 117s 308 2.2585509 9.1989758 117s 309 -40.3987381 -8.6196806 117s 310 -38.9604090 -5.4488565 117s 330 23.6906196 -4.8143503 117s 331 22.2603126 -3.0699116 117s 332 9.0395679 -0.2721770 117s 333 16.8405086 -0.2236361 117s 334 -7.2326151 1.0745816 117s 335 -0.3336684 -10.7521652 117s 337 34.8904868 8.6282652 117s 349 -25.2102286 1.1734322 117s 350 -13.0700342 6.6142178 117s 351 4.5778642 -3.0152621 117s 352 20.8636782 3.5360011 117s 369 3.2754656 0.8722149 117s 370 -25.6129993 4.8224850 117s 371 0.8070461 -0.9881562 117s 372 12.3145921 1.2840221 117s 117s with conditional variances for “Subject” 117s > VarCorr(fm1) 117s Groups Name Std.Dev. Corr 117s Subject (Intercept) 24.7407 117s Days 5.9221 0.066 117s Residual 25.5918 117s > 117s > ranef(fm) 117s $judge 117s (Intercept) 117s 1 1.69617818 117s 2 -0.56578308 117s 3 0.96880828 117s 4 -0.05954989 117s 5 0.23051011 117s 6 0.47703864 117s 7 -1.91097339 117s 8 -0.27294385 117s 9 -0.55467576 117s 117s > VarCorr(fm) 117s $judge 117s (Intercept) 117s (Intercept) 1.279461 117s attr(,"stddev") 117s (Intercept) 117s 1.131133 117s 117s > condVar(fm) 117s $judge 117s (Intercept) 117s 1 0.3067453 117s 2 0.3779358 117s 3 0.3545529 117s 4 0.3651870 117s 5 0.3566066 117s 6 0.3485475 117s 7 0.3435693 117s 8 0.3050453 117s 9 0.3183194 117s 117s > summary(fm) 117s Cumulative Link Mixed Model fitted with the Laplace approximation 117s 117s formula: rating ~ temp + contact + (1 | judge) 117s data: wine 117s 117s link threshold nobs logLik AIC niter max.grad cond.H 117s logit flexible 72 -81.57 177.13 332(999) 1.03e-05 2.8e+01 117s 117s Random effects: 117s Groups Name Variance Std.Dev. 117s judge (Intercept) 1.279 1.131 117s Number of groups: judge 9 117s 117s Coefficients: 117s Estimate Std. Error z value Pr(>|z|) 117s tempwarm 3.0630 0.5954 5.145 2.68e-07 *** 117s contactyes 1.8349 0.5125 3.580 0.000344 *** 117s --- 117s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 117s 117s Threshold coefficients: 117s Estimate Std. Error z value 117s 1|2 -1.6237 0.6824 -2.379 117s 2|3 1.5134 0.6038 2.507 117s 3|4 4.2285 0.8090 5.227 117s 4|5 6.0888 0.9725 6.261 117s > 117s BEGIN TEST confint.R 117s 117s R version 4.4.3 (2025-02-28) -- "Trophy Case" 117s Copyright (C) 2025 The R Foundation for Statistical Computing 117s Platform: x86_64-pc-linux-gnu 117s 117s R is free software and comes with ABSOLUTELY NO WARRANTY. 117s You are welcome to redistribute it under certain conditions. 117s Type 'license()' or 'licence()' for distribution details. 117s 117s R is a collaborative project with many contributors. 117s Type 'contributors()' for more information and 117s 'citation()' on how to cite R or R packages in publications. 117s 117s Type 'demo()' for some demos, 'help()' for on-line help, or 117s 'help.start()' for an HTML browser interface to help. 117s Type 'q()' to quit R. 117s 117s > ################################# 117s > ## test profile and confint methods: 117s > library(ordinal) 118s > data(wine) 118s > fm1 <- clm(rating ~ contact + temp, data = wine) 118s > summary(fm1) 118s formula: rating ~ contact + temp 118s data: wine 118s 118s link threshold nobs logLik AIC niter max.grad cond.H 118s logit flexible 72 -86.49 184.98 6(0) 4.01e-12 2.7e+01 118s 118s Coefficients: 118s Estimate Std. Error z value Pr(>|z|) 118s contactyes 1.5278 0.4766 3.205 0.00135 ** 118s tempwarm 2.5031 0.5287 4.735 2.19e-06 *** 118s --- 118s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 118s 118s Threshold coefficients: 118s Estimate Std. Error z value 118s 1|2 -1.3444 0.5171 -2.600 118s 2|3 1.2508 0.4379 2.857 118s 3|4 3.4669 0.5978 5.800 118s 4|5 5.0064 0.7309 6.850 118s > 118s > ## profile.clm and confint.clm: 118s > pr1 <- profile(fm1) 118s > confint(pr1) 118s 2.5 % 97.5 % 118s contactyes 0.6158045 2.492424 118s tempwarm 1.5097839 3.595251 118s > pr1 <- profile(fm1, which.beta = 1:2) 118s > confint(pr1) 118s 2.5 % 97.5 % 118s contactyes 0.6158045 2.492424 118s tempwarm 1.5097839 3.595251 118s > pr1 <- profile(fm1, which.beta = 2:1) 118s > confint(pr1) 118s 2.5 % 97.5 % 118s tempwarm 1.5097839 3.595251 118s contactyes 0.6158045 2.492424 118s > pr1 <- profile(fm1, which.beta = 1) 118s > confint(pr1) 118s 2.5 % 97.5 % 118s contactyes 0.6158045 2.492424 118s > pr1 <- profile(fm1, which.beta = 2) 118s > confint(pr1) 118s 2.5 % 97.5 % 118s tempwarm 1.509784 3.595251 118s > pr1 <- try(profile(fm1, which.beta = 0), silent = TRUE) ## error 118s > pr1 <- try(profile(fm1, which.beta = "no.par"), silent = TRUE) ## error 118s > pr1 <- try(profile(fm1, which.beta = -1), silent = TRUE) ## error 118s > pr1 <- profile(fm1, which.beta = "tempwarm") 119s > confint(pr1) 119s 2.5 % 97.5 % 119s tempwarm 1.509784 3.595251 119s > pr1 <- profile(fm1, alpha = 0.1) 119s > confint(pr1) ## should give NA in this case? 119s 2.5 % 97.5 % 119s contactyes NA NA 119s tempwarm NA NA 119s > pr1 <- profile(fm1, max.steps = 9) 119s > pr1 <- profile(fm1, step.warn = 7) 119s > pr1 <- profile(fm1, nsteps = 6) 119s > pr1 <- profile(fm1, trace = 1) 119s 119s Parameter: contactyes down 119s 119s Parameter: contactyes up 119s 119s Parameter: tempwarm down 119s 119s Parameter: tempwarm up 119s > pr1 <- profile(fm1, control = list(gradTol = .1)) 119s > confint(pr1) ## not at all unreliable... 119s 2.5 % 97.5 % 119s contactyes 0.6158045 2.492424 119s tempwarm 1.5097839 3.595251 119s > 119s > ## single regression coef setting: 119s > fm2 <- clm(rating ~ contact, data = wine) 119s > summary(fm2) 119s formula: rating ~ contact 119s data: wine 119s 119s link threshold nobs logLik AIC niter max.grad cond.H 119s logit flexible 72 -99.96 209.91 5(0) 1.67e-07 1.7e+01 119s 119s Coefficients: 119s Estimate Std. Error z value Pr(>|z|) 119s contactyes 1.2070 0.4499 2.683 0.0073 ** 119s --- 119s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 119s 119s Threshold coefficients: 119s Estimate Std. Error z value 119s 1|2 -2.13933 0.48981 -4.368 119s 2|3 0.04257 0.32063 0.133 119s 3|4 1.71449 0.38637 4.437 119s 4|5 2.97875 0.50207 5.933 119s > pr2 <- profile(fm2) 119s > confint(pr2) 119s 2.5 % 97.5 % 119s contactyes 0.3403978 2.110952 119s > 119s > ## confint.clm: 119s > confint(fm1) 119s 2.5 % 97.5 % 119s contactyes 0.6157925 2.492404 119s tempwarm 1.5097627 3.595225 119s > confint(fm1, 2) 119s argument 'parm' ignored 119s 2.5 % 97.5 % 119s contactyes 0.6157925 2.492404 119s tempwarm 1.5097627 3.595225 119s > confint(fm1, 1) 119s argument 'parm' ignored 119s argument 'parm' ignored 119s 2.5 % 97.5 % 119s contactyes 0.6157925 2.492404 119s tempwarm 1.5097627 3.595225 119s > confint(fm1, "tempwarm") 119s 2.5 % 97.5 % 119s contactyes 0.6157925 2.492404 119s tempwarm 1.5097627 3.595225 119s > confint(fm1, type = "profile") 119s 2.5 % 97.5 % 119s contactyes 0.6157925 2.492404 119s tempwarm 1.5097627 3.595225 119s > confint(fm1, type = "Wald") 119s 2.5 % 97.5 % 119s 1|2 -2.3578848 -0.330882 119s 2|3 0.3925794 2.109038 119s 3|4 2.2952980 4.638476 119s 4|5 3.5738541 6.438954 119s contactyes 0.5936345 2.461961 119s tempwarm 1.4669081 3.539296 119s > confint(fm1, 2, type = "Wald") 119s argument 'parm' ignored 119s 2.5 % 97.5 % 119s 1|2 -2.3578848 -0.330882 119s 2|3 0.3925794 2.109038 119s 3|4 2.2952980 4.638476 119s 4|5 3.5738541 6.438954 119s contactyes 0.5936345 2.461961 119s tempwarm 1.4669081 3.539296 119s > confint(fm1, level = 0.5) 119s 25 % 75 % 119s contactyes 1.209254 1.852544 119s tempwarm 2.152051 2.865757 119s > confint(fm1, level = 1 - 1e-6) 119s 0 % 100 % 119s contactyes -0.7003630 4.091731 119s tempwarm 0.1351282 5.520007 119s > confint(fm1, level = 1 - 1e-10) ## extreme, but it works 119s Wait for profiling to be done... 119s 0 % 100 % 119s contactyes -1.4045009 5.059182 119s tempwarm -0.5753928 6.774556 119s > confint(fm1, trace = 1) 119s 119s Parameter: contactyes down 119s 119s Parameter: contactyes up 119s 119s Parameter: tempwarm down 119s 119s Parameter: tempwarm up 119s 2.5 % 97.5 % 119s contactyes 0.6157925 2.492404 119s tempwarm 1.5097627 3.595225 119s > 119s > ## plot.profile: 119s > pr1 <- profile(fm1, which.beta=1:2, alpha = 1e-3) 119s > par(mfrow = c(1,2)) 119s > plot(pr1) 119s > plot(pr1, 1) 119s > plot(pr1, "contactyes") 119s > plot(pr1, level = .97) 119s > plot(pr1, Log = TRUE) 119s > plot(pr1, relative = FALSE) 119s > plot(pr1, root = TRUE) 119s > plot(pr1, approx = TRUE) 119s > plot(pr1, n=10) 119s > plot(pr1, ylim = c(0,2)) 119s > plot(pr1, las = 1) 119s > plot(pr2) 119s > 119s > 119s BEGIN TEST nominal.test.R 119s 119s R version 4.4.3 (2025-02-28) -- "Trophy Case" 119s Copyright (C) 2025 The R Foundation for Statistical Computing 119s Platform: x86_64-pc-linux-gnu 119s 119s R is free software and comes with ABSOLUTELY NO WARRANTY. 119s You are welcome to redistribute it under certain conditions. 119s Type 'license()' or 'licence()' for distribution details. 119s 119s R is a collaborative project with many contributors. 119s Type 'contributors()' for more information and 119s 'citation()' on how to cite R or R packages in publications. 119s 119s Type 'demo()' for some demos, 'help()' for on-line help, or 119s 'help.start()' for an HTML browser interface to help. 119s Type 'q()' to quit R. 119s 119s > library(ordinal) 120s > 120s > if(require(MASS)) { 120s + fm1 <- clm(Sat ~ Infl + Type + Cont, data=housing, weights=Freq) 120s + scale_test(fm1) 120s + nominal_test(fm1) 120s + 120s + fm2 <- update(fm1, scale=~Cont) 120s + scale_test(fm2) 120s + nominal_test(fm2) 120s + fm3 <- update(fm1, nominal=~ Cont) 120s + fm3$Theta 120s + anova(fm2, fm3) 120s + fm3$alpha.mat 120s + summary(fm3) 120s + } 120s Loading required package: MASS 120s formula: Sat ~ Infl + Type + Cont 120s nominal: ~Cont 120s data: housing 120s 120s link threshold nobs logLik AIC niter max.grad cond.H 120s logit flexible 1681 -1738.35 3494.70 4(0) 1.31e-07 6.3e+01 120s 120s Coefficients: (1 not defined because of singularities) 120s Estimate Std. Error z value Pr(>|z|) 120s InflMedium 0.5695 0.1048 5.436 5.45e-08 *** 120s InflHigh 1.2884 0.1271 10.137 < 2e-16 *** 120s TypeApartment -0.5706 0.1192 -4.788 1.68e-06 *** 120s TypeAtrium -0.3643 0.1552 -2.348 0.0189 * 120s TypeTerrace -1.0980 0.1516 -7.242 4.43e-13 *** 120s ContHigh NA NA NA NA 120s --- 120s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 120s 120s Threshold coefficients: 120s Estimate Std. Error z value 120s Low|Medium.(Intercept) -0.4494 0.1279 -3.515 120s Medium|High.(Intercept) 0.6480 0.1279 5.066 120s Low|Medium.ContHigh -0.4440 0.1095 -4.056 120s Medium|High.ContHigh -0.2861 0.1063 -2.691 120s > 120s > ################################# 120s > ### Testing nominal_test and scale_test: 120s > fm1 <- clm(rating ~ temp * contact, data=wine) 120s > ## names(fm1) 120s > fm2 <- clm(rating ~ temp * contact, data=wine, nominal=~contact) 120s > (an <- anova(fm1, fm2)) 120s Likelihood ratio tests of cumulative link models: 120s 120s formula: nominal: link: threshold: 120s fm1 rating ~ temp * contact ~1 logit flexible 120s fm2 rating ~ temp * contact ~contact logit flexible 120s 120s no.par AIC logLik LR.stat df Pr(>Chisq) 120s fm1 7 186.83 -86.416 120s fm2 10 192.17 -86.083 0.6669 3 0.881 120s > (nm <- nominal_test(fm1)) 120s Tests of nominal effects 120s 120s formula: rating ~ temp * contact 120s Df logLik AIC LRT Pr(>Chi) 120s -86.416 186.83 120s temp 3 -84.874 189.75 3.08352 0.3789 120s contact 3 -86.083 192.16 0.66691 0.8810 120s temp:contact 120s > stopifnot(isTRUE(all.equal(an[2, 6], nm["contact", 5]))) 120s > 120s > fm2 <- clm(rating ~ temp * contact, data=wine, scale=~contact) 120s > (an <- anova(fm1, fm2)) 120s Likelihood ratio tests of cumulative link models: 120s 120s formula: scale: link: threshold: 120s fm1 rating ~ temp * contact ~1 logit flexible 120s fm2 rating ~ temp * contact ~contact logit flexible 120s 120s no.par AIC logLik LR.stat df Pr(>Chisq) 120s fm1 7 186.83 -86.416 120s fm2 8 188.60 -86.300 0.2325 1 0.6297 120s > (sc <- scale_test(fm1)) 120s Tests of scale effects 120s 120s formula: rating ~ temp * contact 120s Df logLik AIC LRT Pr(>Chi) 120s -86.416 186.83 120s temp 1 -86.326 188.65 0.18061 0.6709 120s contact 1 -86.300 188.60 0.23252 0.6297 120s temp:contact 3 -86.259 192.52 0.31391 0.9574 120s > stopifnot(isTRUE(all.equal(an[2, 6], sc["contact", "Pr(>Chi)"]))) 120s > 120s > fm1 <- clm(rating ~ temp + contact, 120s + nominal=~temp + contact, data=wine) 121s Warning message: 121s (1) Hessian is numerically singular: parameters are not uniquely determined 121s In addition: Absolute convergence criterion was met, but relative criterion was not met 121s > fm1 121s formula: rating ~ temp + contact 121s nominal: ~temp + contact 121s data: wine 121s 121s link threshold nobs logLik AIC niter max.grad cond.H 121s logit flexible 72 -84.61 193.22 20(0) 4.36e-09 5.0e+10 121s 121s Coefficients: (2 not defined because of singularities) 121s 121s no additional terms to add to nominal 121s 121s tempwarm contactyes 121s NA NA 121s 121s Threshold coefficients: 121s 1|2 2|3 3|4 4|5 121s (Intercept) -1.226 1.033 3.946 24.553 121s tempwarm -21.118 -2.111 -2.940 -22.432 121s contactyes -1.659 -1.343 -1.693 -1.162 121s > try(nominal_test(fm1), silent=TRUE)[1] ## gives error OK 121s Df 121s 121s > scale_test(fm1) 121s Tests of scale effects 121s 121s formula: rating ~ temp + contact 121s nominal: ~temp + contact 121s Df logLik AIC LRT Pr(>Chi) 121s -84.611 193.22 121s temp 1 -84.604 195.21 0.0129568 0.9094 121s contact 1 -84.610 195.22Warning messages: 121s 1: (1) Hessian is numerically singular: parameters are not uniquely determined 121s In addition: Absolute convergence criterion was met, but relative criterion was not met 121s 2: (1) Hessian is numerically singular: parameters are not uniquely determined 121s In addition: Absolute convergence criterion was met, but relative criterion was not met 121s 0.0012219 0.9721 121s > fm1 <- clm(rating ~ temp + contact, 121s + scale=~temp + contact, data=wine) 121s > fm1 121s formula: rating ~ temp + contact 121s scale: ~temp + contact 121s data: wine 121s 121s link threshold nobs logLik AIC niter max.grad cond.H 121s logit flexible 72 -86.34 188.68 8(0) 7.40e-09 2.0e+02 121s 121s Coefficients: 121s tempwarm contactyes 121s 2.446 1.482 121s 121s log-scale coefficients: 121s tempwarm contactyes 121s 0.05008 -0.11418 121s 121s Threshold coefficients: 121s 1|2 2|3 3|4 4|5 121s -1.303 1.219 3.377 4.872 121s > try(scale_test(fm1), silent=TRUE)[1] ## gives error OK 121s 121s no relevant terms to add to scale 121s 121s Df 121s 121s > nominal_test(fm1) 121s Tests of nominal effects 121s 121s formula: rating ~ temp + contact 121s scale: ~temp + contact 121s Df logLik AIC LRT Pr(>Chi) 121s -86.342 188.69 121s temp 3 -84.851 191.70 2.98202 0.3944 121s contact 3 -86.008 194.02 0.66808 0.8807 121s > 121s > 121s > ## Using weights: 121s > set.seed(123454321) 121s > wt <- runif(nrow(wine)) 121s > fm1 <- clm(rating ~ temp * contact, data=wine, weigths=wt) 121s > nominal_test(fm1) 121s Tests of nominal effects 121s 121s formula: rating ~ temp * contact 121s Df logLik AIC LRT Pr(>Chi) 121s -86.416 186.83 121s temp 3 -84.874 189.75 3.08352 0.3789 121s contact 3 -86.083 192.16 0.66691 0.8810 121s temp:contact 121s > scale_test(fm1) 121s Tests of scale effects 121s 121s formula: rating ~ temp * contact 121s Df logLik AIC LRT Pr(>Chi) 121s -86.416 186.83 121s temp 1 -86.326 188.65 0.18061 0.6709 121s contact 1 -86.300 188.60 0.23252 0.6297 121s temp:contact 3 -86.259 192.52 0.31391 0.9574 121s > 121s > ## No nominal test for judge since that model is not identifiable: 121s > fm1 <- clm(rating ~ judge + temp + contact, data=wine) 121s > nominal_test(fm1) 121s Tests of nominal effects 121s 121s formula: rating ~ judge + temp + contact 121s Df logLik AIC LRT Pr(>Chi) 121s -70.921 169.84 121s judge 121s temp 3 -69.900 173.80 2.04253 0.5636 121s contact 3 -70.708 175.42 0.42612 0.9348 121s > scale_test(fm1) 121s Tests of scale effects 121s 121s formula: rating ~ judge + temp + contact 121s Df logLik AIC LRT Pr(>Chi) 121s -70.921 169.84 121s judge 8 -64.731 173.46 12.3790 0.1351 121s temp 1 -70.897 171.79 0.0474 0.8276 121s contact 1 -70.870 171.74 0.1018 0.7497 121s > fm1 <- clm(rating ~ judge + temp, nominal=~contact, data=wine) 121s > nominal_test(fm1) 121s Tests of nominal effects 121s 121s formula: rating ~ judge + temp 121s nominal: ~contact 121s Df logLik AIC LRT Pr(>Chi) 121s -70.708 175.42 121s judge 121s temp 3 -69.707 179.41 2.0015 0.5721 121s > summary(fm1) 121s formula: rating ~ judge + temp 121s nominal: ~contact 121s data: wine 121s 121s link threshold nobs logLik AIC niter max.grad cond.H 121s logit flexible 72 -70.71 175.42 6(0) 8.07e-08 9.9e+01 121s 121s Coefficients: 121s Estimate Std. Error z value Pr(>|z|) 121s judge2 -3.2395 1.0683 -3.032 0.00243 ** 121s judge3 -0.9556 0.9699 -0.985 0.32452 121s judge4 -2.4613 1.0321 -2.385 0.01709 * 121s judge5 -2.0248 1.0093 -2.006 0.04484 * 121s judge6 -1.6379 0.9770 -1.677 0.09364 . 121s judge7 -5.2222 1.1381 -4.589 4.46e-06 *** 121s judge8 -2.7648 0.9776 -2.828 0.00468 ** 121s judge9 -3.1751 1.0028 -3.166 0.00154 ** 121s tempwarm 3.3309 0.6174 5.395 6.87e-08 *** 121s --- 121s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 121s 121s Threshold coefficients: 121s Estimate Std. Error z value 121s 1|2.(Intercept) -4.1549 0.9897 -4.198 121s 2|3.(Intercept) -0.7354 0.7920 -0.928 121s 3|4.(Intercept) 2.3388 0.8909 2.625 121s 4|5.(Intercept) 3.8873 1.0352 3.755 121s 1|2.contactyes -2.0216 1.3072 -1.547 121s 2|3.contactyes -1.9865 0.6904 -2.877 121s 3|4.contactyes -2.1825 0.7774 -2.807 121s 4|5.contactyes -1.5077 1.0044 -1.501 121s > 121s > ## A continuous variable: 121s > set.seed(123454321) 121s > x <- rnorm(nrow(wine), sd=1) 121s > fm <- clm(rating ~ temp, nominal=~contact * x, data=wine) 121s > nominal_test(fm) 121s Warning message: 121s (1) Hessian is numerically singular: parameters are not uniquely determined 121s In addition: Absolute convergence criterion was met, but relative criterion was not met 121s Tests of nominal effects 121s 121s formula: rating ~ temp 121s nominal: ~contact * x 121s Df logLik AIC LRT Pr(>Chi) 121s -77.858 189.72 121s temp 3 -76.738 193.48 2.24 0.5241 121s > scale_test(fm) 121s Tests of scale effects 121s 121s formula: rating ~ temp 121s nominal: ~contact * x 121s Df logLik AIC LRT Pr(>Chi) 121s -77.858 189.72 121s temp 1 -77.684 191.37 0.34804 0.5552 121s > fm <- clm(rating ~ temp + x, nominal=~contact, data=wine) 121s Warning message: 121s (1) Hessian is numerically singular: parameters are not uniquely determined 121s In addition: Absolute convergence criterion was met, but relative criterion was not met 121s > nominal_test(fm) 121s Tests of nominal effects 121s 121s formula: rating ~ temp + x 121s nominal: ~contact 121s Df logLik AIC LRT Pr(>Chi) 121s -84.949 189.90 121s temp 3 -83.421 192.84 3.0560 0.3831 121s x 3 -84.333 194.67 1.2322 0.7453 121s > scale_test(fm) 121s Tests of scale effects 121s 121s formula: rating ~ temp + x 121s nominal: ~contact 121s Df logLik AIC LRT Pr(>Chi) 121s -84.949 189.90 121s temp 1 -84.737 191.47 0.42504 0.5144 121s x 1 -84.896 191.79 0.10781 0.7426 121s > ## poly: 121s > fm <- clm(rating ~ temp + poly(x, 2), nominal=~contact, data=wine) 121s > nominal_test(fm) 121s Tests of nominal effects 121s 121s formula: rating ~ temp + poly(x, 2) 121s nominal: ~contact 121s Df logLik AIC LRT Pr(>Chi) 121s -84.079 190.16 121s temp 3 -82.694 193.39 2.7693 0.4286 121s poly(x, 2) 6 -80.941 195.88 6.2762 0.3930 121s > scale_test(fm) 121s Tests of scale effects 121s 121s formula: rating ~ temp + poly(x, 2) 121s nominal: ~contact 121s Df logLik AIC LRT Pr(>Chi) 121s -84.079 190.16 121s temp 1 -84.020 192.04 0.11784 0.7314 121s poly(x, 2) 2 -83.314 192.63 1.53017 0.4653 121s > ## another combination: 121s > fm1 <- clm(SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ, 121s + scale=~PROD, 121s + nominal=~ DAY*GENDER, data=soup) 121s > fm1 121s formula: SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ 121s scale: ~PROD 121s nominal: ~DAY * GENDER 121s data: soup 121s 121s link threshold nobs logLik AIC niter max.grad cond.H 121s logit flexible 1847 -2657.84 5375.68 8(2) 3.50e-07 4.0e+03 121s 121s Coefficients: (1 not defined because of singularities) 121s PRODID2 PRODID3 PRODID4 PRODID5 121s 1.0780 1.5090 0.9482 1.4910 121s PRODID6 DAY2 SOUPTYPECanned SOUPTYPEDry-mix 121s 1.8174 NA -0.2337 0.1832 121s SOUPFREQ1-4/month SOUPFREQ<1/month 121s -0.0954 -0.1137 121s 121s log-scale coefficients: 121s PRODTest 121s 0.1427 121s 121s Threshold coefficients: 121s 1|2 2|3 3|4 4|5 5|6 121s (Intercept) -1.65979 -0.75912 -0.36903 0.02374 0.66929 121s DAY2 -0.22291 0.13711 0.16406 0.10279 0.23721 121s GENDERFemale 0.06531 0.06089 -0.01938 -0.13670 -0.01594 121s DAY2:GENDERFemale 0.36194 0.25429 0.25482 0.23375 0.05243 121s > nominal_test(fm1) 122s Tests of nominal effects 122s 122s formula: SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ 122s scale: ~PROD 122s nominal: ~DAY * GENDER 122s Df logLik AIC LRT Pr(>Chi) 122s -2657.8 5375.7 122s PRODID 20 -2644.7 5389.4 26.2387 0.1580707 122s SOUPTYPE 8 -2654.0 5384.1 7.5969 0.4738067 122s SOUPFREQ 8 -2644.6 5365.1 26.5587 0.0008423 *** 122s PROD 4 -2654.7 5377.5 6.2011 0.1846258 122s --- 122s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 122s > scale_test(fm1) 122s Tests of scale effects 122s 122s formula: SURENESS ~ PRODID + DAY + SOUPTYPE + SOUPFREQ 122s scale: ~PROD 122s nominal: ~DAY * GENDER 122s Df logLik AIC LRT Pr(>Chi) 122s -2657.8 5375.7 122s PRODID 4 -2657.3 5382.5 1.1526 0.885842 122s DAY 1 -2655.9 5373.8 3.8544 0.049616 * 122s SOUPTYPE 2 -2657.6 5379.1 0.5416 0.762771 122s SOUPFREQ 2 -2652.7 5369.3 10.3447 0.005671 ** 122s --- 122s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 122s > 122s > ################################# 122s > 122s > 122s BEGIN TEST ranef.loading.R 122s 122s R version 4.4.3 (2025-02-28) -- "Trophy Case" 122s Copyright (C) 2025 The R Foundation for Statistical Computing 122s Platform: x86_64-pc-linux-gnu 122s 122s R is free software and comes with ABSOLUTELY NO WARRANTY. 122s You are welcome to redistribute it under certain conditions. 122s Type 'license()' or 'licence()' for distribution details. 122s 122s R is a collaborative project with many contributors. 122s Type 'contributors()' for more information and 122s 'citation()' on how to cite R or R packages in publications. 122s 122s Type 'demo()' for some demos, 'help()' for on-line help, or 122s 'help.start()' for an HTML browser interface to help. 122s Type 'q()' to quit R. 122s 122s > # check that ranef and VarCorr work even after loading ordinal: 122s > library(lme4) 122s Loading required package: Matrix 123s > fm1 <- lmer(Reaction ~ Days + (Days | Subject), data=sleepstudy) 123s > ranef(fm1) 123s $Subject 123s (Intercept) Days 123s 308 2.2585509 9.1989758 123s 309 -40.3987381 -8.6196806 123s 310 -38.9604090 -5.4488565 123s 330 23.6906196 -4.8143503 123s 331 22.2603126 -3.0699116 123s 332 9.0395679 -0.2721770 123s 333 16.8405086 -0.2236361 123s 334 -7.2326151 1.0745816 123s 335 -0.3336684 -10.7521652 123s 337 34.8904868 8.6282652 123s 349 -25.2102286 1.1734322 123s 350 -13.0700342 6.6142178 123s 351 4.5778642 -3.0152621 123s 352 20.8636782 3.5360011 123s 369 3.2754656 0.8722149 123s 370 -25.6129993 4.8224850 123s 371 0.8070461 -0.9881562 123s 372 12.3145921 1.2840221 123s 123s with conditional variances for “Subject” 123s > VarCorr(fm1) 123s Groups Name Std.Dev. Corr 123s Subject (Intercept) 24.7407 123s Days 5.9221 0.066 123s Residual 25.5918 123s > library(ordinal) 124s > ranef(fm1) 124s $Subject 124s (Intercept) Days 124s 308 2.2585509 9.1989758 124s 309 -40.3987381 -8.6196806 124s 310 -38.9604090 -5.4488565 124s 330 23.6906196 -4.8143503 124s 331 22.2603126 -3.0699116 124s 332 9.0395679 -0.2721770 124s 333 16.8405086 -0.2236361 124s 334 -7.2326151 1.0745816 124s 335 -0.3336684 -10.7521652 124s 337 34.8904868 8.6282652 124s 349 -25.2102286 1.1734322 124s 350 -13.0700342 6.6142178 124s 351 4.5778642 -3.0152621 124s 352 20.8636782 3.5360011 124s 369 3.2754656 0.8722149 124s 370 -25.6129993 4.8224850 124s 371 0.8070461 -0.9881562 124s 372 12.3145921 1.2840221 124s 124s with conditional variances for “Subject” 124s > VarCorr(fm1) 124s Groups Name Std.Dev. Corr 124s Subject (Intercept) 24.7407 124s Days 5.9221 0.066 124s Residual 25.5918 124s > 124s BEGIN TEST test-all.R 124s 124s R version 4.4.3 (2025-02-28) -- "Trophy Case" 124s Copyright (C) 2025 The R Foundation for Statistical Computing 124s Platform: x86_64-pc-linux-gnu 124s 124s R is free software and comes with ABSOLUTELY NO WARRANTY. 124s You are welcome to redistribute it under certain conditions. 124s Type 'license()' or 'licence()' for distribution details. 124s 124s R is a collaborative project with many contributors. 124s Type 'contributors()' for more information and 124s 'citation()' on how to cite R or R packages in publications. 124s 124s Type 'demo()' for some demos, 'help()' for on-line help, or 124s 'help.start()' for an HTML browser interface to help. 124s Type 'q()' to quit R. 124s 124s > 124s > if(require(testthat) && require(ordinal)) { 124s + test_check("ordinal") 124s + } 124s Loading required package: testthat 124s Loading required package: ordinal 129s [ FAIL 0 | WARN 0 | SKIP 0 | PASS 81 ] 129s > 129s BEGIN TEST test.clm.Theta.R 130s 130s R version 4.4.3 (2025-02-28) -- "Trophy Case" 130s Copyright (C) 2025 The R Foundation for Statistical Computing 130s Platform: x86_64-pc-linux-gnu 130s 130s R is free software and comes with ABSOLUTELY NO WARRANTY. 130s You are welcome to redistribute it under certain conditions. 130s Type 'license()' or 'licence()' for distribution details. 130s 130s R is a collaborative project with many contributors. 130s Type 'contributors()' for more information and 130s 'citation()' on how to cite R or R packages in publications. 130s 130s Type 'demo()' for some demos, 'help()' for on-line help, or 130s 'help.start()' for an HTML browser interface to help. 130s Type 'q()' to quit R. 130s 130s > library(ordinal) 131s > 131s > ################################# 131s > ## 1 categorical variable in nominal: 131s > fm <- clm(rating ~ temp, nominal=~contact, data=wine) 131s > fm$Theta 131s contact 1|2 2|3 3|4 4|5 131s 1 no -1.323043 1.2464435 3.550044 4.660247 131s 2 yes -2.938103 -0.2651238 1.875288 3.609624 131s > fm$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -1.323043 1.246444 3.550044 4.660247 131s contactyes -1.615059 -1.511567 -1.674756 -1.050623 131s > ## Threshold effects: 131s > fm <- clm(rating ~ temp, nominal=~contact, data=wine, 131s + threshold="symmetric") 131s > fm$Theta 131s contact 1|2 2|3 3|4 4|5 131s 1 no -1.054279 1.083892 3.383980 5.522152Warning message: 131s (1) Hessian is numerically singular: parameters are not uniquely determined 131s In addition: Absolute convergence criterion was met, but relative criterion was not met 131s 131s 2 yes -2.360683 -0.356889 1.753317 3.757111 131s > fm$alpha.mat 131s central.1 central.2 spacing.1 131s (Intercept) 1.083892 3.383980 2.1381713 131s contactyes -1.440781 -1.630663 -0.1343777 131s > fm <- clm(rating ~ temp, nominal=~contact, data=wine, 131s + threshold="equidistant") 131s > fm$Theta 131s contact 1|2 2|3 3|4 4|5 131s 1 no -1.089140 1.1176064 3.324353 5.531099 131s 2 yes -2.386361 -0.3365063 1.713348 3.763202 131s > fm$alpha.mat 131s threshold.1 spacing 131s (Intercept) -1.08914 2.2067465 131s contactyes -1.29722 -0.1568922 131s > ## Singular fit is still ok (with a warning, though) 131s > fm <- clm(rating ~ contact, nominal=~temp, data=wine) 131s > fm$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -1.265638 1.104045 3.765661 24.89643 131s tempwarm -21.095417 -2.153024 -2.873317 -22.55000 131s > fm$Theta 131s temp 1|2 2|3 3|4 4|5 131s 1 cold -1.265638 1.104045 3.7656606 24.896432 131s 2 warm -22.361055 -1.048979 0.8923431 2.346436 131s > 131s > ################################# 131s > ## 1 continuous variable: 131s > set.seed(123) 131s > x <- rnorm(nrow(wine), sd=1) 131s > fm <- clm(rating ~ temp, nominal=~ x, data=wine) 131s > fm$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -1.93392115 0.4251062 2.4798775 3.9190335 131s x 0.09463825 0.3805713 0.4261607 0.3809099 131s > fm$Theta 131s 1|2 2|3 3|4 4|5 131s 1 -1.933921 0.4251062 2.479878 3.919034 131s > fm <- clm(rating ~ temp, nominal=~ poly(x, 2), data=wine) 131s > fm$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -1.9310988 0.4469436 2.517523 4.094448 131s poly(x, 2)1 0.8763914 3.2908002 3.471603 4.422045 131s poly(x, 2)2 -0.3826811 0.2518184 -2.064209 5.810095 131s > fm$Theta 131s 1|2 2|3 3|4 4|5 131s 1 -1.931099 0.4469436 2.517523 4.094448 131s > 131s > ################################# 131s > ## 1 categorical + 1 continuous variable: 131s > set.seed(123) 131s > x <- rnorm(nrow(wine), sd=1) 131s > fm <- clm(rating ~ temp, nominal=~contact + x, data=wine) 131s > fm$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -1.279484 1.2782515 3.612766 4.7496630 131s contactyes -1.770377 -1.6715296 -1.647335 -0.9575417 131s x 0.300792 0.5330593 0.351517 0.3320371 131s > fm$Theta 131s contact 1|2 2|3 3|4 4|5 131s 1 no -1.279484 1.2782515 3.612766 4.749663 131s 2 yes -3.049860 -0.3932781 1.965431 3.792121 131s > fm <- clm(rating ~ temp, nominal=~contact + x, data=wine, 131s + threshold="symmetric") 131s > fm$alpha.mat 131s central.1 central.2 spacing.1 131s (Intercept) 1.1195535 3.4384752 2.134429723 131s contactyes -1.5864032 -1.5904314 -0.007568099 131s x 0.5069573 0.3485632 0.137951085 131s > fm$Theta 131s contact 1|2 2|3 3|4 4|5 131s 1 no -1.014876 1.1195535 3.438475 5.572905 131s 2 yes -2.593711 -0.4668497 1.848044 3.974905 131s > ################################# 131s > ### NOTE: To get the by-threshold nominal effects of continuous terms 131s > ## use: 131s > with(fm, t(apply(alpha.mat, 1, function(th) tJac %*% th))) 131s [,1] [,2] [,3] [,4] 131s (Intercept) -1.0148763 1.1195535 3.4384752 5.5729049 131s contactyes -1.5788351 -1.5864032 -1.5904314 -1.5979995 131s x 0.3690062 0.5069573 0.3485632 0.4865143 131s > ################################# 131s > ## Interactions: 131s > fm <- clm(rating ~ temp, nominal=~contact:x, data=wine) 131s > fm$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -1.9577944 0.5997213 2.6863244 4.1510613 131s contactno:x 0.1127629 0.7818026 0.4423216 0.9364319 131s contactyes:x 0.2129232 -0.2720801 0.3848893 0.1730418 131s > fm$Theta 131s 1|2 2|3 3|4 4|5 131s 1 -1.957794 0.5997213 2.686324 4.151061 131s > fm <- clm(rating ~ temp, nominal=~contact+x+contact:x, data=wine) 131s > fm$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -1.3000385 1.4056290 3.8340494 5.195521 131s contactyes -2.2801110 -1.5685386 -1.7308097 -1.318630 131s x 0.1790630 0.8754972 0.5140440 1.061857 131s contactyes:x 0.7541913 -0.8829449 -0.2203363 -1.055090 131s > fm$Theta 131s contact 1|2 2|3 3|4 4|5 131s 1 no -1.300039 1.4056290 3.834049 5.195521 131s 2 yes -3.580150 -0.1629096 2.103240 3.876891 131s > fm <- clm(rating ~ temp, nominal=~contact*x, data=wine) 131s > fm$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -1.3000385 1.4056290 3.8340494 5.195521 131s contactyes -2.2801110 -1.5685386 -1.7308097 -1.318630 131s x 0.1790630 0.8754972 0.5140440 1.061857 131s contactyes:x 0.7541913 -0.8829449 -0.2203363 -1.055090 131s > fm$Theta 131s contact 1|2 2|3 3|4 4|5 131s 1 no -1.300039 1.4056290 3.834049 5.195521 131s 2 yes -3.580150 -0.1629096 2.103240 3.876891 131s > ## polynomial terms: 131s > fm <- clm(rating ~ temp, nominal=~contact + poly(x, 2), data=wine) 131s > fm$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -1.2704762 1.3058436 3.635351 4.984803 131s contactyes -1.7725959 -1.6863567 -1.668402 -1.045016 131s poly(x, 2)1 2.4660191 4.4257770 3.395876 4.572499 131s poly(x, 2)2 -0.5079931 -0.4326472 -2.815490 5.853814 131s > fm$Theta 131s contact 1|2 2|3 3|4 4|5 131s 1 no -1.270476 1.3058436 3.635351 4.984803 131s 2 yes -3.043072 -0.3805131 1.966949 3.939787 131s > ## logical variables: (treated like numeric variables) 131s > wine$Con <- as.character(wine$contact) == "yes" 131s > fm <- clm(rating ~ temp, nominal=~Con, data=wine) 131s > fm$Theta 131s 1|2 2|3 3|4 4|5 131s 1 -1.323043 1.246444 3.550044 4.660247 131s > fm$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -1.323043 1.246444 3.550044 4.660247 131s ConTRUE -1.615059 -1.511567 -1.674756 -1.050623 131s > wine$Con.num <- 1 * wine$Con 131s > fm <- clm(rating ~ temp, nominal=~Con.num, data=wine) 131s > fm$Theta 131s 1|2 2|3 3|4 4|5 131s 1 -1.323043 1.246444 3.550044 4.660247 131s > fm$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -1.323043 1.246444 3.550044 4.660247 131s Con.num -1.615059 -1.511567 -1.674756 -1.050623 131s > ################################# 131s > ## Two continuous variables: 131s > set.seed(321) 131s > y <- rnorm(nrow(wine), sd=1) 131s > fm1 <- clm(rating ~ temp, nominal=~y + x, data=wine) 131s > fm1$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -2.0361734 0.4221202 2.4970718 3.92796873 131s y 0.4687950 0.1396038 0.3125431 0.08012751 131s x 0.1283933 0.3903469 0.4322374 0.37584062 131s > fm1$Theta 131s 1|2 2|3 3|4 4|5 131s 1 -2.036173 0.4221202 2.497072 3.927969 131s > ## summary(fm1) 131s > 131s > ################################# 131s > ## 1 categorical + 2 continuous variables: 131s > fm1 <- clm(rating ~ temp, nominal=~y + contact + x, data=wine) 131s > fm1$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -1.3789903 1.2645381 3.5778844 4.76356985 131s y 0.4385042 0.1049073 0.2439721 -0.01655843 131s contactyes -1.7688345 -1.6608152 -1.5801690 -0.98076349 131s x 0.3414184 0.5436276 0.3683201 0.33263316 131s > fm1$Theta 131s contact 1|2 2|3 3|4 4|5 131s 1 no -1.378990 1.2645381 3.577884 4.763570 131s 2 yes -3.147825 -0.3962771 1.997715 3.782806 131s > 131s > fm1 <- clm(rating ~ temp, nominal=~contact + x + contact:x + y, 131s + data=wine) 131s > summary(fm1) 131s formula: rating ~ temp 131s nominal: ~contact + x + contact:x + y 131s data: wine 131s 131s link threshold nobs logLik AIC niter max.grad cond.H 131s logit flexible 72 -81.86 205.72 7(0) 6.30e-12 9.3e+01 131s 131s Coefficients: 131s Estimate Std. Error z value Pr(>|z|) 131s tempwarm 2.8541 0.6159 4.634 3.58e-06 *** 131s --- 131s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 131s 131s Threshold coefficients: 131s Estimate Std. Error z value 131s 1|2.(Intercept) -1.40166 0.63306 -2.214 131s 2|3.(Intercept) 1.38723 0.49672 2.793 131s 3|4.(Intercept) 3.78725 0.71352 5.308 131s 4|5.(Intercept) 5.19478 1.07162 4.848 131s 1|2.contactyes -2.25974 1.68593 -1.340 131s 2|3.contactyes -1.54343 0.62658 -2.463 131s 3|4.contactyes -1.65472 0.68161 -2.428 131s 4|5.contactyes -1.34417 1.10192 -1.220 131s 1|2.x 0.21217 0.60781 0.349 131s 2|3.x 0.88433 0.41592 2.126 131s 3|4.x 0.47072 0.57857 0.814 131s 4|5.x 0.98582 0.94345 1.045 131s 1|2.y 0.41959 0.59889 0.701 131s 2|3.y 0.08377 0.27912 0.300 131s 3|4.y 0.27724 0.33118 0.837 131s 4|5.y -0.03370 0.59652 -0.056 131s 1|2.contactyes:x 0.71850 1.19479 0.601 131s 2|3.contactyes:x -0.89167 0.68974 -1.293 131s 3|4.contactyes:x -0.10843 0.74237 -0.146 131s 4|5.contactyes:x -0.98243 1.06343 -0.924 131s > fm1$Theta 131s contact 1|2 2|3 3|4 4|5 131s 1 no -1.401661 1.3872281 3.787248 5.194782 131s 2 yes -3.661402 -0.1562067 2.132530 3.850615 131s > fm1$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -1.4016606 1.38722808 3.7872478 5.19478152 131s contactyes -2.2597419 -1.54343480 -1.6547177 -1.34416691 131s x 0.2121750 0.88432858 0.4707237 0.98581604 131s y 0.4195947 0.08377343 0.2772447 -0.03369796 131s contactyes:x 0.7184952 -0.89166532 -0.1084271 -0.98242663 131s > fm1 <- clm(rating ~ temp, nominal=~contact*x + y, data=wine) 131s > fm1$Theta 131s contact 1|2 2|3 3|4 4|5 131s 1 no -1.401661 1.3872281 3.787248 5.194782 131s 2 yes -3.661402 -0.1562067 2.132530 3.850615 131s > fm1$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -1.4016606 1.38722808 3.7872478 5.19478152 131s contactyes -2.2597419 -1.54343480 -1.6547177 -1.34416691 131s x 0.2121750 0.88432858 0.4707237 0.98581604 131s y 0.4195947 0.08377343 0.2772447 -0.03369796 131s contactyes:x 0.7184952 -0.89166532 -0.1084271 -0.98242663 131s > t(fm1$alpha.mat) 131s (Intercept) contactyes x y contactyes:x 131s 1|2 -1.401661 -2.259742 0.2121750 0.41959467 0.7184952 131s 2|3 1.387228 -1.543435 0.8843286 0.08377343 -0.8916653 131s 3|4 3.787248 -1.654718 0.4707237 0.27724473 -0.1084271 131s 4|5 5.194782 -1.344167 0.9858160 -0.03369796 -0.9824266 131s > fm1 131s formula: rating ~ temp 131s nominal: ~contact * x + y 131s data: wine 131s 131s link threshold nobs logLik AIC niter max.grad cond.H 131s logit flexible 72 -81.86 205.72 7(0) 6.30e-12 9.3e+01 131s 131s Coefficients: 131s tempwarm 131s 2.854 131s 131s Threshold coefficients: 131s 1|2 2|3 3|4 4|5 131s (Intercept) -1.40166 1.38723 3.78725 5.19478 131s contactyes -2.25974 -1.54343 -1.65472 -1.34417 131s x 0.21217 0.88433 0.47072 0.98582 131s y 0.41959 0.08377 0.27724 -0.03370 131s contactyes:x 0.71850 -0.89167 -0.10843 -0.98243 131s > 131s > ################################# 131s > ## ordered factors (behaves like numerical variables): 131s > data(soup, package="ordinal") 131s > fm2 <- clm(SURENESS ~ 1, nominal=~PRODID + DAY, data=soup) 131s > fm2$Theta 131s PRODID DAY 1|2 2|3 3|4 4|5 5|6 131s 1 1 1 -1.541481 -0.5738506 -0.21399538 0.04222703 0.75684062 131s 2 2 1 -2.260759 -1.5442697 -1.21890789 -0.91689299 -0.24659733 131s 3 3 1 -2.662588 -1.8500284 -1.67612929 -1.15745279 -0.65265582 131s 4 4 1 -2.230317 -1.3875834 -1.10527201 -0.70760465 -0.16454916 131s 5 5 1 -2.291960 -1.8870049 -1.51852627 -1.32708454 -0.64222204 131s 6 6 1 -2.765844 -2.1222058 -1.93080891 -1.76177831 -0.87239437 131s 7 1 2 -1.497366 -0.2765643 0.08617449 0.27652240 0.97863135 131s 8 2 2 -2.216645 -1.2469835 -0.91873802 -0.68259762 -0.02480661 131s 9 3 2 -2.618473 -1.5527421 -1.37595942 -0.92315742 -0.43086509 131s 10 4 2 -2.186203 -1.0902972 -0.80510215 -0.47330927 0.05724157 131s 11 5 2 -2.247845 -1.5897187 -1.21835640 -1.09278917 -0.42043131 131s 12 6 2 -2.721729 -1.8249196 -1.63063905 -1.52748294 -0.65060365 131s > fm2$alpha.mat 131s 1|2 2|3 3|4 4|5 5|6 131s (Intercept) -1.54148084 -0.5738506 -0.2139954 0.04222703 0.7568406 131s PRODID2 -0.71927809 -0.9704192 -1.0049125 -0.95912001 -1.0034380 131s PRODID3 -1.12110698 -1.2761778 -1.4621339 -1.19967981 -1.4094964 131s PRODID4 -0.68883656 -0.8137329 -0.8912766 -0.74983167 -0.9213898 131s PRODID5 -0.75047874 -1.3131544 -1.3045309 -1.36931157 -1.3990627 131s PRODID6 -1.22436292 -1.5483553 -1.7168135 -1.80400534 -1.6292350 131s DAY2 0.04411439 0.2972862 0.3001699 0.23429537 0.2217907 131s > prodid <- factor(soup$PRODID, ordered=TRUE) 131s > fm2 <- clm(SURENESS ~ 1, nominal=~prodid + DAY, data=soup) 131s > fm2$alpha.mat 131s 1|2 2|3 3|4 4|5 5|6 131s (Intercept) -2.29215806 -1.5608238 -1.2772733 -0.9714310 -0.3035963 131s prodid.L -0.69121817 -0.9929406 -1.0651956 -1.1714141 -1.0571728 131s prodid.Q 0.28234300 0.3165731 0.3424949 0.1207237 0.3905959 131s prodid.C -0.56889235 -0.5360906 -0.6536897 -0.5924148 -0.5462885 131s prodid^4 -0.08220340 0.2121409 0.0953785 0.2423256 0.1732012 131s prodid^5 0.20500444 0.3017272 0.3458281 0.2989342 0.3294562 131s DAY2 0.04411439 0.2972862 0.3001699 0.2342954 0.2217907 131s > fm2$Theta 131s DAY 1|2 2|3 3|4 4|5 5|6 131s 1 1 -2.292158 -1.560824 -1.2772733 -0.9714310 -0.30359635 131s 2 2 -2.248044 -1.263538 -0.9771034 -0.7371357 -0.08180562 131s > fm2 <- clm(SURENESS ~ 1, nominal=~prodid, data=soup) 131s > fm2$alpha.mat 131s 1|2 2|3 3|4 4|5 5|6 131s (Intercept) -2.2615449 -1.4231189 -1.13844940 -0.8610163 -0.20025662 131s prodid.L -0.6802192 -1.0171675 -1.08713192 -1.1713363 -1.05578526 131s prodid.Q 0.2551357 0.3521163 0.37511177 0.1651463 0.43182970 131s prodid.C -0.6064464 -0.5635065 -0.68182671 -0.6050149 -0.55490977 131s prodid^4 -0.1115795 0.1036958 -0.01443457 0.1577696 0.09355651 131s prodid^5 0.2349647 0.4222560 0.46856405 0.3867234 0.41280490 131s > fm2$Theta 131s 1|2 2|3 3|4 4|5 5|6 131s 1 -2.261545 -1.423119 -1.138449 -0.8610163 -0.2002566 131s > ################################# 131s > ## Aliased Coefficients: 131s > ## 131s > ## Example where the interaction in the nominal effects is aliased (by 131s > ## design). Here the two Theta matrices coincide. The alpha.mat 131s > ## matrices are similar except one has an extra row with NAs: 131s > soup2 <- soup 131s > levels(soup2$DAY) 131s [1] "1" "2" 131s > levels(soup2$GENDER) 131s [1] "Male" "Female" 131s > xx <- with(soup2, DAY == "2" & GENDER == "Female") 131s > ## Model with additive nominal effects: 131s > fm8 <- clm(SURENESS ~ PRODID, nominal= ~ DAY + GENDER, data=soup2, subset=!xx) 131s > fm8$alpha.mat 131s 1|2 2|3 3|4 4|5 5|6 131s (Intercept) -1.5296912 -0.68765358 -0.3255117394 0.03773041 0.629325973 131s DAY2 -0.2553049 0.08584421 0.1101987830 0.05149732 0.168514829 131s GENDERFemale 0.0790841 0.07464904 -0.0001589362 -0.11045608 -0.005418789 131s > fm8$Theta 131s DAY GENDER 1|2 2|3 3|4 4|5 5|6 131s 1 1 Male -1.529691 -0.6876536 -0.3255117 0.03773041 0.6293260 131s 2 2 Male -1.784996 -0.6018094 -0.2153130 0.08922773 0.7978408 131s 3 1 Female -1.450607 -0.6130045 -0.3256707 -0.07272568 0.6239072 131s 4 2 Female -1.705912 -0.5271603 -0.2154719 -0.02122835 0.7924220 131s > ## Model with non-additive, but aliased nominal effects: 131s > fm9 <- clm(SURENESS ~ PRODID, nominal= ~ DAY * GENDER, data=soup2, subset=!xx) 131s > fm9$alpha.mat 131s 1|2 2|3 3|4 4|5 5|6 131s (Intercept) -1.5296912 -0.68765358 -0.3255117394 0.03773041 0.629325973 131s DAY2 -0.2553049 0.08584421 0.1101987830 0.05149732 0.168514829 131s GENDERFemale 0.0790841 0.07464904 -0.0001589362 -0.11045608 -0.005418789 131s DAY2:GENDERFemale NA NA NA NA NA 131s > fm9$Theta 131s DAY GENDER 1|2 2|3 3|4 4|5 5|6 131s 1 1 Male -1.529691 -0.6876536 -0.3255117 0.03773041 0.6293260 131s 2 2 Male -1.784996 -0.6018094 -0.2153130 0.08922773 0.7978408 131s 3 1 Female -1.450607 -0.6130045 -0.3256707 -0.07272568 0.6239072 131s 4 2 Female -1.705912 -0.5271603 -0.2154719 -0.02122835 0.7924220 131s > 131s > stopEqual <- function(x, y, ca=FALSE) 131s + stopifnot(isTRUE(all.equal(x, y, check.attributes=ca))) 131s > 131s > stopEqual(fm8$alpha.mat, fm9$alpha.mat[1:3, ]) 131s > stopEqual(fm8$Theta, fm9$Theta) 131s > stopEqual(logLik(fm8), logLik(fm9)) 131s > 131s > ################################# 131s > ## Weights: 131s > set.seed(12345) 131s > wts <- runif(nrow(soup)) 131s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE + DAY, data=soup, weights=wts) 131s > fm2$Theta 131s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 131s 1 Self-made 1 -1.957136 -1.2051740 -0.8829317 -0.6651699 -0.03270025 131s 2 Canned 1 -1.665918 -0.9408556 -0.6818962 -0.4277315 0.14356406 131s 3 Dry-mix 1 -2.180024 -1.2221288 -1.1502087 -0.8113657 -0.24840514 131s 4 Self-made 2 -1.988269 -0.9456030 -0.5614139 -0.3852570 0.23978932 131s 5 Canned 2 -1.697051 -0.6812846 -0.3603783 -0.1478186 0.41605363 131s 6 Dry-mix 2 -2.211157 -0.9625577 -0.8286909 -0.5314528 0.02408443 131s > 131s > ## Offset (correctly gives and error) 131s > fm2 <- try(clm(SURENESS ~ 1, nominal=~SOUPTYPE + DAY + offset(wts), 131s + data=soup), silent=TRUE) 131s > stopifnot(inherits(fm2, "try-error")) 131s > 131s > ################################# 131s > ### Other (misc) examples: 131s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE + DAY, data=soup) 131s > fm2$Theta 131s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 131s 1 Self-made 1 -2.040111 -1.2615146 -0.9302684 -0.6740629 -0.05003069 131s 2 Canned 1 -1.816274 -1.0347697 -0.7305192 -0.4563265 0.15972072 131s 3 Dry-mix 1 -2.313198 -1.3029029 -1.1328903 -0.8076982 -0.23529457 131s 4 Self-made 2 -1.956698 -0.9371883 -0.5968669 -0.4131354 0.21403949 131s 5 Canned 2 -1.732861 -0.7104435 -0.3971177 -0.1953990 0.42379090 131s 6 Dry-mix 2 -2.229785 -0.9785767 -0.7994888 -0.5467707 0.02877561 131s > fm2 131s formula: SURENESS ~ 1 131s nominal: ~SOUPTYPE + DAY 131s data: soup 131s 131s link threshold nobs logLik AIC niter max.grad cond.H 131s logit flexible 1847 -2758.02 5556.03 6(2) 1.77e-11 8.7e+02 131s 131s Threshold coefficients: 131s 1|2 2|3 3|4 4|5 5|6 131s (Intercept) -2.04011 -1.26151 -0.93027 -0.67406 -0.05003 131s SOUPTYPECanned 0.22384 0.22674 0.19975 0.21774 0.20975 131s SOUPTYPEDry-mix -0.27309 -0.04139 -0.20262 -0.13364 -0.18526 131s DAY2 0.08341 0.32433 0.33340 0.26093 0.26407 131s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE * DAY, data=soup) 131s > fm2$Theta 131s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 131s 1 Self-made 1 -2.062794 -1.3083328 -0.9935434 -0.7187896 -0.05107493 131s 2 Canned 1 -1.757074 -0.9398212 -0.6286087 -0.3721287 0.15415068 131s 3 Dry-mix 1 -2.369525 -1.3618033 -1.1700713 -0.8661663 -0.23795864 131s 4 Self-made 2 -1.945910 -0.9005649 -0.5459555 -0.3731219 0.21392690 131s 5 Canned 2 -1.775759 -0.7985077 -0.4924765 -0.2776317 0.43428555 131s 6 Dry-mix 2 -2.182299 -0.9257695 -0.7649729 -0.4964369 0.02702867 131s > fm2 131s formula: SURENESS ~ 1 131s nominal: ~SOUPTYPE * DAY 131s data: soup 131s 131s link threshold nobs logLik AIC niter max.grad cond.H 131s logit flexible 1847 -2755.60 5571.21 6(2) 1.76e-11 4.9e+03 131s 131s Threshold coefficients: 131s 1|2 2|3 3|4 4|5 5|6 131s (Intercept) -2.063e+00 -1.308e+00 -9.935e-01 -7.188e-01 -5.107e-02 131s SOUPTYPECanned 3.057e-01 3.685e-01 3.649e-01 3.467e-01 2.052e-01 131s SOUPTYPEDry-mix -3.067e-01 -5.347e-02 -1.765e-01 -1.474e-01 -1.869e-01 131s DAY2 1.169e-01 4.078e-01 4.476e-01 3.457e-01 2.650e-01 131s SOUPTYPECanned:DAY2 -1.356e-01 -2.665e-01 -3.115e-01 -2.512e-01 1.513e-02 131s SOUPTYPEDry-mix:DAY2 7.034e-02 2.827e-02 -4.249e-02 2.406e-02 -1.452e-05 131s > fm2$alpha.mat 131s 1|2 2|3 3|4 4|5 131s (Intercept) -2.06279431 -1.30833282 -0.99354336 -0.71878961 131s SOUPTYPECanned 0.30572040 0.36851159 0.36493470 0.34666092 131s SOUPTYPEDry-mix -0.30673027 -0.05347052 -0.17652789 -0.14737673 131s DAY2 0.11688416 0.40776793 0.44758789 0.34566775 131s SOUPTYPECanned:DAY2 -0.13556938 -0.26645440 -0.31145572 -0.25117080 131s SOUPTYPEDry-mix:DAY2 0.07034149 0.02826594 -0.04248955 0.02406171 131s 5|6 131s (Intercept) -5.107493e-02 131s SOUPTYPECanned 2.052256e-01 131s SOUPTYPEDry-mix -1.868837e-01 131s DAY2 2.650018e-01 131s SOUPTYPECanned:DAY2 1.513304e-02 131s SOUPTYPEDry-mix:DAY2 -1.451666e-05 131s > fm2 <- clm(SURENESS ~ 1, nominal=~SOUPTYPE * DAY, data=soup, 131s + threshold="symmetric") 131s > fm2$Theta 131s SOUPTYPE DAY 1|2 2|3 3|4 4|5 5|6 131s 1 Self-made 1 -2.023473 -1.3261580 -1.0328445 -0.7395310 -0.04221610 131s 2 Canned 1 -1.650803 -1.0121961 -0.7301243 -0.4480525 0.19055466 131s 3 Dry-mix 1 -2.214507 -1.4643357 -1.2132431 -0.9621504 -0.21197912 131s 4 Self-made 2 -1.757994 -1.0009894 -0.7422397 -0.4834900 0.27351461 131s 5 Canned 2 -1.673970 -0.8581393 -0.5997040 -0.3412687 0.47456211 131s 6 Dry-mix 2 -1.899340 -1.1167968 -0.9013722 -0.6859476 0.09659551 131s > fm2$alpha.mat 131s central spacing.1 spacing.2 131s (Intercept) -1.03284450 0.293313471 0.99062841 131s SOUPTYPECanned 0.30272022 -0.011241697 -0.06994946 131s SOUPTYPEDry-mix -0.18039855 -0.042220836 0.01063552 131s DAY2 0.29060480 -0.034563797 0.02512591 131s SOUPTYPECanned:DAY2 -0.16018453 0.010927306 0.12846128 131s SOUPTYPEDry-mix:DAY2 0.02126607 -0.001104241 -0.02842214 131s > 131s > ################################# 131s > ### Check correctness of Theta matrix when intercept is removed in 131s > ### nominal formula: 131s > ### December 25th 2014, RHBC 131s > fm1 <- clm(rating ~ temp, nominal=~contact-1, data=wine) 131s Warning message: 131s an intercept is needed and assumed in 'nominal' 131s > fm2 <- clm(rating ~ temp, nominal=~contact, data=wine) 131s > stopifnot(isTRUE(all.equal(fm1$Theta, fm2$Theta))) 131s > stopifnot(isTRUE(all.equal(fm1$logLik, fm2$logLik))) 131s > wine2 <- wine 131s > wine2$contact <- relevel(wine2$contact, "yes") 131s > fm3 <- clm(rating ~ temp, nominal=~contact, data=wine2) 131s > stopifnot(isTRUE(all.equal(coef(fm1, na.rm=TRUE), coef(fm3)))) 131s > ################################# 131s > 131s > 131s BEGIN TEST test.clm.convergence.R 131s 131s R version 4.4.3 (2025-02-28) -- "Trophy Case" 131s Copyright (C) 2025 The R Foundation for Statistical Computing 131s Platform: x86_64-pc-linux-gnu 131s 131s R is free software and comes with ABSOLUTELY NO WARRANTY. 131s You are welcome to redistribute it under certain conditions. 131s Type 'license()' or 'licence()' for distribution details. 131s 131s R is a collaborative project with many contributors. 131s Type 'contributors()' for more information and 131s 'citation()' on how to cite R or R packages in publications. 131s 131s Type 'demo()' for some demos, 'help()' for on-line help, or 131s 'help.start()' for an HTML browser interface to help. 131s Type 'q()' to quit R. 131s 131s > library(ordinal) 132s > 132s > 132s > ## Testing that errors in chol() are caught soon enough: 132s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 132s > wine2 <- subset(wine, subset=(!1:nrow(wine) %in% cy)) 132s > wine2[c(9, 15, 46), "rating"] <- NA 132s > fm1 <- clm(rating ~ temp, scale=~contact, nominal=~contact, 132s + data=wine2) 132s Warning message: 132s (1) Hessian is numerically singular: parameters are not uniquely determined 132s In addition: Absolute convergence criterion was met, but relative criterion was not met 132s > fm1 <- try(clm(rating ~ temp, scale=~contact, nominal=~contact, 132s + data=wine2, control=list(gradTol=1e-12)), silent=TRUE) 132s Warning message: 132s (1) Hessian is numerically singular: parameters are not uniquely determined 132s In addition: Absolute convergence criterion was met, but relative criterion was not met 132s > fm2 <- try(clm(rating ~ temp, scale=~contact, nominal=~contact, 132s + data=wine2, control=list(gradTol=1e-15)), silent=TRUE) 132s Warning message: 132s (-1) Model failed to converge with max|grad| = 1.11481e-07 (tol = 1e-15) 132s In addition: iteration limit reached 132s > ## These gave errors in version 2014.11-12. 132s > stopifnot(!inherits(fm1, "try-error")) 132s > stopifnot(!inherits(fm2, "try-error")) 132s > summary(fm1) 132s formula: rating ~ temp 132s scale: ~contact 132s nominal: ~contact 132s data: wine2 132s 132s link threshold nobs logLik AIC niter max.grad cond.H 132s logit flexible 51 -60.44 140.87 63(39) 1.51e-13 -2.1e+16 132s 132s Coefficients: 132s Estimate Std. Error z value Pr(>|z|) 132s tempwarm 2.306 NA NA NA 132s 132s log-scale coefficients: 132s Estimate Std. Error z value Pr(>|z|) 132s contactyes -0.07119 NA NA NA 132s 132s Threshold coefficients: 132s Estimate Std. Error z value 132s 1|2.(Intercept) -1.354 NA NA 132s 2|3.(Intercept) 1.092 NA NA 132s 3|4.(Intercept) 3.469 NA NA 132s 4|5.(Intercept) 5.066 NA NA 132s 1|2.contactyes -30.684 NA NA 132s 2|3.contactyes -1.425 NA NA 132s 3|4.contactyes -1.808 NA NA 132s 4|5.contactyes -1.870 NA NA 132s (3 observations deleted due to missingness) 132s > summary(fm2) 132s formula: rating ~ temp 132s scale: ~contact 132s nominal: ~contact 132s data: wine2 132s 132s link threshold nobs logLik AIC niter max.grad cond.H 132s logit flexible 51 -60.44 140.87 111(86) 1.11e-07 1.8e+17 132s 132s Coefficients: 132s Estimate Std. Error z value Pr(>|z|) 132s tempwarm 2.3060 0.7713 2.99 0.00279 ** 132s --- 132s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 132s 132s log-scale coefficients: 132s Estimate Std. Error z value Pr(>|z|) 132s contactyes -0.07126 2995.02357 0 1 132s 132s Threshold coefficients: 132s Estimate Std. Error z value 132s 1|2.(Intercept) -1.354e+00 5.707e-01 -2.373 132s 2|3.(Intercept) 1.092e+00 5.251e-01 2.080 132s 3|4.(Intercept) 3.469e+00 7.982e-01 4.346 132s 4|5.(Intercept) 5.066e+00 1.193e+00 4.246 132s 1|2.contactyes -3.822e+01 1.282e+09 0.000 132s 2|3.contactyes -1.425e+00 7.902e+03 0.000 132s 3|4.contactyes -1.808e+00 1.933e+03 -0.001 132s 4|5.contactyes -1.870e+00 2.665e+03 -0.001 132s (3 observations deleted due to missingness) 132s > 132s > ## Error in convergence.clm() due to bad evaluation of model 132s > ## environment with update(object, doFit=FALSE): 132s > wine3 <- wine 132s > set.seed(1234) 132s > wts <- runif(nrow(wine3), 0, 2) 132s > fm3 <- clm(rating ~ temp + contact, data=wine3, 132s + weights=wts) 132s > c0 <- convergence(fm3) 132s > set.seed(1234) 132s > fm3 <- clm(rating ~ temp + contact, data=wine3, 132s + weights=runif(nrow(wine3), 0, 2)) 132s > c1 <- convergence(fm3) 132s > c0$info$logLik.Error 132s [1] "<1e-10" 132s > c1$info$logLik.Error 132s [1] "<1e-10" 132s > all.equal(c0$info$logLik.Error, c1$info$logLik.Error) 132s [1] TRUE 132s > ## In version 2014.11-14: 132s > ## > wine3 <- wine 132s > ## > set.seed(1234) 132s > ## > wts <- runif(nrow(wine3), 0, 2) 132s > ## > fm3 <- clm(rating ~ temp + contact, data=wine3, 132s > ## + weights=wts) 132s > ## > c0 <- convergence(fm3) 132s > ## > set.seed(1234) 132s > ## > fm3 <- clm(rating ~ temp + contact, data=wine3, 132s > ## + weights=runif(nrow(wine3), 0, 2)) 132s > ## > c1 <- convergence(fm3) 132s > ## > c0$info$logLik.Error 132s > ## [1] "<1e-10" 132s > ## > c1$info$logLik.Error 132s > ## [1] "4.80e+00" 132s > ## > all.equal(c0$info$logLik.Error, c1$info$logLik.Error) 132s > ## [1] "1 string mismatch" 132s > stopifnot(c0$info$logLik.Error == 132s + c1$info$logLik.Error) 132s > 132s BEGIN TEST test.clm.flex.link.R 133s 133s R version 4.4.3 (2025-02-28) -- "Trophy Case" 133s Copyright (C) 2025 The R Foundation for Statistical Computing 133s Platform: x86_64-pc-linux-gnu 133s 133s R is free software and comes with ABSOLUTELY NO WARRANTY. 133s You are welcome to redistribute it under certain conditions. 133s Type 'license()' or 'licence()' for distribution details. 133s 133s R is a collaborative project with many contributors. 133s Type 'contributors()' for more information and 133s 'citation()' on how to cite R or R packages in publications. 133s 133s Type 'demo()' for some demos, 'help()' for on-line help, or 133s 'help.start()' for an HTML browser interface to help. 133s Type 'q()' to quit R. 133s 133s > # test.clm.flex.link.R 133s > 133s > library(ordinal) 133s > 133s > fm <- clm(rating ~ contact + temp, data=wine, link="log-gamma") 134s Changing to 'nlminb' optimizer for flexible link function 134s Warning message: 134s (-1) Model failed to converge with max|grad| = 9.92567e-05 (tol = 1e-06) 134s > fm 134s formula: rating ~ contact + temp 134s data: wine 134s 134s link threshold nobs logLik AIC niter max.grad cond.H 134s log-gamma flexible 72 -85.72 185.44 27(179) 9.93e-05 5.9e+01 134s 134s Coefficients: 134s contactyes tempwarm 134s 0.8614 1.5072 134s 134s Link coefficient: 134s lambda 134s 0.1615 134s 134s Threshold coefficients: 134s 1|2 2|3 3|4 4|5 134s -0.8798 0.6678 1.9807 2.8593 134s > summary(fm) 134s formula: rating ~ contact + temp 134s data: wine 134s 134s link threshold nobs logLik AIC niter max.grad cond.H 134s log-gamma flexible 72 -85.72 185.44 27(179) 9.93e-05 5.9e+01 134s 134s Coefficients: 134s Estimate Std. Error z value Pr(>|z|) 134s contactyes 0.8614 0.2675 3.220 0.00128 ** 134s tempwarm 1.5072 0.2947 5.114 3.16e-07 *** 134s --- 134s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 134s 134s Link coefficients: 134s Estimate Std. Error z value Pr(>|z|) 134s lambda 0.1615 0.5752 0.281 0.779 134s 134s Threshold coefficients: 134s Estimate Std. Error z value 134s 1|2 -0.8798 0.5003 -1.759 134s 2|3 0.6678 0.3450 1.936 134s 3|4 1.9807 0.3826 5.177 134s 4|5 2.8593 0.4656 6.141 134s > vcov(fm) 134s 1|2 2|3 3|4 4|5 contactyes 134s 1|2 0.25029666 0.12858124 0.11888119 0.14341730 0.03339111 134s 2|3 0.12858124 0.11899384 0.10688715 0.12363922 0.04117758 134s 3|4 0.11888119 0.10688715 0.14635447 0.15493865 0.05320442 134s 4|5 0.14341730 0.12363922 0.15493865 0.21676904 0.06051103 134s contactyes 0.03339111 0.04117758 0.05320442 0.06051103 0.07156735 134s tempwarm 0.00707258 0.03006561 0.05390802 0.06549176 0.01159715Profile intervals not available for models with flexible link function: 134s reporting Wald intervals instead 134s 134s lambda -0.23173314 -0.13979170 -0.12509774 -0.15581154 -0.01157950 134s tempwarm lambda 134s 1|2 0.00707258 -0.23173314 134s 2|3 0.03006561 -0.13979170 134s 3|4 0.05390802 -0.12509774 134s 4|5 0.06549176 -0.15581154 134s contactyes 0.01159715 -0.01157950 134s tempwarm 0.08687099 0.01970691 134s lambda 0.01970691 0.33082448 134s > logLik(fm) 134s 'log Lik.' -85.72141 (df=7) 134s > extractAIC(fm) 134s [1] 7.0000 185.4428 134s > fm2 <- update(fm, link="probit") 134s > anova(fm, fm2) 134s Likelihood ratio tests of cumulative link models: 134s 134s formula: link: threshold: 134s fm2 rating ~ contact + temp probit flexible 134s fm rating ~ contact + temp log-gamma flexible 134s 134s no.par AIC logLik LR.stat df Pr(>Chisq) 134s fm2 6 183.52 -85.761 134s fm 7 185.44 -85.721 0.0795 1 0.778 134s > head(model.matrix(fm)$X) 134s (Intercept) contactyes tempwarm 134s 1 1 0 0 134s 2 1 0 0 134s 3 1 1 0 134s 4 1 1 0 134s 5 1 0 1 134s 6 1 0 1 134s > head(model.frame(fm)) 134s rating contact temp 134s 1 2 no cold 134s 2 3 no cold 134s 3 3 yes cold 134s 4 4 yes cold 134s 5 4 no warm 134s 6 4 no warm 134s > coef(fm) 134s 1|2 2|3 3|4 4|5 contactyes tempwarm lambda 134s -0.8797774 0.6678307 1.9806826 2.8593125 0.8614400 1.5071959 0.1614741 134s > coef(summary(fm)) 134s Estimate Std. Error z value Pr(>|z|) 134s 1|2 -0.8797774 0.5002966 -1.7585117 7.866049e-02 134s 2|3 0.6678307 0.3449548 1.9359945 5.286837e-02 134s 3|4 1.9806826 0.3825630 5.1774020 2.249970e-07 134s 4|5 2.8593125 0.4655846 6.1413379 8.182929e-10 134s contactyes 0.8614400 0.2675208 3.2200868 1.281518e-03 134s tempwarm 1.5071959 0.2947388 5.1136658 3.159661e-07 134s lambda 0.1614741 0.5751734 0.2807398 7.789100e-01 134s > nobs(fm) 134s [1] 72 134s > terms(fm) 134s rating ~ contact + temp 134s attr(,"variables") 134s list(rating, contact, temp) 134s attr(,"factors") 134s contact temp 134s rating 0 0 134s contact 1 0 134s temp 0 1 134s attr(,"term.labels") 134s [1] "contact" "temp" 134s attr(,"order") 134s [1] 1 1 134s attr(,"intercept") 134s [1] 1 134s attr(,"response") 134s [1] 1 134s attr(,".Environment") 134s 134s attr(,"predvars") 134s list(rating, contact, temp) 134s attr(,"dataClasses") 134s rating contact temp 134s "ordered" "factor" "factor" 134s > # profile(fm) # not implemented 134s > confint(fm) 134s 2.5 % 97.5 % 134s 1|2 -1.860340621 0.1007859 134s 2|3 -0.008268388 1.3439298 134s 3|4 1.230872848 2.7304924 134s 4|5 1.946783408 3.7718416 134s contactyes 0.337108998 1.3857711 134s tempwarm 0.929518434 2.0848735 134s lambda -0.965845153 1.2887933 134s > 134s > predict(fm, se=TRUE, interval = TRUE) 134s $fit 134s [1] 0.55792544 0.21565445 0.44140779 0.09846706 0.22428321 0.22428321 134s [7] 0.29090567 0.29090567 0.21042288 0.55792544 0.05388914 0.44140779 134s [13] 0.20737471 0.48129483 0.29090567 0.33832254 0.55792544 0.21565445 134s [19] 0.44140779 0.39099052 0.07269587 0.07269587 0.33832254 0.33832254 134s [25] 0.21565445 0.55792544 0.44140779 0.39099052 0.48129483 0.20737471 134s [31] 0.29090567 0.31272339 0.55792544 0.21565445 0.09846706 0.44140779 134s [37] 0.48129483 0.48129483 0.31272339 0.31272339 0.21565445 0.55792544 134s [43] 0.44140779 0.39099052 0.20737471 0.22428321 0.29090567 0.33832254 134s [49] 0.21042288 0.21042288 0.39099052 0.39099052 0.20737471 0.48129483 134s [55] 0.05636253 0.31272339 0.55792544 0.55792544 0.39099052 0.44140779 134s [61] 0.48129483 0.48129483 0.31272339 0.33832254 0.21042288 0.55792544 134s [67] 0.44140779 0.39099052 0.48129483 0.20737471 0.33832254 0.33832254 134s 134s $se.fit 134s [1] 0.09164058 0.09494135 0.08777656 0.05464347 0.08112461 0.08112461 134s [7] 0.13494788 0.13494788 0.13693811 0.09164058 0.04809909 0.08777656 134s [13] 0.09512593 0.07373113 0.13494788 0.08236628 0.09164058 0.09494135 134s [19] 0.08777656 0.09756681 0.06362571 0.06362571 0.08236628 0.08236628 134s [25] 0.09494135 0.09164058 0.08777656 0.09756681 0.07373113 0.09512593 134s [31] 0.13494788 0.09451059 0.09164058 0.09494135 0.05464347 0.08777656 134s [37] 0.07373113 0.07373113 0.09451059 0.09451059 0.09494135 0.09164058 134s [43] 0.08777656 0.09756681 0.09512593 0.08112461 0.13494788 0.08236628 134s [49] 0.13693811 0.13693811 0.09756681 0.09756681 0.09512593 0.07373113 134s [55] 0.03866211 0.09451059 0.09164058 0.09164058 0.09756681 0.08777656 134s [61] 0.07373113 0.07373113 0.09451059 0.08236628 0.13693811Changing to 'nlminb' optimizer for flexible link function 134s 0.09164058 134s [67] 0.08777656 0.09756681 0.07373113 0.09512593 0.08236628 0.08236628 134s 134s $lwr 134s [1] 0.378604419 0.083839590 0.282278456 0.031650566 0.103885179 0.103885179 134s [7] 0.102183450 0.102183450 0.050316478 0.378604419 0.008885132 0.282278456 134s [13] 0.077621509 0.342154617 0.102183450 0.199101469 0.378604419 0.083839590 134s [19] 0.282278456 0.223352982 0.012177667 0.012177667 0.199101469 0.199101469 134s [25] 0.083839590 0.378604419 0.282278456 0.223352982 0.342154617 0.077621509 134s [31] 0.102183450 0.161206607 0.378604419 0.083839590 0.031650566 0.282278456 134s [37] 0.342154617 0.342154617 0.161206607 0.161206607 0.083839590 0.378604419 134s [43] 0.282278456 0.223352982 0.077621509 0.103885179 0.102183450 0.199101469 134s [49] 0.050316478 0.050316478 0.223352982 0.223352982 0.077621509 0.342154617 134s [55] 0.014165414 0.161206607 0.378604419 0.378604419 0.223352982 0.282278456 134s [61] 0.342154617 0.342154617 0.161206607 0.199101469 0.050316478 0.378604419 134s [67] 0.282278456 0.223352982 0.342154617 0.077621509 0.199101469 0.199101469 134s 134s $upr 134s [1] 0.7233159 0.4523801 0.6135565 0.2673887 0.4189772 0.4189772 0.5965756 134s [8] 0.5965756 0.5727401 0.7233159 0.2657272 0.6135565 0.4485489 0.6233979 134s [15] 0.5965756 0.5125880 0.7233159 0.4523801 0.6135565 0.5890239 0.3326786 134s [22] 0.3326786 0.5125880 0.5125880 0.4523801 0.7233159 0.6135565 0.5890239 134s [29] 0.6233979 0.4485489 0.5965756 0.5186019 0.7233159 0.4523801 0.2673887 134s [36] 0.6135565 0.6233979 0.6233979 0.5186019 0.5186019 0.4523801 0.7233159 134s [43] 0.6135565 0.5890239 0.4485489 0.4189772 0.5965756 0.5125880 0.5727401 134s [50] 0.5727401 0.5890239 0.5890239 0.4485489 0.6233979 0.1988990 0.5186019 134s [57] 0.7233159 0.7233159 0.5890239 0.6135565 0.6233979 0.6233979 0.5186019 134s [64] 0.5125880 0.5727401 0.7233159 0.6135565 0.5890239 0.6233979 0.4485489 134s [71] 0.5125880 0.5125880 134s 134s > predict(fm, type="class") 134s $fit 134s [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 134s [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 134s Levels: 1 2 3 4 5 134s 134s > newData <- expand.grid(temp = c("cold", "warm"), 134s + contact = c("no", "yes")) 134s > 134s > ## Predicted probabilities in all five response categories for each of 134s > ## the four cases in newData: 134s > predict(fm, newdata=newData, type="prob") 134s $fit 134s 1 2 3 4 5 134s 1 0.210422885 0.55792544 0.2156545 0.01517801 0.0008192112 134s 2 0.014351371 0.20737471 0.4812948 0.22428321 0.0726958749 134s 3 0.053889141 0.39099052 0.4414078 0.09846706 0.0152454936 134s 4 0.001685878 0.05636253 0.3127234 0.33832254 0.2909056663 134s 134s > predict(fm, newdata=newData, type="class") 134s $fit 134s [1] 2 3 3 4 134s Levels: 1 2 3 4 5 134s 134s > 134s > predict(fm, newdata=newData, type="prob", se.fit = TRUE, interval = TRUE) 134s $fit 134s 1 2 3 4 5 134s 1 0.210422885 0.55792544 0.2156545 0.01517801 0.0008192112 134s 2 0.014351371 0.20737471 0.4812948 0.22428321 0.0726958749 134s 3 0.053889141 0.39099052 0.4414078 0.09846706 0.0152454936 134s 4 0.001685878 0.05636253 0.3127234 0.33832254 0.2909056663 134s 134s $se.fit 134s 1 2 3 4 5 134s 1 0.136938109 0.09164058 0.09494135 0.01696529 0.002047363 134s 2 0.016247015 0.09512593 0.07373113 0.08112461 0.063625711 134s 3 0.048099092 0.09756681 0.08777656 0.05464347 0.019268560 134s 4 0.002046575 0.03866211 0.09451059 0.08236628 0.134947885 134s 134s $lwr 134s 1 2 3 4 5 134s 1 0.0503164778 0.37860442 0.08383959 0.001663553 6.091054e-06 134s 2 0.0015305241 0.07762151 0.34215462 0.103885179 1.217767e-02 134s 3 0.0088851324 0.22335298 0.28227846 0.031650566 1.249665e-03 134s 4 0.0001557499 0.01416541 0.16120661 0.199101469 1.021834e-01 134s 134s $upr 134s 1 2 3 4 5 134s 1 0.57274013 0.7233159 0.4523801 0.1247616 0.09939053 134s 2 0.12150065 0.4485489 0.6233979 0.4189772 0.33267865 134s 3 0.26572719 0.5890239 0.6135565 0.2673887 0.16075952 134s 4 0.01797808 0.1988990 0.5186019 0.5125880 0.59657563 134s 134s > 134s > 134s > ## Aranda-Ordaz link: 134s > fm <- clm(rating ~ contact + temp, data=wine, link="Aranda-Ordaz") 134s Warning message: 134s (-1) Model failed to converge with max|grad| = 1.21391e-05 (tol = 1e-06) 134s > fm 134s formula: rating ~ contact + temp 134s data: wine 134s 134s link threshold nobs logLik AIC niter max.grad cond.H 134s Aranda-Ordaz flexible 72 -86.34 186.68 32(214) 1.21e-05 3.9e+02 134s 134s Coefficients: 134s contactyes tempwarm 134s 1.193 2.076 134s 134s Link coefficient: 134s lambda 134s 0.4994 134s 134s Threshold coefficients: 134s 1|2 2|3 3|4 4|5 134s -1.5284 0.7669 2.6021 3.7962 134s > summary(fm) 134s formula: rating ~ contact + temp 134s data: wine 134s 134s link threshold nobs logLik AIC niter max.grad cond.H 134s Aranda-Ordaz flexible 72 -86.34 186.68 32(214) 1.21e-05 3.9e+02 134s 134s Coefficients: 134s Estimate Std. Error z value Pr(>|z|) 134s contactyes 1.1927 0.6526 1.828 0.0676 . 134s tempwarm 2.0758 0.8196 2.533 0.0113 * 134s --- 134s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 134s 134s Link coefficients: 134s Estimate Std. Error z value Pr(>|z|) 134s lambda 0.4994 0.7840 0.637 0.524 134s 134s Threshold coefficients: 134s Estimate Std. Error z value 134s 1|2 -1.5284 0.5775 -2.647 134s 2|3 0.7669 0.8234 0.931 134s 3|4 2.6021 1.4335 1.815 134s 4|5 3.7962 1.9674 1.930 134s > vcov(fm) 134s Profile intervals not available for models with flexible link function: 134s reporting Wald intervals instead 134s 1|2 2|3 3|4 4|5 contactyes tempwarm 134s 1|2 0.3335060 0.2983831 0.4851478 0.6557867 0.2132245 0.2586680 134s 2|3 0.2983831 0.6780281 1.1261332 1.5330566 0.4699073 0.5953101 134s 3|4 0.4851478 1.1261332 2.0550131 2.7755711 0.8214407 1.0831426 134s 4|5 0.6557867 1.5330566 2.7755711 3.8705149 1.1194947 1.4831338 134s contactyes 0.2132245 0.4699073 0.8214407 1.1194947 0.4259337 0.3965114 134s tempwarm 0.2586680 0.5953101 1.0831426 1.4831338 0.3965114 0.6717718 134s lambda 0.2424390 0.5895695 1.0675177 1.4810300 0.4153800 0.5471764 134s lambda 134s 1|2 0.2424390 134s 2|3 0.5895695 134s 3|4 1.0675177 134s 4|5 1.4810300 134s contactyes 0.4153800 134s tempwarm 0.5471764 134s lambda 0.6146953 134s > logLik(fm) 134s 'log Lik.' -86.34171 (df=7) 134s > extractAIC(fm) 134s [1] 7.0000 186.6834 134s > fm2 <- update(fm, link="logit") 134s > anova(fm, fm2) 134s Likelihood ratio tests of cumulative link models: 134s 134s formula: link: threshold: 134s fm2 rating ~ contact + temp logit flexible 134s fm rating ~ contact + temp Aranda-Ordaz flexible 134s 134s no.par AIC logLik LR.stat df Pr(>Chisq) 134s fm2 6 184.98 -86.492 134s fm 7 186.68 -86.342 0.3004 1 0.5836 134s > head(model.matrix(fm)$X) 134s (Intercept) contactyes tempwarm 134s 1 1 0 0 134s 2 1 0 0 134s 3 1 1 0 134s 4 1 1 0 134s 5 1 0 1 134s 6 1 0 1 134s > head(model.frame(fm)) 134s rating contact temp 134s 1 2 no cold 134s 2 3 no cold 134s 3 3 yes cold 134s 4 4 yes cold 134s 5 4 no warm 134s 6 4 no warm 134s > coef(fm) 134s 1|2 2|3 3|4 4|5 contactyes tempwarm lambda 134s -1.5283880 0.7668896 2.6021283 3.7962201 1.1927250 2.0757935 0.4994416 134s > coef(summary(fm)) 134s Estimate Std. Error z value Pr(>|z|) 134s 1|2 -1.5283880 0.5774998 -2.6465602 0.008131504 134s 2|3 0.7668896 0.8234246 0.9313416 0.351676870 134s 3|4 2.6021283 1.4335317 1.8151871 0.069495154 134s 4|5 3.7962201 1.9673624 1.9295988 0.053656573 134s contactyes 1.1927250 0.6526360 1.8275501 0.067617093 134s tempwarm 2.0757935 0.8196168 2.5326389 0.011320750 134s lambda 0.4994416 0.7840251 0.6370225 0.524110192 134s > nobs(fm) 134s [1] 72 134s > terms(fm) 134s rating ~ contact + temp 134s attr(,"variables") 134s list(rating, contact, temp) 134s attr(,"factors") 134s contact temp 134s rating 0 0 134s contact 1 0 134s temp 0 1 134s attr(,"term.labels") 134s [1] "contact" "temp" 134s attr(,"order") 134s [1] 1 1 134s attr(,"intercept") 134s [1] 1 134s attr(,"response") 134s [1] 1 134s attr(,".Environment") 134s 134s attr(,"predvars") 134s list(rating, contact, temp) 134s attr(,"dataClasses") 134s rating contact temp 134s "ordered" "factor" "factor" 134s > # profile(fm) # not implemented 134s > confint(fm) 134s 2.5 % 97.5 % 134s 1|2 -2.66026679 -0.3965092 134s 2|3 -0.84699296 2.3807722 134s 3|4 -0.20754218 5.4117988 134s 4|5 -0.05973941 7.6521796 134s contactyes -0.08641803 2.4718680 134s tempwarm 0.46937402 3.6822130 134s lambda -1.03721931 2.0361025 134s > 134s > predict(fm, se=TRUE, interval = TRUE) 134s $fit 134s [1] 0.58209325 0.21518048 0.46054752 0.09103830 0.22383773 0.22383773 134s [7] 0.29286879 0.29286879 0.18610442 0.58209325 0.06269201 0.46054752 134s [13] 0.19716621 0.48293293 0.29286879 0.34021076 0.58209325 0.21518048 134s [19] 0.46054752 0.36913989 0.06939859 0.06939859 0.34021076 0.34021076 134s [25] 0.21518048 0.58209325 0.46054752 0.36913989 0.48293293 0.19716621 134s [31] 0.29286879 0.28974268 0.58209325 0.21518048 0.09103830 0.46054752 134s [37] 0.48293293 0.48293293 0.28974268 0.28974268 0.21518048 0.58209325 134s [43] 0.46054752 0.36913989 0.19716621 0.22383773 0.29286879 0.34021076 134s [49] 0.18610442 0.18610442 0.36913989 0.36913989 0.19716621 0.48293293 134s [55] 0.06897334 0.28974268 0.58209325 0.58209325 0.36913989 0.46054752 134s [61] 0.48293293 0.48293293 0.28974268 0.34021076 0.18610442 0.58209325 134s [67] 0.46054752 0.36913989 0.48293293 0.19716621 0.34021076 0.34021076 134s 134s $se.fit 134s [1] 0.14151187 0.09458707 0.10284385 0.06173008 0.06089158 0.06089158 134s [7] 0.17401315 0.17401315 0.08458285 0.14151187 0.03342713 0.10284385 134s [13] 0.06151483 0.16022476 0.17401315 0.14317218 0.14151187 0.09458707 134s [19] 0.10284385 0.09671233 0.16165491 0.16165491 0.14317218 0.14317218 134s [25] 0.09458707 0.14151187 0.10284385 0.09671233 0.16022476 0.06151483 134s [31] 0.17401315 0.08680258 0.14151187 0.09458707 0.06173008 0.10284385 134s [37] 0.16022476 0.16022476 0.08680258 0.08680258 0.09458707 0.14151187 134s [43] 0.10284385 0.09671233 0.06151483 0.06089158 0.17401315 0.14317218 134s [49] 0.08458285 0.08458285 0.09671233 0.09671233 0.06151483 0.16022476 134s [55] 0.03861752 0.08680258 0.14151187 0.14151187 0.09671233 0.10284385 134s [61] 0.16022476 0.16022476 0.08680258 0.14317218 0.08458285 0.14151187 134s [67] 0.10284385 0.09671233 0.16022476 0.06151483 0.14317218 0.14317218 134s 134s $lwr 134s [1] 0.308147105 0.083805034 0.274985966 0.022684752 0.126708383 0.126708383 134s [7] 0.073894276 0.073894276 0.071094501 0.308147105 0.021463145 0.274985966 134s [13] 0.102866209 0.209838512 0.073894276 0.128702471 0.308147105 0.083805034 134s [19] 0.274985966 0.205891005 0.000551725 0.000551725 0.128702471 0.128702471 134s [25] 0.083805034 0.308147105 0.274985966 0.205891005 0.209838512 0.102866209 134s [31] 0.073894276 0.151441083 0.308147105 0.083805034 0.022684752 0.274985966 134s [37] 0.209838512 0.209838512 0.151441083 0.151441083 0.083805034 0.308147105 134s [43] 0.274985966 0.205891005 0.102866209 0.126708383 0.073894276 0.128702471 134s [49] 0.071094501 0.071094501 0.205891005 0.205891005 0.102866209 0.209838512 134s [55] 0.022286640 0.151441083 0.308147105 0.308147105 0.205891005 0.274985966 134s [61] 0.209838512 0.209838512 0.151441083 0.128702471 0.071094501 0.308147105 134s [67] 0.274985966 0.205891005 0.209838512 0.102866209 0.128702471 0.128702471 134s 134s $upr 134s [1] 0.8132915 0.4511025 0.6577298 0.3017604 0.3643579 0.3643579 0.6825185 134s [8] 0.6825185 0.4058734 0.8132915 0.1694071 0.6577298 0.3446985 0.7666175Changing to 'nlminb' optimizer for flexible link function 134s 134s [15] 0.6825185 0.6428533 0.8132915 0.4511025 0.6577298 0.5690698 0.9097002 134s [22] 0.9097002 0.6428533 0.6428533 0.4511025 0.8132915 0.6577298 0.5690698 134s [29] 0.7666175 0.3446985 0.6825185 0.4825258 0.8132915 0.4511025 0.3017604 134s [36] 0.6577298 0.7666175 0.7666175 0.4825258 0.4825258 0.4511025 0.8132915 134s [43] 0.6577298 0.5690698 0.3446985 0.3643579 0.6825185 0.6428533 0.4058734 134s [50] 0.4058734 0.5690698 0.5690698 0.3446985 0.7666175 0.1940499 0.4825258 134s [57] 0.8132915 0.8132915 0.5690698 0.6577298 0.7666175 0.7666175 0.4825258 134s [64] 0.6428533 0.4058734 0.8132915 0.6577298 0.5690698 0.7666175 0.3446985 134s [71] 0.6428533 0.6428533 134s 134s > predict(fm, type="class") 134s $fit 134s [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 134s [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 134s Levels: 1 2 3 4 5 134s 134s > newData <- expand.grid(temp = c("cold", "warm"), 134s + contact = c("no", "yes")) 134s > 134s > ## Predicted probabilities in all five response categories for each of 134s > ## the four cases in newData: 134s > predict(fm, newdata=newData, type="prob") 134s $fit 134s 1 2 3 4 5 134s 1 0.186104423 0.58209325 0.2151805 0.01478353 0.001838317 134s 2 0.026664532 0.19716621 0.4829329 0.22383773 0.069398592 134s 3 0.062692007 0.36913989 0.4605475 0.09103830 0.016582284 134s 4 0.008204432 0.06897334 0.2897427 0.34021076 0.292868788 134s 134s > predict(fm, newdata=newData, type="class") 134s $fit 134s [1] 2 3 3 4 134s Levels: 1 2 3 4 5 134s 134s > 134s > predict(fm, newdata=newData, type="prob", se.fit = TRUE, interval = TRUE) 134s $fit 134s 1 2 3 4 5 134s 1 0.186104423 0.58209325 0.2151805 0.01478353 0.001838317 134s 2 0.026664532 0.19716621 0.4829329 0.22383773 0.069398592 134s 3 0.062692007 0.36913989 0.4605475 0.09103830 0.016582284 134s 4 0.008204432 0.06897334 0.2897427 0.34021076 0.292868788 134s 134s $se.fit 134s 1 2 3 4 5 134s 1 0.084582846 0.14151187 0.09458707 0.05105461 0.04225889 134s 2 0.018013151 0.06151483 0.16022476 0.06089158 0.16165491 134s 3 0.033427135 0.09671233 0.10284385 0.06173008 0.09203687 134s 4 0.009189042 0.03861752 0.08680258 0.14317218 0.17401315 134s 134s $lwr 134s 1 2 3 4 5 134s 1 0.071094501 0.30814710 0.08380503 1.557844e-05 4.591076e-23 134s 2 0.006979909 0.10286621 0.20983851 1.267084e-01 5.517250e-04 134s 3 0.021463145 0.20589100 0.27498597 2.268475e-02 2.647331e-07 134s 4 0.000903636 0.02228664 0.15144108 1.287025e-01 7.389428e-02 134s 134s $upr 134s 1 2 3 4 5 134s 1 0.40587337 0.8132915 0.4511025 0.9352883 1.0000000 134s 2 0.09647029 0.3446985 0.7666175 0.3643579 0.9097002 134s 3 0.16940715 0.5690698 0.6577298 0.3017604 0.9990698 134s 4 0.07033825 0.1940499 0.4825258 0.6428533 0.6825185 134s 134s > 134s > ######################################################################## 134s > ### Models with scale + flex link (or cauchit link) 134s > ######################################################################## 134s > 134s > fm <- clm(SURENESS ~ PRODID, scale=~PROD, data = soup, link="Aranda-Ordaz") 134s > summary(fm) 134s formula: SURENESS ~ PRODID 134s scale: ~PROD 134s data: soup 134s 134s Warning message: 134s (-1) Model failed to converge with max|grad| = 0.000374031 (tol = 1e-06) 134s link threshold nobs logLik AIC niter max.grad cond.H 134s Aranda-Ordaz flexible 1847 -2674.65 5373.30 57(719) 3.74e-04 9.0e+03 134s 134s Coefficients: 134s Estimate Std. Error z value Pr(>|z|) 134s PRODID2 1.3604 0.4137 3.289 0.001007 ** 134s PRODID3 2.2066 0.6659 3.314 0.000921 *** 134s PRODID4 1.2553 0.4086 3.072 0.002124 ** 134s PRODID5 1.9820 0.5886 3.367 0.000759 *** 134s PRODID6 2.4715 0.7713 3.204 0.001355 ** 134s --- 134s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 134s 134s log-scale coefficients: 134s Estimate Std. Error z value Pr(>|z|) 134s PRODTest 0.2807 0.1553 1.808 0.0706 . 134s --- 134s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 134s 134s Link coefficients: 134s Estimate Std. Error z value Pr(>|z|) 134s lambda 2.063 1.136 1.816 0.0693 . 134s --- 134s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 134s 134s Threshold coefficients: 134s Estimate Std. Error z value 134s 1|2 -1.3927 0.1491 -9.344 134s 2|3 -0.1449 0.3533 -0.410 134s 3|4 0.3051 0.4699 0.649 134s 4|5 0.6733 0.5802 1.160 134s 5|6 1.7210 0.9594 1.794 134s > 134s > fm <- clm(SURENESS ~ PRODID, scale=~PROD, data = soup, link="log-gamma") 134s Changing to 'nlminb' optimizer for flexible link function 136s Warning message: 136s (-1) Model failed to converge with max|grad| = 0.00138434 (tol = 1e-06) 136s > summary(fm) 136s formula: SURENESS ~ PRODID 136s scale: ~PROD 136s data: soup 136s 136s link threshold nobs logLik AIC niter max.grad cond.H 136s log-gamma flexible 1847 -2676.84 5377.68 87(1058) 1.38e-03 8.9e+03 136s 136s Coefficients: 136s Estimate Std. Error z value Pr(>|z|) 136s PRODID2 0.62876 0.09223 6.817 9.27e-12 *** 136s PRODID3 1.02757 0.13449 7.640 2.16e-14 *** 136s PRODID4 0.59157 0.11435 5.173 2.30e-07 *** 136s PRODID5 0.91936 0.12977 7.085 1.39e-12 *** 136s PRODID6 1.13201 0.13927 8.128 4.35e-16 *** 136s --- 136s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 136s 136s log-scale coefficients: 136s Estimate Std. Error z value Pr(>|z|) 136s PRODTest 0.09066 0.18406 0.493 0.622 136s 136s Link coefficients: 136s Estimate Std. Error z value Pr(>|z|) 136s lambda 0.4749 0.7031 0.675 0.499 136s 136s Threshold coefficients: 136s Changing to 'nlminb' optimizer for flexible link function 136s Estimate Std. Error z value 136s 1|2 -1.15649 0.45774 -2.527 136s 2|3 -0.47329 0.29575 -1.600 136s 3|4 -0.24744 0.26544 -0.932 136s 4|5 -0.07223 0.24988 -0.289 136s 5|6 0.37913 0.24136 1.571 136s > 136s > fm <- clm(SURENESS ~ PRODID, scale=~PROD, data = soup, link="cauchit") 136s > summary(fm) 136s formula: SURENESS ~ PRODID 136s scale: ~PROD 136s data: soup 136s 136s link threshold nobs logLik AIC niter max.grad cond.H 136s cauchit flexible 1847 -2679.34 5380.67 11(1) 3.10e-07 3.0e+02 136s 136s Coefficients: 136s Estimate Std. Error z value Pr(>|z|) 136s PRODID2 0.70550 0.09611 7.341 2.12e-13 *** 136s PRODID3 1.06186 0.13882 7.649 2.02e-14 *** 136s PRODID4 0.66876 0.11911 5.614 1.97e-08 *** 136s PRODID5 1.01135 0.13277 7.617 2.59e-14 *** 136s PRODID6 1.12784 0.14159 7.966 1.64e-15 *** 136s --- 136s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 136s 136s log-scale coefficients: 136s Estimate Std. Error z value Pr(>|z|) 136s PRODTest -0.20801 0.09524 -2.184 0.029 * 136s --- 136s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 136s 136s Threshold coefficients: 136s Estimate Std. Error z value 136s 1|2 -1.70920 0.14977 -11.412 136s 2|3 -0.36737 0.06302 -5.830 136s 3|4 -0.06736 0.05734 -1.175 136s 4|5 0.14657 0.05708 2.568 136s 5|6 0.67063 0.07072 9.483 136s > 136s > ######################################################################## 136s > ### clm.fit 136s > ######################################################################## 136s > 136s > ## Example with log-gamma: 136s > fm1 <- clm(rating ~ contact + temp, data=wine, link="log-gamma") 136s Warning message: 136s (-1) Model failed to converge with max|grad| = 9.92567e-05 (tol = 1e-06) 136s > summary(fm1) 136s formula: rating ~ contact + temp 136s data: wine 136s 136s link threshold nobs logLik AIC niter max.grad cond.H 136s log-gamma flexible 72 -85.72 185.44 27(179) 9.93e-05 5.9e+01 136s 136s Coefficients: 136s Estimate Std. Error z value Pr(>|z|) 136s contactyes 0.8614 0.2675 3.220 0.00128 ** 136s tempwarm 1.5072 0.2947 5.114 3.16e-07 *** 136s --- 136s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 136s 136s Link coefficients: 136s Estimate Std. Error z value Pr(>|z|) 136s lambda 0.1615 0.5752 0.281 0.779 136s 136s Threshold coefficients: 136s Estimate Std. Error z value 136s 1|2 -0.8798 0.5003 -1.759 136s 2|3 0.6678 0.3450 1.936 136s 3|4 1.9807 0.3826 5.177 136s 4|5 2.8593 0.4656 6.141 136s > ## get the model frame containing y and X: 136s > mf1 <- update(fm1, method="design") 136s > names(mf1) 136s [1] "y" "y.levels" "X" "offset" "terms" "contrasts" 136s [7] "xlevels" "weights" "doFit" "control" "link" "threshold" 136s [13] "start" "formulas" 136s > res <- clm.fit(mf1$y, mf1$X, link="log-gamma") ## invoking the factor method 136s Changing to 'nlminb' optimizer for flexible link function 136s Warning message: 136s (-1) Model failed to converge with max|grad| = 9.92567e-05 (tol = 1e-06) 136s > coef(res) 136s 1|2 2|3 3|4 4|5 contactyes tempwarm lambda 136s -0.8797774 0.6678307 1.9806826 2.8593125 0.8614400 1.5071959 0.1614741 136s > stopifnot(all.equal(coef(res), coef(fm1))) 136s > 136s > ## Example with Aranda-Ordaz: 136s > fm1 <- clm(rating ~ contact + temp, data=wine, link="Aranda-Ordaz") 136s Changing to 'nlminb' optimizer for flexible link function 136s Warning message: 136s (-1) Model failed to converge with max|grad| = 1.21391e-05 (tol = 1e-06) 136s > mf1 <- update(fm1, method="design") 136s > res <- clm.fit(mf1$y, mf1$X, link="Aranda") ## invoking the factor method 136s Changing to 'nlminb' optimizer for flexible link function 136s > stopifnot(all.equal(coef(res), coef(fm1))) 136s > 136s > 136s Warning message: 136s (-1) Model failed to converge with max|grad| = 1.21391e-05 (tol = 1e-06) 136s BEGIN TEST test.clm.model.matrix.R 136s 136s R version 4.4.3 (2025-02-28) -- "Trophy Case" 136s Copyright (C) 2025 The R Foundation for Statistical Computing 136s Platform: x86_64-pc-linux-gnu 136s 136s R is free software and comes with ABSOLUTELY NO WARRANTY. 136s You are welcome to redistribute it under certain conditions. 136s Type 'license()' or 'licence()' for distribution details. 136s 136s R is a collaborative project with many contributors. 136s Type 'contributors()' for more information and 136s 'citation()' on how to cite R or R packages in publications. 136s 136s Type 'demo()' for some demos, 'help()' for on-line help, or 136s 'help.start()' for an HTML browser interface to help. 136s Type 'q()' to quit R. 136s 136s > library(ordinal) 137s > ## source("test.clm.model.matrix.R") 137s > 137s > ## library(devtools) 137s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 137s > ## clean_dll(pkg = r2path) 137s > ## load_all(r2path) 137s > 137s > ## Check that get_clmDesign works in standard setting: 137s > fm1 <- clm(rating ~ temp, scale=~contact, nominal=~contact, data=wine) 137s > contr <- c(fm1$contrasts, fm1$S.contrasts, fm1$nom.contrasts) 137s > XX <- ordinal:::get_clmDesign(fm1$model, terms(fm1, "all"), contrasts=contr) 137s > XX2 <- update(fm1, method="design") 137s > (keep <- intersect(names(XX), names(XX2))) 137s [1] "y" "y.levels" "X" "offset" 137s [5] "terms" "contrasts" "xlevels" "weights" 137s [9] "S" "S.terms" "S.off" "S.contrasts" 137s [13] "S.xlevels" "NOM" "nom.terms" "nom.contrasts" 137s [17] "nom.xlevels" 137s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 137s + XX[keep], XX2[keep])) 137s y y.levels X offset terms 137s TRUE TRUE TRUE TRUE TRUE 137s contrasts xlevels weights S S.terms 137s TRUE TRUE TRUE TRUE TRUE 137s S.off S.contrasts S.xlevels NOM nom.terms 137s TRUE TRUE TRUE TRUE TRUE 137s nom.contrasts nom.xlevels 137s TRUE TRUE 137s > stopifnot(all(test)) 137s > 137s > ## Check that get_clmDesign works with singular fit and NAs: 137s > Warning message: 137s (1) Hessian is numerically singular: parameters are not uniquely determined 137s In addition: Absolute convergence criterion was met, but relative criterion was not met 137s cy <- with(wine, which(temp == "cold" & contact == "yes")) 137s > wine2 <- subset(wine, subset=(!1:nrow(wine) %in% cy)) 137s > wine2[c(9, 15, 46), "rating"] <- NA 137s > fm1 <- clm(rating ~ temp, scale=~contact, nominal=~contact, 137s + data=wine2) 137s > contr <- c(fm1$contrasts, fm1$S.contrasts, fm1$nom.contrasts) 137s > XX <- ordinal:::get_clmDesign(fm1$model, terms(fm1, "all"), contrasts=contr) 137s > XX2 <- update(fm1, method="design") 137s > (keep <- intersect(names(XX), names(XX2))) 137s [1] "y" "y.levels" "X" "offset" 137s [5] "terms" "contrasts" "xlevels" "na.action" 137s [9] "weights" "S" "S.terms" "S.off" 137s [13] "S.contrasts" "S.xlevels" "NOM" "nom.terms" 137s [17] "nom.contrasts" "nom.xlevels" 137s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 137s + XX[keep], XX2[keep])) 137s y y.levels X offset terms 137s TRUE TRUE TRUE TRUE TRUE 137s contrasts xlevels na.action weights S 137s TRUE TRUE TRUE TRUE TRUE 137s S.terms S.off S.contrasts S.xlevels NOM 137s TRUE TRUE TRUE TRUE TRUE 137s nom.terms nom.contrasts nom.xlevels 137s TRUE TRUE TRUE 137s > stopifnot(all(test)) 137s > 137s > ## In this situation update and get_clmRho give the same results: 137s > wine2 <- wine 137s > fm1 <- clm(rating ~ temp + contact, data=wine2) ## OK 137s > rho1 <- ordinal:::get_clmRho.clm(fm1) 137s > l1 <- as.list(rho1) 137s > l2 <- as.list(update(fm1, doFit=FALSE)) 137s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 137s + l1, l2[names(l1)])) 137s nlambda link gfun dfun pfun par clm.hess clm.grad 137s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 137s clm.nll wts fitted has.scale sigma k Soff S 137s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 137s n.psi o2 o1 B2 B1 137s TRUE TRUE TRUE TRUE TRUE 137s > stopifnot(all(test)) 137s > ## If we modify the data (or other subset, weights, formulae, etc.) 137s > ## used in the model call, the results from update no longer correspond 137s > ## to the elements of the fitted model object. get_clmRho gets it 137s > ## right on the other hand: 137s > wine2[10:13, "rating"] <- NA 137s > l3 <- as.list(ordinal:::get_clmRho.clm(fm1)) 137s > l4 <- as.list(update(fm1, doFit=FALSE)) 137s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 137s + l1, l3)) 137s nlambda link gfun dfun pfun par clm.hess clm.grad 137s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 137s clm.nll wts fitted has.scale sigma k Soff S 137s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 137s n.psi o2 o1 B2 B1 137s TRUE TRUE TRUE TRUE TRUE 137s > stopifnot(all(test)) ## same 137s > (test <- mapply(function(x, y) isTRUE(all.equal(x, y)), 137s Warning messages: 137s 1: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 137s non-list contrasts argument ignored 137s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 137s non-list contrasts argument ignored 137s Warning messages: 137s 1: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 137s non-list contrasts argument ignored 137s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 137s non-list contrasts argument ignored 137s + l3, l4[names(l3)])) 137s nlambda link gfun dfun pfun par clm.hess clm.grad 137s TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 137s clm.nll wts fitted has.scale sigma k Soff S 137s TRUE FALSE FALSE TRUE FALSE TRUE FALSE TRUE 137s n.psi o2 o1 B2 B1 137s TRUE FALSE FALSE FALSE FALSE 137s > stopifnot(sum(!test) == 8) ## not all the same anymore! 137s > ## In conclusion l1, l2, and l3 are identical. l4 is different. 137s > 137s > ################################# 137s > ## Test that checkContrasts give appropriate warnings: 137s > contr <- c(temp="contr.sum", contact="contr.sum") 137s > fm1 <- clm(rating ~ temp + contact, scale=~contact, data=wine) ## OK 137s > fm1 <- clm(rating ~ temp + contact, scale=~contact, data=wine, 137s + contrasts=contr) ## OK 137s > fm1 <- clm(rating ~ temp, scale=~contact, data=wine, 137s + contrasts=contr) ## OK 137s > ## These should give warnings: 137s > fm1 <- clm(rating ~ temp, contrasts=c(contact="contr.sum"), data=wine) 137s Warning messages: 137s 1: variable 'contact' is absent: its contrasts will be ignored 137s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 137s non-list contrasts argument ignored 137s Warning messages: 137s 1: variable 'contact' is absent: its contrasts will be ignored 137s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 137s non-list contrasts argument ignored 137s Warning messages: 137s 1: variable 'temp' is absent: its contrasts will be ignored 137s 2: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 137s non-list contrasts argument ignored 137s 3: In model.matrix.default(terms, data = fullmf, contrasts.arg = getContrasts(terms, : 137s non-list contrasts argument ignored 137s Warning message: 137s variable 'temp' is absent: its contrasts will be ignored 137s > fm1 <- clm(rating ~ temp, contrasts=contr, data=wine) 137s > fm1 <- clm(rating ~ 1, scale=~contact, contrasts=c(temp="contr.sum"), 137s + data=wine) 137s > fm1 <- clm(rating ~ 1, scale=~contact, contrasts=list(temp="contr.sum"), 137s + data=wine) 137s > 137s > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 137s Warning message: 137s variable 'temp' is absent: its contrasts will be ignored 137s > ordinal:::checkContrasts(fm0$S.terms, fm0$contrasts) 137s > ordinal:::checkContrasts(fm0$S.terms, fm0$S.contrasts) 137s > ordinal:::checkContrasts(fm0$terms, fm0$contrasts) 137s > ordinal:::checkContrasts(fm0$terms, fm0$S.contrasts) 137s > 137s > ################################# 137s > ## Check that clm and model.matrix respects contrast settings: 137s > options("contrasts" = c("contr.treatment", "contr.poly")) 137s > fm0 <- clm(rating ~ temp + contact, data=wine) 137s > options("contrasts" = c("contr.sum", "contr.poly")) 137s > fm1 <- clm(rating ~ temp + contact, data=wine) 137s > stopifnot(all(model.matrix(fm0)$X[, 2] %in% c(0, 1))) 137s > stopifnot(all(model.matrix(fm1)$X[, 2] %in% c(1, -1))) 137s > 137s > ################################# 137s > ## Check that model.matrix results do not depend on global contrast 137s > ## setting: 137s > options("contrasts" = c("contr.sum", "contr.poly")) 137s > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 137s > MM <- model.matrix(fm0) 137s > options("contrasts" = c("contr.treatment", "contr.poly")) 137s > MM2 <- model.matrix(fm0) 137s > for(x in MM) print(head(x)) 137s (Intercept) temp1 contact1 137s 1 1 1 1 137s 2 1 1 1 137s 3 1 1 -1 137s 4 1 1 -1 137s 5 1 -1 1 137s 6 1 -1 1 137s (Intercept) contact1 137s 1 1 1 137s 2 1 1 137s 3 1 -1 137s 4 1 -1 137s 5 1 1 137s 6 1 1 137s > for(x in MM2) print(head(x)) 137s (Intercept) temp1 contact1 137s 1 1 1 1 137s 2 1 1 1 137s 3 1 1 -1 137s 4 1 1 -1 137s 5 1 -1 1 137s 6 1 -1 1 137s (Intercept) contact1 137s 1 1 1 137s 2 1 1 137s 3 1 -1 137s 4 1 -1 137s 5 1 1 137s 6 1 1 137s > stopifnot(all(mapply(all.equal, MM, MM2))) 137s > 137s > ################################# 137s > ## This gave a warning before getContrasts was implemented: 137s > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 137s > MM <- model.matrix(fm0) 137s > ## > fm0 <- clm(rating ~ temp + contact, scale=~contact, data=wine) 137s > ## > MM <- model.matrix(fm0) 137s > ## Warning message: 137s > ## In model.matrix.default(res$S.terms, data = fullmf, contrasts.arg = getContrasts(res$S.terms, : 137s > ## variable 'temp' is absent, its contrast will be ignored 137s > for(x in MM) print(head(x)) 137s (Intercept) tempwarm contactyes 137s 1 1 0 0 137s 2 1 0 0 137s 3 1 0 1 137s 4 1 0 1 137s 5 1 1 0 137s 6 1 1 0 137s (Intercept) contactyes 137s 1 1 0 137s 2 1 0 137s 3 1 1 137s 4 1 1 137s 5 1 0 137s 6 1 0 137s > 137s > 137s BEGIN TEST test.clm.predict.R 137s 137s R version 4.4.3 (2025-02-28) -- "Trophy Case" 137s Copyright (C) 2025 The R Foundation for Statistical Computing 137s Platform: x86_64-pc-linux-gnu 137s 137s R is free software and comes with ABSOLUTELY NO WARRANTY. 137s You are welcome to redistribute it under certain conditions. 137s Type 'license()' or 'licence()' for distribution details. 137s 137s R is a collaborative project with many contributors. 137s Type 'contributors()' for more information and 137s 'citation()' on how to cite R or R packages in publications. 137s 137s Type 'demo()' for some demos, 'help()' for on-line help, or 137s 'help.start()' for an HTML browser interface to help. 137s Type 'q()' to quit R. 137s 137s > library(ordinal) 138s > ## source("test.clm.predict.R") 138s > 138s > ## library(devtools) 138s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 138s > ## clean_dll(pkg = r2path) 138s > ## load_all(r2path) 138s > 138s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 138s > options("contrasts" = c("contr.treatment", "contr.poly")) 138s > getOption("contrasts") 138s [1] "contr.treatment" "contr.poly" 138s > 138s > ## Example model 138s > 138s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine) 138s > summary(wine1.clm) 138s formula: rating ~ temp * contact 138s data: wine 138s subset: -cy 138s 138s link threshold nobs logLik AIC niter max.grad cond.H 138s logit flexible 54 -65.47 142.93 6(0) 2.80e-12 2.9e+01 138s 138s Coefficients: (1 not defined because of singularities) 138s Estimate Std. Error z value Pr(>|z|) 138s tempwarm 2.2892 0.7192 3.183 0.00146 ** 138s contactyes 1.6505 0.6698 2.464 0.01374 * 138s tempwarm:contactyes NA NA NA NA 138s --- 138s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 138s 138s Threshold coefficients: 138s Estimate Std. Error z value 138s 1|2 -1.3971 0.5728 -2.439 138s 2|3 1.1349 0.5262 2.157 138s 3|4 3.3351 0.6987 4.774 138s 4|5 4.7924 0.7996 5.994 138s > names(wine1.clm) 138s [1] "aliased" "alpha" "beta" "call" 138s [5] "coefficients" "cond.H" "contrasts" "control" 138s [9] "convergence" "df.residual" "edf" "fitted.values" 138s [13] "formula" "formulas" "gradient" "Hessian" 138s [17] "info" "link" "logLik" "maxGradient" 138s [21] "message" "model" "n" "niter" 138s [25] "nobs" "start" "terms" "Theta" 138s [29] "threshold" "tJac" "vcov" "xlevels" 138s [33] "y" "y.levels" 138s > 138s > wine.clm <- clm(rating~temp*contact, data=wine) 138s > summary(wine.clm) 138s formula: rating ~ temp * contact 138s data: wine 138s 138s link threshold nobs logLik AIC niter max.grad cond.H 138s logit flexible 72 -86.42 186.83 6(0) 5.22e-12 5.1e+01 138s 138s Coefficients: 138s Estimate Std. Error z value Pr(>|z|) 138s tempwarm 2.3212 0.7009 3.311 0.000928 *** 138s contactyes 1.3475 0.6604 2.041 0.041300 * 138s tempwarm:contactyes 0.3595 0.9238 0.389 0.697129 138s --- 138s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 138s 138s Threshold coefficients: 138s Estimate Std. Error z value 138s 1|2 -1.4113 0.5454 -2.588 138s 2|3 1.1436 0.5097 2.244 138s 3|4 3.3771 0.6382 5.292 138s 4|5 4.9420 0.7509 6.581 138s > names(wine.clm) 138s [1] "aliased" "alpha" "beta" "call" 138s [5] "coefficients" "cond.H" "contrasts" "control" 138s [9] "convergence" "df.residual" "edf" "fitted.values" 138s [13] "formula" "formulas" "gradient" "Hessian" 138s [17] "info" "link" "logLik" "maxGradient" 138s [21] "message" "model" "n" "niter" 138s [25] "nobs" "start" "terms" "Theta" 138s [29] "threshold" "tJac" "vcov" "xlevels" 138s [33] "y" "y.levels" 138s > ## Make sure the same elements are present with a rank deficient model 138s > ## fit: 138s > stopifnot(all(names(wine1.clm) == names(wine.clm))) 138s > 138s > ## With treatment contrasts: 138s > options("contrasts" = c("contr.treatment", "contr.poly")) 138s > wine.clm <- clm(rating~temp*contact, data=wine) 138s > coef(summary(wine.clm)) 138s Estimate Std. Error z value Pr(>|z|) 138s 1|2 -1.4112620 0.5453532 -2.5877943 9.659266e-03 138s 2|3 1.1435537 0.5096555 2.2437776 2.484671e-02 138s 3|4 3.3770825 0.6381617 5.2918913 1.210578e-07 138s 4|5 4.9419823 0.7509113 6.5813133 4.663108e-11 138s tempwarm 2.3211843 0.7009479 3.3114931 9.279953e-04 138s contactyes 1.3474604 0.6603557 2.0405072 4.129984e-02 138s tempwarm:contactyes 0.3595489 0.9238188 0.3891985 6.971293e-01 138s > head(model.matrix(wine.clm)$X) 138s (Intercept) tempwarm contactyes tempwarm:contactyes 138s 1 1 0 0 0 138s 2 1 0 0 0 138s 3 1 0 1 0 138s 4 1 0 1 0 138s 5 1 1 0 0 138s 6 1 1 0 0 138s > wine.clm$contrasts 138s $temp 138s [1] "contr.treatment" 138s 138s $contact 138s [1] "contr.treatment" 138s 138s > head(pred1 <- predict(wine.clm)$fit) 138s [1] 0.56229641 0.20864908 0.43467309 0.08938852 0.19028226 0.19028226 138s > 138s > ## With sum contrasts: 138s > options("contrasts" = c("contr.sum", "contr.poly")) 138s > wine.clm <- clm(rating~temp*contact, data=wine) 138s > coef(summary(wine.clm)) 138s Estimate Std. Error z value Pr(>|z|) 138s 1|2 -3.33547153 0.5253364 -6.3492103 2.164231e-10 138s 2|3 -0.78065590 0.2945538 -2.6503003 8.042025e-03 138s 3|4 1.45287292 0.3367529 4.3143590 1.600667e-05 138s 4|5 3.01777269 0.4813097 6.2699186 3.612370e-10 138s temp1 -1.25047935 0.2641023 -4.7348292 2.192396e-06 138s contact1 -0.76361743 0.2380971 -3.2071683 1.340485e-03 138s temp1:contact1 0.08988722 0.2309547 0.3891985 6.971293e-01 138s > head(model.matrix(wine.clm)$X) 138s (Intercept) temp1 contact1 temp1:contact1 138s 1 1 1 1 1 138s 2 1 1 1 1 138s 3 1 1 -1 -1 138s 4 1 1 -1 -1 138s 5 1 -1 1 -1 138s 6 1 -1 1 -1 138s > wine.clm$contrasts 138s $temp 138s [1] "contr.sum" 138s 138s $contact 138s [1] "contr.sum" 138s 138s > head(pred2 <- predict(wine.clm)$fit) 138s [1] 0.56229641 0.20864908 0.43467309 0.08938852 0.19028226 0.19028226 138s > 138s > ## Mixture of sum and treatment contrasts: 138s > options("contrasts" = c("contr.treatment", "contr.poly")) 138s > wine.clm <- clm(rating~temp*contact, data=wine, 138s + contrasts=list(temp="contr.sum")) 138s > coef(summary(wine.clm)) 138s Estimate Std. Error z value Pr(>|z|) 138s 1|2 -2.57185410 0.5227165 -4.92016984 8.646915e-07 138s 2|3 -0.01703847 0.3611634 -0.04717662 9.623725e-01 138s 3|4 2.21649036 0.4529312 4.89365773 9.897892e-07 138s 4|5 3.78139013 0.5957919 6.34683010 2.197966e-10 138s temp1 -1.16059213 0.3504740 -3.31149309 9.279953e-04 138s contactyes 1.52723487 0.4761942 3.20716830 1.340485e-03 138s temp1:contactyes -0.17977444 0.4619094 -0.38919847 6.971293e-01 138s > head(model.matrix(wine.clm)$X) 138s (Intercept) temp1 contactyes temp1:contactyes 138s 1 1 1 0 0 138s 2 1 1 0 0 138s 3 1 1 1 1 138s 4 1 1 1 1 138s 5 1 -1 0 0 138s 6 1 -1 0 0 138s > wine.clm$contrasts 138s $temp 138s [1] "contr.sum" 138s 138s $contact 138s [1] "contr.treatment" 138s 138s > head(pred3 <- predict(wine.clm)$fit) 138s [1] 0.56229641 0.20864908 0.43467309 0.08938852 0.19028226 0.19028226 138s > 138s > stopifnot(isTRUE(all.equal(pred1, pred2))) 138s > stopifnot(isTRUE(all.equal(pred1, pred3))) 138s > 138s > ################################# 138s > ### Now for a rank deficient fit: 138s > ################################# 138s > 138s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 138s > options("contrasts" = c("contr.treatment", "contr.poly")) 138s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine) 138s > coef(summary(wine1.clm)) 138s Estimate Std. Error z value Pr(>|z|) 138s 1|2 -1.397134 0.5727918 -2.439164 1.472127e-02 138s 2|3 1.134907 0.5261653 2.156940 3.101038e-02 138s 3|4 3.335090 0.6986647 4.773521 1.810331e-06 138s 4|5 4.792428 0.7995580 5.993846 2.049352e-09 138s tempwarm 2.289221 0.7191705 3.183140 1.456870e-03 138s contactyes 1.650538 0.6698484 2.464047 1.373782e-02 138s tempwarm:contactyes NA NA NA NA 138s > attributes(model.matrix(wine1.clm)$X)$contrasts 138s $temp 138s [1] "contr.treatment" 138s 138s $contact 138s [1] "contr.treatment" 138s 138s > wine1.clm$contrasts 138s $temp 138s [1] "contr.treatment" 138s 138s $contact 138s [1] "contr.treatment" 138s 138s > head(pred4 <- predict(wine1.clm)$fit) 138s [1] 0.5584719 0.2088699 0.1843854 0.1843854 0.2988733 0.2988733 138s > 138s > options("contrasts" = c("contr.sum", "contr.poly")) 138s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine) 138s > attributes(model.matrix(wine1.clm)$X)$contrasts 138s $temp 138s [1] "contr.sum" 138s 138s $contact 138s [1] "contr.sum" 138s 138s > options("contrasts" = c("contr.treatment", "contr.poly")) 138s > attributes(model.matrix(wine1.clm)$X)$contrasts 138s $temp 138s [1] "contr.sum" 138s 138s $contact 138s [1] "contr.sum" 138s 138s > ## Notice that the contrasts change in the attributes of the fit!!! 138s > coef(summary(wine1.clm)) 138s Estimate Std. Error z value Pr(>|z|) 138s 1|2 -3.3670128 0.6149672 -5.475110 4.372411e-08 138s 2|3 -0.8349725 0.4231096 -1.973419 4.844787e-02 138s 3|4 1.3652108 0.4310181 3.167409 1.538037e-03 138s 4|5 2.8225483 0.5190089 5.438343 5.377826e-08 138s temp1 -1.1446104 0.3595853 -3.183140 1.456870e-03 138s contact1 -0.8252689 0.3349242 -2.464047 1.373782e-02 138s temp1:contact1 NA NA NA NA 138s > wine1.clm$contrasts 138s $temp 138s [1] "contr.sum" 138s 138s $contact 138s [1] "contr.sum" 138s 138s > head(pred5 <- predict(wine1.clm)$fit) 138s [1] 0.5584719 0.2088699 0.1843854 0.1843854 0.2988733 0.2988733 138s > 138s > head(cbind(pred4, pred5)) 138s pred4 pred5 138s [1,] 0.5584719 0.5584719 138s [2,] 0.2088699 0.2088699 138s [3,] 0.1843854 0.1843854 138s [4,] 0.1843854 0.1843854 138s [5,] 0.2988733 0.2988733 138s [6,] 0.2988733 0.2988733 138s > stopifnot(isTRUE(all.equal(pred4, pred5))) 138s > 138s > options("contrasts" = c("contr.treatment", "contr.poly")) 138s > wine1.clm <- clm(rating ~ temp*contact, subset = -cy, data = wine, 138s + contrasts=list(temp="contr.sum")) 138s > coef(summary(wine1.clm)) 138s Estimate Std. Error z value Pr(>|z|) 138s 1|2 -2.54174387 0.5792622 -4.38789851 1.144512e-05 138s 2|3 -0.00970353 0.3737929 -0.02595964 9.792895e-01 138s 3|4 2.19047975 0.4965589 4.41131906 1.027428e-05 138s 4|5 3.64781729 0.6257007 5.82997171 5.543677e-09 138s temp1 -1.14461036 0.3595853 -3.18314035 1.456870e-03 138s contactyes 1.65053789 0.6698484 2.46404685 1.373782e-02 138s temp1:contactyes NA NA NA NA 138s > head(model.matrix(wine1.clm)$X) 138s (Intercept) temp1 contactyes temp1:contactyes 138s 1 1 1 0 0 138s 2 1 1 0 0 138s 5 1 -1 0 0 138s 6 1 -1 0 0 138s 7 1 -1 1 -1 138s 8 1 -1 1 -1 138s > attributes(model.matrix(wine1.clm)$X)$contrasts 138s $temp 138s [1] "contr.sum" 138s 138s $contact 138s [1] "contr.treatment" 138s 138s > wine1.clm$contrasts 138s $temp 138s [1] "contr.sum" 138s 138s $contact 138s [1] "contr.treatment" 138s 138s > head(pred6 <- predict(wine1.clm)$fit) 138s [1] 0.5584719 0.2088699 0.1843854 0.1843854 0.2988733 0.2988733 138s > 138s > head(cbind(pred4, pred5, pred6)) 138s pred4 pred5 pred6 138s [1,] 0.5584719 0.5584719 0.5584719 138s [2,] 0.2088699 0.2088699 0.2088699 138s [3,] 0.1843854 0.1843854 0.1843854 138s [4,] 0.1843854 0.1843854 0.1843854 138s [5,] 0.2988733 0.2988733 0.2988733 138s [6,] 0.2988733 0.2988733 0.2988733 138s > stopifnot(isTRUE(all.equal(pred4, pred6))) 138s > ################################################################## 138s > 138s > ## Compare equality of fitted values for models with different contrasts: 138s > options("contrasts" = c("contr.treatment", "contr.poly")) 138s > fm1 <- clm(rating ~ temp + contact, data=wine) 138s > fitted(fm1) 138s [1] 0.57064970 0.19229094 0.44305990 0.09582084 0.20049402 0.20049402 138s [7] 0.27378469 0.27378469 0.20679013 0.57064970 0.05354601 0.44305990 138s [13] 0.20141572 0.50157554 0.27378469 0.36359581 0.57064970 0.19229094 138s [19] 0.44305990 0.37764614 0.07562701 0.07562701 0.36359581 0.36359581 138s [25] 0.19229094 0.57064970 0.44305990 0.37764614 0.50157554 0.20141572 138s [31] 0.27378469 0.30420994 0.57064970 0.19229094 0.09582084 0.44305990 138s [37] 0.50157554 0.50157554 0.30420994 0.30420994 0.19229094 0.57064970 138s [43] 0.44305990 0.37764614 0.20141572 0.20049402 0.27378469 0.36359581 138s [49] 0.20679013 0.20679013 0.37764614 0.37764614 0.20141572 0.50157554 138s [55] 0.05380128 0.30420994 0.57064970 0.57064970 0.37764614 0.44305990 138s [61] 0.50157554 0.50157554 0.30420994 0.36359581 0.20679013 0.57064970 138s [67] 0.44305990 0.37764614 0.50157554 0.20141572 0.36359581 0.36359581 138s > options("contrasts" = c("contr.sum", "contr.poly")) 138s > fm2 <- clm(rating ~ temp + contact, data=wine) 138s > fitted(fm2) 138s [1] 0.57064970 0.19229094 0.44305990 0.09582084 0.20049402 0.20049402 138s [7] 0.27378469 0.27378469 0.20679013 0.57064970 0.05354601 0.44305990 138s [13] 0.20141572 0.50157554 0.27378469 0.36359581 0.57064970 0.19229094 138s [19] 0.44305990 0.37764614 0.07562701 0.07562701 0.36359581 0.36359581 138s [25] 0.19229094 0.57064970 0.44305990 0.37764614 0.50157554 0.20141572 138s [31] 0.27378469 0.30420994 0.57064970 0.19229094 0.09582084 0.44305990 138s [37] 0.50157554 0.50157554 0.30420994 0.30420994 0.19229094 0.57064970 138s [43] 0.44305990 0.37764614 0.20141572 0.20049402 0.27378469 0.36359581 138s [49] 0.20679013 0.20679013 0.37764614 0.37764614 0.20141572 0.50157554 138s [55] 0.05380128 0.30420994 0.57064970 0.57064970 0.37764614 0.44305990 138s [61] 0.50157554 0.50157554 0.30420994 0.36359581 0.20679013 0.57064970 138s [67] 0.44305990 0.37764614 0.50157554 0.20141572 0.36359581 0.36359581 138s > options("contrasts" = c("contr.treatment", "contr.poly")) 138s > fm3 <- clm(rating ~ temp + contact, data=wine, 138s + contrasts=list(contact="contr.sum")) 138s > fitted(fm3) 138s [1] 0.57064970 0.19229094 0.44305990 0.09582084 0.20049402 0.20049402 138s [7] 0.27378469 0.27378469 0.20679013 0.57064970 0.05354601 0.44305990 138s [13] 0.20141572 0.50157554 0.27378469 0.36359581 0.57064970 0.19229094 138s [19] 0.44305990 0.37764614 0.07562701 0.07562701 0.36359581 0.36359581 138s [25] 0.19229094 0.57064970 0.44305990 0.37764614 0.50157554 0.20141572 138s [31] 0.27378469 0.30420994 0.57064970 0.19229094 0.09582084 0.44305990 138s [37] 0.50157554 0.50157554 0.30420994 0.30420994 0.19229094 0.57064970 138s [43] 0.44305990 0.37764614 0.20141572 0.20049402 0.27378469 0.36359581 138s [49] 0.20679013 0.20679013 0.37764614 0.37764614 0.20141572 0.50157554 138s [55] 0.05380128 0.30420994 0.57064970 0.57064970 0.37764614 0.44305990 138s [61] 0.50157554 0.50157554 0.30420994 0.36359581 0.20679013 0.57064970 138s [67] 0.44305990 0.37764614 0.50157554 0.20141572 0.36359581 0.36359581 138s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm2)))) 138s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm3)))) 138s > 138s > ################################################################## 138s > ## Compare equality of fitted values for models with different 138s > ## contrasts in face of aliased coefficients: 138s > options("contrasts" = c("contr.treatment", "contr.poly")) 138s > cy <- with(wine, which(temp == "cold" & contact == "yes")) 138s > Wine <- subset(wine, subset=!(temp == "cold" & contact == "yes")) 138s > fm1 <- clm(rating ~ temp + contact, data=Wine) 138s > options("contrasts" = c("contr.sum", "contr.poly")) 138s > fm2 <- clm(rating ~ temp + contact, data=Wine) 138s > options("contrasts" = c("contr.treatment", "contr.poly")) 138s > fm3 <- clm(rating ~ temp + contact, data=Wine, 138s + contrasts=list(contact="contr.sum")) 138s > 138s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm2)))) 138s > stopifnot(isTRUE(all.equal(fitted(fm1), fitted(fm3)))) 138s > stopifnot(isTRUE(all.equal(predict(fm1)$fit, predict(fm2)$fit))) 138s > stopifnot(isTRUE(all.equal(predict(fm1)$fit, predict(fm3)$fit))) 138s > 138s > ################################# 138s > ## Does this also happen if the wine data has changed? 138s > options("contrasts" = c("contr.treatment", "contr.poly")) 138s > Wine <- subset(wine, subset=!(temp == "cold" & contact == "yes")) 138s > fm1 <- clm(rating ~ temp + contact, data=Wine) 138s > fit1 <- fitted(fm1) 138s > pred1 <- predict(fm1)$fit 138s > Wine <- wine 138s > pred2 <- predict(fm1)$fit 138s > stopifnot(isTRUE(all.equal(fit1, pred1))) 138s > stopifnot(isTRUE(all.equal(fit1, pred2))) 138s > 138s > ## What if weights, say, is an expression? 138s > ## Notice that updating the model object changes it: 138s > set.seed(123) 138s > fm1 <- clm(rating ~ temp + contact, data=wine, 138s + weights=runif(nrow(wine), .5, 1.5)) 138s > fm2 <- update(fm1) 138s > stopifnot(isTRUE(all.equal(fitted(fm1), predict(fm1)$fit))) 138s > stopifnot(!isTRUE(all.equal(fitted(fm1), fitted(fm2)))) 138s > 138s > ################################# 138s > ## Test equality of fits and predictions of models with: 138s > ## 'x + I(x^2)' and 'poly(x, 2)': 138s > ## December 25th 2014, RHBC. 138s > data(wine) 138s > set.seed(1) 138s > x <- rnorm(nrow(wine), sd=2) + as.numeric(wine$rating) 138s > range(x) 138s [1] -1.429400 7.803236 138s > 138s > ## Comparison of 'x + I(x^2)' and 'poly(x, 2)': 138s > fm3 <- clm(rating ~ temp + x + I(x^2), data=wine) 138s > fm4 <- clm(rating ~ temp + poly(x, 2), data=wine) 138s > ## Same model fits, but different parameterizations: 138s > stopifnot( 138s + !isTRUE(all.equal(coef(fm3), coef(fm4), check.names=FALSE)) 138s + ) 138s > stopifnot(isTRUE(all.equal(logLik(fm3), logLik(fm4)))) 138s > newData <- expand.grid(temp = levels(wine$temp), 138s + x=seq(-1, 7, 3)) 138s > predict(fm3, newdata=newData)$fit 138s 1 2 3 4 5 138s 1 0.206057293 0.56152859 0.2029812 0.0245885 0.004844463 138s 2 0.036289668 0.28766182 0.5031703 0.1404155 0.032462707 138s 3 0.147105364 0.53988789 0.2693657 0.0363691 0.007271946 138s 4 0.024413857 0.21711772 0.5192073 0.1912002 0.048060899 138s 5 0.035397238 0.28292433 0.5050762 0.1433185 0.033283705 138s 6 0.005296054 0.05815716 0.3400568 0.4047024 0.191787585 138s > predict(fm4, newdata=newData)$fit 138s 1 2 3 4 5 138s 1 0.206057293 0.56152859 0.2029812 0.0245885 0.004844463 138s 2 0.036289668 0.28766182 0.5031703 0.1404155 0.032462707 138s 3 0.147105364 0.53988789 0.2693657 0.0363691 0.007271946 138s 4 0.024413857 0.21711772 0.5192073 0.1912002 0.048060899 138s 5 0.035397238 0.28292433 0.5050762 0.1433185 0.033283705 138s 6 0.005296054 0.05815716 0.3400568 0.4047024 0.191787585 138s > stopifnot(isTRUE(all.equal(fitted(fm3), fitted(fm4)))) 138s > stopifnot(isTRUE( 138s + all.equal(predict(fm3, newdata=newData)$fit, 138s + predict(fm4, newdata=newData)$fit))) 138s > ################################# 138s > 138s BEGIN TEST test.clm.profile.R 138s 138s R version 4.4.3 (2025-02-28) -- "Trophy Case" 138s Copyright (C) 2025 The R Foundation for Statistical Computing 138s Platform: x86_64-pc-linux-gnu 138s 138s R is free software and comes with ABSOLUTELY NO WARRANTY. 138s You are welcome to redistribute it under certain conditions. 138s Type 'license()' or 'licence()' for distribution details. 138s 138s R is a collaborative project with many contributors. 138s Type 'contributors()' for more information and 138s 'citation()' on how to cite R or R packages in publications. 138s 138s Type 'demo()' for some demos, 'help()' for on-line help, or 138s 'help.start()' for an HTML browser interface to help. 138s Type 'q()' to quit R. 138s 139s > library(ordinal) 139s > 139s > ## Testing that the profile remains the same - that the model object 139s > ## is not 'distorted' by update(object/fitted, doFit=FALSE) 139s > set.seed(1234) 139s > wts <- runif(nrow(wine), 0, 2) 139s > fm3 <- clm(rating ~ temp + contact, data=wine, 139s + weights=wts) 139s > pr <- profile(fm3) 139s > 139s > set.seed(1234) 139s > fm3 <- clm(rating ~ temp + contact, data=wine, 139s + weights=runif(nrow(wine), 0, 2)) 139s > pr3 <- profile(fm3) 140s > ## > set.seed(1234) 140s > ## > fm3 <- clm(rating ~ temp + contact, data=wine, 140s > ## + weights=runif(nrow(wine), 0, 2)) 140s > ## > pr3 <- profile(fm3) 140s > ## Warning messages: 140s > ## 1: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 140s > ## profile may be unreliable for tempwarm because only 1 140s > ## steps were taken down 140s > ## 2: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 140s > ## profile may be unreliable for tempwarm because only 1 140s > ## steps were taken up 140s > ## 3: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 140s > ## profile may be unreliable for contactyes because only 1 140s > ## steps were taken down 140s > ## 4: In profile.clm.beta(fitted, which.beta, alpha, max.steps, nsteps, : 140s > ## profile may be unreliable for contactyes because only 1 140s > ## steps were taken up 140s > ## 140s > stopifnot(isTRUE(all.equal(pr, pr3, check.attributes=FALSE))) 140s > stopifnot( 140s + isTRUE(all.equal(pr$tempwarm[, "lroot"], pr3$tempwarm[, "lroot"])), 140s + isTRUE(all.equal(pr$contactyes[, "lroot"], pr3$contactyes[, "lroot"]))) 140s > 140s BEGIN TEST test.clm.single.anova.R 140s 140s R version 4.4.3 (2025-02-28) -- "Trophy Case" 140s Copyright (C) 2025 The R Foundation for Statistical Computing 140s Platform: x86_64-pc-linux-gnu 140s 140s R is free software and comes with ABSOLUTELY NO WARRANTY. 140s You are welcome to redistribute it under certain conditions. 140s Type 'license()' or 'licence()' for distribution details. 140s 140s R is a collaborative project with many contributors. 140s Type 'contributors()' for more information and 140s 'citation()' on how to cite R or R packages in publications. 140s 140s Type 'demo()' for some demos, 'help()' for on-line help, or 140s 'help.start()' for an HTML browser interface to help. 140s Type 'q()' to quit R. 140s 140s > # test.clm.single.anova.R 140s > 140s > library(ordinal) 141s > 141s > # WRE says "using if(requireNamespace("pkgname")) is preferred, if possible." 141s > # even in tests: 141s > assertError <- function(expr, ...) 141s + if(requireNamespace("tools")) tools::assertError(expr, ...) else invisible() 141s > assertWarning <- function(expr, ...) 141s + if(requireNamespace("tools")) tools::assertWarning(expr, ...) else invisible() 141s > 141s > fm <- clm(rating ~ temp * contact, scale=~contact, data=wine) 141s > 141s > anova(fm, type="I") 141s Type I Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 17.1046 3.538e-05 *** 141s contact 1 9.1574 0.002477 ** 141s temp:contact 1 0.1097 0.740512 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > anova(fm, type="II") 141s Type II Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 17.1046 3.538e-05 *** 141s contact 1 9.1574 0.002477 ** 141s temp:contact 1 0.1097 0.740512 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > anova(fm, type="III") 141s Type III Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 9.5681 0.00198 ** 141s contact 1 4.1830 0.04083 * 141s temp:contact 1 0.1097 0.74051 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > anova(fm, type=1) 141s Type I Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 17.1046 3.538e-05 *** 141s contact 1 9.1574 0.002477 ** 141s temp:contact 1 0.1097 0.740512 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > anova(fm, type=2) 141s Type II Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 17.1046 3.538e-05 *** 141s contact 1 9.1574 0.002477 ** 141s temp:contact 1 0.1097 0.740512 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > anova(fm, type=3) 141s Type III Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 9.5681 0.00198 ** 141s contact 1 4.1830 0.04083 * 141s temp:contact 1 0.1097 0.74051 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > anova(fm, type="1") 141s Type I Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 17.1046 3.538e-05 *** 141s contact 1 9.1574 0.002477 ** 141s temp:contact 1 0.1097 0.740512 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > anova(fm, type="2") 141s Type II Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 17.1046 3.538e-05 *** 141s contact 1 9.1574 0.002477 ** 141s temp:contact 1 0.1097 0.740512 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > anova(fm, type="3") 141s Type III Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 9.5681 0.00198 ** 141s contact 1 4.1830 0.04083 * 141s temp:contact 1 0.1097 0.74051 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > anova(fm, type="marginal") 141s Marginal Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 9.5681 0.00198 ** 141s contact 1 4.1830 0.04083 * 141s temp:contact 1 0.1097 0.74051 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > 141s > # Nominal effects: 141s > fm <- clm(rating ~ temp, nominal=~contact, data=wine) 141s > anova(fm) 141s Type I Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 22.166 2.501e-06 *** 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > 141s > # Flexible links: 141s > fm1 <- clm(rating ~ temp + contact, link="log-gamma", data=wine) 141s Changing to 'nlminb' optimizer for flexible link function 141s > anova(fm1, type=1) 141s Warning message: 141s (-1) Model failed to converge with max|grad| = 9.92642e-05 (tol = 1e-06) 141s Type I Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 26.150 3.16e-07 *** 141s contact 1 10.369 0.001282 ** 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > anova(fm1, type=2) 141s Type II Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 26.150 3.16e-07 *** 141s contact 1 10.369 0.001282 ** 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > anova(fm1, type=3) 141s Type III Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 26.150 3.16e-07 *** 141s contact 1 10.369 0.001282 ** 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > 141s > # Equivalence of tests irrespective of contrasts: 141s > fm1 <- clm(SURENESS ~ PRODID * SOUPFREQ, data=soup) 141s > # summary(fm1) 141s > (an1 <- anova(fm1, type=3)) 141s Type III Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s PRODID 5 72.5901 2.959e-14 *** 141s SOUPFREQ 2 1.8132 0.4039 141s PRODID:SOUPFREQ 10 8.5837 0.5720 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > fm2 <- clm(SURENESS ~ PRODID * SOUPFREQ, data=soup, 141s + contrasts = list(SOUPFREQ = "contr.sum", PRODID = "contr.SAS")) 141s > # summary(fm2) 141s > anova(fm1, fm2) 141s Likelihood ratio tests of cumulative link models: 141s 141s formula: link: threshold: 141s fm1 SURENESS ~ PRODID * SOUPFREQ logit flexible 141s fm2 SURENESS ~ PRODID * SOUPFREQ logit flexible 141s 141s no.par AIC logLik LR.stat df Pr(>Chisq) 141s fm1 22 5388 -2672 141s fm2 22 5388 -2672 0 0 141s > (an2 <- anova(fm2, type=3)) 141s Type III Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s PRODID 5 72.5901 2.959e-14 *** 141s SOUPFREQ 2 1.8132 0.4039 141s PRODID:SOUPFREQ 10 8.5837 0.5720 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > stopifnot( 141s + isTRUE(all.equal(an1, an2, check.attributes=FALSE)) 141s + ) 141s > 141s > 141s > # Aliased coefficients: 141s > fm1 <- clm(SURENESS ~ PRODID * DAY, data=soup) 141s > anova(fm1, type=1) 141s Type I Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s PRODID 5 185.2017 < 2e-16 *** 141s DAY 1 4.1131 0.04255 * 141s PRODID:DAY 4 5.1186 0.27534 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > anova(fm1, type=2) 141s Type II Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s PRODID 5 181.5967 < 2e-16 *** 141s DAY 1 4.1131 0.04255 * 141s PRODID:DAY 4 5.1186 0.27534 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > anova(fm1, type=3) 141s Missing cells for: PRODID3:DAY2. 141s Interpret type III hypotheses with care. 141s Type III Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s PRODID 5 76.3722 4.81e-15 *** 141s DAY 1 10.1485 0.001444 ** 141s PRODID:DAY 4 5.1186 0.275344 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > 141s > # Aliased term (due to nominal effects): 141s > fm <- clm(rating ~ temp * contact, nominal=~contact, data=wine) 141s > anova(fm, type=1) 141s Type I Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 22.066 2.634e-06 *** 141s contact 141s temp:contact 1 0.250 0.6171 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > anova(fm, type=2) 141s Type II Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 22.066 2.634e-06 *** 141s contact 141s temp:contact 1 0.250 0.6171 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > anova(fm, type=3) 141s Type III Analysis of Deviance Table with Wald chi-square tests 141s 141s Df Chisq Pr(>Chisq) 141s temp 1 9.6335 0.001911 ** 141s contact 141s temp:contact 1 0.2500 0.617071 141s --- 141s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 141s > 141s > # model with all NA in vcov(object): 141s > fm <- clm(rating ~ temp * contact, nominal=~contact, scale=~contact, data=wine) 141s > assertError(anova(fm, type=1)) # error 141s Warning message: 141s (1) Hessian is numerically singular: parameters are not uniquely determined 141s In addition: Absolute and relative convergence criteria were met 141s Loading required namespace: tools 141s > assertError(anova(fm, type=2)) # error 141s > assertError(anova(fm, type=3)) # error 141s > all(is.na(vcov(fm))) 141s [1] TRUE 141s > 141s BEGIN TEST test.general.R 141s 141s R version 4.4.3 (2025-02-28) -- "Trophy Case" 141s Copyright (C) 2025 The R Foundation for Statistical Computing 141s Platform: x86_64-pc-linux-gnu 141s 141s R is free software and comes with ABSOLUTELY NO WARRANTY. 141s You are welcome to redistribute it under certain conditions. 141s Type 'license()' or 'licence()' for distribution details. 141s 141s R is a collaborative project with many contributors. 141s Type 'contributors()' for more information and 141s 'citation()' on how to cite R or R packages in publications. 141s 141s Type 'demo()' for some demos, 'help()' for on-line help, or 141s 'help.start()' for an HTML browser interface to help. 141s Type 'q()' to quit R. 141s 141s > 141s > txt <- citation("ordinal") 141s > stopifnot(as.logical(grep("year", txt))) 141s > 141s BEGIN TEST test.makeThresholds.R 141s 141s R version 4.4.3 (2025-02-28) -- "Trophy Case" 141s Copyright (C) 2025 The R Foundation for Statistical Computing 141s Platform: x86_64-pc-linux-gnu 141s 141s R is free software and comes with ABSOLUTELY NO WARRANTY. 141s You are welcome to redistribute it under certain conditions. 141s Type 'license()' or 'licence()' for distribution details. 141s 141s R is a collaborative project with many contributors. 141s Type 'contributors()' for more information and 141s 'citation()' on how to cite R or R packages in publications. 141s 141s Type 'demo()' for some demos, 'help()' for on-line help, or 141s 'help.start()' for an HTML browser interface to help. 141s Type 'q()' to quit R. 141s 141s > # test.makeThresholds.R 141s > 141s > library(ordinal) 142s > 142s > # Prvious bug which is now fixed: 142s > res <- ordinal:::makeThresholds(letters[1:3], "symmetric") 142s > stopifnot(length(res$alpha.names) == res$nalpha) 142s > # length(res$alpha.names) used to be 4 142s > 142s > # Real data example: 142s > wine <- within(wine, { 142s + rating_comb3b <- rating 142s + levels(rating_comb3b) <- c("1-2", "1-2", "3", "4-5", "4-5") 142s + }) 142s > wine$rating_comb3b[1] <- "4-5" # Need to remove the zero here to avoid inf MLE 142s > ftable(rating_comb3b ~ temp + contact, data=wine) 142s rating_comb3b 1-2 3 4-5 142s temp contact 142s cold no 12 5 1 142s yes 8 8 2 142s warm no 5 8 5 142s yes 1 5 12 142s > 142s > fm.comb3_c <- clm(rating_comb3b ~ contact, #scale=~contact, 142s + threshold = "symmetric", data=wine) # no error 142s > 142s BEGIN TEST test.sign.R 142s 142s R version 4.4.3 (2025-02-28) -- "Trophy Case" 142s Copyright (C) 2025 The R Foundation for Statistical Computing 142s Platform: x86_64-pc-linux-gnu 142s 142s R is free software and comes with ABSOLUTELY NO WARRANTY. 142s You are welcome to redistribute it under certain conditions. 142s Type 'license()' or 'licence()' for distribution details. 142s 142s R is a collaborative project with many contributors. 142s Type 'contributors()' for more information and 142s 'citation()' on how to cite R or R packages in publications. 142s 142s Type 'demo()' for some demos, 'help()' for on-line help, or 142s 'help.start()' for an HTML browser interface to help. 142s Type 'q()' to quit R. 142s 142s > # test.sign.R 142s > 142s > # Test the use of sign.location and sign.nominal in clm.control(): 142s > 142s > library(ordinal) 143s > 143s > fm1 <- clm(rating ~ temp + contact, data=wine) 143s > fm2 <- clm(rating ~ temp + contact, data=wine, 143s + sign.location="positive") 143s > # dput(names(fm1)) 143s > keep <- c("aliased", "alpha", "cond.H", 143s + "contrasts", "convergence", "df.residual", "edf", 143s + "fitted.values", "formula", "formulas", "gradient", 143s + "info", "link", "logLik", "maxGradient", "message", "model", 143s + "n", "niter", "nobs", "start", "terms", "Theta", "threshold", 143s + "tJac", "xlevels", "y", "y.levels") 143s > check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1[keep], fm2[keep]) 143s > stopifnot(all(check)) 143s > stopifnot(isTRUE(all.equal( 143s + fm1$beta, - fm2$beta 143s + ))) 143s > 143s > fm1 <- clm(rating ~ temp, nominal=~ contact, data=wine) 143s > fm2 <- clm(rating ~ temp, nominal=~ contact, data=wine, 143s + sign.nominal="negative") 143s > keep <- c("aliased", "beta", "cond.H", 143s + "contrasts", "convergence", "df.residual", "edf", 143s + "fitted.values", "formula", "formulas", "gradient", 143s + "info", "link", "logLik", "maxGradient", "message", "model", 143s + "n", "niter", "nobs", "start", "terms", "Theta", "threshold", 143s + "tJac", "xlevels", "y", "y.levels") 143s > # check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1, fm2) 143s > check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1[keep], fm2[keep]) 143s > stopifnot(all(check)) 143s > stopifnot(isTRUE(all.equal( 143s + fm1$alpha[5:8], -fm2$alpha[5:8] 143s + ))) 143s > 143s > 143s > fm1 <- clm(rating ~ temp, nominal=~ contact, data=wine) 143s > fm2 <- clm(rating ~ temp, nominal=~ contact, data=wine, 143s + sign.nominal="negative", sign.location="positive") 143s > keep <- c("aliased", "cond.H", 143s + "contrasts", "convergence", "df.residual", "edf", 143s + "fitted.values", "formula", "formulas", "gradient", 143s + "info", "link", "logLik", "maxGradient", "message", "model", 143s + "n", "niter", "nobs", "start", "terms", "Theta", "threshold", 143s + "tJac", "xlevels", "y", "y.levels") 143s > # check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1, fm2) 143s > check <- mapply(function(x, y) isTRUE(all.equal(x, y)), fm1[keep], fm2[keep]) 143s > stopifnot(all(check)) 143s > stopifnot( 143s + isTRUE(all.equal(fm1$alpha[5:8], -fm2$alpha[5:8])), 143s + isTRUE(all.equal(fm1$beta, -fm2$beta)) 143s + ) 143s > 143s > # Check predict method: 143s > newData <- with(wine, expand.grid(temp=levels(temp), contact=levels(contact))) 143s > (p1 <- predict(fm1, newdata=newData)) 143s $fit 143s 1 2 3 4 5 143s 1 0.210312404 0.56637121 0.1953950 0.0185460 0.009375394 143s 2 0.020998377 0.19781391 0.5182972 0.1577343 0.105156202 143s 3 0.050301839 0.38380275 0.4329644 0.1065821 0.026348960 143s 4 0.004247588 0.05393811 0.2862121 0.4040930 0.251509196 143s 143s > (p2 <- predict(fm2, newdata=newData)) 143s $fit 143s 1 2 3 4 5 143s 1 0.210312404 0.56637121 0.1953950 0.0185460 0.009375394 143s 2 0.020998377 0.19781391 0.5182972 0.1577343 0.105156202 143s 3 0.050301839 0.38380275 0.4329644 0.1065821 0.026348960 143s 4 0.004247588 0.05393811 0.2862121 0.4040930 0.251509196 143s 143s > stopifnot(isTRUE(all.equal(p1, p2))) 143s > 143s > stopifnot(isTRUE( 143s + all.equal(predict(fm1, newdata=wine, se=TRUE, interval=TRUE), 143s + predict(fm2, newdata=wine, se=TRUE, interval=TRUE)) 143s + )) 143s > 143s > # Check profile and confint methods: 143s > confint.default(fm1) 143s 2.5 % 97.5 % 143s 1|2.(Intercept) -2.4250844 -0.2210024 143s 2|3.(Intercept) 0.3158056 2.1770814 143s 3|4.(Intercept) 2.2642614 4.8358258 143s 4|5.(Intercept) 2.9738888 6.3466053 143s 1|2.contactyes -3.8921464 0.6620280 143s 2|3.contactyes -2.6692032 -0.3539315 143s 3|4.contactyes -2.9464535 -0.4030579 143s 4|5.contactyes -2.8077520 0.7065061 143s tempwarm 1.4703720 3.5677176 143s > confint.default(fm2) 143s 2.5 % 97.5 % 143s 1|2.(Intercept) -2.4250844 -0.2210024 143s 2|3.(Intercept) 0.3158056 2.1770814 143s 3|4.(Intercept) 2.2642614 4.8358258 143s 4|5.(Intercept) 2.9738888 6.3466053 143s 1|2.contactyes -0.6620280 3.8921464 143s 2|3.contactyes 0.3539315 2.6692032 143s 3|4.contactyes 0.4030579 2.9464535 143s 4|5.contactyes -0.7065061 2.8077520 143s tempwarm -3.5677176 -1.4703720 143s > 143s > stopifnot( 143s + isTRUE(all.equal(confint(fm1), -confint(fm2)[, 2:1, drop=FALSE], 143s + check.attributes=FALSE)) 143s + ) 143s > 143s > fm1 <- clm(rating ~ temp + contact, data=wine) 143s > fm2 <- clm(rating ~ temp + contact, data=wine, 143s + sign.location="positive") 143s > pr1 <- profile(fm1) 143s > pr2 <- profile(fm2) 144s > stopifnot( 144s + isTRUE(all.equal(confint(fm1), - confint(fm2)[, 2:1], check.attributes=FALSE)) 144s + ) 144s > 144s > 144s BEGIN TEST test0weights.R 144s 144s R version 4.4.3 (2025-02-28) -- "Trophy Case" 144s Copyright (C) 2025 The R Foundation for Statistical Computing 144s Platform: x86_64-pc-linux-gnu 144s 144s R is free software and comes with ABSOLUTELY NO WARRANTY. 144s You are welcome to redistribute it under certain conditions. 144s Type 'license()' or 'licence()' for distribution details. 144s 144s R is a collaborative project with many contributors. 144s Type 'contributors()' for more information and 144s 'citation()' on how to cite R or R packages in publications. 144s 144s Type 'demo()' for some demos, 'help()' for on-line help, or 144s 'help.start()' for an HTML browser interface to help. 144s Type 'q()' to quit R. 144s 144s > library(ordinal) 145s > options(contrasts = c("contr.treatment", "contr.poly")) 145s > ## library(devtools) 145s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 145s > ## clean_dll(pkg = r2path) 145s > ## load_all(r2path) 145s > 145s > ## one zero weight: 145s > data(wine, package="ordinal") 145s > wts <- rep(1, nrow(wine)) 145s > wine$rating 145s [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 145s [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 145s Levels: 1 < 2 < 3 < 4 < 5 145s > wts[1] <- 0 145s > fm1 <- clm(rating ~ contact + temp, data=wine, weights=wts) 145s > fm1 145s formula: rating ~ contact + temp 145s data: wine 145s 145s link threshold nobs logLik AIC niter max.grad cond.H 145s logit flexible 71 -85.92 183.84 6(0) 3.43e-12 2.7e+01 145s 145s Coefficients: 145s contactyes tempwarm 145s 1.511 2.482 145s 145s Threshold coefficients: 145s 1|2 2|3 3|4 4|5 145s -1.295 1.220 3.437 4.975 145s > fm1$n ## 72 145s [1] 72 145s > fm1$nobs ## 71 145s [1] 71 145s > confint(fm1) 145s 2.5 % 97.5 % 145s contactyes 0.5951066 2.478924 145s tempwarm 1.4856829 3.577621 145s > plot(profile(fm1)) 145s > plot(slice(fm1), 5) 145s > convergence(fm1) 145s nobs logLik niter max.grad cond.H logLik.Error 145s 71 -85.92 6(0) 3.43e-12 2.7e+01 <1e-10 145s 145s Estimate Std.Err Gradient Error Cor.Dec Sig.Dig 145s 1|2 -1.295 0.5220 7.57e-13 7.84e-14 12 13 145s 2|3 1.220 0.4436 2.65e-12 -1.27e-13 12 13 145s 3|4 3.437 0.6014 -3.43e-12 -7.17e-13 11 12 145s 4|5 4.975 0.7341 -6.06e-14 -7.01e-13 11 12 145s contactyes 1.511 0.4785 1.53e-13 -1.95e-13 12 13 145s tempwarm 2.482 0.5303 -4.07e-13 -4.95e-13 12 13 145s 145s Eigen values of Hessian: 145s 21.7419 18.5476 10.4115 5.2426 4.0755 0.8013 145s 145s Convergence message from clm: 145s (0) successful convergence 145s In addition: Absolute and relative convergence criteria were met 145s 145s > drop1(fm1, test="Chi") 145s Single term deletions 145s 145s Model: 145s rating ~ contact + temp 145s Df AIC LRT Pr(>Chi) 145s 183.84 145s contact 1 192.54 10.698 0.001072 ** 145s temp 1 208.07 26.234 3.024e-07 *** 145s --- 145s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 145s > add1(fm1, scope=~.^2, test="Chi") 145s Single term additions 145s 145s Model: 145s rating ~ contact + temp 145s Df AIC LRT Pr(>Chi) 145s 183.84 145s contact:temp 1 185.66 0.18256 0.6692 145s > ## clm_anova(fm1) 145s > pred <- predict(fm1, newdata=wine) ## OK 145s > step.fm1 <- step(fm1, trace=0) 145s > fitted(fm1) 145s [1] 0.19683278 0.44514183 0.09677403 0.20147980 0.20147980 0.27261558 145s [7] 0.27261558 0.21497073 0.55705124 0.05699435 0.44514183 0.19814731 145s [13] 0.50160837 0.27261558 0.36288756 0.55705124 0.19683278 0.44514183 145s [19] 0.37073110 0.07640020 0.07640020 0.36288756 0.36288756 0.19683278 145s [25] 0.55705124 0.44514183 0.37073110 0.50160837 0.19814731 0.27261558 145s [31] 0.30572865 0.55705124 0.19683278 0.09677403 0.44514183 0.50160837 145s [37] 0.50160837 0.30572865 0.30572865 0.19683278 0.55705124 0.44514183 145s [43] 0.37073110 0.19814731 0.20147980 0.27261558 0.36288756 0.21497073 145s [49] 0.21497073 0.37073110 0.37073110 0.19814731 0.50160837 0.05374460 145s [55] 0.30572865 0.55705124 0.55705124 0.37073110 0.44514183 0.50160837 145s [61] 0.50160837 0.30572865 0.36288756 0.21497073 0.55705124 0.44514183 145s [67] 0.37073110 0.50160837 0.19814731 0.36288756 0.36288756 145s > dim(model.matrix(fm1)$X) 145s [1] 72 3 145s > dim(model.matrix(fm1, "B")$B1) 145s [1] 71 6 145s > mf <- update(fm1, method="model.frame") 145s > str(mf) 145s 'data.frame': 72 obs. of 4 variables: 145s $ rating : Ord.factor w/ 5 levels "1"<"2"<"3"<"4"<..: 2 3 3 4 4 4 5 5 1 2 ... 145s $ contact : Factor w/ 2 levels "no","yes": 1 1 2 2 1 1 2 2 1 1 ... 145s $ temp : Factor w/ 2 levels "cold","warm": 1 1 1 1 2 2 2 2 1 1 ... 145s $ (weights): num 0 1 1 1 1 1 1 1 1 1 ... 145s - attr(*, "terms")=Classes 'terms', 'formula' language rating ~ contact + temp 145s .. ..- attr(*, "variables")= language list(rating, contact, temp) 145s .. ..- attr(*, "factors")= int [1:3, 1:2] 0 1 0 0 0 1 145s .. .. ..- attr(*, "dimnames")=List of 2 145s .. .. .. ..$ : chr [1:3] "rating" "contact" "temp" 145s .. .. .. ..$ : chr [1:2] "contact" "temp" 145s .. ..- attr(*, "term.labels")= chr [1:2] "contact" "temp" 145s .. ..- attr(*, "order")= int [1:2] 1 1 145s .. ..- attr(*, "intercept")= int 1 145s .. ..- attr(*, "response")= int 1 145s .. ..- attr(*, ".Environment")= 145s .. ..- attr(*, "predvars")= language list(rating, contact, temp) 145s .. ..- attr(*, "dataClasses")= Named chr [1:4] "ordered" "factor" "factor" "numeric" 145s .. .. ..- attr(*, "names")= chr [1:4] "rating" "contact" "temp" "(weights)" 145s > wts <- mf$wts 145s > dim(model.matrix(fm1)$X[wts > 0, , drop=FALSE]) 145s [1] 0 3 145s > 145s > fm1b <- clm(rating ~ temp, scale=~contact, data=wine, weights=wts) 145s > summary(fm1b) 145s formula: rating ~ temp 145s scale: ~contact 145s data: wine 145s 145s link threshold nobs logLik AIC niter max.grad cond.H 145s logit flexible 72 -91.92 195.83 8(0) 1.57e-09 5.6e+01 145s 145s Coefficients: 145s Estimate Std. Error z value Pr(>|z|) 145s tempwarm 2.1690 0.5527 3.924 8.69e-05 *** 145s --- 145s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 145s 145s log-scale coefficients: 145s Estimate Std. Error z value Pr(>|z|) 145s contactyes -0.1222 0.2775 -0.44 0.66 145s 145s Threshold coefficients: 145s Estimate Std. Error z value 145s 1|2 -1.8957 0.4756 -3.986 145s 2|3 0.3668 0.3442 1.066 145s 3|4 2.2483 0.5932 3.790 145s 4|5 3.5393 0.8336 4.246 145s > pr <- profile(fm1b) 145s > confint(pr) 145s 2.5 % 97.5 % 145s tempwarm 1.2122036 3.4033767 145s sca.contactyes -0.6721766 0.4156449 145s > plot(pr, 1) 145s > fm1c <- clm(rating ~ temp, nominal=~contact, data=wine, weights=wts) 145s > summary(fm1c) 145s formula: rating ~ temp 145s nominal: ~contact 145s data: wine 145s 145s link threshold nobs logLik AIC niter max.grad cond.H 145s logit flexible 72 -86.21 190.42 6(0) 1.64e-10 4.8e+01 145s 145s Coefficients: 145s Estimate Std. Error z value Pr(>|z|) 145s tempwarm 2.519 0.535 4.708 2.5e-06 *** 145s --- 145s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 145s 145s Threshold coefficients: 145s Estimate Std. Error z value 145s 1|2.(Intercept) -1.3230 0.5623 -2.353 145s 2|3.(Intercept) 1.2464 0.4748 2.625 145s 3|4.(Intercept) 3.5500 0.6560 5.411 145s 4|5.(Intercept) 4.6602 0.8604 5.416 145s 1|2.contactyes -1.6151 1.1618 -1.390 145s 2|3.contactyes -1.5116 0.5906 -2.559 145s 3|4.contactyes -1.6748 0.6488 -2.581 145s 4|5.contactyes -1.0506 0.8965 -1.172 145s > pr <- profile(fm1c) 145s > confint(pr) 145s 2.5 % 97.5 % 145s tempwarm 1.516862 3.629098 145s > plot(pr, 1) 145s > 145s > ## nominal.test(fm1) 145s > ## scale.test(fm1) 145s > 145s > ## zero out an entire response category: 145s > wts2 <- 1 * with(wine, rating != "2") 145s > fm2 <- clm(rating ~ contact + temp, data=wine, weights=wts2) 145s > fm2 145s formula: rating ~ contact + temp 145s data: wine 145s 145s link threshold nobs logLik AIC niter max.grad cond.H 145s logit flexible 50 -46.76 103.52 7(0) 3.56e-13 4.2e+01 145s 145s Coefficients: 145s contactyes tempwarm 145s 1.593 3.062 145s 145s Threshold coefficients: 145s 1|3 3|4 4|5 145s -0.5173 3.6238 5.3657 145s > fm2$n ## 72 145s [1] 72 145s > fm2$nobs ## 50 145s [1] 50 145s > ## Dimension of X and B1, B2 differ: 145s > dim(model.matrix(fm2)$X) 145s [1] 72 3 145s > dim(model.matrix(fm2, "B")$B1) 145s [1] 50 5 145s > ## Cannot directly evaluate predictions on the original data: 145s > try(predict(fm2, newdata=wine), silent=TRUE)[1] 145s [1] "Error in predict.clm(fm2, newdata = wine) : \n response factor 'rating' has new levels\n" 145s > confint(fm2) 145s 2.5 % 97.5 % 145s contactyes 0.4216272 2.876550 145s tempwarm 1.5970977 5.026527 145s > profile(fm2) 145s $contactyes 145s lroot par.vals.1|3 par.vals.3|4 par.vals.4|5 par.vals.contactyes 145s 1 3.4747852 -1.448538968 2.255543944 3.804439509 -0.447374822 145s 2 3.0276372 -1.308493024 2.407453551 3.967827135 -0.192380808 145s 3 2.5822211 -1.174976592 2.565043880 4.140537415 0.062613207 145s 4 2.1395315 -1.048101582 2.728199207 4.322490592 0.317607222 145s 5 1.7005507 -0.927983229 2.896810974 4.513576014 0.572601236 145s 6 1.2662317 -0.814738724 3.070776301 4.713647671 0.827595251 145s 7 0.8374817 -0.708483160 3.249996208 4.922519451 1.082589265 145s 8 0.4151468 -0.609322477 3.434373593 5.139960291 1.337583280 145s 9 0.0000000 -0.517343412 3.623810880 5.365689290 1.592577294 145s 10 -0.4072702 -0.432600941 3.818207180 5.599370818 1.847571309 145s 11 -0.8060673 -0.355104205 4.017454848 5.840609731 2.102565323 145s 12 -1.1958918 -0.284802472 4.221435388 6.088946911 2.357559338 145s 13 -1.5763436 -0.221573075 4.430015019 6.343855637 2.612553352 145s 14 -1.9471215 -0.165213368 4.643040370 6.604739566 2.867547367 145s 15 -2.3080198 -0.115438462 4.860335061 6.870933284 3.122541381 145s 16 -2.6589228 -0.071885700 5.081697900 7.141706504 3.377535396 145s 17 -2.9997972 -0.034125762 5.306903276 7.416272839 3.632529410 145s 18 -3.3306833 -0.001679093 5.535703885 7.693803770 3.887523425 145s par.vals.tempwarm 145s 1 2.840981986 145s 2 2.848907417 145s 3 2.863086150 145s 4 2.883227511 145s 5 2.909025226 145s 6 2.940155181 145s 7 2.976272850 145s 8 3.017010511 145s 9 3.061974244 145s 10 3.110740675 145s 11 3.162853507 145s 12 3.217819929 145s 13 3.275107380 145s 14 3.334141312 145s 15 3.394304942 145s 16 3.454942107 145s 17 3.515364293 145s 18 3.574862708 145s 145s $tempwarm 145s lroot par.vals.1|3 par.vals.3|4 par.vals.4|5 par.vals.contactyes 145s 1 3.4300164 -1.3083735 1.7272573 3.1899360 1.3296606 145s 2 2.8813858 -1.1550431 1.9737448 3.4740817 1.3627908 145s 3 2.3491188 -1.0148529 2.2280703 3.7683888 1.3992293 145s 4 1.8354355 -0.8881411 2.4904988 4.0722937 1.4379639 145s 5 1.3422735 -0.7751174 2.7612331 4.3850175 1.4778669 145s 6 0.8712358 -0.6758159 3.0403898 4.7055883 1.5177348 145s 7 0.4235444 -0.5900448 3.3279674 5.0328829 1.5563515 145s 8 0.0000000 -0.5173434 3.6238109 5.3656893 1.5925773 145s 9 -0.3990485 -0.4569595 3.9275814 5.7027863 1.6254526 145s 10 -0.7737184 -0.4078590 4.2387443 6.0430310 1.6542958 145s 11 -1.1245809 -0.3687765 4.5565843 6.3854348 1.6787668 145s 12 -1.4526173 -0.3383014 4.8802522 6.7292117 1.6988730 145s 13 -1.7591420 -0.3149843 5.2088333 7.0737893 1.7149136 145s 14 -2.0457031 -0.2974396 5.5414220 7.4187857 1.7273842 145s 15 -2.3139760 -0.2844232 5.8771833 7.7639689 1.7368704 145s 16 -2.5656664 -0.2748765 6.2153929 8.1092106 1.7439599 145s 17 -2.8024328 -0.2679376 6.5554528 8.4544482 1.7491850 145s 18 -3.0258332 -0.2629290 6.8968876 8.7996559 1.7529951 145s 19 -3.2372944 -0.2593326 7.2393314 9.1448275 1.7557514 145s 20 -3.4380992 -0.2567600 7.5825083 9.4899654 1.7577335 145s par.vals.tempwarm 145s 1 0.6468007 145s 2 0.9918255 145s 3 1.3368503 145s 4 1.6818751 145s 5 2.0268999 145s 6 2.3719247 145s 7 2.7169495 145s 8 3.0619742 145s 9 3.4069990 145s 10 3.7520238 145s 11 4.0970486 145s 12 4.4420734 145s 13 4.7870982 145s 14 5.1321230 145s 15 5.4771478 145s 16 5.8221726 145s 17 6.1671974 145s 18 6.5122222 145s 19 6.8572470 145s 20 7.2022718 145s 145s attr(,"original.fit") 145s formula: rating ~ contact + temp 145s data: wine 145s 145s link threshold nobs logLik AIC niter max.grad cond.H 145s logit flexible 50 -46.76 103.52 7(0) 3.56e-13 4.2e+01 145s 145s Coefficients: 145s contactyes tempwarm 145s 1.593 3.062 145s 145s Threshold coefficients: 145s 1|3 3|4 4|5 145s -0.5173 3.6238 5.3657 145s attr(,"class") 145s [1] "profile.clm" 145s > plot(slice(fm2), 5) 145s > step.fm2 <- step(fm2, trace=0) 145s > fitted(fm2) 145s [1] 0.60053892 0.77590129 0.09349820 0.27230685 0.27230685 0.32934749 145s [7] 0.32934749 0.37347364 0.10813631 0.77590129 0.60973967 0.32934749 145s [13] 0.40771198 0.60053892 0.77590129 0.09081575 0.09081575 0.40771198 145s [19] 0.40771198 0.60053892 0.77590129 0.60973967 0.32934749 0.25729874 145s [25] 0.60053892 0.09349820 0.77590129 0.60973967 0.60973967 0.25729874 145s [31] 0.25729874 0.60053892 0.77590129 0.27230685 0.32934749 0.40771198 145s [37] 0.37347364 0.37347364 0.60973967 0.25729874 0.77590129 0.60973967 145s [43] 0.60973967 0.25729874 0.40771198 0.37347364 0.77590129 0.60973967 145s [49] 0.40771198 0.40771198 145s > ## Scale and nominal effects: 145s > fm2b <- clm(rating ~ temp, scale=~contact, data=wine, weights=wts2) 145s > summary(fm2b) 145s formula: rating ~ temp 145s scale: ~contact 145s data: wine 145s 145s link threshold nobs logLik AIC niter max.grad cond.H 145s logit flexible 50 -50.35 110.71 9(0) 2.51e-08 1.2e+02 145s 145s Coefficients: 145s Estimate Std. Error z value Pr(>|z|) 145s tempwarm 2.667 1.059 2.519 0.0118 * 145s --- 145s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 145s 145s log-scale coefficients: 145s Estimate Std. Error z value Pr(>|z|) 145s contactyes -0.09812 0.38836 -0.253 0.801 145s 145s Threshold coefficients: 145s Estimate Std. Error z value 145s 1|3 -1.2009 0.5033 -2.386 145s 3|4 2.3219 1.0427 2.227 145s 4|5 3.7986 1.3876 2.738 145s > pr <- profile(fm2b) 145s > confint(pr) 145s 2.5 % 97.5 % 145s tempwarm 1.1319929 6.0851931 145s sca.contactyes -0.8403892 0.7190847 145s > plot(pr, 1) 145s > fm2c <- clm(rating ~ temp, nominal=~contact, data=wine, weights=wts2) 145s > summary(fm2c) 145s formula: rating ~ temp 145s nominal: ~contact 145s data: wine 145s 145s link threshold nobs logLik AIC niter max.grad cond.H 145s logit flexible 50 -46.36 106.72 7(0) 1.22e-12 4.8e+01 145s 145s Coefficients: 145s Estimate Std. Error z value Pr(>|z|) 145s tempwarm 3.1100 0.8529 3.646 0.000266 *** 145s --- 145s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 145s 145s Threshold coefficients: 145s Estimate Std. Error z value 145s 1|3.(Intercept) -0.4250 0.6381 -0.666 145s 3|4.(Intercept) 3.6911 0.9505 3.883 145s 4|5.(Intercept) 4.8968 1.1001 4.451 145s 1|3.contactyes -1.8993 1.2128 -1.566 145s 3|4.contactyes -1.7003 0.7432 -2.288 145s 4|5.contactyes -0.9153 0.9243 -0.990 145s > pr <- profile(fm2c) 145s > confint(pr) 145s 2.5 % 97.5 % 145s tempwarm 1.623761 5.102185 145s > plot(pr, 1) 145s > pred <- predict(fm2c, newdata=wine[!names(wine) %in% "rating"]) 145s > pred <- predict(fm2b, newdata=wine[!names(wine) %in% "rating"]) 145s > 145s > ## nominal.test(fm2) 145s > ## scale.test(fm2) 145s > 145s > ## Different data sets (error): 145s > try(anova(fm1, fm2), silent=TRUE)[1] ## OK 145s [1] "Error in anova.clm(fm1, fm2) : \n models were not all fitted to the same dataset\n" 145s > 145s > ## Test clm.fit: 145s > wts2 <- 1 * with(wine, rating != "2") 145s > mf2 <- update(fm2, method="design") 145s > fm3 <- with(mf2, clm.fit(y, X, weights=wts)) 145s > 145s > ################################# 145s > 145s BEGIN TEST testAnova.clm2.R 145s 145s R version 4.4.3 (2025-02-28) -- "Trophy Case" 145s Copyright (C) 2025 The R Foundation for Statistical Computing 145s Platform: x86_64-pc-linux-gnu 145s 145s R is free software and comes with ABSOLUTELY NO WARRANTY. 145s You are welcome to redistribute it under certain conditions. 145s Type 'license()' or 'licence()' for distribution details. 145s 145s R is a collaborative project with many contributors. 145s Type 'contributors()' for more information and 145s 'citation()' on how to cite R or R packages in publications. 145s 145s Type 'demo()' for some demos, 'help()' for on-line help, or 145s 'help.start()' for an HTML browser interface to help. 145s Type 'q()' to quit R. 145s 145s > library(ordinal) 146s > options(contrasts = c("contr.treatment", "contr.poly")) 146s > 146s > ## More manageable data set: 146s > (tab26 <- with(soup, table("Product" = PROD, "Response" = SURENESS))) 146s Response 146s Product 1 2 3 4 5 6 146s Ref 132 161 65 41 121 219 146s Test 96 99 50 57 156 650 146s > dimnames(tab26)[[2]] <- c("Sure", "Not Sure", "Guess", "Guess", "Not Sure", "Sure") 146s > dat26 <- expand.grid(sureness = as.factor(1:6), prod = c("Ref", "Test")) 146s > dat26$wghts <- c(t(tab26)) 146s > m1 <- clm(sureness ~ prod, scale = ~prod, data = dat26, 146s + weights = wghts, link = "logit") 146s > 146s > ## anova 146s > m2 <- update(m1, scale = ~1) 146s > anova(m1, m2) 146s Likelihood ratio tests of cumulative link models: 146s 146s formula: scale: link: threshold: 146s m2 sureness ~ prod ~1 logit flexible 146s m1 sureness ~ prod ~prod logit flexible 146s 146s no.par AIC logLik LR.stat df Pr(>Chisq) 146s m2 6 5392.7 -2690.3 146s m1 7 5389.5 -2687.7 5.1749 1 0.02292 * 146s --- 146s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 146s > mN1 <- clm(sureness ~ 1, nominal = ~prod, data = dat26, 146s + link = "logit") 146s > anova(m1, mN1) 146s Likelihood ratio tests of cumulative link models: 146s 146s formula: nominal: scale: link: threshold: 146s m1 sureness ~ prod ~1 ~prod logit flexible 146s mN1 sureness ~ 1 ~prod ~1 logit flexible 146s 146s no.par AIC logLik LR.stat df Pr(>Chisq) 146s m1 7 5389.489 -2687.745 146s mN1 10 63.002 -21.501 5332.5 3 < 2.2e-16 *** 146s --- 146s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 146s > anova(m1, m2, mN1) 146s Likelihood ratio tests of cumulative link models: 146s 146s formula: nominal: scale: link: threshold: 146s m2 sureness ~ prod ~1 ~1 logit flexible 146s m1 sureness ~ prod ~1 ~prod logit flexible 146s mN1 sureness ~ 1 ~prod ~1 logit flexible 146s 146s no.par AIC logLik LR.stat df Pr(>Chisq) 146s m2 6 5392.664 -2690.332 146s m1 7 5389.489 -2687.745 5.1749 1 0.02292 * 146s mN1 10 63.002 -21.501 5332.4869 3 < 2e-16 *** 146s --- 146s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 146s > 146s > ## dropterm 146s > if(require(MASS)) { 146s + dropterm(m1, test = "Chi") 146s + mB1 <- clm(SURENESS ~ PROD + GENDER + SOUPTYPE, 146s + scale = ~ COLD, data = soup, link = "probit") 146s + dropterm(mB1, test = "Chi") # or 146s + 146s + ## addterm 146s + addterm(mB1, scope = ~.^2, test = "Chi") 146s + ## addterm(mB1, scope = ~ . + AGEGROUP + SOUPFREQ, 146s + ## test = "Chi", which = "location") 146s + ## addterm(mB1, scope = ~ . + GENDER + SOUPTYPE, 146s + ## test = "Chi", which = "scale") 146s + 146s + ## Fit model from polr example: 146s + ## data(housing, package = "MASS") 146s + 146s + fm1 <- clm(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) 146s + ## addterm(fm1, ~ Infl + Type + Cont, test= "Chisq", which = "scale") 146s + dropterm(fm1, test = "Chisq") 146s + fm2 <- update(fm1, scale =~ Cont) 146s + fm3 <- update(fm1, formula =~.-Cont, nominal =~ Cont) 146s + anova(fm1, fm2, fm3) 146s + } 146s Loading required package: MASS 147s Likelihood ratio tests of cumulative link models: 147s 147s formula: nominal: scale: link: threshold: 147s fm1 Sat ~ Infl + Type + Cont ~1 ~1 logit flexible 147s fm2 Sat ~ Infl + Type + Cont ~1 ~Cont logit flexible 147s fm3 Sat ~ Infl + Type ~Cont ~1 logit flexible 147s 147s no.par AIC logLik LR.stat df Pr(>Chisq) 147s fm1 8 3495.1 -1739.6 147s fm2 9 3491.5 -1736.7 5.6559 1 0.0174 * 147s fm3 9 3494.7 -1738.4 -3.2113 0 147s --- 147s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 147s > 147s > 147s BEGIN TEST testCLM.R 147s 147s R version 4.4.3 (2025-02-28) -- "Trophy Case" 147s Copyright (C) 2025 The R Foundation for Statistical Computing 147s Platform: x86_64-pc-linux-gnu 147s 147s R is free software and comes with ABSOLUTELY NO WARRANTY. 147s You are welcome to redistribute it under certain conditions. 147s Type 'license()' or 'licence()' for distribution details. 147s 147s R is a collaborative project with many contributors. 147s Type 'contributors()' for more information and 147s 'citation()' on how to cite R or R packages in publications. 147s 147s Type 'demo()' for some demos, 'help()' for on-line help, or 147s 'help.start()' for an HTML browser interface to help. 147s Type 'q()' to quit R. 147s 147s > library(ordinal) 148s > options(contrasts = c("contr.treatment", "contr.poly")) 148s > ## library(devtools) 148s > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal" 148s > ## clean_dll(pkg = r2path) 148s > ## load_all(r2path) 148s > 148s > ## More manageable data set: 148s > data(soup, package="ordinal") 148s > (tab26 <- with(soup, table("Product" = PROD, "Response" = SURENESS))) 148s Response 148s Product 1 2 3 4 5 6 148s Ref 132 161 65 41 121 219 148s Test 96 99 50 57 156 650 148s > dimnames(tab26)[[2]] <- c("Sure", "Not Sure", "Guess", "Guess", "Not Sure", "Sure") 148s > dat26 <- expand.grid(sureness = as.factor(1:6), prod = c("Ref", "Test")) 148s > dat26$wghts <- c(t(tab26)) 148s > m1 <- clm(sureness ~ prod, scale = ~prod, data = dat26, 148s + weights = wghts, link = "logit") 148s > ## print, summary, vcov, logLik, AIC: 148s > m1 148s formula: sureness ~ prod 148s scale: ~prod 148s data: dat26 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 148s 148s Coefficients: 148s prodTest 148s 1.296 148s 148s log-scale coefficients: 148s prodTest 148s 0.148 148s 148s Threshold coefficients: 148s 1|2 2|3 3|4 4|5 5|6 148s -1.4913 -0.4522 -0.1072 0.1634 0.8829 148s > summary(m1) 148s formula: sureness ~ prod 148s scale: ~prod 148s data: dat26 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s prodTest 1.296 0.119 10.89 <2e-16 *** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s prodTest 0.1480 0.0651 2.273 0.023 * 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.49126 0.09215 -16.183 148s 2|3 -0.45218 0.07182 -6.296 148s 3|4 -0.10721 0.06995 -1.533 148s 4|5 0.16337 0.07025 2.325 148s 5|6 0.88291 0.07957 11.096 148s > vcov(m1) 148s 1|2 2|3 3|4 4|5 5|6 148s 1|2 0.0084917417 0.0046258673 0.0038492096 0.003316006 0.002036170 148s 2|3 0.0046258673 0.0051586967 0.0044974099 0.004099300 0.003352323 148s 3|4 0.0038492096 0.0044974099 0.0048935739 0.004528181 0.003948048 148s 4|5 0.0033160059 0.0040993002 0.0045281811 0.004935721 0.004489054 148s 5|6 0.0020361699 0.0033523229 0.0039480481 0.004489054 0.006331523 148s prodTest 0.0009111749 0.0031074167 0.0039832831 0.004738959 0.007064828 148s prodTest -0.0024312129 -0.0007825923 -0.0001820514 0.000338977 0.001989991 148s prodTest prodTest 148s 1|2 0.0009111749 -0.0024312129 148s 2|3 0.0031074167 -0.0007825923 148s 3|4 0.0039832831 -0.0001820514 148s 4|5 0.0047389591 0.0003389770 148s 5|6 0.0070648284 0.0019899912 148s prodTest 0.0141687135 0.0045752922 148s prodTest 0.0045752922 0.0042385585 148s > 148s > logLik(m1) 148s 'log Lik.' -2687.745 (df=7) 148s > ll.m1 <- structure(-2687.74456343981, df = 7L, nobs = 1847, 148s + class = "logLik") 148s > stopifnot(all.equal(logLik(m1), ll.m1)) 148s > 148s > AIC(m1) 148s [1] 5389.489 148s > 148s > coef(m1) 148s 1|2 2|3 3|4 4|5 5|6 prodTest prodTest 148s -1.4912570 -0.4521846 -0.1072083 0.1633653 0.8829135 1.2958776 0.1479862 148s > cm1 <- c(-1.49125702755587, -0.45218462707814, -0.107208315524318, 0.163365282774162, 148s + 0.88291347877514, 1.29587762626394, 0.147986162902775) 148s > stopifnot(all.equal(as.vector(coef(m1)), cm1)) 148s > 148s > coef(summary(m1)) 148s Estimate Std. Error z value Pr(>|z|) 148s 1|2 -1.4912570 0.09215065 -16.182817 6.667319e-59 148s 2|3 -0.4521846 0.07182407 -6.295726 3.059652e-10 148s 3|4 -0.1072083 0.06995408 -1.532553 1.253861e-01 148s 4|5 0.1633653 0.07025469 2.325329 2.005437e-02 148s 5|6 0.8829135 0.07957087 11.095938 1.312749e-28 148s prodTest 1.2958776 0.11903241 10.886763 1.332938e-27 148s prodTest 0.1479862 0.06510421 2.273066 2.302222e-02 148s > csm1 <- structure(c(-1.49125702755587, -0.45218462707814, -0.107208315524318, 148s + 0.163365282774162, 0.88291347877514, 1.29587762626394, 0.147986162902775, 148s + 0.0921506468161812, 0.0718240681909781, 0.069954084652323, 0.0702546879687391, 148s + 0.0795708692869622, 0.119032405993894, 0.065104213008022, -16.1828167145758, 148s + -6.2957256316336, -1.53255261729392, 2.32532927691394, 11.0959385851501, 148s + 10.8867632762999, 2.27306584421104, 6.66732036748908e-59, 3.05965144996025e-10, 148s + 0.125386123756898, 0.0200543599621069, 1.31274723412040e-28, 148s + 1.33293711602276e-27, 0.0230222123418036), .Dim = c(7L, 4L), .Dimnames = list( 148s + c("1|2", "2|3", "3|4", "4|5", "5|6", "prodTest", "prodTest" 148s + ), c("Estimate", "Std. Error", "z value", "Pr(>|z|)"))) 148s > stopifnot(all.equal(coef(summary(m1)), csm1)) 148s > 148s > ## link functions: 148s > m2 <- update(m1, link = "probit") 148s > m3 <- update(m1, link = "cloglog") 148s > 148s > m4 <- update(m1, link = "loglog") 148s > m5 <- update(m1, link = "cauchit", start = coef(m1)) 148s > ## m6 <- update(m1, link = "Aranda-Ordaz", lambda = 1) 148s > ## m7 <- update(m1, link = "Aranda-Ordaz") 148s > ## m8 <- update(m1, link = "log-gamma", lambda = 1) 148s > ## m9 <- update(m1, link = "log-gamma") 148s > ## nominal effects: 148s > mN1 <- clm(sureness ~ 1, nominal = ~ prod, data = dat26, 148s + weights = wghts) 148s > anova(m1, mN1) 148s Likelihood ratio tests of cumulative link models: 148s 148s formula: nominal: scale: link: threshold: 148s m1 sureness ~ prod ~1 ~prod logit flexible 148s mN1 sureness ~ 1 ~prod ~1 logit flexible 148s 148s no.par AIC logLik LR.stat df Pr(>Chisq) 148s m1 7 5389.5 -2687.7 148s mN1 10 5390.1 -2685.1 5.3755 3 0.1463 148s > ## optimizer / method: 148s > update(m1, scale = ~ 1, method = "Newton") 148s formula: sureness ~ prod 148s scale: ~1 148s data: dat26 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1847 -2690.33 5392.66 6(1) 3.44e-12 1.1e+02 148s 148s Coefficients: 148s prodTest 148s 1.144 148s 148s Threshold coefficients: 148s 1|2 2|3 3|4 4|5 5|6 148s -1.4050 -0.4247 -0.1013 0.1508 0.8126 148s > update(m1, scale = ~ 1, method = "ucminf") 148s formula: sureness ~ prod 148s scale: ~1 148s data: dat26 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1847 -2690.33 5392.66 18(0) 3.36e-06 1.1e+02 148s 148s Coefficients: 148s prodTest 148s 1.144 148s 148s Threshold coefficients: 148s 1|2 2|3 3|4 4|5 5|6 148s -1.4050 -0.4247 -0.1013 0.1508 0.8126 148s > update(m1, scale = ~ 1, method = "nlminb") 148s Warning message: 148s (-1) Model failed to converge with max|grad| = 3.36378e-06 (tol = 1e-06) 148s formula: sureness ~ prod 148s scale: ~1 148s data: dat26 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1847 -2690.33 5392.66 56(43) 4.13e-03 1.1e+02 148s 148s Coefficients: 148s prodTest 148s 1.144 148s 148s Threshold coefficients: 148s 1|2 2|3 3|4 4|5 5|6 148s -1.4050 -0.4247 -0.1013 0.1508 0.8126 148s > update(m1, scale = ~ 1, method = "optim") 148s Warning message: 148s (-1) Model failed to converge with max|grad| = 0.00413248 (tol = 1e-06) 148s formula: sureness ~ prod 148s scale: ~1 148s data: dat26 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1847 -2690.33 5392.66 44(12) 4.73e-03 1.1e+02 148s 148s Coefficients: 148s prodTest 148s 1.144 148s 148s Threshold coefficients: 148s 1|2 2|3 3|4 4|5 5|6 148s -1.4050 -0.4247 -0.1013 0.1508 0.8126 148s > update(m1, scale = ~ 1, method = "model.frame") 148s sureness prod (weights) 148s 1 1 Ref 132 148s 2 2 Ref 161 148s 3 3 Ref 65 148s 4 4 Ref 41 148s 5 5 Ref 121 148s 6 6 Ref 219 148s 7 1 Test 96 148s 8 2 Test 99 148s 9 3 Test 50 148s 10 4 Test 57 148s 11 5 Test 156 148s 12 6 Test 650 148s > update(m1, ~.-prod, scale = ~ 1, 148s + nominal = ~ prod, method = "model.frame") 148s sureness prod (weights) 148s 1 1 Ref 132 148s 2 2 Ref 161 148s 3 3 Ref 65 148s 4 4 Ref 41 148s 5 5 Ref 121 148s 6 6 Ref 219 148s 7 1 Test 96 148s 8 2 Test 99 148s 9 3 Test 50 148s 10 4 Test 57 148s 11 5 Test 156 148s 12 6 Test 650 148s > ## threshold functions 148s > mT1 <- update(m1, threshold = "symmetric") 148s Warning message: 148s (-1) Model failed to converge with max|grad| = 0.00472568 (tol = 1e-06) 148s > mT2 <- update(m1, threshold = "equidistant") 148s > anova(m1, mT1, mT2) 148s Likelihood ratio tests of cumulative link models: 148s 148s formula: scale: link: threshold: 148s mT2 sureness ~ prod ~prod logit equidistant 148s mT1 sureness ~ prod ~prod logit symmetric 148s m1 sureness ~ prod ~prod logit flexible 148s Loading required package: MASS 148s 148s no.par AIC logLik LR.stat df Pr(>Chisq) 148s mT2 4 5585.6 -2788.8 148s mT1 5 5407.8 -2698.9 179.806 1 < 2.2e-16 *** 148s m1 7 5389.5 -2687.7 22.271 2 1.459e-05 *** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s > 148s > ## Extend example from polr in package MASS: 148s > ## Fit model from polr example: 148s > if(require(MASS)) { 148s + fm1 <- clm(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) 148s + fm1 148s + summary(fm1) 148s + ## With probit link: 148s + summary(update(fm1, link = "probit")) 148s + ## Allow scale to depend on Cont-variable 148s + summary(fm2 <- update(fm1, scale =~ Cont)) 148s + summary(fm3 <- update(fm1, location =~.-Cont, nominal =~ Cont)) 148s + summary(fm4 <- update(fm2, location =~.-Cont, nominal =~ Cont)) 148s + anova(fm1, fm2, fm3, fm4) 148s + ## which seems to improve the fit 148s + } 148s Likelihood ratio tests of cumulative link models: 148s 148s formula: nominal: scale: link: threshold: 148s fm1 Sat ~ Infl + Type + Cont ~1 ~1 logit flexible 148s fm2 Sat ~ Infl + Type + Cont ~1 ~Cont logit flexible 148s fm3 Sat ~ Infl + Type + Cont ~Cont ~1 logit flexible 148s fm4 Sat ~ Infl + Type + Cont ~Cont ~Cont logit flexible 148s 148s no.par AIC logLik LR.stat df Pr(>Chisq) 148s fm1 8 3495.1 -1739.6 148s fm2 9 3491.5 -1736.7 5.6559 1 0.01740 * 148s fm3 9 3494.7 -1738.4 -3.2113 0 148s fm4 10 3492.5 -1736.2 4.2190 1 0.03997 * 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s > 148s > ################################# 148s > ## Better handling of ill-defined variance-covariance matrix of the 148s > ## parameters in summary methods for clm and clmm objects: 148s > dat26.2 <- data.frame(sureness = as.factor(1:12), 148s + prod = rep(c("One", "Two", "Three"),each=4)) 148s > fm1 <- clm(sureness ~ prod, ~prod, data = dat26.2) 148s Warning message: 148s (1) Hessian is numerically singular: parameters are not uniquely determined 148s In addition: Absolute convergence criterion was met, but relative criterion was not met 148s > fm1 148s formula: sureness ~ prod 148s scale: ~prod 148s data: dat26.2 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 12 -16.64 63.27 33(14) 6.18e-07 2.0e+12 148s 148s Coefficients: 148s prodThree prodTwo 148s 90.72 46.65 148s 148s log-scale coefficients: 148s prodThree prodTwo 148s -0.11719 -0.09167 148s 148s Threshold coefficients: 148s 1|2 2|3 3|4 4|5 5|6 6|7 7|8 148s -1.099e+00 2.045e-16 1.099e+00 2.441e+01 4.564e+01 4.665e+01 4.765e+01 148s 8|9 9|10 10|11 11|12 148s 6.888e+01 8.975e+01 9.072e+01 9.170e+01 148s > summary(fm1) 148s formula: sureness ~ prod 148s scale: ~prod 148s data: dat26.2 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 12 -16.64 63.27 33(14) 6.18e-07 2.0e+12 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s prodThree 90.72 NA NA NA 148s prodTwo 46.65 NA NA NA 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s prodThree -0.11719 NA NA NA 148s prodTwo -0.09167 NA NA NA 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.099e+00 NA NA 148s 2|3 2.045e-16 NA NA 148s 3|4 1.099e+00 NA NA 148s 4|5 2.441e+01 NA NA 148s 5|6 4.564e+01 NA NA 148s 6|7 4.665e+01 NA NA 148s 7|8 4.765e+01 NA NA 148s 8|9 6.888e+01 NA NA 148s 9|10 8.975e+01 NA NA 148s 10|11 9.072e+01 NA NA 148s 11|12 9.170e+01 NA NA 148s > summary(fm1, corr = 1) 148s formula: sureness ~ prod 148s scale: ~prod 148s data: dat26.2 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 12 -16.64 63.27 33(14) 6.18e-07 2.0e+12 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s prodThree 90.72 NA NA NA 148s prodTwo 46.65 NA NA NA 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s prodThree -0.11719 NA NA NA 148s prodTwo -0.09167 NA NA NA 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.099e+00 NA NA 148s 2|3 2.045e-16 NA NA 148s 3|4 1.099e+00 NA NA 148s 4|5 2.441e+01 NA NA 148s 5|6 4.564e+01 NA NA 148s 6|7 4.665e+01 NA NA 148s 7|8 4.765e+01 NA NA 148s 8|9 6.888e+01 NA NA 148s 9|10 8.975e+01 NA NA 148s 10|11 9.072e+01 NA NA 148s 11|12 9.170e+01 NA NA 148s > ## fm1$Hessian 148s > ## sl1 <- slice(fm1, 13) 148s > ## fitted(fm1) 148s > ## convergence(fm1) 148s > ## eigen(fm1$Hessian)$values 148s > ## sqrt(diag(solve(fm1$Hessian))) 148s > ## sqrt(diag(ginv(fm1$Hessian))) 148s > 148s > ################################# 148s > ## Missing values: 148s > ## Bug-report from Jonathan Williams 148s > ## , 18 March 2010 12:42 148s > data(soup, package = "ordinal") 148s > soup$SURENESS[10] <- NA 148s > c1a <- clm(ordered(SURENESS)~PROD, data=soup); summary(c1a) 148s Warning message: 148s In summary.clm(fm1, corr = 1) : Correlation matrix is unavailable 148s formula: ordered(SURENESS) ~ PROD 148s data: soup 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1846 -2688.71 5389.43 6(1) 2.49e-12 1.1e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 1.14251 0.08931 12.79 <2e-16 *** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.40460 0.08174 -17.184 148s 2|3 -0.42733 0.06965 -6.135 148s 3|4 -0.10357 0.06884 -1.505 148s 4|5 0.14862 0.06898 2.155 148s 5|6 0.81063 0.07185 11.282 148s (1 observation deleted due to missingness) 148s > c2a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup) 148s > summary(c2a) 148s formula: ordered(SURENESS) ~ PROD 148s scale: ~PROD 148s data: soup 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1846 -2686.16 5386.32 8(1) 4.81e-07 1.0e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 1.293 0.119 10.87 <2e-16 *** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 0.14711 0.06514 2.258 0.0239 * 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.49041 0.09219 -16.166 148s 2|3 -0.45478 0.07189 -6.326 148s 3|4 -0.10961 0.07000 -1.566 148s 4|5 0.16104 0.07029 2.291 148s 5|6 0.88052 0.07959 11.064 148s (1 observation deleted due to missingness) 148s > c3a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup) 148s > summary(c3a) 148s formula: ordered(SURENESS) ~ 1 148s scale: ~PROD 148s data: soup 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1846 -2769.95 5551.91 10(1) 3.37e-13 6.9e+01 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest -0.15478 0.06683 -2.316 0.0206 * 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.85565 0.08111 -22.878 148s 2|3 -0.98626 0.05260 -18.752 148s 3|4 -0.70743 0.04676 -15.129 148s 4|5 -0.49243 0.04393 -11.208 148s 5|6 0.06504 0.04653 1.398 148s (1 observation deleted due to missingness) 148s > data(soup, package = "ordinal") 148s > soup$PROD[1] <- NA 148s > c1a <- clm(ordered(SURENESS)~PROD, data=soup) 148s > summary(c1a) 148s formula: ordered(SURENESS) ~ PROD 148s data: soup 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1846 -2689.15 5390.30 6(1) 3.37e-12 1.1e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 1.14774 0.08932 12.85 <2e-16 *** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.40278 0.08171 -17.167 148s 2|3 -0.42216 0.06962 -6.064 148s 3|4 -0.09849 0.06882 -1.431 148s 4|5 0.15373 0.06898 2.229 148s 5|6 0.81613 0.07188 11.353 148s (1 observation deleted due to missingness) 148s > c2a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup) 148s > summary(c2a) 148s formula: ordered(SURENESS) ~ PROD 148s scale: ~PROD 148s data: soup 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1846 -2686.51 5387.03 8(1) 5.41e-07 1.0e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 1.3009 0.1192 10.91 <2e-16 *** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 0.1494 0.0651 2.295 0.0217 * 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.48982 0.09217 -16.163 148s 2|3 -0.44981 0.07186 -6.260 148s 3|4 -0.10441 0.07000 -1.492 148s 4|5 0.16655 0.07031 2.369 148s 5|6 0.88740 0.07969 11.136 148s (1 observation deleted due to missingness) 148s > c3a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup) 148s > summary(c3a) 148s formula: ordered(SURENESS) ~ 1 148s scale: ~PROD 148s data: soup 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1846 -2771.22 5554.43 10(1) 7.51e-13 6.9e+01 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest -0.15330 0.06689 -2.292 0.0219 * 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.85700 0.08108 -22.903 148s 2|3 -0.98437 0.05252 -18.742 148s 3|4 -0.70562 0.04673 -15.100 148s 4|5 -0.49061 0.04395 -11.163 148s 5|6 0.06723 0.04667 1.441 148s (1 observation deleted due to missingness) 148s > soup$SURENESS[10] <- NA 148s > c1a <- clm(ordered(SURENESS)~PROD, data=soup) 148s > summary(c1a) 148s formula: ordered(SURENESS) ~ PROD 148s data: soup 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1845 -2687.53 5387.07 6(1) 2.94e-12 1.1e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 1.14581 0.08934 12.82 <2e-16 *** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.40237 0.08175 -17.155 148s 2|3 -0.42475 0.06968 -6.096 148s 3|4 -0.10080 0.06887 -1.464 148s 4|5 0.15158 0.06902 2.196 148s 5|6 0.81421 0.07191 11.322 148s (2 observations deleted due to missingness) 148s > c2a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup) 148s > summary(c2a) 148s formula: ordered(SURENESS) ~ PROD 148s scale: ~PROD 148s data: soup 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1845 -2684.93 5383.86 8(1) 5.12e-07 1.0e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 1.2979 0.1192 10.89 <2e-16 *** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 0.14853 0.06514 2.28 0.0226 * 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.48896 0.09222 -16.147 148s 2|3 -0.45241 0.07192 -6.290 148s 3|4 -0.10681 0.07004 -1.525 148s 4|5 0.16422 0.07034 2.335 148s 5|6 0.88500 0.07970 11.104 148s (2 observations deleted due to missingness) 148s > c3a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup) 148s > summary(c3a) 148s formula: ordered(SURENESS) ~ 1 148s scale: ~PROD 148s data: soup 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1845 -2769.23 5550.46 10(1) 9.65e-13 6.9e+01 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest -0.15410 0.06688 -2.304 0.0212 * 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.85563 0.08111 -22.877 148s 2|3 -0.98586 0.05259 -18.745 148s 3|4 -0.70689 0.04676 -15.116 148s 4|5 -0.49176 0.04395 -11.188 148s 5|6 0.06616 0.04661 1.419 148s (2 observations deleted due to missingness) 148s > 148s > ## na.actions: 148s > c4a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 148s + na.action=na.omit) 148s > summary(c4a) 148s formula: ordered(SURENESS) ~ PROD 148s scale: ~PROD 148s data: soup 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1845 -2684.93 5383.86 8(1) 5.12e-07 1.0e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 1.2979 0.1192 10.89 <2e-16 *** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 0.14853 0.06514 2.28 0.0226 * 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.48896 0.09222 -16.147 148s 2|3 -0.45241 0.07192 -6.290 148s 3|4 -0.10681 0.07004 -1.525 148s 4|5 0.16422 0.07034 2.335 148s 5|6 0.88500 0.07970 11.104 148s (2 observations deleted due to missingness) 148s > 148s > tC1 <- try(clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 148s + na.action=na.fail), silent = TRUE) 148s > stopifnot(inherits(tC1, "try-error")) 148s > 148s > c4a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 148s + na.action=na.exclude) 148s > summary(c4a) 148s formula: ordered(SURENESS) ~ PROD 148s scale: ~PROD 148s data: soup 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1845 -2684.93 5383.86 8(1) 5.12e-07 1.0e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 1.2979 0.1192 10.89 <2e-16 *** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 0.14853 0.06514 2.28 0.0226 * 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.48896 0.09222 -16.147 148s 2|3 -0.45241 0.07192 -6.290 148s 3|4 -0.10681 0.07004 -1.525 148s 4|5 0.16422 0.07034 2.335 148s 5|6 0.88500 0.07970 11.104 148s (2 observations deleted due to missingness) 148s > 148s > tC2 <- try(clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 148s + na.action=na.pass), silent = TRUE) 148s > stopifnot(inherits(tC2, "try-error")) 148s > 148s > ## Subset: 148s > data(soup, package="ordinal") 148s > c4a <- clm(ordered(SURENESS)~PROD, scale = ~PROD, data=soup, 148s + subset = 1:100) 148s > c4a <- clm(ordered(SURENESS)~1, scale = ~PROD, data=soup, 148s + subset = 1:100) 148s > c4a <- clm(ordered(SURENESS)~PROD, data=soup, 148s + subset = 1:100) 148s > c4a <- clm(ordered(SURENESS)~1, data=soup, 148s + subset = 1:100) 148s > 148s > ## Offset: 148s > data(soup, package = "ordinal") 148s > set.seed(290980) 148s > offs <- runif(nrow(soup)) 148s > c4a <- clm(ordered(SURENESS)~PROD + offset(offs), 148s + scale = ~PROD, data=soup, subset = 1:100) 148s > summary(c4a) 148s formula: ordered(SURENESS) ~ PROD + offset(offs) 148s scale: ~PROD 148s data: soup 148s subset: 1:100 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 100 -139.58 293.17 9(2) 1.41e-07 2.0e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 2.4410 0.7091 3.443 0.000576 *** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 0.5105 0.2671 1.911 0.056 . 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.0470 0.4019 -2.605 148s 2|3 0.4213 0.3106 1.356 148s 3|4 0.5488 0.3106 1.767 148s 4|5 0.9217 0.3162 2.915 148s 5|6 2.0775 0.4062 5.114 148s > 148s > c4a <- clm(ordered(SURENESS)~PROD + offset(offs), 148s + scale = ~PROD + offset(offs), data=soup, subset = 1:100) 148s > summary(c4a) 148s formula: ordered(SURENESS) ~ PROD + offset(offs) 148s scale: ~PROD + offset(offs) 148s data: soup 148s subset: 1:100 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 100 -143.12 300.24 9(2) 5.32e-09 1.9e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 3.344 1.020 3.277 0.00105 ** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 0.4412 0.2753 1.603 0.109 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -2.09797 0.62565 -3.353 148s 2|3 0.06671 0.46874 0.142 148s 3|4 0.25559 0.46525 0.549 148s 4|5 0.80178 0.46743 1.715 148s 5|6 2.46041 0.59193 4.157 148s > 148s > off2 <- offs 148s > c4a <- clm(ordered(SURENESS)~PROD + offset(offs), 148s + scale = ~PROD + offset(off2), data=soup, subset = 1:100) 148s > summary(c4a) 148s formula: ordered(SURENESS) ~ PROD + offset(offs) 148s scale: ~PROD + offset(off2) 148s data: soup 148s subset: 1:100 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 100 -143.12 300.24 9(2) 5.32e-09 1.9e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 3.344 1.020 3.277 0.00105 ** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 0.4412 0.2753 1.603 0.109 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -2.09797 0.62565 -3.353 148s 2|3 0.06671 0.46874 0.142 148s 3|4 0.25559 0.46525 0.549 148s 4|5 0.80178 0.46743 1.715 148s 5|6 2.46041 0.59193 4.157 148s > 148s > c4a <- clm(ordered(SURENESS)~PROD, 148s + scale = ~PROD + offset(offs), data=soup, subset = 1:100) 148s > summary(c4a) 148s formula: ordered(SURENESS) ~ PROD 148s scale: ~PROD + offset(offs) 148s data: soup 148s subset: 1:100 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 100 -142.15 298.31 10(2) 7.69e-10 1.8e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 3.283 1.016 3.231 0.00123 ** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 0.4263 0.2801 1.522 0.128 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -2.4698 0.6308 -3.915 148s 2|3 -0.2916 0.4668 -0.625 148s 3|4 -0.1005 0.4628 -0.217 148s 4|5 0.4484 0.4638 0.967 148s 5|6 2.1036 0.5864 3.587 148s > 148s > ## data as matrix: 148s > dat26M <- as.matrix(dat26) 148s > m1 <- clm(sureness ~ prod, scale = ~prod, data = dat26, 148s + weights = wghts, link = "logit") 148s > summary(m1) 148s formula: sureness ~ prod 148s scale: ~prod 148s data: dat26 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s prodTest 1.296 0.119 10.89 <2e-16 *** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s prodTest 0.1480 0.0651 2.273 0.023 * 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.49126 0.09215 -16.183 148s 2|3 -0.45218 0.07182 -6.296 148s 3|4 -0.10721 0.06995 -1.533 148s 4|5 0.16337 0.07025 2.325 148s 5|6 0.88291 0.07957 11.096 148s > 148s > ## data in enclosing environment: 148s > attach(soup) 148s > m1 <- clm(SURENESS ~ PROD, scale = ~PROD) 148s > summary(m1) 148s formula: SURENESS ~ PROD 148s scale: ~PROD 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 1847 -2687.74 5389.49 8(1) 5.09e-07 1.0e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 1.296 0.119 10.89 <2e-16 *** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s PRODTest 0.1480 0.0651 2.273 0.023 * 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -1.49126 0.09215 -16.183 148s 2|3 -0.45218 0.07182 -6.296 148s 3|4 -0.10721 0.06995 -1.533 148s 4|5 0.16337 0.07025 2.325 148s 5|6 0.88291 0.07957 11.096 148s > detach(soup) 148s > 148s > ################################################################## 148s > ### Parameter estimates were not correct with large scale effects due 148s > ### to end cut-points being \pm 100. This is not enough for 148s > ### location-scale model, but seems to be for location only models. 148s > ### Bug report from Ioannis Kosmidis : 148s > 148s > ### A 2x3 contigency table that will give a large estimated value of 148s > ### zeta 148s > x <- rep(0:1, each = 3) 148s > response <- factor(rep(c(1, 2, 3), times = 2)) 148s > freq <- c(1, 11, 1, 13, 1, 14) 148s > totals <- rep(tapply(freq, x, sum), each = 3) 148s > Dat <- data.frame(response, x, freq) 148s > 148s > ### Fitting a cumulative link model with dispersion effects 148s > modClm <- clm(response ~ x, scale = ~ x, weights = freq, data = Dat, 148s + control = clm.control(grtol = 1e-10, convTol = 1e-10)) 148s > summary(modClm) 148s formula: response ~ x 148s scale: ~x 148s data: Dat 148s 148s link threshold nobs logLik AIC niter max.grad cond.H 148s logit flexible 41 -29.98 67.96 10(3) 9.23e-10 2.4e+02 148s 148s Coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s x 2.485 13.168 0.189 0.85 148s 148s log-scale coefficients: 148s Estimate Std. Error z value Pr(>|z|) 148s x 3.548 1.023 3.468 0.000524 *** 148s --- 148s Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 148s 148s Threshold coefficients: 148s Estimate Std. Error z value 148s 1|2 -2.485 1.041 -2.387 148s 2|3 2.485 1.041 2.387 148s > ### The maximized log-likelihood for this saturated model should be 148s > sum(freq*log(freq/totals)) 148s [1] -29.97808 148s > # > sum(freq*log(freq/totals)) 148s > # [1] -29.97808 148s > ### but apparently clm fails to maximixe the log-likelihood 148s > modClm$logLik 148s [1] -29.97808 148s > # > modClm$logLik 148s > # [1] -30.44452 148s > stopifnot(isTRUE(all.equal(sum(freq*log(freq/totals)), modClm$logLik))) 148s > 148s > ### The estimates reported by clm are 148s > coef(modClm) 148s 1|2 2|3 x x 148s -2.484907 2.484907 2.484907 3.547588 148s > coef.res <- structure(c(-2.48490664104217, 2.48490665578163, 148s + 2.48490659188594, 148s + 3.54758796387530), .Names = c("1|2", "2|3", 148s + "x", "x")) 148s > stopifnot(isTRUE(all.equal(coef.res, coef(modClm)))) 148s > # > modClm$coefficients 148s > # 1|2 2|3 x x 148s > # -2.297718 2.297038 1.239023 2.834285 148s > ### while they should be (from my own software) 148s > # 1|2 2|3 x disp.x 148s > #-2.484907 2.484907 2.484907 3.547588 148s > convergence(modClm) 148s nobs logLik niter max.grad cond.H logLik.Error 148s 41 -29.98 10(3) 9.23e-10 2.4e+02 <1e-10 148s 148s Estimate Std.Err Gradient Error Cor.Dec Sig.Dig 148s 1|2 -2.485 1.041 3.50e-10 5.32e-10 8 9 148s 2|3 2.485 1.041 -1.60e-10 -5.32e-10 8 9 148s x 2.485 13.168 -1.90e-10 -3.54e-08 7 8 148s x 3.548 1.023 -9.23e-10 -1.55e-09 8 9 148s 148s Eigen values of Hessian: 148s 1.374792 0.855786 0.785151 0.005766 148s 148s Convergence message from clm: 148s (0) successful convergence 148s In addition: Absolute and relative convergence criteria were met 148s 148s > 148s > ################################################################## 148s > 149s autopkgtest [18:55:01]: test run-unit-test: -----------------------] 149s autopkgtest [18:55:01]: test run-unit-test: - - - - - - - - - - results - - - - - - - - - - 149s run-unit-test PASS 149s autopkgtest [18:55:01]: test pkg-r-autopkgtest: preparing testbed 214s autopkgtest [18:56:06]: testbed dpkg architecture: amd64 214s autopkgtest [18:56:06]: testbed apt version: 3.0.0 215s autopkgtest [18:56:07]: @@@@@@@@@@@@@@@@@@@@ test bed setup 215s autopkgtest [18:56:07]: testbed release detected to be: questing 215s autopkgtest [18:56:07]: updating testbed package index (apt update) 216s Get:1 http://ftpmaster.internal/ubuntu questing-proposed InRelease [110 kB] 216s Hit:2 http://ftpmaster.internal/ubuntu questing InRelease 216s Hit:3 http://ftpmaster.internal/ubuntu questing-updates InRelease 216s Hit:4 http://ftpmaster.internal/ubuntu questing-security InRelease 216s Get:5 http://ftpmaster.internal/ubuntu questing-proposed/multiverse Sources [33.7 kB] 216s Get:6 http://ftpmaster.internal/ubuntu questing-proposed/main Sources [149 kB] 216s Get:7 http://ftpmaster.internal/ubuntu questing-proposed/universe Sources [1442 kB] 217s Get:8 http://ftpmaster.internal/ubuntu questing-proposed/main i386 Packages [146 kB] 217s Get:9 http://ftpmaster.internal/ubuntu questing-proposed/main amd64 Packages [203 kB] 217s Get:10 http://ftpmaster.internal/ubuntu questing-proposed/universe amd64 Packages [1424 kB] 217s Get:11 http://ftpmaster.internal/ubuntu questing-proposed/universe i386 Packages [576 kB] 217s Get:12 http://ftpmaster.internal/ubuntu questing-proposed/multiverse i386 Packages [23.1 kB] 217s Get:13 http://ftpmaster.internal/ubuntu questing-proposed/multiverse amd64 Packages [48.6 kB] 217s Fetched 4155 kB in 1s (3565 kB/s) 218s Reading package lists... 219s autopkgtest [18:56:11]: upgrading testbed (apt dist-upgrade and autopurge) 219s Reading package lists... 219s Building dependency tree... 219s Reading state information... 220s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 220s Starting 2 pkgProblemResolver with broken count: 0 220s Done 221s Entering ResolveByKeep 221s 221s Calculating upgrade... 222s The following packages will be upgraded: 222s cloud-init cloud-init-base debianutils libmbim-glib4 libmbim-proxy 222s libnftnl11 libqmi-glib5 libqmi-proxy libsepol2 python3-lazr.restfulclient 222s sos 222s 11 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 222s Need to get 2693 kB of archives. 222s After this operation, 104 kB disk space will be freed. 222s Get:1 http://ftpmaster.internal/ubuntu questing/main amd64 debianutils amd64 5.22 [93.0 kB] 222s Get:2 http://ftpmaster.internal/ubuntu questing/main amd64 libsepol2 amd64 3.8.1-1 [327 kB] 222s Get:3 http://ftpmaster.internal/ubuntu questing/main amd64 libnftnl11 amd64 1.2.9-1 [69.1 kB] 222s Get:4 http://ftpmaster.internal/ubuntu questing/main amd64 cloud-init-base all 25.2~1g7a0265d3-0ubuntu1 [619 kB] 222s Get:5 http://ftpmaster.internal/ubuntu questing/main amd64 libmbim-proxy amd64 1.32.0-1 [6276 B] 222s Get:6 http://ftpmaster.internal/ubuntu questing/main amd64 libmbim-glib4 amd64 1.32.0-1 [233 kB] 222s Get:7 http://ftpmaster.internal/ubuntu questing/main amd64 libqmi-proxy amd64 1.36.0-1 [6220 B] 222s Get:8 http://ftpmaster.internal/ubuntu questing/main amd64 libqmi-glib5 amd64 1.36.0-1 [920 kB] 222s Get:9 http://ftpmaster.internal/ubuntu questing/main amd64 python3-lazr.restfulclient all 0.14.6-3 [51.0 kB] 222s Get:10 http://ftpmaster.internal/ubuntu questing/main amd64 sos all 4.9.1-1 [367 kB] 222s Get:11 http://ftpmaster.internal/ubuntu questing/main amd64 cloud-init all 25.2~1g7a0265d3-0ubuntu1 [2106 B] 223s Preconfiguring packages ... 223s Fetched 2693 kB in 1s (4205 kB/s) 223s (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 ... 80514 files and directories currently installed.) 223s Preparing to unpack .../debianutils_5.22_amd64.deb ... 223s Unpacking debianutils (5.22) over (5.21) ... 223s Setting up debianutils (5.22) ... 223s (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 ... 80514 files and directories currently installed.) 223s Preparing to unpack .../libsepol2_3.8.1-1_amd64.deb ... 223s Unpacking libsepol2:amd64 (3.8.1-1) over (3.7-1) ... 223s Setting up libsepol2:amd64 (3.8.1-1) ... 223s (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 ... 80514 files and directories currently installed.) 223s Preparing to unpack .../0-libnftnl11_1.2.9-1_amd64.deb ... 223s Unpacking libnftnl11:amd64 (1.2.9-1) over (1.2.8-1) ... 223s Preparing to unpack .../1-cloud-init-base_25.2~1g7a0265d3-0ubuntu1_all.deb ... 223s Unpacking cloud-init-base (25.2~1g7a0265d3-0ubuntu1) over (25.1.1-0ubuntu2) ... 224s Preparing to unpack .../2-libmbim-proxy_1.32.0-1_amd64.deb ... 224s Unpacking libmbim-proxy (1.32.0-1) over (1.31.2-0ubuntu4) ... 224s Preparing to unpack .../3-libmbim-glib4_1.32.0-1_amd64.deb ... 224s Unpacking libmbim-glib4:amd64 (1.32.0-1) over (1.31.2-0ubuntu4) ... 224s Preparing to unpack .../4-libqmi-proxy_1.36.0-1_amd64.deb ... 224s Unpacking libqmi-proxy (1.36.0-1) over (1.35.6-1) ... 224s Preparing to unpack .../5-libqmi-glib5_1.36.0-1_amd64.deb ... 224s Unpacking libqmi-glib5:amd64 (1.36.0-1) over (1.35.6-1) ... 224s Preparing to unpack .../6-python3-lazr.restfulclient_0.14.6-3_all.deb ... 224s Unpacking python3-lazr.restfulclient (0.14.6-3) over (0.14.6-2) ... 224s Preparing to unpack .../7-sos_4.9.1-1_all.deb ... 224s Unpacking sos (4.9.1-1) over (4.9.0-6) ... 224s Preparing to unpack .../8-cloud-init_25.2~1g7a0265d3-0ubuntu1_all.deb ... 224s Unpacking cloud-init (25.2~1g7a0265d3-0ubuntu1) over (25.1.1-0ubuntu2) ... 224s Setting up sos (4.9.1-1) ... 225s Setting up libnftnl11:amd64 (1.2.9-1) ... 225s Setting up cloud-init-base (25.2~1g7a0265d3-0ubuntu1) ... 226s Setting up python3-lazr.restfulclient (0.14.6-3) ... 226s Setting up libmbim-glib4:amd64 (1.32.0-1) ... 226s Setting up cloud-init (25.2~1g7a0265d3-0ubuntu1) ... 226s Setting up libmbim-proxy (1.32.0-1) ... 226s Setting up libqmi-glib5:amd64 (1.36.0-1) ... 227s Setting up libqmi-proxy (1.36.0-1) ... 227s Processing triggers for libc-bin (2.41-6ubuntu1) ... 227s Processing triggers for rsyslog (8.2412.0-2ubuntu2) ... 227s Processing triggers for man-db (2.13.0-1) ... 229s Reading package lists... 229s Building dependency tree... 229s Reading state information... 229s Starting pkgProblemResolver with broken count: 0 229s Starting 2 pkgProblemResolver with broken count: 0 229s Done 230s Solving dependencies... 230s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 230s autopkgtest [18:56:22]: rebooting testbed after setup commands that affected boot 256s Reading package lists... 256s Building dependency tree... 256s Reading state information... 256s Starting pkgProblemResolver with broken count: 0 256s Starting 2 pkgProblemResolver with broken count: 0 256s Done 257s The following NEW packages will be installed: 257s build-essential cpp cpp-14 cpp-14-x86-64-linux-gnu cpp-x86-64-linux-gnu 257s dctrl-tools fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-mono 257s g++ g++-14 g++-14-x86-64-linux-gnu g++-x86-64-linux-gnu gcc gcc-14 257s gcc-14-x86-64-linux-gnu gcc-x86-64-linux-gnu gfortran gfortran-14 257s gfortran-14-x86-64-linux-gnu gfortran-x86-64-linux-gnu icu-devtools libasan8 257s libblas-dev libblas3 libbz2-dev libcairo2 libcc1-0 libdatrie1 libdeflate-dev 257s libdeflate0 libfontconfig1 libgcc-14-dev libgfortran-14-dev libgfortran5 257s libgomp1 libgraphite2-3 libharfbuzz0b libhwasan0 libice6 libicu-dev libisl23 257s libitm1 libjbig0 libjpeg-dev libjpeg-turbo8 libjpeg-turbo8-dev libjpeg8 257s libjpeg8-dev liblapack-dev liblapack3 liblerc4 liblsan0 liblzma-dev libmpc3 257s libncurses-dev libnlopt0 libpango-1.0-0 libpangocairo-1.0-0 257s libpangoft2-1.0-0 libpaper-utils libpaper2 libpcre2-16-0 libpcre2-32-0 257s libpcre2-dev libpcre2-posix3 libpixman-1-0 libpkgconf3 libpng-dev 257s libquadmath0 libreadline-dev libsharpyuv0 libsm6 libstdc++-14-dev libtcl8.6 257s libthai-data libthai0 libtiff6 libtirpc-dev libtk8.6 libtsan2 libubsan1 257s libwebp7 libxcb-render0 libxcb-shm0 libxft2 libxrender1 libxss1 libxt6t64 257s littler pkg-r-autopkgtest pkgconf pkgconf-bin r-base-core r-base-dev 257s r-cran-boot r-cran-brio r-cran-callr r-cran-cli r-cran-crayon r-cran-desc 257s r-cran-diffobj r-cran-digest r-cran-evaluate r-cran-fs r-cran-glue 257s r-cran-jsonlite r-cran-lattice r-cran-lifecycle r-cran-littler r-cran-lme4 257s r-cran-magrittr r-cran-mass r-cran-matrix r-cran-minqa r-cran-nlme 257s r-cran-nloptr r-cran-nnet r-cran-numderiv r-cran-ordinal r-cran-pkgbuild 257s r-cran-pkgkitten r-cran-pkgload r-cran-praise r-cran-processx r-cran-ps 257s r-cran-r6 r-cran-rbibutils r-cran-rcpp r-cran-rcppeigen r-cran-rdpack 257s r-cran-reformulas r-cran-rlang r-cran-rprojroot r-cran-statmod 257s r-cran-testthat r-cran-ucminf r-cran-waldo r-cran-withr r-cran-xtable unzip 257s x11-common xdg-utils zip zlib1g-dev 257s 0 upgraded, 146 newly installed, 0 to remove and 0 not upgraded. 257s Need to get 177 MB of archives. 257s After this operation, 516 MB of additional disk space will be used. 257s Get:1 http://ftpmaster.internal/ubuntu questing/main amd64 libisl23 amd64 0.27-1 [685 kB] 257s Get:2 http://ftpmaster.internal/ubuntu questing/main amd64 libmpc3 amd64 1.3.1-1build2 [55.3 kB] 257s Get:3 http://ftpmaster.internal/ubuntu questing/main amd64 cpp-14-x86-64-linux-gnu amd64 14.2.0-19ubuntu2 [11.9 MB] 258s Get:4 http://ftpmaster.internal/ubuntu questing/main amd64 cpp-14 amd64 14.2.0-19ubuntu2 [1030 B] 258s Get:5 http://ftpmaster.internal/ubuntu questing/main amd64 cpp-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [5586 B] 258s Get:6 http://ftpmaster.internal/ubuntu questing/main amd64 cpp amd64 4:14.2.0-1ubuntu1 [22.4 kB] 258s Get:7 http://ftpmaster.internal/ubuntu questing/main amd64 libcc1-0 amd64 15-20250404-0ubuntu1 [47.1 kB] 258s Get:8 http://ftpmaster.internal/ubuntu questing/main amd64 libgomp1 amd64 15-20250404-0ubuntu1 [151 kB] 258s Get:9 http://ftpmaster.internal/ubuntu questing/main amd64 libitm1 amd64 15-20250404-0ubuntu1 [29.5 kB] 258s Get:10 http://ftpmaster.internal/ubuntu questing/main amd64 libasan8 amd64 15-20250404-0ubuntu1 [3076 kB] 258s Get:11 http://ftpmaster.internal/ubuntu questing/main amd64 liblsan0 amd64 15-20250404-0ubuntu1 [1362 kB] 258s Get:12 http://ftpmaster.internal/ubuntu questing/main amd64 libtsan2 amd64 15-20250404-0ubuntu1 [2760 kB] 258s Get:13 http://ftpmaster.internal/ubuntu questing/main amd64 libubsan1 amd64 15-20250404-0ubuntu1 [1211 kB] 258s Get:14 http://ftpmaster.internal/ubuntu questing/main amd64 libhwasan0 amd64 15-20250404-0ubuntu1 [1687 kB] 258s Get:15 http://ftpmaster.internal/ubuntu questing/main amd64 libquadmath0 amd64 15-20250404-0ubuntu1 [153 kB] 258s Get:16 http://ftpmaster.internal/ubuntu questing/main amd64 libgcc-14-dev amd64 14.2.0-19ubuntu2 [2815 kB] 258s Get:17 http://ftpmaster.internal/ubuntu questing/main amd64 gcc-14-x86-64-linux-gnu amd64 14.2.0-19ubuntu2 [23.3 MB] 258s Get:18 http://ftpmaster.internal/ubuntu questing/main amd64 gcc-14 amd64 14.2.0-19ubuntu2 [540 kB] 259s Get:19 http://ftpmaster.internal/ubuntu questing/main amd64 gcc-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [1208 B] 259s Get:20 http://ftpmaster.internal/ubuntu questing/main amd64 gcc amd64 4:14.2.0-1ubuntu1 [5004 B] 259s Get:21 http://ftpmaster.internal/ubuntu questing/main amd64 libstdc++-14-dev amd64 14.2.0-19ubuntu2 [2510 kB] 259s Get:22 http://ftpmaster.internal/ubuntu questing/main amd64 g++-14-x86-64-linux-gnu amd64 14.2.0-19ubuntu2 [13.4 MB] 259s Get:23 http://ftpmaster.internal/ubuntu questing/main amd64 g++-14 amd64 14.2.0-19ubuntu2 [23.0 kB] 259s Get:24 http://ftpmaster.internal/ubuntu questing/main amd64 g++-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [968 B] 259s Get:25 http://ftpmaster.internal/ubuntu questing/main amd64 g++ amd64 4:14.2.0-1ubuntu1 [1100 B] 259s Get:26 http://ftpmaster.internal/ubuntu questing/main amd64 build-essential amd64 12.12ubuntu1 [5080 B] 259s Get:27 http://ftpmaster.internal/ubuntu questing/main amd64 dctrl-tools amd64 2.24-3build3 [106 kB] 259s Get:28 http://ftpmaster.internal/ubuntu questing/main amd64 fonts-dejavu-mono all 2.37-8 [502 kB] 259s Get:29 http://ftpmaster.internal/ubuntu questing/main amd64 fonts-dejavu-core all 2.37-8 [835 kB] 259s Get:30 http://ftpmaster.internal/ubuntu questing/main amd64 fontconfig-config amd64 2.15.0-2.2ubuntu1 [37.8 kB] 259s Get:31 http://ftpmaster.internal/ubuntu questing/main amd64 libfontconfig1 amd64 2.15.0-2.2ubuntu1 [164 kB] 259s Get:32 http://ftpmaster.internal/ubuntu questing/main amd64 fontconfig amd64 2.15.0-2.2ubuntu1 [180 kB] 259s Get:33 http://ftpmaster.internal/ubuntu questing/main amd64 libgfortran5 amd64 15-20250404-0ubuntu1 [926 kB] 259s Get:34 http://ftpmaster.internal/ubuntu questing/main amd64 libgfortran-14-dev amd64 14.2.0-19ubuntu2 [967 kB] 259s Get:35 http://ftpmaster.internal/ubuntu questing/main amd64 gfortran-14-x86-64-linux-gnu amd64 14.2.0-19ubuntu2 [12.5 MB] 259s Get:36 http://ftpmaster.internal/ubuntu questing/main amd64 gfortran-14 amd64 14.2.0-19ubuntu2 [14.2 kB] 259s Get:37 http://ftpmaster.internal/ubuntu questing/main amd64 gfortran-x86-64-linux-gnu amd64 4:14.2.0-1ubuntu1 [1022 B] 259s Get:38 http://ftpmaster.internal/ubuntu questing/main amd64 gfortran amd64 4:14.2.0-1ubuntu1 [1174 B] 259s Get:39 http://ftpmaster.internal/ubuntu questing/main amd64 icu-devtools amd64 76.1-1ubuntu2 [237 kB] 259s Get:40 http://ftpmaster.internal/ubuntu questing/main amd64 libblas3 amd64 3.12.1-2 [359 kB] 259s Get:41 http://ftpmaster.internal/ubuntu questing/main amd64 libblas-dev amd64 3.12.1-2 [338 kB] 259s Get:42 http://ftpmaster.internal/ubuntu questing/main amd64 libbz2-dev amd64 1.0.8-6 [33.8 kB] 259s Get:43 http://ftpmaster.internal/ubuntu questing/main amd64 libpixman-1-0 amd64 0.44.0-3 [427 kB] 259s Get:44 http://ftpmaster.internal/ubuntu questing/main amd64 libxcb-render0 amd64 1.17.0-2 [16.2 kB] 259s Get:45 http://ftpmaster.internal/ubuntu questing/main amd64 libxcb-shm0 amd64 1.17.0-2 [5758 B] 259s Get:46 http://ftpmaster.internal/ubuntu questing/main amd64 libxrender1 amd64 1:0.9.10-1.1build1 [19.0 kB] 259s Get:47 http://ftpmaster.internal/ubuntu questing/main amd64 libcairo2 amd64 1.18.4-1 [662 kB] 259s Get:48 http://ftpmaster.internal/ubuntu questing/main amd64 libdatrie1 amd64 0.2.13-3build1 [19.0 kB] 259s Get:49 http://ftpmaster.internal/ubuntu questing/main amd64 libdeflate0 amd64 1.23-2 [49.9 kB] 259s Get:50 http://ftpmaster.internal/ubuntu questing/main amd64 libdeflate-dev amd64 1.23-2 [56.8 kB] 259s Get:51 http://ftpmaster.internal/ubuntu questing/main amd64 libgraphite2-3 amd64 1.3.14-2ubuntu1 [73.1 kB] 259s Get:52 http://ftpmaster.internal/ubuntu questing/main amd64 libharfbuzz0b amd64 10.2.0-1 [543 kB] 259s Get:53 http://ftpmaster.internal/ubuntu questing/main amd64 x11-common all 1:7.7+23ubuntu4 [21.8 kB] 259s Get:54 http://ftpmaster.internal/ubuntu questing/main amd64 libice6 amd64 2:1.1.1-1 [44.1 kB] 260s Get:55 http://ftpmaster.internal/ubuntu questing/main amd64 libicu-dev amd64 76.1-1ubuntu2 [12.6 MB] 260s Get:56 http://ftpmaster.internal/ubuntu questing/main amd64 libjpeg-turbo8 amd64 2.1.5-3ubuntu2 [179 kB] 260s Get:57 http://ftpmaster.internal/ubuntu questing/main amd64 libjpeg-turbo8-dev amd64 2.1.5-3ubuntu2 [324 kB] 260s Get:58 http://ftpmaster.internal/ubuntu questing/main amd64 libjpeg8 amd64 8c-2ubuntu11 [2148 B] 260s Get:59 http://ftpmaster.internal/ubuntu questing/main amd64 libjpeg8-dev amd64 8c-2ubuntu11 [1484 B] 260s Get:60 http://ftpmaster.internal/ubuntu questing/main amd64 libjpeg-dev amd64 8c-2ubuntu11 [1482 B] 260s Get:61 http://ftpmaster.internal/ubuntu questing/main amd64 liblapack3 amd64 3.12.1-2 [3179 kB] 260s Get:62 http://ftpmaster.internal/ubuntu questing/main amd64 liblapack-dev amd64 3.12.1-2 [6489 kB] 260s Get:63 http://ftpmaster.internal/ubuntu questing/main amd64 liblerc4 amd64 4.0.0+ds-5ubuntu1 [271 kB] 260s Get:64 http://ftpmaster.internal/ubuntu questing/main amd64 libncurses-dev amd64 6.5+20250216-2 [424 kB] 260s Get:65 http://ftpmaster.internal/ubuntu questing/main amd64 libthai-data all 0.1.29-2build1 [158 kB] 260s Get:66 http://ftpmaster.internal/ubuntu questing/main amd64 libthai0 amd64 0.1.29-2build1 [18.9 kB] 260s Get:67 http://ftpmaster.internal/ubuntu questing/main amd64 libpango-1.0-0 amd64 1.56.3-1 [256 kB] 260s Get:68 http://ftpmaster.internal/ubuntu questing/main amd64 libpangoft2-1.0-0 amd64 1.56.3-1 [52.9 kB] 260s Get:69 http://ftpmaster.internal/ubuntu questing/main amd64 libpangocairo-1.0-0 amd64 1.56.3-1 [29.1 kB] 260s Get:70 http://ftpmaster.internal/ubuntu questing/main amd64 libpaper2 amd64 2.2.5-0.3 [17.4 kB] 260s Get:71 http://ftpmaster.internal/ubuntu questing/main amd64 libpaper-utils amd64 2.2.5-0.3 [15.5 kB] 260s Get:72 http://ftpmaster.internal/ubuntu questing/main amd64 libpcre2-16-0 amd64 10.45-1 [268 kB] 260s Get:73 http://ftpmaster.internal/ubuntu questing/main amd64 libpcre2-32-0 amd64 10.45-1 [251 kB] 260s Get:74 http://ftpmaster.internal/ubuntu questing/main amd64 libpcre2-posix3 amd64 10.45-1 [7204 B] 260s Get:75 http://ftpmaster.internal/ubuntu questing/main amd64 libpcre2-dev amd64 10.45-1 [908 kB] 260s Get:76 http://ftpmaster.internal/ubuntu questing/main amd64 libpkgconf3 amd64 1.8.1-4 [32.3 kB] 260s Get:77 http://ftpmaster.internal/ubuntu questing/main amd64 zlib1g-dev amd64 1:1.3.dfsg+really1.3.1-1ubuntu1 [895 kB] 260s Get:78 http://ftpmaster.internal/ubuntu questing/main amd64 libpng-dev amd64 1.6.47-1.1 [298 kB] 260s Get:79 http://ftpmaster.internal/ubuntu questing/main amd64 libreadline-dev amd64 8.2-6 [184 kB] 260s Get:80 http://ftpmaster.internal/ubuntu questing/main amd64 libsharpyuv0 amd64 1.5.0-0.1 [25.9 kB] 260s Get:81 http://ftpmaster.internal/ubuntu questing/main amd64 libsm6 amd64 2:1.2.4-1 [17.4 kB] 260s Get:82 http://ftpmaster.internal/ubuntu questing/main amd64 libtcl8.6 amd64 8.6.16+dfsg-1 [1086 kB] 260s Get:83 http://ftpmaster.internal/ubuntu questing/main amd64 libjbig0 amd64 2.1-6.1ubuntu2 [29.7 kB] 260s Get:84 http://ftpmaster.internal/ubuntu questing/main amd64 libwebp7 amd64 1.5.0-0.1 [378 kB] 260s Get:85 http://ftpmaster.internal/ubuntu questing/main amd64 libtiff6 amd64 4.7.0-3ubuntu1 [204 kB] 260s Get:86 http://ftpmaster.internal/ubuntu questing/main amd64 libxft2 amd64 2.3.6-1build1 [45.3 kB] 260s Get:87 http://ftpmaster.internal/ubuntu questing/main amd64 libxss1 amd64 1:1.2.3-1build3 [7204 B] 260s Get:88 http://ftpmaster.internal/ubuntu questing/main amd64 libtk8.6 amd64 8.6.16-1 [868 kB] 260s Get:89 http://ftpmaster.internal/ubuntu questing/main amd64 libxt6t64 amd64 1:1.2.1-1.2build1 [171 kB] 260s Get:90 http://ftpmaster.internal/ubuntu questing/main amd64 zip amd64 3.0-14ubuntu2 [185 kB] 260s Get:91 http://ftpmaster.internal/ubuntu questing/main amd64 unzip amd64 6.0-28ubuntu6 [181 kB] 260s Get:92 http://ftpmaster.internal/ubuntu questing/main amd64 xdg-utils all 1.2.1-2ubuntu1 [66.0 kB] 260s Get:93 http://ftpmaster.internal/ubuntu questing/universe amd64 r-base-core amd64 4.4.3-1 [28.9 MB] 261s Get:94 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-littler amd64 0.3.20-2 [96.6 kB] 261s Get:95 http://ftpmaster.internal/ubuntu questing/universe amd64 littler all 0.3.20-2 [2554 B] 261s Get:96 http://ftpmaster.internal/ubuntu questing/main amd64 liblzma-dev amd64 5.6.4-1ubuntu1 [189 kB] 261s Get:97 http://ftpmaster.internal/ubuntu questing/main amd64 pkgconf-bin amd64 1.8.1-4 [21.6 kB] 261s Get:98 http://ftpmaster.internal/ubuntu questing/main amd64 pkgconf amd64 1.8.1-4 [16.8 kB] 261s Get:99 http://ftpmaster.internal/ubuntu questing/main amd64 libtirpc-dev amd64 1.3.4+ds-1.3 [193 kB] 261s Get:100 http://ftpmaster.internal/ubuntu questing/universe amd64 r-base-dev all 4.4.3-1 [4176 B] 261s Get:101 http://ftpmaster.internal/ubuntu questing/universe amd64 pkg-r-autopkgtest all 20231212ubuntu1 [6448 B] 261s Get:102 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-boot all 1.3-31-1 [635 kB] 262s Get:103 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-brio amd64 1.1.5-1 [39.0 kB] 262s Get:104 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-ps amd64 1.9.0-1 [408 kB] 262s Get:105 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-r6 all 2.6.1-1 [101 kB] 262s Get:106 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-processx amd64 3.8.6-1 [365 kB] 262s Get:107 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-callr all 3.7.6-1 [458 kB] 262s Get:108 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-cli amd64 3.6.4-1 [1394 kB] 262s Get:109 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-crayon all 1.5.3-1 [165 kB] 262s Get:110 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-desc all 1.4.3-1 [359 kB] 262s Get:111 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-diffobj amd64 0.3.5-1 [1117 kB] 262s Get:112 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-digest amd64 0.6.37-1 [200 kB] 262s Get:113 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-evaluate all 1.0.3-1 [114 kB] 262s Get:114 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-fs amd64 1.6.5+dfsg-1 [246 kB] 262s Get:115 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-glue amd64 1.8.0-1 [164 kB] 262s Get:116 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-jsonlite amd64 1.9.1+dfsg-1 [447 kB] 262s Get:117 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-lattice amd64 0.22-6-1 [1340 kB] 262s Get:118 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-rlang amd64 1.1.5-1 [1719 kB] 262s Get:119 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-lifecycle all 1.0.4+dfsg-1 [110 kB] 262s Get:120 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-matrix amd64 1.7-3-1 [4349 kB] 262s Get:121 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-mass amd64 7.3-65-1 [1116 kB] 262s Get:122 http://ftpmaster.internal/ubuntu questing-proposed/universe amd64 r-cran-nlme amd64 3.1.168-1 [2320 kB] 262s Get:123 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-pkgkitten all 0.2.4-1 [27.2 kB] 262s Get:124 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-rcpp amd64 1.0.14-1 [1998 kB] 262s Get:125 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-minqa amd64 1.2.8-1 [119 kB] 262s Get:126 http://ftpmaster.internal/ubuntu questing/universe amd64 libnlopt0 amd64 2.7.1-6ubuntu3 [251 kB] 262s Get:127 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-nloptr amd64 2.2.1-1 [251 kB] 262s Get:128 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-rbibutils amd64 2.3-1 [1023 kB] 262s Get:129 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-rdpack all 2.6.3-1 [636 kB] 262s Get:130 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-reformulas all 0.4.1-1 [128 kB] 262s Get:131 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-rcppeigen amd64 0.3.4.0.2-1 [1428 kB] 262s Get:132 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-statmod amd64 1.5.0-1 [295 kB] 262s Get:133 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-lme4 amd64 1.1-36-1 [4135 kB] 262s Get:134 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-magrittr amd64 2.0.3-1 [154 kB] 262s Get:135 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-nnet amd64 7.3-20-1 [116 kB] 262s Get:136 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-numderiv all 2016.8-1.1-3 [115 kB] 262s Get:137 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-ucminf amd64 1.2.2-1 [35.9 kB] 262s Get:138 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-ordinal amd64 2023.12-4.1-1 [1268 kB] 262s Get:139 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-pkgbuild all 1.4.6-1 [213 kB] 262s Get:140 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-rprojroot all 2.0.4-2 [125 kB] 262s Get:141 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-withr all 3.0.2+dfsg-1 [214 kB] 262s Get:142 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-pkgload all 1.4.0-1 [247 kB] 262s Get:143 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-praise all 1.0.0-4build1 [20.3 kB] 262s Get:144 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-waldo all 0.6.1-2 [150 kB] 262s Get:145 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-testthat amd64 3.2.3-1 [1651 kB] 262s Get:146 http://ftpmaster.internal/ubuntu questing/universe amd64 r-cran-xtable all 1:1.8-4-2 [689 kB] 263s Preconfiguring packages ... 263s Fetched 177 MB in 6s (29.8 MB/s) 263s Selecting previously unselected package libisl23:amd64. 263s (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 ... 80518 files and directories currently installed.) 263s Preparing to unpack .../000-libisl23_0.27-1_amd64.deb ... 263s Unpacking libisl23:amd64 (0.27-1) ... 263s Selecting previously unselected package libmpc3:amd64. 263s Preparing to unpack .../001-libmpc3_1.3.1-1build2_amd64.deb ... 263s Unpacking libmpc3:amd64 (1.3.1-1build2) ... 263s Selecting previously unselected package cpp-14-x86-64-linux-gnu. 263s Preparing to unpack .../002-cpp-14-x86-64-linux-gnu_14.2.0-19ubuntu2_amd64.deb ... 263s Unpacking cpp-14-x86-64-linux-gnu (14.2.0-19ubuntu2) ... 264s Selecting previously unselected package cpp-14. 264s Preparing to unpack .../003-cpp-14_14.2.0-19ubuntu2_amd64.deb ... 264s Unpacking cpp-14 (14.2.0-19ubuntu2) ... 264s Selecting previously unselected package cpp-x86-64-linux-gnu. 264s Preparing to unpack .../004-cpp-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 264s Unpacking cpp-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 264s Selecting previously unselected package cpp. 264s Preparing to unpack .../005-cpp_4%3a14.2.0-1ubuntu1_amd64.deb ... 264s Unpacking cpp (4:14.2.0-1ubuntu1) ... 264s Selecting previously unselected package libcc1-0:amd64. 264s Preparing to unpack .../006-libcc1-0_15-20250404-0ubuntu1_amd64.deb ... 264s Unpacking libcc1-0:amd64 (15-20250404-0ubuntu1) ... 264s Selecting previously unselected package libgomp1:amd64. 264s Preparing to unpack .../007-libgomp1_15-20250404-0ubuntu1_amd64.deb ... 264s Unpacking libgomp1:amd64 (15-20250404-0ubuntu1) ... 264s Selecting previously unselected package libitm1:amd64. 264s Preparing to unpack .../008-libitm1_15-20250404-0ubuntu1_amd64.deb ... 264s Unpacking libitm1:amd64 (15-20250404-0ubuntu1) ... 264s Selecting previously unselected package libasan8:amd64. 264s Preparing to unpack .../009-libasan8_15-20250404-0ubuntu1_amd64.deb ... 264s Unpacking libasan8:amd64 (15-20250404-0ubuntu1) ... 264s Selecting previously unselected package liblsan0:amd64. 264s Preparing to unpack .../010-liblsan0_15-20250404-0ubuntu1_amd64.deb ... 264s Unpacking liblsan0:amd64 (15-20250404-0ubuntu1) ... 264s Selecting previously unselected package libtsan2:amd64. 264s Preparing to unpack .../011-libtsan2_15-20250404-0ubuntu1_amd64.deb ... 264s Unpacking libtsan2:amd64 (15-20250404-0ubuntu1) ... 264s Selecting previously unselected package libubsan1:amd64. 264s Preparing to unpack .../012-libubsan1_15-20250404-0ubuntu1_amd64.deb ... 264s Unpacking libubsan1:amd64 (15-20250404-0ubuntu1) ... 264s Selecting previously unselected package libhwasan0:amd64. 264s Preparing to unpack .../013-libhwasan0_15-20250404-0ubuntu1_amd64.deb ... 264s Unpacking libhwasan0:amd64 (15-20250404-0ubuntu1) ... 264s Selecting previously unselected package libquadmath0:amd64. 264s Preparing to unpack .../014-libquadmath0_15-20250404-0ubuntu1_amd64.deb ... 264s Unpacking libquadmath0:amd64 (15-20250404-0ubuntu1) ... 264s Selecting previously unselected package libgcc-14-dev:amd64. 264s Preparing to unpack .../015-libgcc-14-dev_14.2.0-19ubuntu2_amd64.deb ... 264s Unpacking libgcc-14-dev:amd64 (14.2.0-19ubuntu2) ... 264s Selecting previously unselected package gcc-14-x86-64-linux-gnu. 265s Preparing to unpack .../016-gcc-14-x86-64-linux-gnu_14.2.0-19ubuntu2_amd64.deb ... 265s Unpacking gcc-14-x86-64-linux-gnu (14.2.0-19ubuntu2) ... 265s Selecting previously unselected package gcc-14. 265s Preparing to unpack .../017-gcc-14_14.2.0-19ubuntu2_amd64.deb ... 265s Unpacking gcc-14 (14.2.0-19ubuntu2) ... 265s Selecting previously unselected package gcc-x86-64-linux-gnu. 265s Preparing to unpack .../018-gcc-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 265s Unpacking gcc-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 265s Selecting previously unselected package gcc. 265s Preparing to unpack .../019-gcc_4%3a14.2.0-1ubuntu1_amd64.deb ... 265s Unpacking gcc (4:14.2.0-1ubuntu1) ... 265s Selecting previously unselected package libstdc++-14-dev:amd64. 265s Preparing to unpack .../020-libstdc++-14-dev_14.2.0-19ubuntu2_amd64.deb ... 265s Unpacking libstdc++-14-dev:amd64 (14.2.0-19ubuntu2) ... 265s Selecting previously unselected package g++-14-x86-64-linux-gnu. 265s Preparing to unpack .../021-g++-14-x86-64-linux-gnu_14.2.0-19ubuntu2_amd64.deb ... 265s Unpacking g++-14-x86-64-linux-gnu (14.2.0-19ubuntu2) ... 266s Selecting previously unselected package g++-14. 266s Preparing to unpack .../022-g++-14_14.2.0-19ubuntu2_amd64.deb ... 266s Unpacking g++-14 (14.2.0-19ubuntu2) ... 266s Selecting previously unselected package g++-x86-64-linux-gnu. 266s Preparing to unpack .../023-g++-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 266s Unpacking g++-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 266s Selecting previously unselected package g++. 266s Preparing to unpack .../024-g++_4%3a14.2.0-1ubuntu1_amd64.deb ... 266s Unpacking g++ (4:14.2.0-1ubuntu1) ... 266s Selecting previously unselected package build-essential. 266s Preparing to unpack .../025-build-essential_12.12ubuntu1_amd64.deb ... 266s Unpacking build-essential (12.12ubuntu1) ... 266s Selecting previously unselected package dctrl-tools. 266s Preparing to unpack .../026-dctrl-tools_2.24-3build3_amd64.deb ... 266s Unpacking dctrl-tools (2.24-3build3) ... 266s Selecting previously unselected package fonts-dejavu-mono. 266s Preparing to unpack .../027-fonts-dejavu-mono_2.37-8_all.deb ... 266s Unpacking fonts-dejavu-mono (2.37-8) ... 266s Selecting previously unselected package fonts-dejavu-core. 266s Preparing to unpack .../028-fonts-dejavu-core_2.37-8_all.deb ... 266s Unpacking fonts-dejavu-core (2.37-8) ... 266s Selecting previously unselected package fontconfig-config. 266s Preparing to unpack .../029-fontconfig-config_2.15.0-2.2ubuntu1_amd64.deb ... 266s Unpacking fontconfig-config (2.15.0-2.2ubuntu1) ... 266s Selecting previously unselected package libfontconfig1:amd64. 266s Preparing to unpack .../030-libfontconfig1_2.15.0-2.2ubuntu1_amd64.deb ... 266s Unpacking libfontconfig1:amd64 (2.15.0-2.2ubuntu1) ... 266s Selecting previously unselected package fontconfig. 266s Preparing to unpack .../031-fontconfig_2.15.0-2.2ubuntu1_amd64.deb ... 266s Unpacking fontconfig (2.15.0-2.2ubuntu1) ... 266s Selecting previously unselected package libgfortran5:amd64. 266s Preparing to unpack .../032-libgfortran5_15-20250404-0ubuntu1_amd64.deb ... 266s Unpacking libgfortran5:amd64 (15-20250404-0ubuntu1) ... 266s Selecting previously unselected package libgfortran-14-dev:amd64. 266s Preparing to unpack .../033-libgfortran-14-dev_14.2.0-19ubuntu2_amd64.deb ... 266s Unpacking libgfortran-14-dev:amd64 (14.2.0-19ubuntu2) ... 266s Selecting previously unselected package gfortran-14-x86-64-linux-gnu. 266s Preparing to unpack .../034-gfortran-14-x86-64-linux-gnu_14.2.0-19ubuntu2_amd64.deb ... 266s Unpacking gfortran-14-x86-64-linux-gnu (14.2.0-19ubuntu2) ... 266s Selecting previously unselected package gfortran-14. 267s Preparing to unpack .../035-gfortran-14_14.2.0-19ubuntu2_amd64.deb ... 267s Unpacking gfortran-14 (14.2.0-19ubuntu2) ... 267s Selecting previously unselected package gfortran-x86-64-linux-gnu. 267s Preparing to unpack .../036-gfortran-x86-64-linux-gnu_4%3a14.2.0-1ubuntu1_amd64.deb ... 267s Unpacking gfortran-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 267s Selecting previously unselected package gfortran. 267s Preparing to unpack .../037-gfortran_4%3a14.2.0-1ubuntu1_amd64.deb ... 267s Unpacking gfortran (4:14.2.0-1ubuntu1) ... 267s Selecting previously unselected package icu-devtools. 267s Preparing to unpack .../038-icu-devtools_76.1-1ubuntu2_amd64.deb ... 267s Unpacking icu-devtools (76.1-1ubuntu2) ... 267s Selecting previously unselected package libblas3:amd64. 267s Preparing to unpack .../039-libblas3_3.12.1-2_amd64.deb ... 267s Unpacking libblas3:amd64 (3.12.1-2) ... 267s Selecting previously unselected package libblas-dev:amd64. 267s Preparing to unpack .../040-libblas-dev_3.12.1-2_amd64.deb ... 267s Unpacking libblas-dev:amd64 (3.12.1-2) ... 267s Selecting previously unselected package libbz2-dev:amd64. 267s Preparing to unpack .../041-libbz2-dev_1.0.8-6_amd64.deb ... 267s Unpacking libbz2-dev:amd64 (1.0.8-6) ... 267s Selecting previously unselected package libpixman-1-0:amd64. 267s Preparing to unpack .../042-libpixman-1-0_0.44.0-3_amd64.deb ... 267s Unpacking libpixman-1-0:amd64 (0.44.0-3) ... 267s Selecting previously unselected package libxcb-render0:amd64. 267s Preparing to unpack .../043-libxcb-render0_1.17.0-2_amd64.deb ... 267s Unpacking libxcb-render0:amd64 (1.17.0-2) ... 267s Selecting previously unselected package libxcb-shm0:amd64. 267s Preparing to unpack .../044-libxcb-shm0_1.17.0-2_amd64.deb ... 267s Unpacking libxcb-shm0:amd64 (1.17.0-2) ... 267s Selecting previously unselected package libxrender1:amd64. 267s Preparing to unpack .../045-libxrender1_1%3a0.9.10-1.1build1_amd64.deb ... 267s Unpacking libxrender1:amd64 (1:0.9.10-1.1build1) ... 267s Selecting previously unselected package libcairo2:amd64. 267s Preparing to unpack .../046-libcairo2_1.18.4-1_amd64.deb ... 267s Unpacking libcairo2:amd64 (1.18.4-1) ... 267s Selecting previously unselected package libdatrie1:amd64. 267s Preparing to unpack .../047-libdatrie1_0.2.13-3build1_amd64.deb ... 267s Unpacking libdatrie1:amd64 (0.2.13-3build1) ... 267s Selecting previously unselected package libdeflate0:amd64. 267s Preparing to unpack .../048-libdeflate0_1.23-2_amd64.deb ... 267s Unpacking libdeflate0:amd64 (1.23-2) ... 267s Selecting previously unselected package libdeflate-dev:amd64. 267s Preparing to unpack .../049-libdeflate-dev_1.23-2_amd64.deb ... 267s Unpacking libdeflate-dev:amd64 (1.23-2) ... 267s Selecting previously unselected package libgraphite2-3:amd64. 267s Preparing to unpack .../050-libgraphite2-3_1.3.14-2ubuntu1_amd64.deb ... 267s Unpacking libgraphite2-3:amd64 (1.3.14-2ubuntu1) ... 267s Selecting previously unselected package libharfbuzz0b:amd64. 267s Preparing to unpack .../051-libharfbuzz0b_10.2.0-1_amd64.deb ... 267s Unpacking libharfbuzz0b:amd64 (10.2.0-1) ... 267s Selecting previously unselected package x11-common. 267s Preparing to unpack .../052-x11-common_1%3a7.7+23ubuntu4_all.deb ... 267s Unpacking x11-common (1:7.7+23ubuntu4) ... 267s Selecting previously unselected package libice6:amd64. 267s Preparing to unpack .../053-libice6_2%3a1.1.1-1_amd64.deb ... 267s Unpacking libice6:amd64 (2:1.1.1-1) ... 267s Selecting previously unselected package libicu-dev:amd64. 267s Preparing to unpack .../054-libicu-dev_76.1-1ubuntu2_amd64.deb ... 267s Unpacking libicu-dev:amd64 (76.1-1ubuntu2) ... 267s Selecting previously unselected package libjpeg-turbo8:amd64. 267s Preparing to unpack .../055-libjpeg-turbo8_2.1.5-3ubuntu2_amd64.deb ... 267s Unpacking libjpeg-turbo8:amd64 (2.1.5-3ubuntu2) ... 268s Selecting previously unselected package libjpeg-turbo8-dev:amd64. 268s Preparing to unpack .../056-libjpeg-turbo8-dev_2.1.5-3ubuntu2_amd64.deb ... 268s Unpacking libjpeg-turbo8-dev:amd64 (2.1.5-3ubuntu2) ... 268s Selecting previously unselected package libjpeg8:amd64. 268s Preparing to unpack .../057-libjpeg8_8c-2ubuntu11_amd64.deb ... 268s Unpacking libjpeg8:amd64 (8c-2ubuntu11) ... 268s Selecting previously unselected package libjpeg8-dev:amd64. 268s Preparing to unpack .../058-libjpeg8-dev_8c-2ubuntu11_amd64.deb ... 268s Unpacking libjpeg8-dev:amd64 (8c-2ubuntu11) ... 268s Selecting previously unselected package libjpeg-dev:amd64. 268s Preparing to unpack .../059-libjpeg-dev_8c-2ubuntu11_amd64.deb ... 268s Unpacking libjpeg-dev:amd64 (8c-2ubuntu11) ... 268s Selecting previously unselected package liblapack3:amd64. 268s Preparing to unpack .../060-liblapack3_3.12.1-2_amd64.deb ... 268s Unpacking liblapack3:amd64 (3.12.1-2) ... 268s Selecting previously unselected package liblapack-dev:amd64. 268s Preparing to unpack .../061-liblapack-dev_3.12.1-2_amd64.deb ... 268s Unpacking liblapack-dev:amd64 (3.12.1-2) ... 268s Selecting previously unselected package liblerc4:amd64. 268s Preparing to unpack .../062-liblerc4_4.0.0+ds-5ubuntu1_amd64.deb ... 268s Unpacking liblerc4:amd64 (4.0.0+ds-5ubuntu1) ... 268s Selecting previously unselected package libncurses-dev:amd64. 268s Preparing to unpack .../063-libncurses-dev_6.5+20250216-2_amd64.deb ... 268s Unpacking libncurses-dev:amd64 (6.5+20250216-2) ... 268s Selecting previously unselected package libthai-data. 268s Preparing to unpack .../064-libthai-data_0.1.29-2build1_all.deb ... 268s Unpacking libthai-data (0.1.29-2build1) ... 268s Selecting previously unselected package libthai0:amd64. 268s Preparing to unpack .../065-libthai0_0.1.29-2build1_amd64.deb ... 268s Unpacking libthai0:amd64 (0.1.29-2build1) ... 268s Selecting previously unselected package libpango-1.0-0:amd64. 268s Preparing to unpack .../066-libpango-1.0-0_1.56.3-1_amd64.deb ... 268s Unpacking libpango-1.0-0:amd64 (1.56.3-1) ... 268s Selecting previously unselected package libpangoft2-1.0-0:amd64. 268s Preparing to unpack .../067-libpangoft2-1.0-0_1.56.3-1_amd64.deb ... 268s Unpacking libpangoft2-1.0-0:amd64 (1.56.3-1) ... 268s Selecting previously unselected package libpangocairo-1.0-0:amd64. 268s Preparing to unpack .../068-libpangocairo-1.0-0_1.56.3-1_amd64.deb ... 268s Unpacking libpangocairo-1.0-0:amd64 (1.56.3-1) ... 268s Selecting previously unselected package libpaper2:amd64. 268s Preparing to unpack .../069-libpaper2_2.2.5-0.3_amd64.deb ... 268s Unpacking libpaper2:amd64 (2.2.5-0.3) ... 268s Selecting previously unselected package libpaper-utils. 268s Preparing to unpack .../070-libpaper-utils_2.2.5-0.3_amd64.deb ... 268s Unpacking libpaper-utils (2.2.5-0.3) ... 268s Selecting previously unselected package libpcre2-16-0:amd64. 268s Preparing to unpack .../071-libpcre2-16-0_10.45-1_amd64.deb ... 268s Unpacking libpcre2-16-0:amd64 (10.45-1) ... 268s Selecting previously unselected package libpcre2-32-0:amd64. 268s Preparing to unpack .../072-libpcre2-32-0_10.45-1_amd64.deb ... 268s Unpacking libpcre2-32-0:amd64 (10.45-1) ... 268s Selecting previously unselected package libpcre2-posix3:amd64. 268s Preparing to unpack .../073-libpcre2-posix3_10.45-1_amd64.deb ... 268s Unpacking libpcre2-posix3:amd64 (10.45-1) ... 268s Selecting previously unselected package libpcre2-dev:amd64. 268s Preparing to unpack .../074-libpcre2-dev_10.45-1_amd64.deb ... 268s Unpacking libpcre2-dev:amd64 (10.45-1) ... 268s Selecting previously unselected package libpkgconf3:amd64. 268s Preparing to unpack .../075-libpkgconf3_1.8.1-4_amd64.deb ... 268s Unpacking libpkgconf3:amd64 (1.8.1-4) ... 268s Selecting previously unselected package zlib1g-dev:amd64. 268s Preparing to unpack .../076-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_amd64.deb ... 268s Unpacking zlib1g-dev:amd64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 268s Selecting previously unselected package libpng-dev:amd64. 268s Preparing to unpack .../077-libpng-dev_1.6.47-1.1_amd64.deb ... 268s Unpacking libpng-dev:amd64 (1.6.47-1.1) ... 268s Selecting previously unselected package libreadline-dev:amd64. 268s Preparing to unpack .../078-libreadline-dev_8.2-6_amd64.deb ... 268s Unpacking libreadline-dev:amd64 (8.2-6) ... 268s Selecting previously unselected package libsharpyuv0:amd64. 268s Preparing to unpack .../079-libsharpyuv0_1.5.0-0.1_amd64.deb ... 268s Unpacking libsharpyuv0:amd64 (1.5.0-0.1) ... 268s Selecting previously unselected package libsm6:amd64. 268s Preparing to unpack .../080-libsm6_2%3a1.2.4-1_amd64.deb ... 268s Unpacking libsm6:amd64 (2:1.2.4-1) ... 268s Selecting previously unselected package libtcl8.6:amd64. 268s Preparing to unpack .../081-libtcl8.6_8.6.16+dfsg-1_amd64.deb ... 268s Unpacking libtcl8.6:amd64 (8.6.16+dfsg-1) ... 269s Selecting previously unselected package libjbig0:amd64. 269s Preparing to unpack .../082-libjbig0_2.1-6.1ubuntu2_amd64.deb ... 269s Unpacking libjbig0:amd64 (2.1-6.1ubuntu2) ... 269s Selecting previously unselected package libwebp7:amd64. 269s Preparing to unpack .../083-libwebp7_1.5.0-0.1_amd64.deb ... 269s Unpacking libwebp7:amd64 (1.5.0-0.1) ... 269s Selecting previously unselected package libtiff6:amd64. 269s Preparing to unpack .../084-libtiff6_4.7.0-3ubuntu1_amd64.deb ... 269s Unpacking libtiff6:amd64 (4.7.0-3ubuntu1) ... 269s Selecting previously unselected package libxft2:amd64. 269s Preparing to unpack .../085-libxft2_2.3.6-1build1_amd64.deb ... 269s Unpacking libxft2:amd64 (2.3.6-1build1) ... 269s Selecting previously unselected package libxss1:amd64. 269s Preparing to unpack .../086-libxss1_1%3a1.2.3-1build3_amd64.deb ... 269s Unpacking libxss1:amd64 (1:1.2.3-1build3) ... 269s Selecting previously unselected package libtk8.6:amd64. 269s Preparing to unpack .../087-libtk8.6_8.6.16-1_amd64.deb ... 269s Unpacking libtk8.6:amd64 (8.6.16-1) ... 269s Selecting previously unselected package libxt6t64:amd64. 269s Preparing to unpack .../088-libxt6t64_1%3a1.2.1-1.2build1_amd64.deb ... 269s Unpacking libxt6t64:amd64 (1:1.2.1-1.2build1) ... 269s Selecting previously unselected package zip. 269s Preparing to unpack .../089-zip_3.0-14ubuntu2_amd64.deb ... 269s Unpacking zip (3.0-14ubuntu2) ... 269s Selecting previously unselected package unzip. 269s Preparing to unpack .../090-unzip_6.0-28ubuntu6_amd64.deb ... 269s Unpacking unzip (6.0-28ubuntu6) ... 269s Selecting previously unselected package xdg-utils. 269s Preparing to unpack .../091-xdg-utils_1.2.1-2ubuntu1_all.deb ... 269s Unpacking xdg-utils (1.2.1-2ubuntu1) ... 269s Selecting previously unselected package r-base-core. 269s Preparing to unpack .../092-r-base-core_4.4.3-1_amd64.deb ... 269s Unpacking r-base-core (4.4.3-1) ... 269s Selecting previously unselected package r-cran-littler. 269s Preparing to unpack .../093-r-cran-littler_0.3.20-2_amd64.deb ... 269s Unpacking r-cran-littler (0.3.20-2) ... 269s Selecting previously unselected package littler. 269s Preparing to unpack .../094-littler_0.3.20-2_all.deb ... 269s Unpacking littler (0.3.20-2) ... 269s Selecting previously unselected package liblzma-dev:amd64. 269s Preparing to unpack .../095-liblzma-dev_5.6.4-1ubuntu1_amd64.deb ... 269s Unpacking liblzma-dev:amd64 (5.6.4-1ubuntu1) ... 269s Selecting previously unselected package pkgconf-bin. 269s Preparing to unpack .../096-pkgconf-bin_1.8.1-4_amd64.deb ... 269s Unpacking pkgconf-bin (1.8.1-4) ... 269s Selecting previously unselected package pkgconf:amd64. 269s Preparing to unpack .../097-pkgconf_1.8.1-4_amd64.deb ... 269s Unpacking pkgconf:amd64 (1.8.1-4) ... 269s Selecting previously unselected package libtirpc-dev:amd64. 269s Preparing to unpack .../098-libtirpc-dev_1.3.4+ds-1.3_amd64.deb ... 269s Unpacking libtirpc-dev:amd64 (1.3.4+ds-1.3) ... 269s Selecting previously unselected package r-base-dev. 269s Preparing to unpack .../099-r-base-dev_4.4.3-1_all.deb ... 269s Unpacking r-base-dev (4.4.3-1) ... 269s Selecting previously unselected package pkg-r-autopkgtest. 269s Preparing to unpack .../100-pkg-r-autopkgtest_20231212ubuntu1_all.deb ... 269s Unpacking pkg-r-autopkgtest (20231212ubuntu1) ... 269s Selecting previously unselected package r-cran-boot. 269s Preparing to unpack .../101-r-cran-boot_1.3-31-1_all.deb ... 269s Unpacking r-cran-boot (1.3-31-1) ... 270s Selecting previously unselected package r-cran-brio. 270s Preparing to unpack .../102-r-cran-brio_1.1.5-1_amd64.deb ... 270s Unpacking r-cran-brio (1.1.5-1) ... 270s Selecting previously unselected package r-cran-ps. 270s Preparing to unpack .../103-r-cran-ps_1.9.0-1_amd64.deb ... 270s Unpacking r-cran-ps (1.9.0-1) ... 270s Selecting previously unselected package r-cran-r6. 270s Preparing to unpack .../104-r-cran-r6_2.6.1-1_all.deb ... 270s Unpacking r-cran-r6 (2.6.1-1) ... 270s Selecting previously unselected package r-cran-processx. 270s Preparing to unpack .../105-r-cran-processx_3.8.6-1_amd64.deb ... 270s Unpacking r-cran-processx (3.8.6-1) ... 270s Selecting previously unselected package r-cran-callr. 270s Preparing to unpack .../106-r-cran-callr_3.7.6-1_all.deb ... 270s Unpacking r-cran-callr (3.7.6-1) ... 270s Selecting previously unselected package r-cran-cli. 270s Preparing to unpack .../107-r-cran-cli_3.6.4-1_amd64.deb ... 270s Unpacking r-cran-cli (3.6.4-1) ... 270s Selecting previously unselected package r-cran-crayon. 270s Preparing to unpack .../108-r-cran-crayon_1.5.3-1_all.deb ... 270s Unpacking r-cran-crayon (1.5.3-1) ... 270s Selecting previously unselected package r-cran-desc. 270s Preparing to unpack .../109-r-cran-desc_1.4.3-1_all.deb ... 270s Unpacking r-cran-desc (1.4.3-1) ... 270s Selecting previously unselected package r-cran-diffobj. 270s Preparing to unpack .../110-r-cran-diffobj_0.3.5-1_amd64.deb ... 270s Unpacking r-cran-diffobj (0.3.5-1) ... 270s Selecting previously unselected package r-cran-digest. 270s Preparing to unpack .../111-r-cran-digest_0.6.37-1_amd64.deb ... 270s Unpacking r-cran-digest (0.6.37-1) ... 270s Selecting previously unselected package r-cran-evaluate. 270s Preparing to unpack .../112-r-cran-evaluate_1.0.3-1_all.deb ... 270s Unpacking r-cran-evaluate (1.0.3-1) ... 270s Selecting previously unselected package r-cran-fs. 270s Preparing to unpack .../113-r-cran-fs_1.6.5+dfsg-1_amd64.deb ... 270s Unpacking r-cran-fs (1.6.5+dfsg-1) ... 270s Selecting previously unselected package r-cran-glue. 270s Preparing to unpack .../114-r-cran-glue_1.8.0-1_amd64.deb ... 270s Unpacking r-cran-glue (1.8.0-1) ... 270s Selecting previously unselected package r-cran-jsonlite. 270s Preparing to unpack .../115-r-cran-jsonlite_1.9.1+dfsg-1_amd64.deb ... 270s Unpacking r-cran-jsonlite (1.9.1+dfsg-1) ... 270s Selecting previously unselected package r-cran-lattice. 270s Preparing to unpack .../116-r-cran-lattice_0.22-6-1_amd64.deb ... 270s Unpacking r-cran-lattice (0.22-6-1) ... 270s Selecting previously unselected package r-cran-rlang. 270s Preparing to unpack .../117-r-cran-rlang_1.1.5-1_amd64.deb ... 270s Unpacking r-cran-rlang (1.1.5-1) ... 270s Selecting previously unselected package r-cran-lifecycle. 270s Preparing to unpack .../118-r-cran-lifecycle_1.0.4+dfsg-1_all.deb ... 270s Unpacking r-cran-lifecycle (1.0.4+dfsg-1) ... 270s Selecting previously unselected package r-cran-matrix. 270s Preparing to unpack .../119-r-cran-matrix_1.7-3-1_amd64.deb ... 270s Unpacking r-cran-matrix (1.7-3-1) ... 270s Selecting previously unselected package r-cran-mass. 270s Preparing to unpack .../120-r-cran-mass_7.3-65-1_amd64.deb ... 270s Unpacking r-cran-mass (7.3-65-1) ... 270s Selecting previously unselected package r-cran-nlme. 270s Preparing to unpack .../121-r-cran-nlme_3.1.168-1_amd64.deb ... 270s Unpacking r-cran-nlme (3.1.168-1) ... 270s Selecting previously unselected package r-cran-pkgkitten. 270s Preparing to unpack .../122-r-cran-pkgkitten_0.2.4-1_all.deb ... 270s Unpacking r-cran-pkgkitten (0.2.4-1) ... 270s Selecting previously unselected package r-cran-rcpp. 270s Preparing to unpack .../123-r-cran-rcpp_1.0.14-1_amd64.deb ... 270s Unpacking r-cran-rcpp (1.0.14-1) ... 271s Selecting previously unselected package r-cran-minqa. 271s Preparing to unpack .../124-r-cran-minqa_1.2.8-1_amd64.deb ... 271s Unpacking r-cran-minqa (1.2.8-1) ... 271s Selecting previously unselected package libnlopt0:amd64. 271s Preparing to unpack .../125-libnlopt0_2.7.1-6ubuntu3_amd64.deb ... 271s Unpacking libnlopt0:amd64 (2.7.1-6ubuntu3) ... 271s Selecting previously unselected package r-cran-nloptr. 271s Preparing to unpack .../126-r-cran-nloptr_2.2.1-1_amd64.deb ... 271s Unpacking r-cran-nloptr (2.2.1-1) ... 271s Selecting previously unselected package r-cran-rbibutils. 271s Preparing to unpack .../127-r-cran-rbibutils_2.3-1_amd64.deb ... 271s Unpacking r-cran-rbibutils (2.3-1) ... 271s Selecting previously unselected package r-cran-rdpack. 271s Preparing to unpack .../128-r-cran-rdpack_2.6.3-1_all.deb ... 271s Unpacking r-cran-rdpack (2.6.3-1) ... 271s Selecting previously unselected package r-cran-reformulas. 271s Preparing to unpack .../129-r-cran-reformulas_0.4.1-1_all.deb ... 271s Unpacking r-cran-reformulas (0.4.1-1) ... 271s Selecting previously unselected package r-cran-rcppeigen. 271s Preparing to unpack .../130-r-cran-rcppeigen_0.3.4.0.2-1_amd64.deb ... 271s Unpacking r-cran-rcppeigen (0.3.4.0.2-1) ... 271s Selecting previously unselected package r-cran-statmod. 271s Preparing to unpack .../131-r-cran-statmod_1.5.0-1_amd64.deb ... 271s Unpacking r-cran-statmod (1.5.0-1) ... 271s Selecting previously unselected package r-cran-lme4. 271s Preparing to unpack .../132-r-cran-lme4_1.1-36-1_amd64.deb ... 271s Unpacking r-cran-lme4 (1.1-36-1) ... 271s Selecting previously unselected package r-cran-magrittr. 271s Preparing to unpack .../133-r-cran-magrittr_2.0.3-1_amd64.deb ... 271s Unpacking r-cran-magrittr (2.0.3-1) ... 271s Selecting previously unselected package r-cran-nnet. 271s Preparing to unpack .../134-r-cran-nnet_7.3-20-1_amd64.deb ... 271s Unpacking r-cran-nnet (7.3-20-1) ... 271s Selecting previously unselected package r-cran-numderiv. 271s Preparing to unpack .../135-r-cran-numderiv_2016.8-1.1-3_all.deb ... 271s Unpacking r-cran-numderiv (2016.8-1.1-3) ... 271s Selecting previously unselected package r-cran-ucminf. 271s Preparing to unpack .../136-r-cran-ucminf_1.2.2-1_amd64.deb ... 271s Unpacking r-cran-ucminf (1.2.2-1) ... 271s Selecting previously unselected package r-cran-ordinal. 271s Preparing to unpack .../137-r-cran-ordinal_2023.12-4.1-1_amd64.deb ... 271s Unpacking r-cran-ordinal (2023.12-4.1-1) ... 271s Selecting previously unselected package r-cran-pkgbuild. 271s Preparing to unpack .../138-r-cran-pkgbuild_1.4.6-1_all.deb ... 271s Unpacking r-cran-pkgbuild (1.4.6-1) ... 271s Selecting previously unselected package r-cran-rprojroot. 271s Preparing to unpack .../139-r-cran-rprojroot_2.0.4-2_all.deb ... 271s Unpacking r-cran-rprojroot (2.0.4-2) ... 271s Selecting previously unselected package r-cran-withr. 271s Preparing to unpack .../140-r-cran-withr_3.0.2+dfsg-1_all.deb ... 271s Unpacking r-cran-withr (3.0.2+dfsg-1) ... 271s Selecting previously unselected package r-cran-pkgload. 271s Preparing to unpack .../141-r-cran-pkgload_1.4.0-1_all.deb ... 271s Unpacking r-cran-pkgload (1.4.0-1) ... 272s Selecting previously unselected package r-cran-praise. 272s Preparing to unpack .../142-r-cran-praise_1.0.0-4build1_all.deb ... 272s Unpacking r-cran-praise (1.0.0-4build1) ... 272s Selecting previously unselected package r-cran-waldo. 272s Preparing to unpack .../143-r-cran-waldo_0.6.1-2_all.deb ... 272s Unpacking r-cran-waldo (0.6.1-2) ... 272s Selecting previously unselected package r-cran-testthat. 272s Preparing to unpack .../144-r-cran-testthat_3.2.3-1_amd64.deb ... 272s Unpacking r-cran-testthat (3.2.3-1) ... 272s Selecting previously unselected package r-cran-xtable. 272s Preparing to unpack .../145-r-cran-xtable_1%3a1.8-4-2_all.deb ... 272s Unpacking r-cran-xtable (1:1.8-4-2) ... 272s Setting up libgraphite2-3:amd64 (1.3.14-2ubuntu1) ... 272s Setting up libpixman-1-0:amd64 (0.44.0-3) ... 272s Setting up libsharpyuv0:amd64 (1.5.0-0.1) ... 272s Setting up libncurses-dev:amd64 (6.5+20250216-2) ... 272s Setting up liblerc4:amd64 (4.0.0+ds-5ubuntu1) ... 272s Setting up libxrender1:amd64 (1:0.9.10-1.1build1) ... 272s Setting up libdatrie1:amd64 (0.2.13-3build1) ... 272s Setting up libxcb-render0:amd64 (1.17.0-2) ... 272s Setting up unzip (6.0-28ubuntu6) ... 272s Setting up x11-common (1:7.7+23ubuntu4) ... 272s Setting up libdeflate0:amd64 (1.23-2) ... 272s Setting up libnlopt0:amd64 (2.7.1-6ubuntu3) ... 272s Setting up libxcb-shm0:amd64 (1.17.0-2) ... 272s Setting up libreadline-dev:amd64 (8.2-6) ... 272s Setting up libgomp1:amd64 (15-20250404-0ubuntu1) ... 272s Setting up libjbig0:amd64 (2.1-6.1ubuntu2) ... 272s Setting up libpcre2-16-0:amd64 (10.45-1) ... 272s Setting up zip (3.0-14ubuntu2) ... 272s Setting up libpcre2-32-0:amd64 (10.45-1) ... 272s Setting up libblas3:amd64 (3.12.1-2) ... 272s update-alternatives: using /usr/lib/x86_64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/x86_64-linux-gnu/libblas.so.3 (libblas.so.3-x86_64-linux-gnu) in auto mode 272s Setting up libtirpc-dev:amd64 (1.3.4+ds-1.3) ... 272s Setting up libpkgconf3:amd64 (1.8.1-4) ... 272s Setting up libquadmath0:amd64 (15-20250404-0ubuntu1) ... 272s Setting up fonts-dejavu-mono (2.37-8) ... 272s Setting up libmpc3:amd64 (1.3.1-1build2) ... 272s Setting up libtcl8.6:amd64 (8.6.16+dfsg-1) ... 272s Setting up icu-devtools (76.1-1ubuntu2) ... 272s Setting up fonts-dejavu-core (2.37-8) ... 272s Setting up pkgconf-bin (1.8.1-4) ... 272s Setting up libjpeg-turbo8:amd64 (2.1.5-3ubuntu2) ... 272s Setting up libgfortran5:amd64 (15-20250404-0ubuntu1) ... 272s Setting up libwebp7:amd64 (1.5.0-0.1) ... 272s Setting up liblzma-dev:amd64 (5.6.4-1ubuntu1) ... 272s Setting up libubsan1:amd64 (15-20250404-0ubuntu1) ... 272s Setting up zlib1g-dev:amd64 (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 272s Setting up libpcre2-posix3:amd64 (10.45-1) ... 272s Setting up libhwasan0:amd64 (15-20250404-0ubuntu1) ... 272s Setting up libasan8:amd64 (15-20250404-0ubuntu1) ... 272s Setting up libharfbuzz0b:amd64 (10.2.0-1) ... 272s Setting up libthai-data (0.1.29-2build1) ... 272s Setting up libxss1:amd64 (1:1.2.3-1build3) ... 272s Setting up libpaper2:amd64 (2.2.5-0.3) ... 272s Setting up libtsan2:amd64 (15-20250404-0ubuntu1) ... 272s Setting up libisl23:amd64 (0.27-1) ... 272s Setting up libdeflate-dev:amd64 (1.23-2) ... 272s Setting up libicu-dev:amd64 (76.1-1ubuntu2) ... 272s Setting up xdg-utils (1.2.1-2ubuntu1) ... 272s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 272s Setting up libcc1-0:amd64 (15-20250404-0ubuntu1) ... 272s Setting up liblsan0:amd64 (15-20250404-0ubuntu1) ... 272s Setting up libblas-dev:amd64 (3.12.1-2) ... 272s update-alternatives: using /usr/lib/x86_64-linux-gnu/blas/libblas.so to provide /usr/lib/x86_64-linux-gnu/libblas.so (libblas.so-x86_64-linux-gnu) in auto mode 272s Setting up dctrl-tools (2.24-3build3) ... 272s Setting up libitm1:amd64 (15-20250404-0ubuntu1) ... 272s Setting up libbz2-dev:amd64 (1.0.8-6) ... 272s Setting up libjpeg8:amd64 (8c-2ubuntu11) ... 272s Setting up libice6:amd64 (2:1.1.1-1) ... 272s Setting up libjpeg-turbo8-dev:amd64 (2.1.5-3ubuntu2) ... 272s Setting up liblapack3:amd64 (3.12.1-2) ... 272s update-alternatives: using /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/x86_64-linux-gnu/liblapack.so.3 (liblapack.so.3-x86_64-linux-gnu) in auto mode 272s Setting up libpcre2-dev:amd64 (10.45-1) ... 272s Setting up fontconfig-config (2.15.0-2.2ubuntu1) ... 273s Setting up libpng-dev:amd64 (1.6.47-1.1) ... 273s Setting up libpaper-utils (2.2.5-0.3) ... 273s Setting up pkgconf:amd64 (1.8.1-4) ... 273s Setting up libthai0:amd64 (0.1.29-2build1) ... 273s Setting up liblapack-dev:amd64 (3.12.1-2) ... 273s update-alternatives: using /usr/lib/x86_64-linux-gnu/lapack/liblapack.so to provide /usr/lib/x86_64-linux-gnu/liblapack.so (liblapack.so-x86_64-linux-gnu) in auto mode 273s Setting up cpp-14-x86-64-linux-gnu (14.2.0-19ubuntu2) ... 273s Setting up cpp-14 (14.2.0-19ubuntu2) ... 273s Setting up libtiff6:amd64 (4.7.0-3ubuntu1) ... 273s Setting up libfontconfig1:amd64 (2.15.0-2.2ubuntu1) ... 273s Setting up libgcc-14-dev:amd64 (14.2.0-19ubuntu2) ... 273s Setting up libjpeg8-dev:amd64 (8c-2ubuntu11) ... 273s Setting up libstdc++-14-dev:amd64 (14.2.0-19ubuntu2) ... 273s Setting up libsm6:amd64 (2:1.2.4-1) ... 273s Setting up cpp-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 273s Setting up libgfortran-14-dev:amd64 (14.2.0-19ubuntu2) ... 273s Setting up fontconfig (2.15.0-2.2ubuntu1) ... 275s Regenerating fonts cache... done. 275s Setting up libxft2:amd64 (2.3.6-1build1) ... 275s Setting up libtk8.6:amd64 (8.6.16-1) ... 275s Setting up libpango-1.0-0:amd64 (1.56.3-1) ... 275s Setting up libjpeg-dev:amd64 (8c-2ubuntu11) ... 275s Setting up libcairo2:amd64 (1.18.4-1) ... 275s Setting up libxt6t64:amd64 (1:1.2.1-1.2build1) ... 275s Setting up cpp (4:14.2.0-1ubuntu1) ... 275s Setting up gcc-14-x86-64-linux-gnu (14.2.0-19ubuntu2) ... 275s Setting up libpangoft2-1.0-0:amd64 (1.56.3-1) ... 275s Setting up libpangocairo-1.0-0:amd64 (1.56.3-1) ... 275s Setting up gcc-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 275s Setting up gcc-14 (14.2.0-19ubuntu2) ... 275s Setting up gfortran-14-x86-64-linux-gnu (14.2.0-19ubuntu2) ... 275s Setting up r-base-core (4.4.3-1) ... 275s Creating config file /etc/R/Renviron with new version 275s Setting up r-cran-crayon (1.5.3-1) ... 275s Setting up r-cran-lattice (0.22-6-1) ... 275s Setting up r-cran-ps (1.9.0-1) ... 275s Setting up r-cran-nlme (3.1.168-1) ... 275s Setting up g++-14-x86-64-linux-gnu (14.2.0-19ubuntu2) ... 275s Setting up r-cran-statmod (1.5.0-1) ... 275s Setting up g++-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 275s Setting up r-cran-nnet (7.3-20-1) ... 275s Setting up g++-14 (14.2.0-19ubuntu2) ... 275s Setting up r-cran-r6 (2.6.1-1) ... 275s Setting up r-cran-pkgkitten (0.2.4-1) ... 275s Setting up gfortran-14 (14.2.0-19ubuntu2) ... 275s Setting up r-cran-numderiv (2016.8-1.1-3) ... 275s Setting up r-cran-magrittr (2.0.3-1) ... 275s Setting up r-cran-littler (0.3.20-2) ... 275s Setting up r-cran-fs (1.6.5+dfsg-1) ... 275s Setting up r-cran-rcpp (1.0.14-1) ... 275s Setting up r-cran-brio (1.1.5-1) ... 275s Setting up r-cran-nloptr (2.2.1-1) ... 275s Setting up r-cran-boot (1.3-31-1) ... 275s Setting up r-cran-diffobj (0.3.5-1) ... 275s Setting up r-cran-rlang (1.1.5-1) ... 275s Setting up littler (0.3.20-2) ... 275s Setting up r-cran-withr (3.0.2+dfsg-1) ... 275s Setting up r-cran-processx (3.8.6-1) ... 275s Setting up r-cran-praise (1.0.0-4build1) ... 275s Setting up r-cran-digest (0.6.37-1) ... 275s Setting up r-cran-evaluate (1.0.3-1) ... 275s Setting up r-cran-mass (7.3-65-1) ... 275s Setting up r-cran-glue (1.8.0-1) ... 275s Setting up gfortran-x86-64-linux-gnu (4:14.2.0-1ubuntu1) ... 275s Setting up r-cran-xtable (1:1.8-4-2) ... 275s Setting up r-cran-cli (3.6.4-1) ... 275s Setting up r-cran-rbibutils (2.3-1) ... 275s Setting up r-cran-lifecycle (1.0.4+dfsg-1) ... 275s Setting up r-cran-rprojroot (2.0.4-2) ... 275s Setting up gcc (4:14.2.0-1ubuntu1) ... 275s Setting up r-cran-jsonlite (1.9.1+dfsg-1) ... 275s Setting up r-cran-ucminf (1.2.2-1) ... 275s Setting up r-cran-waldo (0.6.1-2) ... 275s Setting up r-cran-matrix (1.7-3-1) ... 275s Setting up g++ (4:14.2.0-1ubuntu1) ... 275s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 275s Setting up build-essential (12.12ubuntu1) ... 275s Setting up r-cran-rcppeigen (0.3.4.0.2-1) ... 275s Setting up r-cran-minqa (1.2.8-1) ... 275s Setting up r-cran-callr (3.7.6-1) ... 275s Setting up r-cran-ordinal (2023.12-4.1-1) ... 275s Setting up r-cran-desc (1.4.3-1) ... 275s Setting up r-cran-rdpack (2.6.3-1) ... 275s Setting up gfortran (4:14.2.0-1ubuntu1) ... 275s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 275s 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 275s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 275s 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 275s Setting up r-cran-pkgbuild (1.4.6-1) ... 275s Setting up r-cran-reformulas (0.4.1-1) ... 275s Setting up r-cran-pkgload (1.4.0-1) ... 275s Setting up r-base-dev (4.4.3-1) ... 275s Setting up r-cran-lme4 (1.1-36-1) ... 275s Setting up r-cran-testthat (3.2.3-1) ... 275s Setting up pkg-r-autopkgtest (20231212ubuntu1) ... 275s Processing triggers for libc-bin (2.41-6ubuntu1) ... 275s Processing triggers for man-db (2.13.0-1) ... 277s Processing triggers for install-info (7.1.1-1) ... 279s autopkgtest [18:57:11]: test pkg-r-autopkgtest: /usr/share/dh-r/pkg-r-autopkgtest 279s autopkgtest [18:57:11]: test pkg-r-autopkgtest: [----------------------- 280s Test: Try to load the R library ordinal 280s 280s R version 4.4.3 (2025-02-28) -- "Trophy Case" 280s Copyright (C) 2025 The R Foundation for Statistical Computing 280s Platform: x86_64-pc-linux-gnu 280s 280s R is free software and comes with ABSOLUTELY NO WARRANTY. 280s You are welcome to redistribute it under certain conditions. 280s Type 'license()' or 'licence()' for distribution details. 280s 280s R is a collaborative project with many contributors. 280s Type 'contributors()' for more information and 280s 'citation()' on how to cite R or R packages in publications. 280s 280s Type 'demo()' for some demos, 'help()' for on-line help, or 280s 'help.start()' for an HTML browser interface to help. 280s Type 'q()' to quit R. 280s 280s > library('ordinal') 281s > 281s > 281s Other tests are currently unsupported! 281s They will be progressively added. 281s autopkgtest [18:57:13]: test pkg-r-autopkgtest: -----------------------] 282s autopkgtest [18:57:14]: test pkg-r-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 282s pkg-r-autopkgtest PASS 282s autopkgtest [18:57:14]: @@@@@@@@@@@@@@@@@@@@ summary 282s run-unit-test PASS 282s pkg-r-autopkgtest PASS 298s nova [W] Skipping flock for amd64 298s Creating nova instance adt-questing-amd64-r-cran-ordinal-20250503-185232-juju-7f2275-prod-proposed-migration-environment-23-e9e3372d-3898-4be5-93a3-aad03b3b45e8 from image adt/ubuntu-questing-amd64-server-20250503.img (UUID 57b7c1b6-ad80-4bdb-b031-36f045f7f3b3)... 298s nova [W] Timed out waiting for bc33f7ac-b2d7-48ea-870f-44c75fdace4d to get deleted. 298s nova [W] Skipping flock for amd64 298s Creating nova instance adt-questing-amd64-r-cran-ordinal-20250503-185232-juju-7f2275-prod-proposed-migration-environment-23-e9e3372d-3898-4be5-93a3-aad03b3b45e8 from image adt/ubuntu-questing-amd64-server-20250503.img (UUID 57b7c1b6-ad80-4bdb-b031-36f045f7f3b3)... 298s nova [W] Timed out waiting for 466889d4-5927-4eef-a6b8-b5bbbf24b1e6 to get deleted.