Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ inst/doc
*~$*docx
*~$*xlsx
*~$*pptx
Rplots.pdf
.DS_Store
2 changes: 1 addition & 1 deletion CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 0.2.8
Version: 0.2.9
Date: 2025-05-07 03:10:43 UTC
SHA: 86213d2cf7bf8a29ac608260f2fd935e7fc2fd7d
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: graphicalMCP
Title: Graphical Multiple Comparison Procedures
Version: 0.2.8
Version: 0.2.9
Authors@R: c(
person("Dong", "Xi", , "dong.xi1@gilead.com", role = c("aut", "cre")),
person("Ethan", "Brockmann", , "ethan.brockmann@atorusresearch.com", role = "aut"),
Expand Down Expand Up @@ -48,5 +48,5 @@ Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
RoxygenNote: 7.3.3
Language: en-US
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,8 @@

* Corrected urls for references
* Submission for CRAN release

# graphicalMCP 0.2.9

* Closed Issue #90 by changing the precision for parametric tests
* Submission for CRAN release
11 changes: 8 additions & 3 deletions R/graph_test_closure.R
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,19 @@ graph_test_closure <- function(graph,
# The adjusted p-value for an *intersection* is the smallest adjusted p-value
# for the groups it contains
adjusted_p_intersection <- apply(adjusted_p, 1, min)
reject_intersection <-
adjusted_p_intersection <= (alpha + .Machine$double.eps)

# When parametric tests are used, mvtnorm::pmvnorm introduces Monte Carlo
# error (controlled by abseps, default 1e-6). A small tolerance is added to
# rejection comparisons to avoid false non-rejections at the boundary.
tol <- if (any(test_types == "parametric")) 1e-6 else .Machine$double.eps

reject_intersection <- adjusted_p_intersection <= (alpha + tol)

# The adjusted p-value for a *hypothesis* is the largest adjusted p-value for
# the intersections containing that hypothesis
adjusted_p_hypothesis <-
apply(adjusted_p_intersection * matrix_intersections, 2, max, na.rm = TRUE)
reject_hypothesis <- adjusted_p_hypothesis <= alpha # Hypothesis test results
reject_hypothesis <- adjusted_p_hypothesis <= (alpha + tol)

# Adjusted p-value details ---------------------------------------------------
# Reported adjusted p-values shouldn't exceed 1
Expand Down
8 changes: 4 additions & 4 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"codeRepository": "https://github.com/openpharma/graphicalMCP",
"issueTracker": "https://github.com/openpharma/graphicalMCP/issues",
"license": "Apache License 2",
"version": "0.2.8",
"version": "0.2.9",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.1.2 (2021-11-01)",
"runtimePlatform": "R version 4.4.3 (2025-02-28)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand Down Expand Up @@ -318,7 +318,7 @@
},
"SystemRequirements": null
},
"fileSize": "803.544KB",
"fileSize": "775.434KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand All @@ -339,7 +339,7 @@
"url": "https://CRAN.R-project.org/package=graphicalMCP"
}
],
"releaseNotes": "https://github.com/openpharma/graphicalMCP/blob/master/NEWS.md",
"releaseNotes": "https://github.com/openpharma/graphicalMCP/blob/main/NEWS.md",
"readme": "https://github.com/openpharma/graphicalMCP/blob/main/README.md",
"developmentStatus": "https://www.repostatus.org/#active",
"relatedLink": "https://CRAN.R-project.org/package=graphicalMCP"
Expand Down
9 changes: 9 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Version 0.2.9

- This is the ninth submission to CRAN.
- Closed Issue #90 by changing the precision for parametric tests

## R CMD check results

0 errors | 0 warnings | 0 notes

# Version 0.2.8

- This is the eighth submission to CRAN.
Expand Down
Binary file removed tests/testthat/Rplots.pdf
Binary file not shown.
15 changes: 8 additions & 7 deletions vignettes/generate-closure.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,14 @@ write.csv(

```{r power-conventional, include = FALSE, eval = FALSE}
gcp_conventional <- function(
graph,
alpha = 0.025,
power_marginal = rep(alpha, length(graph$hypotheses)),
sim_n = 100,
sim_corr = diag(length(graph$hypotheses)),
sim_success = NULL,
verbose = FALSE) {
graph,
alpha = 0.025,
power_marginal = rep(alpha, length(graph$hypotheses)),
sim_n = 100,
sim_corr = diag(length(graph$hypotheses)),
sim_success = NULL,
verbose = FALSE
) {
hyp_names <- names(graph$hypotheses)
num_hyps <- length(graph$hypotheses)

Expand Down
Loading