I have around 200 subjects and I would like to check the power for 90 of those subjects. It is a case control study.
I did this:
library(ssizeRNA)
fc <- function(x){exp(rnorm(x, log(2), 0.5*log(2)))}
#fc=2
size1 <- ssizeRNA_single(nGenes = 544, pi0 = 0.8, m = 90, mu = 3489, disp = 0.17, fc = fc, fdr = 0.05,power = 0.8, maxN = 120)
size1$ssize
p=size1$power
p=as.data.frame(p)
p[p$n==90,]
I got this:
p[p$n==90,]
n 0.8
90 0.949
pi0 ssize power
0.8 17 0.8
Plot is attached. Does this mean that to achieve power of 80% I wold need 17 cases and 17 controls? Or to achieve power of 90% I would need 90 cases and 90 controls?
Does it make more sense to fix fc=2 in that case I would be to detecting log fold changes of at least 2 or greater given FDR=0.05 as opposed to detecting log2 fold changes across the entire fold-change distribution (as I did above)? Is this a paired analysis for power/sample size?
Package used is: https://cran.r-project.org/web/packages/ssizeRNA/vignettes/ssizeRNA.pdf
I should mention that I do have to test this for paired analysis and this software doesn't seem to have option for "paired"
Do you have any recommendation for software which would do power analysis for paired study for RNAseq data?