Correlation and Sample Size Calculations

Correlation

  • Correlation assesses the association between two variables.

  • Pearson’s Correlation: Parametric method.

  • Spearman’s Correlation: Non-parametric method.

  • Values range from -1 to 1.

    • +1: Perfect positive linear association.

    • -1: Perfect negative linear association.

    • 0: No linear relation.

  • Correlation is valid only within the sample range.

  • Strength of Correlation:

    • 0 – 0.19: Very weak

    • 0.2 – 0.39: Weak

    • 0.4 – 0.59: Moderate

    • 0.6 – 0.79: Strong

    • 0.8 – 1.0: Very strong

  • Pearson’s Correlation Coefficient:

    • Measures linear association.

    • Does not account for curved relationships.

    • r > 0: Positive correlation (both variables increase).

    • r < 0: Negative correlation (one variable increases, the other decreases).

    • r = +1 or -1: Perfect straight line.

    • r = 0: No linear association.

  • Assumptions for Pearson’s Correlation:

    • At least one variable is normally distributed for P-value validity.

    • Both variables should ideally be normally distributed in practice for confidence interval validity.

    • All observations must be independent.

  • Hypothesis Test:

    • Null hypothesis: ρ=0\rho = 0

    • Alternative hypothesis: ρ≠0\rho \neq 0

    • Test statistic: T-test

  • Sample Size:

    • The value at which the correlation coefficient becomes significant at the 5% level.

    • N=10, correlation=0.63

    • N=20, correlation=0.44

    • N=50, correlation=0.28

    • N=100, correlation=0.20

    • N=150, correlation=0.16

  • Spearman’s Correlation:

    • Measures general association, not just linear.

    • Non-parametric.

    • Applicable to ordinal data.

    • Outliers have less effect.

  • Presentation of Correlation:

    • Include graph, correlation coefficient (to 2 decimal places), P-value, and number of observations.

    • Example: N=20, R=0.58 (P<0.01)

  • Problems with Correlation:

    • Correlation does not imply causation.

    • It is useful for generating hypotheses.

    • Correlation does not quantify agreement.

    • Multiple testing issues arise when calculating numerous correlations.

Sample Size Calculations

  • Understanding hypothesis testing is crucial.

  • Understanding errors related to hypothesis testing is necessary.

  • Need to comprehend the power of a test.

Importance of Sample Size:

  • Larger studies increase power to detect differences.

  • Estimates population parameters with precision.

  • Many clinical trials are too small.

  • Increasing sample size increases test power.

Ethical Considerations:

  • Too small or too large sample sizes can be unethical.

  • Impacts time, manpower, risk, and cost.

  • Aim for the minimum sample size to achieve a high probability (power) of detecting a clinically worthwhile effect.

Objectives of Study:

  • Should be quantified.

  • Relate to a single primary outcome.

  • Predetermined in grant applications and study protocols.

Factors Influencing Sample Size:

  • Outcome type.

  • Number of groups for comparison.

  • Sampling variability.

  • Effect size.

  • Response rate.

  • Clinical outcome should be expressed in a patient-relevant way.

Components for Sample Size Calculation:

  • Effect size: The magnitude of the effect we wish to detect (clinically relevant difference).

  • Variability: Standard Deviation (SD) to calculate effect size.

  • Chosen Level of Significance: Type I error (e.g., 0.05).

  • Chosen Power: 1 – Type II error (e.g., 80%).

Type I and Type II Errors:

  • Type I Error (False Positive):

    • Rejecting the null hypothesis when it is true.

    • Risk = α\alpha

  • Type II Error (False Negative):

    • Failing to reject the null hypothesis when it is false.

    • Risk = β\beta

  • Power:

    • The probability of rejecting a false null hypothesis.

    • Power = 1−β1 - \beta

Power of a Test:

  • Used to compare two tests with the same α\alpha

  • Helps decide appropriate sample size.

  • Larger sample sizes generally lead to more powerful tests.

Significance Level (α\alpha):

  • The probability of a Type I error.

  • Controlled by the location of the rejection or critical region.

  • Common values: 0.05 or 0.01.

  • Choosing a small α\alpha may increase β\beta (Type II error).

Sample Size Calculation - Basics:

  • Continuous outcome scale (blood pressure, age, QoL score): compare two group means.

  • Binary outcome scale (yes/no, disease present/absent): compare proportions of 'yes' between two groups.

Sample Size Calculation - Advanced:

  • Longitudinal Studies: Account for dropouts and correlation between repeated measures.

  • Neuroimaging Studies: Consider multiple comparisons problem.

  • Genetic Studies: Sample size must be large to detect small effect sizes.

  • Clinical Trials: Account for the expected effect size and population variance.

  • Animal Studies: Balance ethical considerations with the need for statistical power.

  • Consult a statistician for complex scenarios.

Examples of comparing variables:

  • Comparing continuous variables

  • Comparing proportions

