Presentation is loading. Please wait.

Presentation is loading. Please wait.

Applied Biostatistics: Lecture 4

Similar presentations


Presentation on theme: "Applied Biostatistics: Lecture 4"β€” Presentation transcript:

1 Applied Biostatistics: Lecture 4
Brian Healy, Ph.D

2 Goals At the end of this lecture, you will be able to
Perform a sample size calculation for a two sample t-test in R Perform a sample size calculation for a two sample test of proportions in R

3 Previous classes In the previous class, we focused on:
Reading data into R Calculating summary statistics Creating graphics Performing a chi-squared test Performing a t-test Performing a linear regression Performing survival analysis

4 Sample size calculations
For today’s class, we will focus on performing sample size calculations for the design of clinical trials For a clinical trial, we perform the sample size calculation prior to collecting any data so we do not need to load a dataset

5 Know 4, calculate the 5th For each type of outcome, we needed to four of these five things so we could calculate the fifth Type I error rate Power Sample size Group difference Variability or baseline proportion

6 Example For a clinical trial in MS, we would like to assess if a new treatment has an impact compared to placebo on the proportion of subjects who experience sustained disability worsening at the two year time point What type of outcome do we have? What type of explanatory variable do we have? What type of analysis is appropriate in this case?

7 Formula The formula for the sample size calculation if we assume equal group sizes and do not include continuity correction is 𝑛 1 = 𝑧 1βˆ’ 𝛼 βˆ— 𝑝 (1βˆ’ 𝑝 ) 𝑧 1βˆ’π›½ 𝑝 1 1βˆ’ 𝑝 1 + 𝑝 2 1βˆ’ 𝑝 𝑝 1 βˆ’ 𝑝 2 2 Where 𝑝 = 𝑝 1 + 𝑝 2 2 If proportion difference Sample size DECREASES If a-level (z1-a/ ) Sample size DECREASES If power (z1-b ) Sample size INCREASES

8 Preliminary information
Based on previous studies, we anticipate that 30% of subjects in the placebo arm will experience disease worsening over two years Based on earlier trials, we anticipate that the treatment will reduce the proportion of subjects who experience disease worsening to 20% Since this is a traditional trial, we would like a two sided type I error rate of 0.05 and power of 0.8

9 Sample size calculation in R
power.prop.test(p1=0.3,p2=0.2,power=0.8, sig.level=0.05,alternative="two.sided") power.prop.test(p1=0.3,p2=0.2,power=0.8) Estimate sample size is 294 per group (we always choose next whole number

10 Changing the sample size
As difference between groups increases (i.e. d increases), sample size decreases power.prop.test(p1=0.3,p2=0.15,power=0.8, sig.level=0.05,alternative="two.sided") As type I error rate increases (i.e. z1-a/2 decreases), sample size decreases power.prop.test(p1=0.3,p2=0.2,power=0.8, sig.level=0.1,alternative="two.sided") As power increases (i.e. z1-b increases), sample size increases power.prop.test(p1=0.3,p2=0.2,power=0.9, sig.level=0.05,alternative="two.sided")

11 Grant section With a sample of 294 subjects per groups, we will have 80% power to detect a difference with a significance level of 0.05 using a two-sided two-sample test of proportions if the proportion of subjects with disease worsening in the placebo group is 0.3 and the proportion of subjects with disease worsening in the treatment group is 0.2.

12 Example #2 In the same clinical trial in MS, we would like to assess if a new treatment has an impact compared to placebo on SDMT score at the two year time point What type of outcome do we have? What type of explanatory variable do we have? What type of analysis is appropriate in this case?

13 Formula The formula for the sample size calculation if we assume equal group sizes is 𝑛 1 = 𝑛 2 = 𝜎 𝜎 𝑧 1βˆ’ 𝛼 2 + 𝑧 1βˆ’π›½ πœ‡ 1 βˆ’ πœ‡ 2 2 If mean difference Sample size DECREASES If a-level (z1-a/ ) Sample size DECREASES If power (z1-b ) Sample size INCREASES If standard deviation Sample size INCREASES

14 Preliminary information
Based on previous studies, we anticipate that subjects in the placebo arm will have a mean SDMT score of 45 with a standard deviation of 15 Based on earlier trials, we anticipate that the treatment will improve the mean SDMT score to 52 with a standard deviation of 15 Since this is a traditional trial, we would like a two sided type I error rate of 0.05 and power of 0.8

15 Sample size calculation in R
power.t.test(delta=7,sd=15, power=0.8, sig.level=0.05,alternative="two.sided") power.t.test(delta=7,sd=15,power=0.8) Estimated sample size of 74 per group (we always choose next whole number)

16 Changing the sample size
As difference between groups increases, sample size decreases power.t.test(delta=10,sd=15, power=0.8, sig.level=0.05,alternative="two.sided") As type I error rate increases, sample size decreases power.t.test(delta=7,sd=15, power=0.8, sig.level=0.1,alternative="two.sided") As power increases, sample size increases power.t.test(delta=7,sd=15, power=0.9, sig.level=0.05,alternative="two.sided") As standard deviation increases, sample size increases power.t.test(delta=7,sd=20, power=0.8, sig.level=0.05,alternative="two.sided")

17 Grant section With a sample of 74 subjects per groups, we will have 80% power to detect a difference with a significance level of 0.05 using a two-sided two-sample t-test if the mean (SD) SDMT score in the placebo group is 45 (15) and the mean (SD) SDMT score in the treatment group is 52 (15).

18 What we learned At the end of this lecture, you will be able to
Perform a sample size calculation for a two sample t-test in R Perform a sample size calculation for a two sample test of proportions in R


Download ppt "Applied Biostatistics: Lecture 4"

Similar presentations


Ads by Google