R for Survey Analysis
1
Index
2
Introduction
2.1
Aims
2.1.1
Day 1
2.1.2
Day 2
2.2
Why R
3
Day 1
3.1
Outline for Day 1
4
Loading Survey Data
4.1
Analysing a survey in R
4.2
Loading the data
4.3
Cleaning the data
4.4
Exploring the data
4.5
Applying survey weighting for exploratory stats
5
Crosstabs
5.1
Case 1: with survey weights
5.2
Case 2: Without survey weights
6
Day 2
6.1
Outline for Day 2
6.1.1
Take home messages to start with
7
Plotting basic charts (base R)
7.1
histograms - basic frequencies
7.2
bar charts - plotting stats across categories
7.3
Box plots - plotting distribution of several categories/vars
7.4
Scatter plots - relationship between two continuous vars
7.5
Tiny statistics excursion
7.6
Are there any other plots that you regularly use?
8
Intermediate plotting in R (GGPLOT2)
8.1
Adding transparency
8.2
Adding automatic line of best fit
8.3
Adding colours
8.4
Fitting a line of best fit for each group of a categorical variable
8.5
Exercise: Brief in-class practice of making charts
8.6
ggplot cheat sheet
9
Regression model
9.1
Simple linear regression
9.2
Multiple linear regression
9.3
Lunch Break
9.4
ggplot cheat sheet reminder:
9.5
Regression output inspection (cont.)
9.5.1
Try this for yourselves
10
Significance tests
10.1
Chi-square
10.2
T-test
11
Testing regression assumptions
11.1
Linear relationship
11.2
normality of residuals
11.3
Testing the Homoscedasticity Assumption
11.4
Test for autocorrelation (Violations of independence)
11.5
Collinearity
11.6
Multicollinearity
12
‘Homework’ questions
13
9. Survey specific functions
Published with bookdown
Intermediate R - R for Survey Analysis
Chapter 3
Day 1
3.1
Outline for Day 1
We will cover:
Loading survey data.
Cleaning the data.
Exploring the data.
Applying survey weightings.
Cross tabs.