R Under development (unstable) (2024-03-24 r86185 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. > ## File from http://rwiki.sciviews.org/doku.php?id=developers:runit > ## Unit tests will not be done if RUnit is not available > if(require("RUnit", quietly=TRUE)) { + ## --- Setup --- + pkg <- "gMCP" + if(Sys.getenv("RCMDCHECK") == "FALSE") { + ## Path to unit tests for standalone running under Makefile (not R CMD check) + ## PKG/tests/../inst/unitTests + path <- file.path(getwd(), "..", "inst", "unitTests") + } else { + ## Path to unit tests for R CMD check + ## PKG.Rcheck/tests/../PKG/unitTests + path <- system.file(package=pkg, "unitTests") + } + cat("\nRunning unit tests\n") + print(list(pkg=pkg, getwd=getwd(), pathToUnitTests=path)) + + library(package=pkg, character.only=TRUE) + + ## If desired, load the name space to allow testing of private functions + ## if (is.element(pkg, loadedNamespaces())) + ## attach(loadNamespace(pkg), name=paste("namespace", pkg, sep=":"), pos=3) + ## + ## or simply call PKG:::myPrivateFunction() in tests + + ## --- Testing --- + + ## Define tests + testSuite <- defineTestSuite(name=paste(pkg, "unit testing"), + dirs=path) + ## Run + tests <- runTestSuite(testSuite) + + ## Default report name + ## pathReport <- file.path(path, "report") + + ## Report to stdout and text files + cat("------------------- UNIT TEST SUMMARY ---------------------\n\n") + printTextProtocol(tests, showDetails=FALSE) + ##printTextProtocol(tests, showDetails=FALSE, fileName=paste(pathReport, "Summary.txt", sep="")) + ##printTextProtocol(tests, showDetails=TRUE, fileName=paste(pathReport, ".txt", sep="")) + + ## Report to HTML file + ##printHTMLProtocol(tests, fileName=paste(pathReport, ".html", sep="")) + + ## Return stop() to cause R CMD check stop in case of + ## - failures i.e. FALSE to unit tests or + ## - errors i.e. R errors + tmp <- getErrors(tests) + if(tmp$nFail > 0 | tmp$nErr > 0) { + stop(paste("\n\nunit testing failed (#test failures: ", tmp$nFail, + ", #R errors: ", tmp$nErr, ")\n\n", sep="")) + } + } else { + warning("cannot run unit tests -- package RUnit is not available") + } Running unit tests $pkg [1] "gMCP" $getwd [1] "d:/RCompile/CRANincoming/R-devel/gMCP.Rcheck/tests" $pathToUnitTests [1] "D:/temp/RtmpgTLO49/RLIBS_e1a03e601061/gMCP/unitTests" Executing test function test.LaTeX ... Skipping interactive control of LaTeX output. done successfully. Executing test function test.fractionStrings ... done successfully. Executing test function test.adjPValues ... done successfully. Executing test function test.gMCP.correlation ... done successfully. Executing test function test.gMCP.correlation.Alpha.Simulation ... Skipping alpha level simulation. done successfully. Executing test function test.everything.analysis ... Graph contains variables (or unparsable terms). No analysis possible. done successfully. Executing test function test.everything.calcPower ... done successfully. Executing test function test.bonferroni ... done successfully. Executing test function test.graphTest ... done successfully. Executing test function test.parametric ... done successfully. Executing test function test.power ... done successfully. Executing test function test.simes ... done successfully. Executing test function test.FastgMCP ... done successfully. Executing test function test.Simes ... done successfully. Executing test function test.checkWeights ... done successfully. Executing test function test.upscale ... done successfully. Executing test function test.gMCP.ext ... Info: Subset {4}: rejected (adj-p: 0.02) Subset {3}: rejected (adj-p: 0.03) Subset {3,4}: rejected (adj-p: 0.04) Subset {2}: rejected (adj-p: 0.05) Subset {2,4}: rejected (adj-p: 0.04) Subset {2,3}: not rejected (adj-p: 0.06) Subset {2,3,4}: not rejected (adj-p: 0.06) Subset {1}: rejected (adj-p: 0.01) Subset {1,4}: rejected (adj-p: 0.02) Subset {1,3}: rejected (adj-p: 0.02) Subset {1,3,4}: rejected (adj-p: 0.03) Subset {1,2}: rejected (adj-p: 0.02) Subset {1,2,4}: rejected (adj-p: 0.03) Subset {1,2,3}: rejected (adj-p: 0.03) Subset {1,2,3,4}: rejected (adj-p: 0.04) Info: Subset {4}: rejected (adj-p: 0.02) Subset {3}: rejected (adj-p: 0.03) Subset {3,4}: rejected (adj-p: 0.03) Subset {2}: rejected (adj-p: 0.05) Subset {2,4}: rejected (adj-p: 0.04) Subset {2,3}: rejected (adj-p: 0.05) Subset {2,3,4}: rejected (adj-p: 0.045) Subset {1}: rejected (adj-p: 0.01) Subset {1,4}: rejected (adj-p: 0.02) Subset {1,3}: rejected (adj-p: 0.02) Subset {1,3,4}: rejected (adj-p: 0.03) Subset {1,2}: rejected (adj-p: 0.02) Subset {1,2,4}: rejected (adj-p: 0.03) Subset {1,2,3}: rejected (adj-p: 0.03) Subset {1,2,3,4}: rejected (adj-p: 0.04) Remaining hypotheses (new numbering): 1: H1 2: H2 3: H3 4: H4 Subset {4} (padj: 0.02): p_4=0.02<=a*(w_4) =0.05*(1)=0.05 Subset {3} (padj: 0.03): p_3=0.03<=a*(w_3) =0.05*(1)=0.05 Subset {3,4} (padj: 0.03): p_4=0.02<=a*(w_4) =0.05*(0.5)=0.025 Subset {2} (padj: 0.05): p_2=0.05<=a*(w_2) =0.05*(1)=0.05 Subset {2,4} (padj: 0.04): p_4=0.02<=a*(w_4) =0.05*(0.5)=0.025 Subset {2,3} (padj: 0.05): p_2=0.05<=a*(w_2+w_3) =0.05*(0.5+0.5)=0.05 Subset {2,3,4} (padj: 0.045): p_3=0.03<=a*(w_3+w_4) =0.05*(0.333333333333333+0.333333333333333)=0.0333333333333333 Subset {1} (padj: 0.01): p_1=0.01<=a*(w_1) =0.05*(1)=0.05 Subset {1,4} (padj: 0.02): p_4=0.02<=a*(w_1+w_4) =0.05*(0.5+0.5)=0.05 Subset {1,3} (padj: 0.02): p_3=0.03<=a*(w_1+w_3) =0.05*(0.5+0.5)=0.05 Subset {1,3,4} (padj: 0.03): p_4=0.02<=a*(w_1+w_4) =0.05*(0.333333333333333+0.333333333333333)=0.0333333333333333 Subset {1,2} (padj: 0.02): p_2=0.05<=a*(w_1+w_2) =0.05*(0.5+0.5)=0.05 Subset {1,2,4} (padj: 0.03): p_4=0.02<=a*(w_1+w_4) =0.05*(0.333333333333333+0.333333333333333)=0.0333333333333333 Subset {1,2,3} (padj: 0.03): p_3=0.03<=a*(w_1+w_3) =0.05*(0.333333333333333+0.333333333333333)=0.0333333333333333 Subset {1,2,3,4} (padj: 0.04): p_4=0.02<=a*(w_1+w_4) =0.05*(0.25+0.25)=0.025 Info: Subset {4}: rejected (adj-p: 0.02) Subset {3}: rejected (adj-p: 0.03) Subset {3,4}: rejected (adj-p: 0.0284) Subset {2}: rejected (adj-p: 0.05) Subset {2,4}: rejected (adj-p: 0.04) Subset {2,3}: not rejected (adj-p: 0.06) Subset {2,3,4}: rejected (adj-p: 0.0484) Subset {1}: rejected (adj-p: 0.01) Subset {1,4}: rejected (adj-p: 0.02) Subset {1,3}: rejected (adj-p: 0.02) Subset {1,3,4}: rejected (adj-p: 0.02458) Subset {1,2}: rejected (adj-p: 0.02) Subset {1,2,4}: rejected (adj-p: 0.03) Subset {1,2,3}: rejected (adj-p: 0.03) Subset {1,2,3,4}: rejected (adj-p: 0.03458) Info: Subset {4}: rejected [pvalues=0.02, weights=1] Subset {3}: rejected [pvalues=0.03, weights=1] Subset {3,4}: rejected [pvalues=c(0.03, 0.02), weights=c(0.5, 0.5)] Subset {2}: rejected [pvalues=0.05, weights=1] Subset {2,4}: rejected [pvalues=c(0.05, 0.02), weights=c(0.5, 0.5)] Subset {2,3}: rejected [pvalues=c(0.05, 0.03), weights=c(0.5, 0.5)] Subset {2,3,4}: not rejected [pvalues=c(0.05, 0.03, 0.02), weights=c(0.3333, 0.3333, 0.3333)] Subset {1}: rejected [pvalues=0.01, weights=1] Subset {1,4}: rejected [pvalues=c(0.01, 0.02), weights=c(0.5, 0.5)] Subset {1,3}: rejected [pvalues=c(0.01, 0.03), weights=c(0.5, 0.5)] Subset {1,3,4}: rejected [pvalues=c(0.01, 0.03, 0.02), weights=c(0.3333, 0.3333, 0.3333)] Subset {1,2}: rejected [pvalues=c(0.01, 0.05), weights=c(0.5, 0.5)] Subset {1,2,4}: rejected [pvalues=c(0.01, 0.05, 0.02), weights=c(0.3333, 0.3333, 0.3333)] Subset {1,2,3}: rejected [pvalues=c(0.01, 0.05, 0.03), weights=c(0.3333, 0.3333, 0.3333)] Subset {1,2,3,4}: rejected [pvalues=c(0.01, 0.05, 0.03, 0.02), weights=c(0.25, 0.25, 0.25, 0.25)] Info: Subset {4}: rejected (adj-p: 0.02) Subset {3}: rejected (adj-p: 0.03) Subset {3,4}: rejected (adj-p: 0.04) Subset {2}: rejected (adj-p: 0.05) Subset {2,4}: rejected (adj-p: 0.04) Subset {2,3}: not rejected (adj-p: 0.06) Subset {2,3,4}: not rejected (adj-p: 0.06) Subset {1}: rejected (adj-p: 0.01) Subset {1,4}: rejected (adj-p: 0.02) Subset {1,3}: rejected (adj-p: 0.02) Subset {1,3,4}: rejected (adj-p: 0.03) Subset {1,2}: rejected (adj-p: 0.02) Subset {1,2,4}: rejected (adj-p: 0.03) Subset {1,2,3}: rejected (adj-p: 0.03) Subset {1,2,3,4}: rejected (adj-p: 0.04) Subset: 4 -> Bonferroni Subset: 3 -> Bonferroni Subset: 3 4 -> Bonferroni Subset: 2 -> Bonferroni Subset: 2 4 -> Bonferroni Subset: 2 3 -> Bonferroni Subset: 2 3 4 -> Bonferroni Subset: 1 -> Bonferroni Subset: 1 4 -> Bonferroni Subset: 1 3 -> Bonferroni Subset: 1 3 4 -> Bonferroni Subset: 1 2 -> Bonferroni Subset: 1 2 4 -> Bonferroni Subset: 1 2 3 -> Bonferroni Subset: 1 2 3 4 -> Bonferroni Info: Subset {4}: rejected (adj-p: 0.02) Subset {3}: rejected (adj-p: 0.03) Subset {3,4}: rejected (adj-p: 0.04) Subset {2}: rejected (adj-p: 0.05) Subset {2,4}: rejected (adj-p: 0.04) Subset {2,3}: not rejected (adj-p: 0.06) Subset {2,3,4}: not rejected (adj-p: 0.06) Subset {1}: rejected (adj-p: 0.01) Subset {1,4}: rejected (adj-p: 0.02) Subset {1,3}: rejected (adj-p: 0.02) Subset {1,3,4}: rejected (adj-p: 0.03) Subset {1,2}: rejected (adj-p: 0.02) Subset {1,2,4}: rejected (adj-p: 0.03) Subset {1,2,3}: rejected (adj-p: 0.03) Subset {1,2,3,4}: rejected (adj-p: 0.04) Info: Subset {4}: rejected (adj-p: 0.02) Subset {3}: rejected (adj-p: 0.03) Subset {3,4}: rejected (adj-p: 0.04) Subset {2}: rejected (adj-p: 0.05) Subset {2,4}: rejected (adj-p: 0.04) Subset {2,3}: not rejected (adj-p: 0.06) Subset {2,3,4}: not rejected (adj-p: 0.06) Subset {1}: rejected (adj-p: 0.01) Subset {1,4}: rejected (adj-p: 0.02) Subset {1,3}: rejected (adj-p: 0.02) Subset {1,3,4}: rejected (adj-p: 0.03) Subset {1,2}: rejected (adj-p: 0.02) Subset {1,2,4}: rejected (adj-p: 0.03) Subset {1,2,3}: rejected (adj-p: 0.03) Subset {1,2,3,4}: rejected (adj-p: 0.04) done successfully. Executing test function test.gMCP.ext.warnings.and.errors ... Error in gMCP.extended(graph = graph, pvalues = pvalues, test = bonferroni.test, : (converted from warning) Parameter 'subsets' will not be used by this test. In addition: There were 19 warnings (use warnings() to see them) Error in gMCP.extended(graph = graph, pvalues = pvalues, test = bonferroni.test, : (converted from warning) Parameter 'correlation' will not be used by this test. Error in gMCP.extended(graph = graph, pvalues = pvalues, test = simes.on.subsets.test, : Specified test requires parameter 'subsets', which is missing. Error in gMCP.extended(graph = graph, pvalues = pvalues, test = parametric.test, : Specified test requires parameter 'correlation', which is missing. done successfully. Executing test function test.adjPValues ... done successfully. Executing test function test.bonferroniHolm ... done successfully. Executing test function test.gMCP ... Error in gMCP(bhG3, 0, alpha = 0.6) : Length of pvalues must equal number of nodes. In addition: Warning messages: 1: In RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: Marsaglia-Multicarry has poor statistical properties 2: In RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: severe deviations from normality for Kinderman-Ramage + Marsaglia-Multicarry Error in gMCP(bhG3, rep(0, 6), alpha = 0.6) : Length of pvalues must equal number of nodes. done successfully. Executing test function test.gMCPBretzEtAl ... done successfully. Executing test function test.gMCPParallelGatekeeping ... done successfully. Executing test function test.graph2matrix ... done successfully. Executing test function test.graphMCP ... done successfully. Executing test function test.only.no.error ... \documentclass[11pt]{article} \usepackage{tikz} \usetikzlibrary{decorations,arrows,shapes} \begin{document} \subsection*{Graph for SRMTP} \begin{tikzpicture} \node (H1) at (125bp,-225bp)[draw,circle split,fill=green!80] {$H1$ \nodepart{lower} $\frac{1}{3}$}; \node (H2) at (325bp,-225bp)[draw,circle split,fill=green!80] {$H2$ \nodepart{lower} $\frac{1}{3}$}; \node (H3) at (525bp,-225bp)[draw,circle split,fill=green!80] {$H3$ \nodepart{lower} $\frac{1}{3}$}; \draw [->,line width=1pt] (H1.42) arc(132:90:125bp) node[fill=blue!20] {$\frac{1}{2}$} arc(90:50:125bp) to (H2); \draw [->,line width=1pt] (H1.47) arc(137:90:250bp) node[fill=blue!20] {$\frac{1}{2}$} arc(90:45:250bp) to (H3); \draw [->,line width=1pt] (H2.222) arc(312:270:125bp) node[fill=blue!20] {$\frac{1}{2}$} arc(270:230:125bp) to (H1); \draw [->,line width=1pt] (H2.42) arc(132:90:125bp) node[fill=blue!20] {$\frac{1}{2}$} arc(90:50:125bp) to (H3); \draw [->,line width=1pt] (H3.227) arc(317:270:250bp) node[fill=blue!20] {$\frac{1}{2}$} arc(270:225:250bp) to (H1); \draw [->,line width=1pt] (H3.222) arc(312:270:125bp) node[fill=blue!20] {$\frac{1}{2}$} arc(270:230:125bp) to (H2); \end{tikzpicture} \end{document}\documentclass[11pt]{article} \usepackage{tikz} \usetikzlibrary{decorations,arrows,shapes} \begin{document} \subsection*{Initial graph} \begin{tikzpicture} \node (H1) at (125bp,-225bp)[draw,circle split,fill=green!80] {$H1$ \nodepart{lower} $\frac{1}{3}$}; \node (H2) at (325bp,-225bp)[draw,circle split,fill=green!80] {$H2$ \nodepart{lower} $\frac{1}{3}$}; \node (H3) at (525bp,-225bp)[draw,circle split,fill=green!80] {$H3$ \nodepart{lower} $\frac{1}{3}$}; \draw [->,line width=1pt] (H1.42) arc(132:90:125bp) node[fill=blue!20] {$\frac{1}{2}$} arc(90:50:125bp) to (H2); \draw [->,line width=1pt] (H1.47) arc(137:90:250bp) node[fill=blue!20] {$\frac{1}{2}$} arc(90:45:250bp) to (H3); \draw [->,line width=1pt] (H2.222) arc(312:270:125bp) node[fill=blue!20] {$\frac{1}{2}$} arc(270:230:125bp) to (H1); \draw [->,line width=1pt] (H2.42) arc(132:90:125bp) node[fill=blue!20] {$\frac{1}{2}$} arc(90:50:125bp) to (H3); \draw [->,line width=1pt] (H3.227) arc(317:270:250bp) node[fill=blue!20] {$\frac{1}{2}$} arc(270:225:250bp) to (H1); \draw [->,line width=1pt] (H3.222) arc(312:270:125bp) node[fill=blue!20] {$\frac{1}{2}$} arc(270:230:125bp) to (H2); \end{tikzpicture} \subsection*{P-Values} \begin{table}[ht] \begin{center} \begin{tabular}{rrr} \hline H1&H2&H3 \\ \hline 0.10000&0.20000&0.30000\\ \hline \end{tabular} \end{center} \end{table} \subsection*{Adjusted p-values} \begin{table}[ht] \begin{center} \begin{tabular}{rrr} \hline H1&H2&H3 \\ \hline 0.30000&0.40000&0.40000\\ \hline \end{tabular} \end{center} \end{table} \subsection*{Rejected Hypotheses with $\alpha=0.05$} \begin{table}[ht] \begin{center} \begin{tabular}{rrr} \hline H1&H2&H3 \\ \hline FALSE&FALSE&FALSE\\ \hline \end{tabular} \end{center} \end{table} \end{document} done successfully. Executing test function test.makeEpsilonString ... done successfully. Executing test function test.matrix2graph ... done successfully. Executing test function test.parseEpsPolynom ... done successfully. Executing test function test.replaceVariables ... done successfully. Executing test function test.api.compatibility ... done successfully. Executing test function test.calcpower ... done successfully. Executing test function test.rqmvnorm ... Skipping checks for rqmvnorm. done successfully. Executing test function test.sampSize ... lower limit for sample size is decreased done successfully. ------------------- UNIT TEST SUMMARY --------------------- RUNIT TEST PROTOCOL -- Mon Mar 25 23:17:38 2024 *********************************************** Number of test functions: 34 Number of errors: 0 Number of failures: 0 1 Test Suite : gMCP unit testing - 34 test functions, 0 errors, 0 failures There were 14 warnings (use warnings() to see them) > > proc.time() user system elapsed 8.85 0.28 9.14