12 days ago by
Netherlands, Rotterdam, ErasmusMC
Dear Ana María, if you go to the ssizeRNA_single help page, section "Value", you may read:
ssize: sample sizes (for each treatment) at which desired power is first reached.
This means that to achieve power of 80%, you would need 17 cases and 17 controls (also, that you reach a power of 94.9% for 90 cases and 90 controls) for those given parameters. This also means that the parameter m you set to 90 is not the target number of samples (but the pseudo-sample size for the simulation).
Normally, you set the number of samples after the power calculation in order to reach a given power (a wide range of sample sizes are tested as plotted in the graph). I think this addresses your question to whether this is a paired analysis of power/sample.
Finally, with respect to your question on the fc parameter, the documentation says:
fc: a vector (or scalar, or a function that takes an integer n and generates a vector of length n) of fold change for differentially expressed (DE) genes.
Your function firstly draws n values from a normal distribution with mean natural log (not log2) of 2 and variance of natural log of 2 divided by 2. Then you exponentiate it to a log-normal distribution (if you would like to generate a lognormal distribution you should use the rlnorm function, instead). In that calculation you are assuming that this is the resulting distribution of fold-change for DE genes (you seem to know an awful lot about the results of your experiment before they even happened...). I would not recommend this. Power calculations are highly biases if given wrong assumptions so try to keep them as simple and pessimistic as possible. Try to supply the worst conditions possible if you want to produce a meaningful power calculation: real data is always much worse that the simulation!
I hope this solves your questions,