== Power computations == Power computations can be performed in SPSS and R using syntax. For SPSS users Chris Aberson has syntax for power calculations in his book. See reference below. __Note__ in SPSS Version 24 and later one can add in R extensions to perform power analyses via the Extensions>Extension hub which adds the R programs to the SPSS gui menu so power computations can be performed in SPSS with 'point and click'. Alternatively one could use these procedures in R with syntax. For a theoretical background and details of specialist software have a look at graduate seminar on power at the [[StatsCourse2006|Graduate Statistics Programme October-December 2006]]. There is also [[http://homepages.gold.ac.uk/aphome/cc16work.doc|a worked example]] using "Method 2" on a t-test. [[attachment:vif.pdf | F. Y. Hsieh, Philip W. Lavori, Harvey J. Cohen and John R. Feussner (2003) An Overview of Variance Inflation Factors for Sample-Size Calculation ]] ''Eval Health Prof'' '''26''' 239-257 mentions various formulae for power calculations. Note in some cases one needs to inflate the total sample size required if there is a natural clustering in the data such as patients being assessed by different exercise therapists. For example if there are b patients assessed by each exercise therapist with an intra-therapist correlation (ICC) then the design effect equals 1 + [(b-1)ICC]. The total sample needs to be multiplied by this design effect to give sample size adjusted for the clustering effect. A further adjustment for variations in cluster sizes can be made (measured by the coefficient of variation) can be incorporated into the formula giving DE = 1 + (b(1+cv^2)-1)ICC. This extra adjustment for differing cluster sizes is not needed for small cvs e.g. cv < 0.23 (see [[attachment:cvDE.pdf | page 26 of this presentation]]). __Sample sizes required for a given power__ * [[FAQ/power/onesamp|One sample t-test]] * [[FAQ/power/unpaired|Unpaired t-tests (equal group sizes)]] * [[FAQ/power/unpairedUneq|Unpaired t-tests (unequal group sizes)]] * [[FAQ/power/pairt|Paired t-tests]] * [[FAQ/power/owAnovaN|Regression including One-Way ANOVA and ANCOVA]] * [[FAQ/power/pPowN| Comparing a single proportion with a constant (sign test)]] * [[FAQ/power/propsn| Comparing two independent proportions]] * [[FAQ/power/prop1sn|Comparing three or more independent proportions]] * [[FAQ/power/mcn| Comparing two related proportions (McNemar test)]] * [[FAQ/power/FisherrN| Comparing two independent correlations from two different samples]] * [[FAQ/power/rmPowN| A term in any Anova (including repeated measures)]] * [[FAQ/power/llogN| A single predictor in a multiple binary logistic regression]] * [[FAQ/power/hazN| Survival analysis]] __Power required for given sample sizes__ * [[FAQ/power/onesampn|One sample t-test]] * [[FAQ/power/unpaireqn|Unpaired t-tests (equal group sizes)]] * [[FAQ/power/unpairn|Unpaired t-tests (unequal group sizes)]] * [[FAQ/power/pairn|Paired t-tests]] * [[FAQ/power/owanova|Regression including One-Way ANOVA and ANCOVA]] * [[FAQ/power/pPow| Comparing a single proportion with a constant (sign test)]] * [[FAQ/power/props|Comparing two independent proportions]] * [[FAQ/power/prop1s|Comparing three or more independent proportions]] * [[FAQ/power/mcnemarN| Comparing two related proportions (McNemar test)]] * [[FAQ/power/Fisherr| Comparing two independent correlations from two different samples]] * [[FAQ/power/rmPow|A term in any Anova (including repeated measures)]] * [[FAQ/power/llogPow| A single predictor in a multiple binary logistic regression]] * [[FAQ/power/haz| Survival analysis]] * [[FAQ/power/roc| ROC Analysis]] Additional power freeware (including the popular G*POWER (currently version 3)) is available for download from [[http://www.epibiostat.ucsf.edu/biostat/sampsize.html#PCSize|here.]] Some examples using G*POWER 3 are in Howell (2013). There are also some power calculators mentioned in the Power Grad talks and [[http://powerandsamplesize.com/Calculators | here including Survival Analysis power computations here]] and for Relative Risk [[https://www.stat.ubc.ca/~rollin/stats/ssize/caco.html | here]] where the calculations are the same as in __Comparing Proportions for Two Independent Samples__ setting p1=p0 (probability of adverse event in the control group) and p2= p0*RR/(1 + p0*(RR - 1)). See Schesselman, J. (1982), Case Control Studies, p. 145. Risk Ratios are ratios of group probabilities of a negative event where Odds Ratios are ratios of the group odds of a negative event [[http://www.theanalysisfactor.com/the-difference-between-relative-risk-and-odds-ratios/ | as described here.]] Other power calculators [[http://www.ai-therapy.com/psychology-statistics/effect-size-calculator | here.]] __References__ Aberson CL (2010) Applied power analysis for the behavioral sciences. Routledge:London. This book contains examples of computing effect sizes and power using SPSS. Howell DC (2013) Statistical methods for psychology. 8th Edition. International Edition. Wadsworth:Belmont,CA.