R for STEPH
Preface
1
Intro to R: Practical 8
1.1
Opening RStudio
1.2
Basic Operations
1.3
Packages and Libraries
2
Comparing Two Means: Practical 9
2.1
Read in data & load libraries
2.2
Descriptive Statistics
2.3
A ggplot2 Tangent
2.4
Constructing Confidence Intervals
2.5
Interpretation of Confidence Intervals
2.6
Interpretation of CIs: Answer
2.7
Distribution Across Subgroups
2.8
Graphing Two Distributions
2.9
Comparing Two Means
2.10
One Sample t-test
2.11
Two sample t-test
2.12
Analysis of Variance
2.13
ANOVA in Multiple Groups
2.14
Non-Parametric Tests
2.14.1
Wilcoxon rank sum test
2.14.2
Wilcoxon Signed Rank Test
2.15
Solutions to Exercises
2.15.1
Exercise 8.1
2.15.2
Exercise 8.2
2.15.3
Exercise 8.3
2.15.4
Exercise 8.4
2.15.5
Exercise 8.5
2.15.6
Exercise 8.6
2.15.7
Exercise 8.7
3
Comparing Two Categorical Variables: Practical 10
3.1
Two-way frequency tables
3.2
3.3
Z-test for proportions
3.4
Trends in proportions
3.5
Further exercises
4
Stratified Analysis of 2x2 Tables: Practical 13
5
Data Analysis Exercise: Practical 14
6
Linear Regression: Practical 16
6.1
Correlation
6.2
Further Exercises
7
Extended Linear Regression: Practical 17
8
Power & Sample Size: Practical 18
9
Survey Samples: Practical 19
R for Statistics in EPH
2.15
Solutions to Exercises
2.15.1
Exercise 8.1
2.15.2
Exercise 8.2
2.15.3
Exercise 8.3
2.15.4
Exercise 8.4
2.15.5
Exercise 8.5
2.15.6
Exercise 8.6
2.15.7
Exercise 8.7