Last updated on 2026-01-30 05:51:03 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 0.7 | 13.10 | 130.61 | 143.71 | OK | |
| r-devel-linux-x86_64-debian-gcc | 0.7-1 | 9.85 | 98.26 | 108.11 | OK | |
| r-devel-linux-x86_64-fedora-clang | 0.7-1 | 21.00 | 204.93 | 225.93 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 0.7-1 | 23.00 | 218.27 | 241.27 | OK | |
| r-devel-windows-x86_64 | 0.7 | 22.00 | 147.00 | 169.00 | OK | |
| r-patched-linux-x86_64 | 0.7 | 15.46 | 120.80 | 136.26 | OK | |
| r-release-linux-x86_64 | 0.7 | 12.38 | 120.04 | 132.42 | OK | |
| r-release-macos-arm64 | 0.7-1 | 3.00 | 37.00 | 40.00 | ERROR | |
| r-release-macos-x86_64 | 0.7-1 | 11.00 | 133.00 | 144.00 | OK | |
| r-release-windows-x86_64 | 0.7 | 21.00 | 140.00 | 161.00 | OK | |
| r-oldrel-macos-arm64 | 0.7-1 | 3.00 | 41.00 | 44.00 | OK | |
| r-oldrel-macos-x86_64 | 0.7-1 | 11.00 | 174.00 | 185.00 | OK | |
| r-oldrel-windows-x86_64 | 0.7 | 26.00 | 176.00 | 202.00 | OK |
Version: 0.7-1
Check: tests
Result: ERROR
Running ‘basic.R’ [1s/1s]
Running ‘check_functions.R’ [0s/0s]
Running ‘domain.R’ [1s/1s]
Running ‘greg.R’ [1s/1s]
Running ‘huber2.R’ [1s/1s]
Running ‘ratio.R’ [1s/1s]
Running ‘reg.R’ [1s/1s]
Running the tests in ‘tests/reg.R’ failed.
Complete output:
> suppressPackageStartupMessages(library("survey"))
> library("robsurvey", quietly = TRUE)
> attach(workplace)
>
> # design object
> dn <- svydesign(ids = ~ID, strata = ~strat, fpc = ~fpc, weights = ~weight,
+ data = workplace)
>
> source("check_functions.R")
>
> #===============================================================================
> # 1 Test against MASS::rlm
> #===============================================================================
> if (requireNamespace("MASS", quietly = TRUE)) {
+ library(MASS)
+ # make a copy of MASS::rlm
+ rlm_mod <- MASS:::rlm.default
+ # replace wmad-function with our weighted mad
+ body(rlm_mod)[[4]] <- substitute(wmad <- function(x, w) weighted_mad(x, w))
+
+ #---------------------------------------------------------------------------
+ # Huber regression M-estimator
+ est <- svyreg_huberM(payroll ~ employment, dn, k = 1.345, tol = 1e-9)
+ ref <- rlm_mod(x = est$model$x, y = est$model$y, weights = est$model$w,
+ k = 1.345, scale.est = "MAD", method = "M", wt.method = "case",
+ acc = 1e-9, maxit = 50, test.vec = "coef")
+ all_equal(coef(est), coef(ref), tolerance = 1e-7,
+ label = "Huber regression regression: coefficients")
+ # model-based covariance matrix
+ all_equal(vcov(est, "model"), vcov(ref), tolerance = 1e-7,
+ label = "Huber regression M-est: model-based cov")
+ # design-based covariance matrix (test against fixed values)
+ ref <- matrix(c(61704317.084028, -3367311.1407500, -3367311.140750,
+ 870905.6027803), ncol = 2)
+ colnames(ref) <- rownames(ref) <- c("(Intercept)", "employment")
+ all_equal(vcov(est), ref,
+ label = "Huber regression M-est: design-based cov")
+
+ #---------------------------------------------------------------------------
+ # Tukey regression M-estimator
+ est <- svyreg_tukeyM(payroll ~ employment, dn, k = 4.6, tol = 1e-9)
+ ref <- rlm_mod(x = est$model$x, y = est$model$y, weights = est$model$w,
+ c = 4.6, psi = psi.bisquare, scale.est = "MAD", method = "M",
+ wt.method = "case", acc = 1e-9, maxit = 50, test.vec = "coef")
+ all_equal(coef(est), coef(ref), tolerance = 1e-7,
+ label = "Tukey regression regression: coefficients")
+ # model-based covariance matrix
+ all_equal(vcov(est, "model"), vcov(ref), tolerance = 1e-7,
+ label = "Tukey regression M-est: model-based cov")
+ # design-based covariance matrix (test against fixed values)
+ ref <- matrix(c(43513457.824988, -1421272.808406, -1421272.808406,
+ 589121.583227), ncol = 2)
+ colnames(ref) <- rownames(ref) <- c("(Intercept)", "employment")
+ all_equal(vcov(est), ref,
+ label = "Tukey regression M-est: design-based cov")
+ }
Error: Huber regression M-est: model-based cov: Mean relative difference: 1
Execution halted
Flavor: r-release-macos-arm64