Skip to content

Commit

Permalink
removed degrees of freedom fron random + full permutation
Browse files Browse the repository at this point in the history
  • Loading branch information
karchjd committed Mar 10, 2023
1 parent 209937a commit 19d6168
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 27 deletions.
7 changes: 4 additions & 3 deletions R/bmtest.b.R
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ bmtestClass <- if (requireNamespace("jmvcore", quietly = TRUE)) {
extract_res <- function(res){
res_sel <- as.numeric(res$Analysis["id", ])
names(res_sel) <- colnames(res$Analysis)
list(statistic = res_sel["Statistic"], parameter = "",
list(statistic = res_sel["Statistic"],
p.value = res_sel["p.value"], estimate = res_sel["Estimator"],
conf.int = c(res_sel["Lower"], res_sel["Upper"]))
}
Expand All @@ -202,7 +202,6 @@ bmtestClass <- if (requireNamespace("jmvcore", quietly = TRUE)) {
suffix <- "[fullPerm]"
full_name <- "All Permutations"
extract_res <- function(res){
res$parameter = ""
res
}
check_n <- TRUE
Expand All @@ -220,7 +219,9 @@ bmtestClass <- if (requireNamespace("jmvcore", quietly = TRUE)) {
suffix)
if (!jmvcore::isError(res)) {
res <- extract_res(res)
res <- check_error_res(res)
if(type == "asym"){
res <- check_error_res(res)
}
}
if (!jmvcore::isError(res)) {
ests <- revert(res$estimate, res$conf.int[1], res$conf.int[2], HA)
Expand Down
10 changes: 0 additions & 10 deletions R/bmtest.h.R
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,6 @@ bmtestResults <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
`title`="Statistic",
`type`="number",
`visible`="(randomPerm)"),
list(
`name`="df[randomPerm]",
`title`="df",
`type`="number",
`visible`="(randomPerm)"),
list(
`name`="p[randomPerm]",
`title`="p",
Expand Down Expand Up @@ -246,11 +241,6 @@ bmtestResults <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
`title`="Statistic",
`type`="number",
`visible`="(fullPerm)"),
list(
`name`="df[fullPerm]",
`title`="df",
`type`="number",
`visible`="(fullPerm)"),
list(
`name`="p[fullPerm]",
`title`="p",
Expand Down
12 changes: 0 additions & 12 deletions jamovi/bmtest.r.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ items:
visible: (randomPerm)


- name: df[randomPerm]
title: df
type: number
visible: (randomPerm)


- name: p[randomPerm]
title: p
type: number
Expand Down Expand Up @@ -124,12 +118,6 @@ items:
visible: (fullPerm)


- name: df[fullPerm]
title: df
type: number
visible: (fullPerm)


- name: p[fullPerm]
title: p
type: number
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-bmtest.R
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,12 @@ testthat::test_that('Formula Interface', {
`ciu[asym]` = 0.747596,
`test[randomPerm]` = "Random Permutations",
`stat[randomPerm]` = 0.000,
`df[randomPerm]` = NA,
`p[randomPerm]` = 0.654,
`relEff[randomPerm]` = 0.500,
`cil[randomPerm]` = 0.282,
`ciu[randomPerm]` = 0.718,
`test[fullPerm]` = "All Permutations",
`stat[fullPerm]` = 0.000000,
`df[fullPerm]` = NA,
`p[fullPerm]` = 1.000000000,
`relEff[fullPerm]` = 0.500,
check.names = FALSE
Expand Down

0 comments on commit 19d6168

Please sign in to comment.