This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Write function | |
t.test2 <- function(m1,m2,s1,s2,n1,n2,m0=0,equal.variance=FALSE) | |
{ | |
if( equal.variance==FALSE ) | |
{ | |
se <- sqrt( (s1^2/n1) + (s2^2/n2) ) | |
# welch-satterthwaite df | |
df <- ( (s1^2/n1 + s2^2/n2)^2 )/( (s1^2/n1)^2/(n1-1) + (s2^2/n2)^2/(n2-1) ) | |
} else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load TOSTER package | |
library(TOSTER) | |
# Perform equivalence test | |
TOSTtwo(m1=37.33,m2=39.65 ,sd1=13.40,sd2=15.91,n1=23,n2=32, | |
low_eqbound_d=-0.26,high_eqbound_d=0.26, | |
plot = TRUE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load package | |
library(pwr) | |
# Perform power analysis | |
pwr.t2n.test(sig.level = 0.05, n1= 32,n2= 23, power = 0.8, | |
alternative="two.sided") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Contour-enhanced funnel plots using metafor ### | |
# Load metafor package | |
library("metafor") | |
# Load dataset | |
dat <- get(data(dat.molloy2014)) |
NewerOlder