* using log directory ‘/data/localhost/ripley/R/packages/tests-MKL/rdlocrand.Rcheck’ * using R Under development (unstable) (2026-10-30 r90795) * 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-30 07:40:01 UTC * using option ‘--no-stop-on-test-error’ * checking for file ‘rdlocrand/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘rdlocrand’ version ‘3.0’ * package encoding: UTF-8 * 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 ‘rdlocrand’ can be installed ... OK * 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 ... 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 examples ... OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘numerical-regression.R’ Running ‘polynomial-inference.R’ ERROR Running the tests in ‘tests/polynomial-inference.R’ failed. Complete output: > library(rdlocrand) > quiet <- function(expr) { + value <- NULL + invisible(capture.output(value <- force(expr))) + value + } > equal <- function(actual, expected, tolerance = 1e-8) { + stopifnot(isTRUE(all.equal(unname(actual), unname(expected), tolerance = tolerance, check.attributes = FALSE))) + } > r <- 2+c(seq(-.9, -.015, length.out=48), seq(.01, 1.1, length.out=63)) > d <- as.numeric(r>=2); i <- seq_along(r) > t <- .7*d+.4*sin(i*.41)+.2*(r-2)+.1*d*(r-2) > y <- 1.2*t+.5*(r-2)-.25*d*(r-2)+(sin(i*1.7)+.4*cos(i*.33))*(1+.5*(r-2)) > base <- list(Y=y, R=r, cutoff=2, wl=1.1, wr=3.1, quietly=TRUE, nulltau=.6) > run <- function(...) quiet(do.call(rdrandinf, c(base, list(...)))) > > # Independent OLS sandwich and IV moment-matrix sandwich; HC1 IV also matches AER. > for (p in 1:2) for (kernel in c('uniform','triangular','epan')) for (vce in c('HC1','HC2','HC3')) { + u <- (r-2)/ifelse(d==1,1.1,-.9) + w <- switch(kernel, uniform=rep(1,length(r)), triangular=pmax(1-abs(u),0), epan=.75*pmax(1-u^2,0)) + keep <- w>1e-14; w <- w[keep]; dw <- d[keep]; tw <- t[keep] + powers <- outer(r[keep]-2, seq_len(p), '^') + z <- cbind(1, dw, powers, dw*powers) + for (kind in c('sharp','ar','tsls')) { + yy <- if (kind=='sharp') y[keep]-.6*dw else if (kind=='ar') y[keep]-.6*tw else y[keep] + fuzzy <- if(kind=='sharp') NULL else if(kind=='ar') t else c(t,'tsls') + if (kind!='tsls') { + fit <- lm(yy ~ z-1, weights=w) + estimate <- coef(fit)[2] + se <- sqrt(sandwich::vcovHC(fit,type=vce)[2,2]) + } else { + x <- z; x[,2] <- tw + zw <- z*sqrt(w); xw <- x*sqrt(w) + projected <- zw %*% solve(crossprod(zw),crossprod(zw,xw)) + bread <- solve(crossprod(projected)) + beta <- bread %*% crossprod(projected,yy*sqrt(w)) + residual <- as.numeric(yy-x%*%beta)*sqrt(w) + h <- rowSums((projected%*%bread)*projected) + scale <- switch(vce,HC1=length(yy)/(length(yy)-ncol(x)),HC2=1/(1-h),HC3=1/(1-h)^2) + cov <- bread %*% crossprod(projected,projected*as.numeric(residual^2*scale)) %*% bread + estimate <- beta[2]; se <- sqrt(cov[2,2]) + if (vce=='HC1') { + fit <- AER::ivreg(yy ~ tw+powers+dw:powers | dw+powers+dw:powers, weights=w) + equal(c(estimate,se),c(coef(fit)['tw'],sqrt(sandwich::vcovHC(fit,type='HC1')['tw','tw']))) + } + } + out <- run(p=p,kernel=kernel,vce=vce,fuzzy=fuzzy) + equal(c(out$obs.stat,out$se),c(estimate,se)) + equal(out$asy.pvalue,2*pnorm(-abs((estimate-if(kind=='tsls') .6 else 0)/se))) + stopifnot(is.na(out$p.value),out$inference=='large-sample') + } + } Error in equal(c(estimate, se), c(coef(fit)["tw"], sqrt(sandwich::vcovHC(fit, : isTRUE(all.equal(unname(actual), unname(expected), tolerance = tolerance, .... is not TRUE Calls: equal -> stopifnot Execution halted * checking PDF version of manual ... 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/rdlocrand.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 0:35.63, 25.78 + 3.70