I asked google: How to correct for small p-value due to very large sample size?
and I got suggestion to use Cohens d. Here are the results.
You can read more about Effect size.
FDR עב made to correct something else. Not big sample, but many questions.
library(effsize)
ws = read.csv("P val for rotem.csv")
treatment = rnorm(5000,mean=11, sd = 5000)
control = rnorm(5000,mean=10, sd = 5000)
d = (c(treatment,control))
f = rep(c("Treatment","Control"),each=1000)
## compute Cohen's d
## treatment and control
cohen.d(treatment,control)
Cohen's d
d estimate: 0.005496748 (negligible)
95 percent confidence interval:
inf sup
-0.03370735 0.04470085
treatment = rnorm(5000,mean=11, sd = 1)
control = rnorm(5000,mean=10, sd = 1)
d = (c(treatment,control))
f = rep(c("Treatment","Control"),each=1000)
## compute Cohen's d
## treatment and control
cohen.d(treatment,control)
Cohen's d
d estimate: 0.975917 (large)
95 percent confidence interval:
inf sup
0.9344449 1.0173891
\[ Cohen.d = (\bar 1-\bar 2)\div \sqrt{\frac{(N_1-1)\times SD_1^2 + (N_1-1)\times SD_2^2}{N_1+N_2 -2 }} \]
mean_1 = mean(treatment)
mean_2 = mean(control)
sd_1 = sd(treatment)
sd_2 = sd(control)
n_1 <- length(treatment)
n_2 <- length(control)
mean_diff <- mean_1 - mean_2
pooled_sd_n <- ((n_1-1)*(sd_1**2)) + ((n_1-1)*(sd_2**2))
pooled_sd_d <- ((n_1 + n_2) - 2)
pooled_sd <- sqrt(pooled_sd_n/pooled_sd_d)
cohens_d <- mean_diff / pooled_sd
cohens_d
[1] 0.975917
# d_ci <- cohen.d.ci(d = cohens_d, n1 = n_1, n2 = n_2, a=a_level)
# d_ci
The small difference between this value and the previous is something about alpha = 0.05 that I don’t understand completly.
View(ws)
gfp10 = ws[,1:2]
colnames(gfp10) <- c("a", "b")
gfp10 = gfp10[3:length(gfp10$a),]
gfp10 = as.matrix(gfp10)
gfp10 = apply(gfp10, 2, as.numeric)
gfp2 = ws[,7:11]
colnames(gfp2) = c("4", "8","GFP+AMP8", "24", "GFP+AMP24")
gfp2 = gfp2[4:length(gfp2$'4'),]
gfp2 = apply(gfp2, 2, as.numeric)
AlonaComment = ws[1:2,13]
Explanation for values: Sign (+/-) is not significant and just sign the direction of the change.
ten = cohen.d(d = as.numeric(gfp10[,2]),f = as.numeric(gfp10[,1]), paired = F, na.rm = T)
ten$estimate
Treatment
0.3148121
amp = cohen.d(as.numeric(gfp2[,3]), as.numeric(gfp2[,5]), na.rm = T, paired = F)
amp$estimate
Treatment
-1.799924
foureight = cohen.d(as.numeric(gfp2[,1]), as.numeric(gfp2[,2]), na.rm = T, paired = F)
four24 = cohen.d(as.numeric(gfp2[,1]), as.numeric(gfp2[,4]), na.rm = T, paired = F)
eight24 = cohen.d(as.numeric(gfp2[,2]), as.numeric(gfp2[,4]), na.rm = T, paired = F)
foureight$estimate
Treatment
-2.370494
four24$estimate
Treatment
-3.564258
eight24$estimate
Treatment
-1.506389
citation("effsize")
To cite package ‘effsize’ in publications use:
Marco Torchiano (2017). effsize: Efficient Effect Size Computation. R package version 0.7.1.
https://CRAN.R-project.org/package=effsize
A BibTeX entry for LaTeX users is
@Manual{,
title = {effsize: Efficient Effect Size Computation},
author = {Marco Torchiano},
year = {2017},
note = {R package version 0.7.1},
url = {https://CRAN.R-project.org/package=effsize},
}