Inferential statistics has two parts: estimation of population parameter and testing of hypothesis. According to the type of medical research, any one of them can be adopted. The estimation method is used in prevalence/descriptive studies and the testing of hypothesis is used for cohort/case control/clinical trials.
One of the most popular approaches to sample size determination involves studying the power of a test of hypothesis
而统计效能的重要影响因素之一就是样本量。所以我们要去计算样本量,这里一定要注意是样本量影响了统计效能所以样本量重要(根源还是统计效能重要)。而不是常常听到的“样本量的影响因素包括β”,“计算样本量的时候要考虑统计效能”,这种表述统统都是错误的。统计效能我们永远是希望越大越好。我们是为了寻求更大的统计效能,减小犯二类错误所以我们才要去要寻求一个合适的样本量。逻辑不能搞反了。我们是Determines the minimum number of subjects for adequate study power。
当然,样本量是统计效能重要的影响因素但并非唯一的,α和效应量等也会对统计效能造成影响:
With continuous outcomes, 4 main components impact power: the specified effect size, the significance level, the sample size n, and the population variance σ2. Specifically, power increases with larger effect sizes, higher values of α, larger sample sizes, and less variability within the sample
pwr::pwr.t.test(
sig.level = 0.05,
type = "two.sample",
alternative = "two.sided",
power = 0.80,
d = 15/20)
得到结果也是每组29人,共需要58人(误差归因于约分):
需要注意的是函数中的d为效应量,其和绝对差异是有区别的,对于连续变量来讲,其就是绝对误差除以变异:
You need to calculate an effect size (aka Cohen’s d) in order to estimate your sample size. This effect size is equal to the difference between the means at the endpoint, divided by the pooled standard deviation.
从上面的逻辑看,为了计算Simon两阶段设计的样本量我们需要事先设定一些值,一个是r1:第一阶段的响应标准(unacceptable response rate; baseline response rate that needs to be exceeded for treatment to be deemed promising);还有第二阶段的期望响应标准(response rate that is desirable; should be larger than pu)。Simon两阶段设计样本量的标准有两个一个叫做minimax design,另一个叫做optimal design,两种标准的逻辑是不一样的:Minimax design的目的是使使用的总样本量最少,optimal是使得第一阶段样本量最少。
Minimax design mainly aims to minimize the maximum sample size. Alternatively, optimal design aims to minimize the expected sample size