## MAS6024 Statistical Data Science in R

 Semester 1, 2021/22 15 Credits Lecturer: Dr Kevin Walters Timetable Reading List Aims Outcomes Teaching Methods Assessment Full Syllabus

This module starts with some basic R, introduces further aspects of the R language, demonstrates how to use and write functions in R, introduces some programming tools and shows how R can be used to implement some Monte Carlo techniques. Alongside the programming aspects the module also illustrates basic exploratory data analysis in R and introduces the grammar of graphics employed in the ggplot2 graphics system. The R web application Shiny is also illustrated.

There are no prerequisites for this module.
No other modules have this module as a prerequisite.

## Outline syllabus

• Introduction to the R language.
• Writing R functions.
• Programming in R.
• Monte Carlo Simulation in R.
• Exploratory data analysis in R.
• ggplot2

## Aims

• To enable students to write R code.
• To give practice in writing functions in R.
• To help students to write longer programs requiring more complex programming.
• To illustrate how R can be used to implement a range of statistical methods via Monte Carlo simulation.
• To give practice in applying Monte Carlo methods and interpreting results from them.
• To give practice in creating reproducible work using R Markdown.
• To give practice in implementing exploratory data analysis in R
• To give practice in using ggplot2 and Shiny.

## Learning outcomes

• write simple functions and programs in R;
• develop skills in writing longer, more complex R programs;
• use Monte Carlo simulation in R to solve a range of problems;
• understand how to perform effective exploratory data analysis and produce high quality plots in R
• prepare technical documents with R Markdown.

## Teaching methods

Computer practicals in the PC Laboratories; on-line discussion. Feedback on the assignment.

No lectures, no tutorials, 16 practicals

## Assessment

One piece of course work. No exam.

## Full syllabus

`Computer labs' are 2hrs in length.

• vectors, lists, matrices;
• writing functions;
• Monte Carlo simulation in R: Monte Carlo integration, importance sampling, Monte Carlo tests;
• loops, branching;
• the apply family;
• exploratory data analysis in R
• ggplot2;
• Shiny;