Sample size calculations- comparing two group means for a continuous outcome

  • Outcome should be on continuous scale (quality of life score, blood pressure, cholesterol level etc.)

  • In a trial if considered two sample t-test that means comparing two group means in continuous scale

  • Formula: N=2s2(z<em>α+z</em>β)2T2N = \frac{2s^2 (z<em>\alpha + z</em>\beta)^2}{T^2}

    • Where:

      • NN is the number of patients in each group.

      • ss is the standard deviation of the outcome.

      • TT is the smallest clinically important difference in the mean outcome between the groups.

      • z<em>αz<em>\alpha is the quantile related to the hypothesis test significance level. For a 5% significance level, z</em>α=1.96z</em>\alpha = 1.96.

      • z<em>βz<em>\beta is the quantile related to the hypothesis test of power. For 90% power, z</em>β=1.28z</em>\beta = 1.28.

Example Problem:
  • A double-blind, placebo-controlled, randomized trial investigates a statin drug's effect on LDL cholesterol levels.

  • Adults aged 55-70 at low stroke risk are followed for six months.

  • The primary outcome is LDL cholesterol level (mmol/L) at six months.

  • A clinically important reduction is 1.8 mmol/L.

  • Previous study SD is approximately 3.0 mmol/L.

  • Significance level of 5% and power of 90% are desired.

Solution:
  • s = 3

  • T = 1.8

  • zα=1.96z_\alpha = 1.96

  • zβ=1.28z_\beta = 1.28

  • N=2×32(1.96+1.28)21.82=59N = \frac{2 \times 3^2 (1.96 + 1.28)^2}{1.8^2} = 59

  • Approximately 59 patients per group.

Using STATA:
  • power twomeans 4.5 6.3 , sd(3) power(0.9)

  • power twomeans 14.5 16.3 , sd(3) power(0.9)

  • power twomeans 16.3 14.5 , sd(3) power(0.9)

  • power twomeans 5.0, diff(1.8) sd(3) power(0.9)

  • power twomeans 15.0, diff(1.8) sd(3) power(0.9)

  • All yield approximately n = 60 per group.

Accounting for Drop-Out Rate:
  • N∗=N(1−d)N^* = \frac{N}{ (1 - d) }

    • Where dd is the expected drop-out rate.

    • NN is the original sample size.

    • Then N∗N^* is the adjusted sample size.

  • If expected drop out rate is 10% in LDL trial (d=0.10):
    N∗=591−0.1=66N^* = \frac{ 59 }{1-0.1} = 66

  • So, calculate revised sample size after considering expected drop out rate.

Sample size calculations-comparing two proportions

  • Outcome should be on proportion, rate, prevalence…

  • In a trial if considers comparing two rates or prevalence or proportions..

  • Assume equal sample per group / arm of the trial

  • Formula:
    N=[z<em>α×2×p(1−p)+z</em>β×p<em>1(1−p</em>1)+p<em>2(1−p</em>2)]2(p<em>1−p</em>2)2N = \frac{[z<em>\alpha \times \sqrt{2 \times p(1-p)} + z</em>\beta \times \sqrt{p<em>1(1-p</em>1)+p<em>2(1-p</em>2)}]^2}{(p<em>1-p</em>2)^2}

    • Where

      • p1p_1 = Estimated current prevalence rate.

      • p2p_2 = Maximum prevalence rate that would signify a clinically important reduction (if interest lies in a prevalence reduction)

      • pp = p<em>1+p</em>22\frac{p<em>1+p</em>2}{2}, mean of p<em>1p<em>1 and p</em>2p</em>2

      • z<em>αz<em>\alpha = Quantile related to hypothesis test significance level. For a 5% significance level, z</em>αz</em>\alpha= 1.96.

      • z<em>βz<em>\beta = Quantile related to hypothesis test of power. For 80% power, z</em>βz</em>\beta = 0.84.

Example:

  • Multi-center randomized trial to investigate the effect of a beta-blocker on mortality as a treatment for severe heart failure.

  • The trial will be double-blind, placebo controlled and will include the same number of patients in each group.

  • Patients will be followed for two years and the primary outcome is all-cause mortality during this two-year period.

  • A previous study suggests that there is a two-year mortality rate of approximately 36% amongst the population of patients to be considered.

  • The investigators consider that it would be clinically important to detect a reduction to 24% in two-year mortality when treated with the beta-blocker.

  • The investigators wish to use a significance level of 5% and a power of 80%.

  • p1=0.36p_1 = 0.36

  • p2=0.24p_2 = 0.24

  • p=0.36+0.242=0.30p = \frac{0.36 + 0.24}{2} = 0.30

  • zα=1.96z_\alpha = 1.96

  • zβ=0.84z_\beta = 0.84

  • N=[1.96×2×0.30(1−0.30)+0.84×0.36(1−0.36)+0.24(1−0.24)]2(0.36−0.24)2=228N = \frac{[1.96 \times \sqrt{2 \times 0.30 (1-0.30)} + 0.84 \times \sqrt{0.36(1-0.36)+0.24(1-0.24)}]^2}{(0.36-0.24)^2} = 228

  • Therefore, we should recruit 228 patients in each group.

Using STATA:
  • power twoproportions 0.24 0.36 , test(chi2) power(0.8)

  • n= 228 / group

  • power twoproportions 0.24 0.36 , test(chi2) power(0.9)

  • n= 305/ group

The more power you want to achieve the more sample you need.