Duration
1 day
What You’ll learn
- Students will understand what R is, and how to input and output data files into their R sessions.
- Students will know how to manipulate numbers and vectors, and will understand objects and classes.
- Students will understand how to create data structures in R: vectors; arrays and matrices; lists and data frames.
- Students will know how to use R as a statistical environment following many examples.
- Students will understand how to create, estimate and interpret ANOVA, regression, GLM and GAM statistical models with many examples of each.
- Students will learn how to create statistical and other visualizations using both the base and ggplot graphics capabilities in R.
Course Outline
Introduction to R and Inputting Data into R
- What is R ?
- Reading in Data
Manipulating Numbers and Vectors
- Vectors
- Vector Arithmetic
- Generating Regular Sequences
- Logical Vectors
- More Missing Values; Character Vectors
- Index Vectors
Objects and Classes
- Numeric Types
- Strings
- Factors
- Logical and Missing
- Vectors
- Vectorization and Recycling
- Basic Data Structures in R
- Objects
Arrays and Matrices
- Factors and Strings
- Function tapply() and Ragged Arrays
- Arrays and Matrices
- Warpbreaks Data
- Row Names and Column Names
List and Data Frame Structures
- Introduction to Lists
- List Features and List Slicing
- Accessing List Components
- What are Data Frames
- Characteristics of Data Frames
- A Data Frame is a List
- Data Frames are Lists
- Manipulating Data Frames
User-Defined Functions
- Introduction to Writing Functions in R
- Writing Functions
- Two Sample t-test
- Finish t-test Example; Named Arguments and Defaults
- Function Examples
- "Many Means" Function Example
- parmax() and parmin() Functions
- parboth() Function
Working with R as a Statistical Environment
- Introduction to R as a Statistical Environment
- Basic Operations
- Presidential Height and Prussian Horsekicks
- Prussian Horsekicks and Functions
- Functions; Vectors and Matrices
- Data Frames and Histograms
- Attaching and Working with Data Frames
- Entering Data Manually
Inferential Statistics - Hypothesis Tests
- Types of Mean and Variance Tests
- Hypothesis Testing - Types of Errors (Theory)
- What is p value? (Theory)
- Hypothesis Testing - One Sample Z Test (Theory)
- One Sample z Test Using R
- One Sample z Test using BSDA Package
- One Sample t Test Using R
- Visualizing One Sample t Test Results using Visualize Package
- One Sample Variance Test - Chi Square Test (Theory)
- One Sample Variance Test Using Envstats Package
- Chi Square Distribution for One Sample Variance Test
- Two Sample Z Test (Theory)
- Two Sample Z Test Using R
- Visualizing Two Sample Z Test Using Visualize Package
- Two Sample Z Test for Populations with Different Means
- Two Sample t Test (Theory)
- Two Sample t Test (Equal Variance) Using R
- Two Sample t Test (Unequal Variance) Using R
- Paired t Test (Theory)
- Paired t Test Using R
- Two Sample Variance Test Using F Test (Theory)
- Two Sample Variance Test (F Distribution) Using R
- Visualizing Two Sample Variance Test Results using Visualize Package
- ANOVA Introduction (Theory)
- Understanding the concept behind ANOVA without doing any calculation.
- Formulas and calculations in ANOVA (Theory)
- ANOVA Example Using Manual Calculations (Theory)
- Analysis of Variance (ANOVA) Using R
- Goodness of Fit Test (Theory)
- Contingency Tables (Theory)
Programme scope, delivery arrangements and suitability are confirmed during enquiry.