Skip to content

Commit

Permalink
final fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hendersontrent committed Mar 13, 2024
1 parent 506f771 commit 05aed8b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion R/kfold_ttest.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ kfold_ttest <- function(x, y, n, k, tailed = c("two", "one"), greater = NULL){
return(tmp)
} else{
statistic <- mean(d, na.rm = TRUE) / sqrt(stats::var(d, na.rm = TRUE) * ((1 / n + (1 / k)) / (1 - 1 / k)))
p.value <- stats::pt(statistic, n - 1, lower.tail = TRUE)
p.value <- stats::pt(statistic, n - 1, lower.tail = FALSE)
}
}

Expand Down
2 changes: 1 addition & 1 deletion R/repkfold_ttest.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ repkfold_ttest <- function(data, n1, n2, k, r, tailed = c("two", "one"), greater
return(tmp)
} else{
statistic <- mean(d, na.rm = TRUE) / sqrt(stats::var(d, na.rm = TRUE) * ((1 / (k * r)) + (n2 / n1)))
p.value <- stats::pt(statistic, (k * r) - 1, lower.tail = TRUE)
p.value <- stats::pt(statistic, (k * r) - 1, lower.tail = FALSE)
}
}

Expand Down
2 changes: 1 addition & 1 deletion R/resampled_ttest.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ resampled_ttest <- function(x, y, n, n1, n2, tailed = c("two", "one"), greater =
return(tmp)
} else{
statistic <- mean(d, na.rm = TRUE) / sqrt(stats::var(d, na.rm = TRUE) * (1 / n + n2 / n1))
p.value <- stats::pt(statistic, n - 1, lower.tail = TRUE)
p.value <- stats::pt(statistic, n - 1, lower.tail = FALSE)
}
}

Expand Down
12 changes: 6 additions & 6 deletions docs/articles/correctR.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pkgdown: 2.0.2
pkgdown_sha: ~
articles:
correctR: correctR.html
last_built: 2024-03-13T02:33Z
last_built: 2024-03-13T10:38Z
urls:
reference: https://hendersontrent.github.io/correctR/reference
article: https://hendersontrent.github.io/correctR/articles
Expand Down
Loading

0 comments on commit 05aed8b

Please sign in to comment.