R Under development (unstable) (2024-02-26 r85990 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. > ##################### > # All of the checks in this tests subdirectory were previously run with the > # following commented code. > > # require("mva"); require("ts"); require("dse") > # #x11() > # postscript(file="lite.out.ps", paper="letter", horizontal=F, onefile=T) > # # width=6, height=8, pointsize=10, > # system.info() > # DSEversion() > # random.number.test() > # dse.function.tests(verbose=T) > # example.verify.data(eg1.DSE.data.diff, fuzz.small=1e-12, verbose=T) > # # The following gave several..NOT CORRECT in R. It needs estVARXar (not in earlier versions of R). > # # example.tests(eg1.DSE.data.diff,fuzz.small=1e-12, verbose=TRUE) > > ##################### > Sys.getenv("R_LIBS") [1] "D:\\temp\\RtmpSiT7bA\\RLIBS_308482ef76f4" > library() > > require("dse") Loading required package: dse Loading required package: tfplot Loading required package: tframe Attaching package: 'dse' The following objects are masked from 'package:stats': acf, simulate > search() [1] ".GlobalEnv" "package:dse" "package:tfplot" [4] "package:tframe" "package:stats" "package:graphics" [7] "package:grDevices" "package:utils" "package:datasets" [10] "package:methods" "Autoloads" "package:base" > > Sys.info() sysname release version nodename machine "Windows" "Server x64" "build 20348" "CRANWIN3" "x86-64" login user effective_user "CRAN" "CRAN" "CRAN" > DSEversion() setRNG tframe dse "2024.2-1" "2015.12-1.1" "2024.2-2" > data("eg1.DSE.data.diff", package="dse") > > if (!is.TSdata(eg1.DSE.data.diff)) stop("Test data not found. Testing stopped.") > > fuzz.small <- 1e-14 > fuzz.large <- 1e-10 > digits <- 18 > all.ok <- TRUE > > > test.rng <- list(kind="Wichmann-Hill",seed=c(979,1479,1542),normal.kind="Box-Muller") > > setRNG::random.number.test() Random number generator tests ...ok Warning messages: 1: In RNGkind(kind = kind, normal.kind = normal.kind) : RNGkind: Marsaglia-Multicarry has poor statistical properties 2: In RNGkind(kind = kind, normal.kind = normal.kind) : RNGkind: severe deviations from normality for Kinderman-Ramage + Marsaglia-Multicarry 3: In RNGkind(kind = kind, normal.kind = normal.kind) : RNGkind: Marsaglia-Multicarry has poor statistical properties 4: In RNGkind(kind = kind, normal.kind = normal.kind) : RNGkind: severe deviations from normality for Kinderman-Ramage + Marsaglia-Multicarry 5: In RNGkind(kind = kind, normal.kind = normal.kind) : buggy version of Kinderman-Ramage generator used 6: In RNGkind(kind = kind, normal.kind = normal.kind) : RNGkind: Marsaglia-Multicarry has poor statistical properties > > > cat("dse test 0 ...\n") dse test 0 ... > # check "window" > z <- tfwindow(outputData(eg1.DSE.data.diff), start=c(1980,1), end=c(1980,1)) > ok <- all( c (c(1,3)==dim(z), c(1980,1)==start(z), c(1980,1)==end(z))) > z <- tfwindow(outputData(eg1.DSE.data.diff), start=c(1980,1), end=c(1982,12)) > ok <- ok & all( c (c(36,3)==dim(z), c(1980,1)==start(z), c(1982,12)==end(z))) > all.ok <- ok > > > cat("dse test 1 ...\n") dse test 1 ... > z <- estVARXls(eg1.DSE.data.diff) > # z <-eg1.DSE.data.diff > # lsfit produces warning messages in the following > # z$output[100,] <-NA > # z <- estVARXls(z, warn=F) > VARmodel <- estVARXar(eg1.DSE.data.diff, re.add.means=FALSE, warn=FALSE) > SSmodel <- toSS(VARmodel) > ok <- fuzz.large > abs(VARmodel$estimates$like[1] - + l(SSmodel, eg1.DSE.data.diff, warn=FALSE)$estimates$like[1]) > ok <- ok & is.TSestModel(VARmodel) & is.TSmodel(VARmodel$model) > ok <- ok & (nseriesInput(VARmodel) == nseriesInput(SSmodel)) > ok <- ok & (nseriesInput(VARmodel) == nseriesInput(VARmodel$data)) > ok <- ok & (nseriesOutput(VARmodel) == nseriesOutput(SSmodel)) > ok <- ok & (nseriesOutput(VARmodel) == nseriesOutput(VARmodel$data)) > VARmodelB <- TSmodel(VARmodel) > B <- t(chol(VARmodel$estimates$cov)) > VARmodelB$B <- array(B, c(1,dim(B))) # has B != I > VARmodelB <- setTSmodelParameters(VARmodelB) > VARmodelB <- l(VARmodelB,VARmodel$data, warn=FALSE) > > z <- residuals(VARmodelB) > z <- acf(VARmodelB) > #x11() > #get(getOption("device"))() > dev.new() dev.new(): using pdf(file="Rplots1.pdf") > acf(VARmodelB) > > good <- VARmodel$estimates$pred > tst <- VARmodelB$estimates$pred > error <- max(abs(good-tst)) > cat("max. error ", max(error)) max. error 2.081668e-17> > if (any(is.na(error)) || any(is.nan(error)) || fuzz.large < error) + {printTestValue(c(tst), digits=18) + all.ok <- FALSE + } > > if (! all.ok) stop("some tests FAILED") > > > proc.time() user system elapsed 0.40 0.09 0.48