Skip to content

Commit

Permalink
update statistical tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad1991 committed Nov 19, 2024
1 parent eb8838a commit 2b89038
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 4 additions & 9 deletions bs/R/statisticalTests.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,11 @@ testsSidebarUI <- function(id) {
),
conditionalPanel(
condition = "input.TestsConditionedPanels == 'More than two groups'",
actionButton(NS(id, "aovTest"), "ANOVA",
title =
"Use ANOVA (Analysis of Variance) when comparing the means of more than two groups,
assuming the data is normally distributed and variances are equal across groups. For more information see the Assumption tab"
actionButton(NS(id, "aovTest"), "ANOVA",
title = "Use ANOVA (Analysis of Variance) when comparing the means of more than two groups, assuming the data is normally distributed and variances are equal across groups. For more information see the Assumption tab"
),
actionButton(NS(id, "kruskalTest"), "Kruskal-Wallis Test",
title =
"Use the Kruskal-Wallis test when comparing more than two groups but
the assumptions of normality or equal variances are not met. It is a non-parametric test. For more information see the Assumption tab"
title = "Use the Kruskal-Wallis test when comparing more than two groups but the assumptions of normality or equal variances are not met. It is a non-parametric test. For more information see the Assumption tab"
),
),
conditionalPanel(
Expand Down Expand Up @@ -108,6 +104,7 @@ testsUI <- function(id) {

testsServer <- function(id, data, listResults) {
moduleServer(id, function(input, output, session) {

# Render p adjustment methods
output[["padj"]] <- renderUI({
if (input$PostHocTests == "kruskalTest" || input$PostHocTests == "LSD") {
Expand All @@ -126,8 +123,6 @@ testsServer <- function(id, data, listResults) {
)
)
}
# condition = "input.PostHocTests == 'kruskalTest' || input.PostHocTests == 'Least significant difference test'",

})

# Render split by group
Expand Down
2 changes: 1 addition & 1 deletion bs/inst/tinytest/StatisticalTests.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ app$click("TESTS-PostHocTest")
res <- app$get_values()$export
df <- CO2
dep <- "uptake"
fit <- with(df, agricolae::kruskal(df[, dep],df[, "conc"]),
fit <- with(df, agricolae::kruskal(df[, dep], df[, "conc"]),
alpha = 0.05, p.adj = 0.05, group = TRUE
)$groups
expected <- cbind(fit, row.names(fit))
Expand Down

0 comments on commit 2b89038

Please sign in to comment.