Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

De-duplicate test value column names #76

Closed
wants to merge 3 commits into from
Closed

Conversation

EeethB
Copy link
Contributor

@EeethB EeethB commented Feb 21, 2024

Thank you for your Pull Request!

We have developed a Pull Request template to aid you and our reviewers. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the graphicalMCP codebase remains robust and consistent.

Changes Description

Closes #75

When running a closed test with parametric testing, the detailed test values data frame has two columns named *. This PR de-duplicates those names by changing them to *_a and *_b. The print function still prints them without the suffixes though

Task List

This is a list of tasks that can be done by contributors to make reviewing faster and more straightforward. If you're unsure how to do any or all of these, please make your contributions anyway. We are happy to work with you on any of them! However, know that your contributions may be more likely to be accepted, or be accepted more quickly, the more of these you can accomplish. They are roughly sorted in descending order of helpfulness.

  • Fill out Changes Description above
  • Update relevant unit tests or write new unit tests
  • Create/update relevant roxygen headers and examples
  • Run pkgdown::build_site() and check that all affected examples are displayed correctly and that all new/updated functions occur on the "Reference" page
  • Update NEWS.md with a brief summary of changes made - Note the related issue number(s) at the end like (#000)
  • Make sure that the package versions in the NEWS.md and DESCRIPTION file are the same
  • Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
  • Format code according to the tidyverse style guide (Run styler::style_pkg())
  • Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
  • Address any updates needed for vignettes and/or templates
  • Link the issue Development Panel so that the related issue closes after successful merging
  • Fix merge conflicts
  • Pat yourself on the back for a job well done! Here's a random cat gif for your hard work :)

@EeethB EeethB changed the title Closes #75 - De-duplicate test value column names De-duplicate test value column names Feb 21, 2024
@EeethB EeethB marked this pull request as ready for review February 21, 2024 20:20
@xidongdxi
Copy link
Collaborator

Many thanks. For parametric tests, there are now two columns: *_a and *_b to separate two * operations. It works.

For bonferroni and simes, it seems that only *_b is used. I think for only bonferroni, only simes, and bonferroni+simes, there is no need to distinguish two columns. It is fine to just have one column *.

hypotheses <- c(0.5, 0.5, 0, 0)
transitions <- rbind(
    c(0, 0.5, 0.5, 0),
    c(0.5, 0, 0, 0.5),
    c(0, 1, 0, 0),
    c(1, 0, 0, 0)
)
hyp_names <- c("H1", "H2", "H3", "H4")
g <- graph_create(hypotheses, transitions, hyp_names)
p_values <- c(.018, .01, .105, .006)
# Bonferroni
test_results_test_values <- graph_test_shortcut(
    g,
    p = p_values,
    alpha = 0.025,
    test_values = TRUE
)
head(test_results_test_values$test_values$results)

# Simes
test_results_simes <-
    graph_test_closure(
        g,
        p = p_values, alpha = 0.025,
        test_groups = list(c(1, 2), c(3, 4)),
        test_types = c("simes", "simes"),
        test_values = TRUE
    )

head(test_results_simes$test_values$results)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Two columns of the same name in parametric test values
2 participants