R Under development (unstable) (2024-01-12 r85803 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # functions that are required in the testing suite > > # utility function > all_equal <- function(target, current, label, + tolerance = sqrt(.Machine$double.eps), scale = NULL, + check.attributes = FALSE) + { + if (missing(label)) + stop("Argument 'label' is missing\n") + res <- all.equal(target, current, tolerance, scale, + check.attributes = check.attributes) + if (is.character(res)) + cat(paste0(label, ": ", res, "\n")) + } > > # check functions for coef() and SE() > check <- function(ref, est, what, characteristic) + { + all_equal(as.numeric(coef(ref)), as.numeric(coef(est)), + paste0(what, ": ", characteristic, ": coef")) + all_equal(as.numeric(SE(ref)), as.numeric(SE(est)), + paste0(what,": ", characteristic, ": SE")) + } > > proc.time() user system elapsed 0.14 0.03 0.15