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

Fix description and K==4 case #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions R/mu_from_ES.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Convenience function to calculate the means for between designs with one factor (One-Way ANOVA). Can be used to determine the means that should yield a specified effect sizes (expressed in Cohen's f).
#' Convenience function to calculate the means for between designs with one factor (One-Way ANOVA). Can be used to determine the means that should yield a specified effect sizes (expressed in Eta-squared).
#' @param K Number of groups (2, 3, or 4)
#' @param ES Effect size (eta-squared)
#' @return Returns vector of means
Expand Down Expand Up @@ -33,7 +33,7 @@ mu_from_ES <- function(K, ES){ # provides the vector of population means for a g
}
if(K == 4){
a <- sqrt(f2)
muvec <- c(-a, -a, a, a)
muvec <- c(-2*a, -a, a, 2*a)
} # note: function gives error when K not 2,3,4. But we don't need other K.
return(muvec)
}