* using log directory ‘/data/localhost/ripley/R/packages/tests-MKL/eDMA.Rcheck’ * using R Under development (unstable) (2026-10-28 r90786) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (GCC) 16.2.1 20260819 (Red Hat 16.2.1-2) GNU Fortran (GCC) 16.2.1 20260819 (Red Hat 16.2.1-2) * running under: Fedora Linux 44 (Server Edition) * using session charset: UTF-8 * current time: 2026-10-29 22:20:07 UTC * using option ‘--no-stop-on-test-error’ * checking for file ‘eDMA/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘eDMA’ version ‘1.5-5’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘eDMA’ can be installed ... [62s/133s] OK * used C++ compiler: ‘g++ (GCC) 16.2.1 20260819 (Red Hat 16.2.1-2)’ * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [4s/11s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... OK * checking for GNU extensions in Makefiles ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking use of PKG_*FLAGS in Makefiles ... OK * checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK * checking pragmas in C/C++ headers and code ... OK * checking compilation flags used ... OK * checking compiled code ... OK * checking examples ... OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘regression.R’ ERROR Running the tests in ‘tests/regression.R’ failed. Complete output: > library(eDMA) Loading required package: zoo Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric Loading required package: xts Loading required package: parallel > checks <- 0L > check <- function(ok, label) { + if (!isTRUE(ok)) stop(label, call. = FALSE) + checks <<- checks + 1L + cat(sprintf("PASS %03d %s\n", checks, label)) + } > close <- function(a, b, tolerance = 2e-9) isTRUE(all.equal(as.numeric(a), as.numeric(b), tolerance = tolerance)) > fails <- function(expr, pattern = NULL) { + result <- tryCatch({force(expr); NULL}, error = identity) + inherits(result, "error") && (is.null(pattern) || grepl(pattern, conditionMessage(result))) + } > > # Independent small-model implementation: ordinary probability arithmetic, > # base R dt(), and the subtractive Kalman covariance formula. > reference <- function(y, X, deltas, alpha, beta, g = 4, S0 = 1, n0 = 2, required = integer()) { + K <- ncol(X); T <- length(y); D <- length(deltas) + models <- lapply(seq_len(2^K - 1L), function(mask) which(as.logical(intToBits(mask)[seq_len(K)]))) + models <- Filter(function(idx) all(required %in% idx), models) + M <- length(models) + states <- lapply(seq_len(M * D), function(h) { + p <- length(models[[(h - 1L) %% M + 1L]]) + list(m = numeric(p), C = diag(g, p), S = S0) + }) + a <- matrix(1/M, M, D); b <- rep(1/D, D); n <- n0 + output <- list(vyhat = numeric(T), vLpdfhat = numeric(T), mmhat = matrix(0,T,K), + mcovhat = matrix(0,T,K), mincpmt = matrix(0,T,K), mpmt = matrix(0,T,D), + mpmt_pred = matrix(0,T,D), mLpdf = matrix(0,T,D), mvdec = matrix(0,T,5), + vShat = numeric(T), vsize = numeric(T), vdeltahat = numeric(T), + vyhat_DMS = numeric(T), vLpdfhat_DMS = numeric(T), + vsize_DMS = numeric(T), vhighmp_DMS = numeric(T), vhighmpTop01_DMS = numeric(T)) + for (t in seq_len(T)) { + ap <- a^alpha; ap <- sweep(ap, 2, colSums(ap), "/") + bp <- b^alpha / sum(b^alpha) + output$mpmt_pred[t, ] <- bp + nu <- beta * n + 1 + f <- obs <- coeff <- density <- matrix(0, M, D) + means <- variances <- array(0, c(K, M, D)) + for (d in seq_len(D)) for (j in seq_len(M)) { + h <- (d-1L)*M+j; s <- states[[h]]; idx <- models[[j]]; x <- X[t, idx] + R <- s$C / if (t == 1L) 1 else deltas[d] + f[j,d] <- sum(x*s$m); coeff[j,d] <- drop(t(x)%*%R%*%x); obs[j,d] <- s$S + q <- coeff[j,d]+s$S; e <- y[t]-f[j,d] + density[j,d] <- dt(e/sqrt(q), df=nu)/sqrt(q) + gain <- drop(R%*%x)/q + s$m <- s$m+gain*e + s$C <- R-tcrossprod(gain)*q + s$S <- s$S+(s$S/nu)*(e^2/q-1) + states[[h]] <- s + means[idx,j,d] <- s$m; variances[idx,j,d] <- diag(s$C) + } + mu <- colSums(ap*f); overall <- sum(bp*mu) + output$vyhat[t] <- overall + vo <- sum(bp*colSums(ap*obs))*nu/(nu-2) + vc <- sum(bp*colSums(ap*coeff))*nu/(nu-2) + vm <- sum(bp*colSums(ap*sweep(f,2,mu,"-")^2)) + vt <- sum(bp*(mu-overall)^2) + output$mvdec[t,] <- c(vo+vc+vm+vt,vo,vc,vm,vt) + ds <- which.max(bp); js <- which.max(ap[,ds]) + output$vyhat_DMS[t] <- f[js,ds] + output$vLpdfhat_DMS[t] <- log(density[js,ds]) + ld <- colSums(ap*density); normalizer <- sum(bp*ld) + output$vLpdfhat[t] <- log(normalizer); output$mLpdf[t,] <- log(ld) + a <- sweep(ap*density,2,ld,"/"); b <- bp*ld/normalizer + joint <- sweep(a,2,b,"*"); marginal <- rowSums(joint) + for (k in seq_len(K)) { + output$mmhat[t,k] <- sum(joint*means[k,,]) + output$mcovhat[t,k] <- sum(joint*(variances[k,,]+(means[k,,]-output$mmhat[t,k])^2)) + output$mincpmt[t,k] <- sum(marginal[vapply(models,function(idx) k %in% idx,logical(1))]) + } + output$mpmt[t,] <- b + output$vShat[t] <- sum(as.vector(joint)*vapply(states,`[[`,numeric(1),"S")) + output$vsize[t] <- sum(marginal*lengths(models)) + output$vdeltahat[t] <- sum(b*deltas) + output$vsize_DMS[t] <- lengths(models)[which.max(marginal)] + output$vhighmp_DMS[t] <- max(marginal) + output$vhighmpTop01_DMS[t] <- sum(sort(marginal,decreasing=TRUE)[seq_len(ceiling(.1*M))]) + n <- nu + } + output + } > set.seed(181) > dat <- data.frame(y = rnorm(45), x = rnorm(45), z = rnorm(45), w = rnorm(45)) > args <- list(formula = y~x+z+w, data = dat, vDelta = c(.8,.97), dAlpha = .83, + dBeta = .96, dG = 4, bParallelize = FALSE) > fit <- do.call(DMA,args) > ref <- reference(dat$y,model.matrix(y~x+z+w,dat),args$vDelta,args$dAlpha,args$dBeta) > for (nm in names(ref)) check(close(fit@Est[[nm]],ref[[nm]]),paste("Independent numerical reference:",nm)) PASS 001 Independent numerical reference: vyhat PASS 002 Independent numerical reference: vLpdfhat PASS 003 Independent numerical reference: mmhat PASS 004 Independent numerical reference: mcovhat PASS 005 Independent numerical reference: mincpmt PASS 006 Independent numerical reference: mpmt PASS 007 Independent numerical reference: mpmt_pred PASS 008 Independent numerical reference: mLpdf PASS 009 Independent numerical reference: mvdec PASS 010 Independent numerical reference: vShat PASS 011 Independent numerical reference: vsize PASS 012 Independent numerical reference: vdeltahat PASS 013 Independent numerical reference: vyhat_DMS PASS 014 Independent numerical reference: vLpdfhat_DMS PASS 015 Independent numerical reference: vsize_DMS PASS 016 Independent numerical reference: vhighmp_DMS PASS 017 Independent numerical reference: vhighmpTop01_DMS > check(all(fit@Est$vhighmpTop01_DMS > fit@Est$vhighmp_DMS),"F11 top ten percent includes more than the largest model") PASS 018 F11 top ten percent includes more than the largest model > parargs <- args; parargs$bParallelize <- TRUE; parargs$iCores <- 2L > parallel <- suppressWarnings(do.call(DMA,parargs)) > for (nm in names(ref)) check(close(fit@Est[[nm]],parallel@Est[[nm]],0),paste("Sequential/parallel equality:",nm)) PASS 019 Sequential/parallel equality: vyhat PASS 020 Sequential/parallel equality: vLpdfhat PASS 021 Sequential/parallel equality: mmhat PASS 022 Sequential/parallel equality: mcovhat PASS 023 Sequential/parallel equality: mincpmt PASS 024 Sequential/parallel equality: mpmt PASS 025 Sequential/parallel equality: mpmt_pred PASS 026 Sequential/parallel equality: mLpdf PASS 027 Sequential/parallel equality: mvdec PASS 028 Sequential/parallel equality: vShat PASS 029 Sequential/parallel equality: vsize PASS 030 Sequential/parallel equality: vdeltahat PASS 031 Sequential/parallel equality: vyhat_DMS PASS 032 Sequential/parallel equality: vLpdfhat_DMS PASS 033 Sequential/parallel equality: vsize_DMS PASS 034 Sequential/parallel equality: vhighmp_DMS PASS 035 Sequential/parallel equality: vhighmpTop01_DMS > fixedargs <- args; fixedargs$vKeep <- c(1,3) > fixed <- do.call(DMA,fixedargs) > fixedref <- reference(dat$y,model.matrix(y~x+z+w,dat),args$vDelta,args$dAlpha,args$dBeta,required=c(1,3)) > check(close(fixed@Est$vyhat,fixedref$vyhat) && fixed@Est$iM==4,"Direct required-column enumeration") PASS 036 Direct required-column enumeration > check(all(abs(fixed@Est$mincpmt[,c(1,3)]-1)<1e-12),"Required columns have unit inclusion probability") PASS 037 Required columns have unit inclusion probability > > # Alter the current/future response without affecting any current prediction moments. > changed <- args; changed$data$y[25:45] <- changed$data$y[25:45]+20 > altered <- do.call(DMA,changed) > check(close(fit@Est$vyhat[1:25],altered@Est$vyhat[1:25]),"F1 point forecast causality") PASS 038 F1 point forecast causality > check(close(fit@Est$mvdec[1:25,],altered@Est$mvdec[1:25,]),"F5 predictive variance causality") PASS 039 F5 predictive variance causality > check(!close(fit@Est$mmhat[25,],altered@Est$mmhat[25,]),"F6 filtered means react to the current observation") PASS 040 F6 filtered means react to the current observation > check(close(fit@Est$mvdec[,1],rowSums(fit@Est$mvdec[,-1,drop=FALSE])),"Predictive variance components add up") PASS 041 Predictive variance components add up > > futureargs <- args; futureargs$data <- rbind(dat,data.frame(y=NA_real_,x=6,z=-2,w=3)) > future <- do.call(DMA,futureargs) > for (nm in names(ref)) check(close(fit@Est[[nm]],future@Est[[nm]],0),paste("F3 terminal prediction preserves history:",nm)) PASS 042 F3 terminal prediction preserves history: vyhat PASS 043 F3 terminal prediction preserves history: vLpdfhat PASS 044 F3 terminal prediction preserves history: mmhat PASS 045 F3 terminal prediction preserves history: mcovhat PASS 046 F3 terminal prediction preserves history: mincpmt PASS 047 F3 terminal prediction preserves history: mpmt PASS 048 F3 terminal prediction preserves history: mpmt_pred PASS 049 F3 terminal prediction preserves history: mLpdf PASS 050 F3 terminal prediction preserves history: mvdec PASS 051 F3 terminal prediction preserves history: vShat PASS 052 F3 terminal prediction preserves history: vsize PASS 053 F3 terminal prediction preserves history: vdeltahat PASS 054 F3 terminal prediction preserves history: vyhat_DMS PASS 055 F3 terminal prediction preserves history: vLpdfhat_DMS PASS 056 F3 terminal prediction preserves history: vsize_DMS PASS 057 F3 terminal prediction preserves history: vhighmp_DMS PASS 058 F3 terminal prediction preserves history: vhighmpTop01_DMS > scoredargs <- futureargs; scoredargs$data$y[46] <- 8 > scored <- do.call(DMA,scoredargs) > last <- getLastForecast(future) > check(close(last$PointForecast,scored@Est$vyhat[46]),"Future mean equals the pre-update forecast") PASS 059 Future mean equals the pre-update forecast > check(close(last$VarianceDecomposition,scored@Est$mvdec[46,]),"F4 variance belongs to the future predictor row") PASS 060 F4 variance belongs to the future predictor row > check(!close(last$VarianceDecomposition,fit@Est$mvdec[45,]),"Future variance is not the prior row's variance") PASS 061 Future variance is not the prior row's variance > native <- eDMA:::funcEstimate_Eff(c(dat$y,NA_real_), model.matrix(~x+z+w,futureargs$data), args$vDelta,.83,-9999,.96,FALSE,4) > check(all(is.na(native$veps[46,])) && is.na(native$vLpdfhat[46]),"Missing response is not scored") PASS 062 Missing response is not scored > check(close(native$mpmt[46,],native$mpmt[45,]),"Missing response does not update posterior probabilities") PASS 063 Missing response does not update posterior probabilities > check(close(native$mmhat[46,],native$mmhat[45,]),"Missing response does not update coefficients") PASS 064 Missing response does not update coefficients > > # Quadrature of the initial predictive mixture, independent of decomposition formulas. > X <- model.matrix(y~x+z+w,dat); xx <- X[1,] > subsets <- lapply(1:15,function(mask) which(as.logical(intToBits(mask)[1:4]))) > q <- vapply(subsets,function(idx) 1+4*sum(xx[idx]^2),numeric(1)) > nu <- .96*2+1 > mixdensity <- function(y) vapply(y,function(value) mean(dt(value/sqrt(q),nu)/sqrt(q)),numeric(1)) > check(abs(integrate(mixdensity,-Inf,Inf)$value-1)<1e-7,"F2 predictive density integrates to one") PASS 065 F2 predictive density integrates to one > second <- integrate(function(y) y^2*mixdensity(y),-Inf,Inf,rel.tol=1e-7)$value > check(abs(second-fit@Est$mvdec[1,1])<1e-5,"F5 variance agrees with Student-t density integration") PASS 066 F5 variance agrees with Student-t density integration > > # Startup, dimensions, NA, time indexes, parameter boundaries and helper contracts. > single <- DMA(y~1,dat,vDelta=.95,bParallelize=FALSE) > check(nrow(coef(single,iBurnPeriod=0))==45,"Zero burn-in retains all observations") PASS 067 Zero burn-in retains all observations > check(identical(dim(coef(single,iBurnPeriod=44)),c(1L,1L)),"Single-row single-column extraction") PASS 068 Single-row single-column extraction > check(identical(dim(as.data.frame(single,which="mpmt",iBurnPeriod=5)),c(40L,1L)),"Single-delta extraction after burn-in") PASS 069 Single-delta extraction after burn-in > check(close(BacktestDMA(single,0)[1,1],mean(single@Est$veps^2)),"Zero burn-in backtest") PASS 070 Zero burn-in backtest > warned <- FALSE > invisible(withCallingHandlers(BacktestDMA(single),warning=function(w) {warned <<- TRUE; invokeRestart("muffleWarning")})) > check(warned,"Default burn-in emits a warning") PASS 071 Default burn-in emits a warning > check(fails(getLastForecast(single),"No future forecast"),"Useful error for absent future forecast") PASS 072 Useful error for absent future forecast > check(fails(coef(single,iBurnPeriod=45)) && fails(coef(single,iBurnPeriod=-1)) && fails(coef(single,iBurnPeriod=.5)),"Burn-in boundaries validated") PASS 073 Burn-in boundaries validated > check(fails(residuals(single,type="bad")) && fails(pred.like(single,type="bad")),"Residual and likelihood types validated") PASS 074 Residual and likelihood types validated > check(close(sd(as.numeric(residuals(single,standardize=TRUE))),1),"Residual standardization uses global sample SD") PASS 075 Residual standardization uses global sample SD > one <- DMA(y~1,data.frame(y=0),bParallelize=FALSE,vDelta=1) > check(is.finite(one@Est$mvdec[1,1]) && one@Est$vyhat[1]==0 && one@Est$mmhat[1]==0,"F8 zero first response and one observation are defined") PASS 076 F8 zero first response and one observation are defined > zero <- DMA(y~0+x,data.frame(y=c(0,1,0),x=c(0,1,2)),vDelta=1,bParallelize=FALSE) > check(all(is.finite(zero@Est$mvdec)) && all(is.finite(zero@Est$vLpdfhat)),"F8 zero initial design is supported") PASS 077 F8 zero initial design is supported > smallnu <- DMA(y~1,dat,vDelta=1,dBeta=.1,bParallelize=FALSE) > check(is.infinite(smallnu@Est$vtotal[1]),"Infinite predictive variance for degrees of freedom at most two") PASS 078 Infinite predictive variance for degrees of freedom at most two > large <- dat; large$y[1] <- 1e50 > largefit <- DMA(y~x+z+w,large,bParallelize=FALSE) > check(all(is.finite(largefit@Est$vLpdfhat)) && all(is.finite(largefit@Est$mpmt)),"F9 extreme observation does not underflow probability normalization") PASS 079 F9 extreme observation does not underflow probability normalization > for (keep in list(character(),"unknown",c("x","unknown"),c(1,1),0,5,.5,NA_real_,c("KS","x"))) + check(fails(DMA(y~x,dat,vKeep=keep,bParallelize=FALSE)),paste("Invalid vKeep rejected:",paste(keep,collapse=","))) PASS 080 Invalid vKeep rejected: PASS 081 Invalid vKeep rejected: unknown PASS 082 Invalid vKeep rejected: x,unknown PASS 083 Invalid vKeep rejected: 1,1 PASS 084 Invalid vKeep rejected: 0 PASS 085 Invalid vKeep rejected: 5 PASS 086 Invalid vKeep rejected: 0.5 PASS 087 Invalid vKeep rejected: NA PASS 088 Invalid vKeep rejected: KS,x > for (entry in list(list(vDelta=numeric()),list(vDelta=0),list(vDelta=NA_real_),list(dAlpha=1.1),list(dBeta=0), + list(dG=0),list(dS0=0),list(dN0=0),list(iCores=0),list(iCores=1.2),list(bParallelize=NA),list(bZellnerPrior=1))) { + bad <- utils::modifyList(args,entry) + check(fails(do.call(DMA,bad)),paste("Invalid parameter rejected:",names(entry))) + } PASS 089 Invalid parameter rejected: vDelta PASS 090 Invalid parameter rejected: vDelta PASS 091 Invalid parameter rejected: vDelta PASS 092 Invalid parameter rejected: dAlpha PASS 093 Invalid parameter rejected: dBeta PASS 094 Invalid parameter rejected: dG PASS 095 Invalid parameter rejected: dS0 PASS 096 Invalid parameter rejected: dN0 PASS 097 Invalid parameter rejected: iCores PASS 098 Invalid parameter rejected: iCores PASS 099 Invalid parameter rejected: bParallelize PASS 100 Invalid parameter rejected: bZellnerPrior > check(fails(DMA(y~0,dat)),"Zero-column design rejected") PASS 101 Zero-column design rejected > check(fails(DMA(y~x,data.frame(y=c(NA,NA),x=1:2))),"All-missing response rejected") PASS 102 All-missing response rejected > check(fails(DMA(y~x,data.frame(y=factor(c("a","b")),x=1:2))),"Nonnumeric response rejected") PASS 103 Nonnumeric response rejected > check(fails(DMA(y~x,data.frame(y=c(1,Inf),x=1:2))),"Nonfinite observed response rejected") PASS 104 Nonfinite observed response rejected > check(fails(DMA(y~x,data.frame(y=c(1,NA),x=c(1,NA)))),"Missing future predictor rejected") PASS 105 Missing future predictor rejected > check(fails(DMA(y~x,data.frame(y=1:5,x=rep(1,5)),bZellnerPrior=TRUE)),"Rank-deficient Zellner prior rejected before workers") PASS 106 Rank-deficient Zellner prior rejected before workers > zargs <- args; zargs$bZellnerPrior <- TRUE > zfit <- do.call(DMA,zargs); zargs$data <- futureargs$data; zfuture <- do.call(DMA,zargs) > check(close(zfit@Est$vyhat,zfuture@Est$vyhat,0),"Zellner prior excludes the forecast-only row") Error: Zellner prior excludes the forecast-only row Execution halted * checking PDF version of manual ... [4s/11s] OK * checking HTML version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR See ‘/data/localhost/ripley/R/packages/tests-MKL/eDMA.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 3:32.62, 80.31 + 11.02