Download presentation
Presentation is loading. Please wait.
Published byRolf Marsh Modified over 9 years ago
1
Choosing Appropriate Descriptive Statistics, Graphs and Statistical Tests
Brian Yuen 15 January 2013
2
Using appropriate statistics and graphs
Report statistics and graphs depends on the types of variables of interest: For continuous (Normally distributed) variables N, mean, standard deviation, minimum, maximum histograms, dot plots, box plots, scatter plots For continuous (skewed) variables N, median, lower quartile, upper quartile, minimum, maximum, geometric mean For categorical variables frequency counts, percentages one-way tables, two-way tables bar charts 2
3
Using appropriate statistics and graphs…
Z=Cat. Y=Cat. Y=Cont. X=Cat. Use 3-Way Table X=Cont. X=Time N/A All these graphs are available in Chart Builder, from the Choose from: list.
4
Flow chart of commonly used descriptive statistics and graphical illustrations
Categorical data Frequency Percentage (Row, Column or Total) Continuous data: Measure of location Descriptive statistics Mean Median Continuous data: Measure of variation Standard deviation Range (Min, Max) Inter-quartile range (LQ, UQ) Exploring data Categorical data Bar chart Clustered bar charts (two categorical variables) Bar charts with error bars Continuous data Graphical illustrations Histogram (can be plotted against a categorical variable) Box & Whisker plot (can be plotted against a categorical variable) Dot plot (can be plotted against a categorical variable) Scatter plot (two continuous variables)
5
Choosing appropriate statistical test
Having a well-defined hypothesis helps to distinguish the outcome variable and the exposure variable Answer the following questions to decide which statistical test is appropriate to analysis your data What is the variable type for the outcome variable? Continuous (Normal, Skew) / Binary / Time dependent If more than one outcomes, are they paired or related? What is the variable type for the main exposure variable? Categorical (1 group, 2 groups, >2 groups) / Continuous For 2 or >2 groups: Independent (Unrelated) / Paired (Related) Any other covariates, confounding factors?
6
Flow chart of commonly used statistical tests
Exposure variable Normal Skew 1 group One-sample t test Sign test / Signed rank test 2 groups Two-sample t test Mann-Whitney U test Continuous Paired Paired t test Wilcoxon signed rank test >2 groups One-way ANOVA test Kruskal Wallis test Continuous Pearson Corr / Linear Reg Spearman Corr / Linear Reg 1 group Chi-square test / Exact test 2 groups Chi-square test / Fisher’s exact test / Logistic regression Outcome variable Categorical Paired McNemar’s test / Kappa statistic >2 groups Chi-square test / Fisher’s exact test / Logistic regression Continuous Logistic regression / Sensitivity & specificity / ROC 2 groups KM plot with Log-rank test Survival >2 groups KM plot with Log-rank test Continuous Cox regression
7
http://www. som. soton. ac
8
Case Studies
9
CONTINUOUS & ORDINAL DATA Case Study 1
A simple study investigating: the fitness level of our locally selected group of healthy volunteers with the published average value on fitness level which was done previously on the national level fitness level was measured by the length of time walking on a treadmill before stopping through tiredness Objective: any difference between the group average and the published value Outcome & type: Exposure & type: If the continuous outcome is Normally distributed Not Normally distributed vs.
10
CONTINUOUS & ORDINAL DATA Case Study 2
A clinical trial investigating: the effect of two physiotherapy treatments (standard and enhanced exercise) for patients with a broken leg on their fitness level (length of time walking on a treadmill before stopping through tiredness) Objective: any difference between the 2 group averages Outcome & type: Exposure & type: If the continuous outcome is Normally distributed Not Normally distributed
11
CONTINUOUS & ORDINAL DATA Case Study 3
Now each patient performs the walking test before and after enhanced physiotherapy treatment data might be presented as two variables, one as before data and the other as after data, but the values for individual patients are paired Objective: any difference between the before and the after averages Number of outcomes: Outcomes & type: If the difference in outcomes (e.g. after - before) is Normally distributed Not Normally distributed
12
CONTINUOUS & ORDINAL DATA Case Study 4
Based on Case Study 2 (standard vs. enhanced exercises), but now with a control group i.e. patients without a broken leg Objective: any difference among the 3 group averages Outcome & type: Exposure & type: If the continuous outcome is Normally distributed Not Normally distributed
13
CONTINUOUS & ORDINAL DATA Case Study 5
Now a group of patients each perform the walking test 3 times firstly when the cast is removed after six weeks of physiotherapy at six months after the physiotherapy treatment Objective: any improvement over time Number of outcomes: Outcomes & type: If the continuous outcome is Normally distributed Not Normally distributed Note –
14
CONTINUOUS & ORDINAL DATA Case Study 6
Before the participants started their fitness test, their blood pressure (BP) was recorded by two different machines machine 1 was the ‘gold standard’ machine 2 was newly made and claimed to be more accurate aim to validate the measurements recorded from machine 2 by assessing the level of agreement with that obtained from machine 1 Objective: any agreement between measuring tools Number of outcomes: Outcomes & type: Choice of test: Note –
15
When the continuous outcome is not normally distributed?
If outcome normally distributed use t-tests / ANOVA easy to obtain confidence interval for differences So far we’ve recommended using non-parametric tests when data not normal often less powerful non-parametric confidence intervals problematic Recall another possibility – take logs (natural log) of the outcome check to see if outcome looks normal after logging can then use t-tests / ANOVA estimate of the difference and its confidence interval on log scale easily available back transform to get estimate of percent change between groups back transform confidence interval better to analyse on log scale if data become normally distributed than to use non-parametric test
16
BINARY DATA Case Study 7 Fitness is now assessed only as Unfit / Fit
could be as a result of dichotomising the previous continuous outcome (0-5 minutes = Unfit; >5 minutes = Fit) investigate whether the proportions of Unfit and Fit are equal (i.e. 50% each) after the standard treatment or compare the proportions to specific values (e.g. 10% Fit, 90% Unfit) Objective: any difference in proportion within the group (or any difference from the specific proportions) Outcome & type: Exposure & type: Choice of test: Unfit Fit Standard
17
BINARY DATA Case Study 8 Similar setting as Case Study 2, but with the binary outcome defined from Case Study 7 (Unfit / Fit) to find out if the enhanced treatment is better than the standard treatment, i.e. more patients into the Fit category Objective: any difference in proportion between the groups Outcome & type: Exposure & type: Choice of test: Note – Unfit Fit Standard Enhanced
18
BINARY DATA Case Study 9 Fitness still assessed as Unfit / Fit, but we now have only one group of patients assessed before and after enhanced physiotherapy each patient was measured before and after treatment their status in fitness may change similar to Case Study 3 Objective: any change in status Number of outcomes: Outcomes & type: Choice of test: Before After Unfit Fit
19
BINARY DATA Case Study 10 Recall resting blood pressure (BP) was recorded by two different machines (machine 1 and 2) on our participants from Case Study 6 the measurements were now categorised as Low BP and High BP could be as a result of dichotomising the previous continuous outcome by the default settings from the two machines aim to validate the status recorded from machine 2 by assessing the level of agreement with that obtained from machine 1 Objective: any agreement between measuring tools Number of outcomes: Outcomes & type: Choice of test: Mac. 1 Mac. 2 Low High
20
SURVIVAL DATA Case Study 11
A clinical trial investigating the survival time of patients with a particular cancer patients are being randomised into a number of treatment groups they are then monitored until the end of the study the length of time between first diagnosis and death is recorded some people will still be alive at the end of study and we don’t want to exclude them Objective: any difference in the average survival time between groups Outcome & type: Exposure & type: Choice of test: Note –
21
Comparing a binary outcome between two groups – data presented as a 2x2 table
Unfit Fit Total Standard 80 (a) 140 (b) 220 (a+b) Enhanced 20 (c) (d) 240 (c+d) Table shows results from our trial (number of patients) Difference in proportion of Fit between groups (absolute difference): d/(c+d) - b/(a+b) An alternative parameter is the relative risk (multiplicative difference): d/(c+d) b/(a+b) Another alternative is the odds ratio: d/c ad b/a bc Chi-square test and Fisher’s exact test show if there is any association between the two independent variables, but it doesn’t provide the effect size between the groups regarding the outcome of interest, e.g. Fit =
22
Percentage of Fit in standard group: 140/220 (63
Percentage of Fit in standard group: 140/220 (63.6%) Percentage of Fit in enhanced group: 220/240 (91.7%) Parameter (95% CI) Absolute difference in proportions d/(c+d) - b/(a+b) 28.1% (21%, 35%)* Relative risk d/(c+d) Relative risk c/(a+b) 1.44 (1.29, 1.60) Odds ratio ad Odds ratio bc 6.29 (3.69, 10.72) * Asymptotic 95% confidence intervals (calculated in CIA) 95% confidence intervals calculated in SPSS Reminder: Report confidence intervals for ALL key parameter estimates If 95% confidence interval for a difference excludes 0 statistically significant e.g. Absolute difference If 95% confidence interval for a ratio excludes 1 statistically significant e.g. Relative risk and Odds ratio
23
Advantages and disadvantages of absolute and relative changes, and odds ratios
Absolute difference simplest to calculate and to interpret when applied to number of subjects in a group gives number of subjects expected to benefit 1/(absolute difference) gives NNT – ‘number needed to treat’ to see one additional positive response Relative risk intuitively appealing a multiplicative effect – proportion (risk) of failure in the treatment group examined relative to (or compare to) that in the reference group different result depending on whether risks of ‘Fit’ or ‘Unfit’ are examined and whether ‘Standard exercise’ group is selected as the reference level natural parameter for cohort studies Odds ratio difficult to understand – unless you’re a betting person! ratio of ‘number of successes expected per number of failures’ between the treatment group of interest and the reference group invariant to whether rate of ‘Fit’, ‘Unfit’, or rate of taking ‘Enhanced exercise’ are examined logistic regression in terms of odds ratios natural parameter for case-control studies
24
CONTINUOUS & ORDINAL DATA Case Study 12
Now, in the physiotherapy trial, we wanted to investigate if there was any relationship between the participants’ fitness level and their age at assessment we suspected that age at assessment affected their fitness level regardless of the treatment group they were in quantify the relationship by the direction, strength, and magnitude Objective: assess and quantify the relationship between two variables Outcome & type: Exposure & type: Choice of test: If any of the variables is Normally distributed If both variables are not Normally distributed
25
CONTINUOUS & ORDINAL DATA Case Study 13
We now found, in Case Study 12, that age at assignment had some linear relationship with participants’ fitness level needed to quantify this relationship, i.e. what is the average fitness level at different age at assignment also wanted to predict fitness level for future patients, given their age at assignment Objective: set up a statistical model to quantify the effect of exposure variable on the outcome variable Outcome & type: Exposure & type: Choice of test: Note –
26
BINARY DATA Case Study 14 Similar analysis was performed as in Case Study 13, but substituted the binary fitness level (Unfit / Fit) instead of the continuous fitness level and wanted to predict the status of fitness level (Unfit / Fit) for future patients, given their age at assignment Objective: set up a statistical model to quantify the effect of exposure variable on the outcome variable Outcome & type: Exposure & type: Choice of test: Note –
27
BINARY DATA Case Study 15 Using the logistic regression model from Case Study 14, we can aim to evaluate the predictive performance of the regression model developed given we know the true outcome status of fitness level for each participant investigate the optimal predictive performance of the model relate the results to an individual participant indicating the likelihood of them having a specific status of fitness Objective: (1) assess the predictive performance of the model; (2) determine the probability that an individual test result is accurate Outcome & type: Exposure & type: Choice of test: (1) (2) Note –
28
SURVIVAL DATA Case Study 16
Recall the clinical trial investigating the survival time of patients with a particular cancer (Case Study 11) age at randomisation is now considered as an important factor in this relationship regardless of the treatment group still interested in the length of time between first diagnosis and death note that censored data still present due to some people having dropped out during follow-up, or are still alive at the end of study and we want to make use of this information Objective: set up a statistical model to quantify the relationship between the exposure variable and the survival status / time Outcome & type: Exposure & type: Choice of test: Note –
29
References Altman, D.G. Practical Statistics for Medical Research. Chapman and Hall 1991. Kirkwood B.R. & Sterne J.A.C. Essential Medical Statistics. 2nd Edition. Oxford: Blackwell Science Ltd 2003. Bland M. An Introduction to Medical Statistics. 3rd Edition. Oxford: Oxford Medical Publications 2000. Altman D.G., Machin D., Bryant, T.N. & Gardner M.J. Statistics with Confidence. 2nd Edition. BMJ Books 2000. Campbell M.J. & Machin D. Medical Statistics: A Commonsense Approach. 3rd Edition, 1999. Field A. Discovering Statistics Using SPSS for Windows. 2nd edition. London: Sage Publications 2005. Bland JM, Altman DG. (1986). Statistical methods for assessing agreement between two methods of clinical measurement. Lancet, i, Mathews JNS, Altman DG, Campbell MJ, Royston P (1990) Analysis of serial measurements in medical research. British Medical Journal, 300,
30
Other web and software resources
UCLA – What statistical analysis should I use? DISCUS Discovering Important Statistical Concepts Using Spreadsheets Interactive spreadsheets, designed for teaching statistics Web-sites for download and information - Choosing the correct statistical test SPSS for Windows Help Statistics Coach Statistics for the Terrified
31
Solutions to Case Studies
32
CONTINUOUS & ORDINAL DATA Case Study 1
A simple study investigating: the fitness level of our locally selected group of healthy volunteers with the published average value on fitness level which was done previously on the national level fitness level was measured by the length of time walking on a treadmill before stopping through tiredness Objective: any difference between the group average and the published value Outcome & type: fitness level (length of time) – continuous Exposure & type: one group only If the continuous outcome is Normally distributed One-sample t test Not Normally distributed Sign test / Signed rank test vs.
33
CONTINUOUS & ORDINAL DATA Case Study 2
A clinical trial investigating: the effect of two physiotherapy treatments (standard and enhanced exercise) for patients with a broken leg on their fitness level (length of time walking on a treadmill before stopping through tiredness) Objective: any difference between the 2 group averages Outcome & type: fitness level – continuous Exposure & type: treatment group – binary, independent (or unrelated) If the continuous outcome is Normally distributed Two-sample t test Not Normally distributed Mann-Whitney U test
34
CONTINUOUS & ORDINAL DATA Case Study 3
Now each patient performs the walking test before and after enhanced physiotherapy treatment data might be presented as two variables, one as before data and the other as after data, but the values for individual patients are paired Objective: any difference between the before and the after averages Number of outcomes: 2 (before and after) Outcomes & type: fitness level – continuous, paired (or related) If the difference in outcomes (e.g. after - before) is Normally distributed Paired t test Not Normally distributed Wilcoxon signed rank test
35
CONTINUOUS & ORDINAL DATA Case Study 4
Based on Case Study 2 (standard vs. enhanced exercises), but now with a control group i.e. patients without a broken leg Objective: any difference among the 3 group averages Outcome & type: fitness level – continuous Exposure & type: treatment group – categorical (more than two levels), independent (or unrelated) If the continuous outcome is Normally distributed One-way ANOVA test Not Normally distributed Kruskal-Wallis test
36
CONTINUOUS & ORDINAL DATA Case Study 5
Now a group of patients each perform the walking test 3 times firstly when the cast is removed after six weeks of physiotherapy at six months after the physiotherapy treatment Objective: any improvement over time Number of outcomes: 3 (time points) Outcomes & type: fitness level – continuous, related (more than two repeated measures per patient) If the continuous outcome is Normally distributed Repeated measures ANOVA test Not Normally distributed Friedman’s test Note – might have a problem with patients dropping out Note – both approaches only use patients with measures at all three time points
37
CONTINUOUS & ORDINAL DATA Case Study 6
Before the participants started their fitness test, their blood pressure (BP) was recorded by two different machines machine 1 was the ‘gold standard’ machine 2 was newly made and claimed to be more accurate aim to validate the measurements recorded from machine 2 by assessing the level of agreement with that obtained from machine 1 Objective: any agreement between measuring tools Number of outcomes: 2 (machines) Outcomes & type: blood pressure – continuous, paired (or related) Choice of test: Bland-Altman method (& Paired t-test) Note – the Bland-Altman method is not a statistical test Note – see the Bland and Altman paper for details
38
BINARY DATA Case Study 7 Fitness is now assessed only as Unfit / Fit
could be as a result of dichotomising the previous continuous outcome (0-5 minutes = Unfit; >5 minutes = Fit) investigate whether the proportions of Unfit and Fit are equal (i.e. 50% each) after the standard treatment or compare the proportions to specific values (e.g. 10% Fit, 90% Unfit) Objective: any difference in proportion within the group (or any difference from the specific proportions) Outcome & type: fitness level category – binary Exposure & type: one group only Choice of test: Chi-square test (large sample size) Exact test (small sample size) Unfit Fit Standard
39
BINARY DATA Case Study 8 Similar setting as Case Study 2, but with the binary outcome defined from Case Study 7 (Unfit / Fit) to find out if the enhanced treatment is better than the standard treatment, i.e. more patients into the Fit category Objective: any difference in proportion between the groups Outcome & type: fitness level category – binary Exposure & type: treatment groups – binary, independent (or unrelated) Choice of test: Chi-square test (large sample size) Fisher’s exact test (small sample size) Note – same tests for more than 2 groups Unfit Fit Standard Enhanced
40
BINARY DATA Case Study 9 Fitness still assessed as Unfit / Fit, but we now have only one group of patients assessed before and after enhanced physiotherapy each patient was measured before and after treatment their status in fitness may change similar to Case Study 3 Objective: any change in status Number of outcomes: 2 (before and after) Outcomes & type: fitness level category – binary, paired (or related) Choice of test: McNemar’s test Before After Unfit Fit
41
BINARY DATA Case Study 10 Recall resting blood pressure (BP) was recorded by two different machines (machine 1 and 2) on our participants from Case Study 6 the measurements were now categorised as Low BP and High BP could be as a result of dichotomising the previous continuous outcome by the default settings from the two machines aim to validate the status recorded from machine 2 by assessing the level of agreement with that obtained from machine 1 Objective: any agreement between measuring tools Number of outcomes: 2 (machines) Outcomes & type: blood pressure status (from each machine) – binary, paired (or related) Choice of test: Kappa statistic Mac. 1 Mac. 2 Low High
42
SURVIVAL DATA Case Study 11
A clinical trial investigating the survival time of patients with a particular cancer patients are being randomised into a number of treatment groups they are then monitored until the end of the study the length of time between first diagnosis and death is recorded some people will still be alive at the end of study and we don’t want to exclude them Objective: any difference in the average survival time between groups Outcome & type: time monitored & death status – survival Exposure & type: treatment group – binary, independent (or unrelated) Choice of test: KM plot with Log-rank test Note – we can also apply this to our physiotherapy example, to look at the “survival time”, that is the time to stop walking on the treadmill through tiredness for both groups of patients in the presence of censored data
43
CONTINUOUS & ORDINAL DATA Case Study 12
Now, in the physiotherapy trial, we wanted to investigate if there was any relationship between the participants’ fitness level and their age at assessment we suspected that age at assessment affected their fitness level regardless of the treatment group they were in quantify the relationship by the direction, strength, and magnitude Objective: assess and quantify the relationship between two variables Outcome & type: fitness level – continuous Exposure & type: age at assessment – continuous Choice of test: If any of the variables is Normally distributed Pearson correlation If both variables are not Normally distributed Spearman’s rank correlation
44
CONTINUOUS & ORDINAL DATA Case Study 13
We now found, in Case Study 12, that age at assignment had some linear relationship with participants’ fitness level needed to quantify this relationship, i.e. what is the average fitness level at different age at assignment also wanted to predict fitness level for future patients, given their age at assignment Objective: set up a statistical model to quantify the effect of exposure variable on the outcome variable Outcome & type: fitness level – continuous Exposure & type: age at assessment – continuous Choice of test: (Simple) Linear regression Note – Linear regression is also appropriate when the exposure variable is categorical, e.g. exercise treatment group (standard & enhanced), as well as controlling for other covariates
45
BINARY DATA Case Study 14 Similar analysis was performed as in Case Study 13, but substituted the binary fitness level (Unfit / Fit) instead of the continuous fitness level and wanted to predict the status of fitness level (Unfit / Fit) for future patients, given their age at assignment Objective: set up a statistical model to quantify the effect of exposure variable on the outcome variable Outcome & type: fitness level category – binary Exposure & type: age at assessment – continuous Choice of test: (Simple) Logistic regression Note – Logistic regression is also appropriate when the exposure variable is categorical, e.g. exercise treatment group (standard & enhanced), as well as controlling for other covariates
46
BINARY DATA Case Study 15 Using the logistic regression model from Case Study 14, we can aim to evaluate the predictive performance of the regression model developed given we know the true outcome status of fitness level for each participant investigate the optimal predictive performance of the model relate the results to an individual participant indicating the likelihood of them having a specific status of fitness Objective: (1) assess the predictive performance of the model; (2) determine the probability that an individual test result is accurate Outcome & type: fitness level category – binary Exposure & type: age at assessment – continuous Choice of test: (1) Sensitivity and specificity, ROC curve (2) PPV and NPV Note – none of the above methods are statistical tests
47
SURVIVAL DATA Case Study 16
Recall the clinical trial investigating the survival time of patients with a particular cancer (Case Study 11) age at randomisation is now considered as an important factor in this relationship regardless of the treatment group still interested in the length of time between first diagnosis and death note that censored data still present due to some people having dropped out during follow-up, or are still alive at the end of study and we want to make use of this information Objective: set up a statistical model to quantify the relationship between the exposure variable and the survival status / time Outcome & type: time monitored & death status – survival Exposure & type: age at randomisation – continuous Choice of test: Cox regression Note – Cox regression is also appropriate when the exposure variable is categorical, e.g. treatment groups (active & placebo), as well as controlling for other covariates
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.