comparing groups
DESCRIPTION
Comparing groups. Research questions. Is outcome of birth related to deprivation? Are surgical and conservative treatments equally effective in resolving schapoid lunate fractures? Does survival from diagnosis to death vary with Dukes’ score?. Issues in comparing groups. Type of data - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/1.jpg)
Comparing groups
![Page 2: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/2.jpg)
2
Research questions Does outcome of birth vary with
deprivation? Are surgical and conservative
treatments equally effective in resolving schapoid lunate fractures?
Does survival from diagnosis to death vary with Dukes’ score?
![Page 3: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/3.jpg)
3
Issues in comparing groups Type of data
Categorical Ordered Unordered
Continuous Survival
Dependence of observations Different case Same cases or matched cases
Number of groups
![Page 4: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/4.jpg)
4
So – WOT test? Categorical data
Chi squared Test of association Test of trend
Continuous data Normal (plausibly!) Two groups
t tests More than two groups
ANOVA Survival data
Logrank test
![Page 5: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/5.jpg)
5
Categorical data Are males and females equally likely to
meet targets to reduce cholesterol? Test of association Example 1
Does the proportion of mothers developing pre-eclampsia vary by parity (birth order)? Test of trend Example 2
![Page 6: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/6.jpg)
6
Hypotheses to be tested H0: Males and females equally likely to
meet targets to reduce cholesterol H1: Males and females equally likely to
meet targets to reduce cholesterolTwo-sided test
H2: Males are less likely to meet targets to reduce cholesterolOne sided test
![Page 7: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/7.jpg)
7
The test statistic Used to decide whether the null hypothesis is:
Accepted Rejected in favour of the alternative
Value calculated from the data Significance assessed from known
distribution of the test statistic
![Page 8: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/8.jpg)
8
Example 1: Crosstabulation Analyse Descriptive
statistics Crosstabs
![Page 9: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/9.jpg)
9
Statistics and display
![Page 10: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/10.jpg)
10
Output
Males more likely than females to achieve the target P<0.001
![Page 11: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/11.jpg)
11
Testing for trend When one of the classes is ordinal:
Deprivation scoreAge groupSeverity of disease
More sensitive Chi-squared tests are available
![Page 12: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/12.jpg)
12
Example 2: Test of trend
Pre-eclamplsia is associated with parity P=0.001 The linear trend is significant P<0.001
Trend
Association
![Page 13: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/13.jpg)
13
Now you’ve wrecked it!Small numbers Chi-squared not appropriate:
In a 2 by 2 table (i.e. 1 dof) Total frequency <20 Total frequency between 20 and 40, and smallest
expected frequency <5 In tables with more than 1 dof
More than one fifth of cells have expected frequency <5
Any cell has expected frequency <1 Yates’ correction for 2 by 2 table (i.e. 1 dof)
When Chi-squared not appropriate
Don’t panic!!!!!SPSS will sort out these details
Return a message to tell you
![Page 14: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/14.jpg)
14
Splitting the test statistic To assess the contribution of one
category to overall significanceCorresponding row or column
removedTest statistic recalculatedNew test statistic no longer significant
The category concerned is responsible for the effect
![Page 15: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/15.jpg)
15
Comparing two means Dependent
Same person Measured on two occasions
Cholesterol Baseline After treatment
Measured on two matched cases Matching on factors known to affect outcome
Age, BMI Independent
Different people Cholesterol at baseline in males and females
![Page 16: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/16.jpg)
16
Dependent data Cholesterol measured on two occasions
Baseline After treatment
Analyse Compare means Paired sample t test
Assuming! Checked distribution Plausibly Normal
![Page 17: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/17.jpg)
17
Dependent dataCholesterol reduced after treatment
From 6.09 (0.036) to 3.67 (0.200)
P<0.001
![Page 18: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/18.jpg)
18
Independent data Cholesterol measured at baseline
Males Females
Analyse Compare means Independent samples t test
![Page 19: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/19.jpg)
19
Independent dataBaseline cholesterol different in males and females
Males 5.83 (0.048) to 6.36 (0.051)
P<0.001
![Page 20: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/20.jpg)
20
Comparing sample variances
Think! If SDs are unequal, does it make sense to
compare means? Techniques include:
Transformation of observationsFormulae for degrees of freedom
![Page 21: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/21.jpg)
21
ANOVA Total variance = V Between groups variance = B Within groups variance = W Ratio = B/W No differences between groups
Ratio = 1 Higher the ratio
Larger differences between groups
Comparing more than 2 groups
![Page 22: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/22.jpg)
22
One-way ANOVA One factor
Smoking status Never, current, former
BMI category Underweight, normal, pre-obese, obese
School type Grammar, Independent, Comprehensive
Tests are: Global between-group differences Specific comparisons
e.g. all groups against the first Contrasts
![Page 23: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/23.jpg)
23
One-way ANOVA Analyse General linear model Univariate
![Page 24: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/24.jpg)
24
One-way ANOVA: Model
![Page 25: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/25.jpg)
25
One-way ANOVA: Contrasts
![Page 26: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/26.jpg)
26
Contrasts All pairwise combinations
Bonferroni Specific comparisons
Contrasts From the previous - Difference From the first From the last Simple
Trend Linear Non-linear
![Page 27: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/27.jpg)
27
One-way ANOVA: Profile plots
![Page 28: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/28.jpg)
28
One-way ANOVA: Post-hoc
![Page 29: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/29.jpg)
29
One-way ANOVA: Options
![Page 30: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/30.jpg)
30
One-way ANOVA: Output
![Page 31: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/31.jpg)
31
One-way ANOVA: Output
![Page 32: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/32.jpg)
32
One-way ANOVA: Output
![Page 33: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/33.jpg)
33
One-way ANOVA: Output
![Page 34: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/34.jpg)
34
One-way ANOVA: Plot
![Page 35: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/35.jpg)
35
Two-way ANOVA Two factors
BMI groupGenderTime
![Page 36: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/36.jpg)
36
Within- and between-subject factors
Within-subjects factorsSide (left, right)Review (pre-treatment, post-
treatment)Treatment (in a cross-over study)
Between-subjects factorsGenderBMI
![Page 37: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/37.jpg)
37
Factor or covariate? Factors are categorical variables Otherwise they are covariates
![Page 38: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/38.jpg)
38
Two-way ANOVA: Output
![Page 39: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/39.jpg)
39
Two-way ANOVA: Output
![Page 40: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/40.jpg)
40
Survival Time between entry to study and
subsequent eventDeathFull recoveryRecurrence of diseaseReadmissionDislocation of joint
![Page 41: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/41.jpg)
41
What’s the problem? Impossible to wait until all
members of the study have experienced the eventSome may leave the study before the
event occurred Censored events Survival time unknown
Times not Normally distributed
![Page 42: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/42.jpg)
42
Survival methods Life table
Events are grouped into intervals One year, three year, five year post-op
review Survival times are inexact
Kaplan-MeierTime at which event occurred known
Time to mobility during hospital stay Survival times are exact
![Page 43: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/43.jpg)
43
Estimates of survival Probability
Of survival to some given time Survival time
Median or mean Confidence intervals for survival
ProbabilitiesTimes
Survival curves
![Page 44: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/44.jpg)
44
Data for analysis Time to survival
Time to event (if event occurred)Time to end of study (censored event)
Status Identifies cases in which the event has
happenedCan be multiple
1=Disease free, 2=Recurrence, 3=Death Group
Treatment regime
![Page 45: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/45.jpg)
45
Data for analysis: Example Time to survival
Time to event (if event occurred)Time to end of study (censored event)
Status Identifies cases in which the event has
happenedCan be multiple
1=Disease free, 2=Recurrence, 3=Death Group
Treatment regime
![Page 46: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/46.jpg)
46
Outcomes from analysis Survival table (Kaplan-Meier)
one row for each event or censored observation Life table (life table)
one row for each interval Time to survival
Mean, median, quartiles, SE Survival curve
probability of no event by time t Hazard curve
probability of event at time t
![Page 47: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/47.jpg)
47
Comparing survival in groups Survival probabilities or times are
point estimatespr(5yr survival) = 0.80±0.05 for
Group 1 pr(5yr survival) = 0.75±0.10 for
Group 2 Survival curves can be compared
Groups have the same survival curve Survival is comparable for both groups
![Page 48: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/48.jpg)
48
Comparing survival curves Log-rank
survival experience of all groups is comparable
Trend if groups are ordinal a trend test
might be appropriate
![Page 49: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/49.jpg)
49
Cox regression Used to investigate effect of
continuous variables on survival timeBMI on time to dislocationage at diagnosis on time to death
Estimates regression coefficients
![Page 50: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/50.jpg)
50
Define time and event
![Page 51: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/51.jpg)
51
Define factor(s) and test
![Page 52: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/52.jpg)
52
Define time and event
![Page 53: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/53.jpg)
53
Select options
![Page 54: Comparing groups](https://reader036.vdocuments.net/reader036/viewer/2022062302/56816793550346895ddcccff/html5/thumbnails/54.jpg)
54
Output