SmarterSig



Smartersig Conference September 2012

Introduction to Betting Data Modelling with R

Dr Alun Owen

Part 1: Using R, Managing Data Files, Initial Data Exploration and a First Look at Logistic Regression

1. Preamble and Pre-Conference Work!

At the conference we will not actually work through the material contained on pages 1 to 15 as we will assume that you have worked through the material on these pages before you arrive. Hence these pages have been supplied to you in advance of the conference. Can you therefore please work through this material on those pages prior to arriving at the conference?

If there are any aspects of the material on pages 1 to 15 that you would like some clarification on please email me (Alun Owen) at alun.j.owen@

Instructions for downloading and installing R should already have been emailed to you or if not can be obtained from Mark.

We will be using a data set here called aiplus2004.csv which is available on the utilities section of the Smartersig website or again can be obtained from Mark.

When you arrive at the conference, you will be given a longer document that includes the material here but extends this work from page 16 onwards. We will kick off the first R session with a 5 minute resume of pages 1 to 15, but will then go almost straight into page 16 and move onwards from there.

2. Using R

R can actually be used in a number of ways; it can be used interactively by typing commands in the R Console window (after the > prompt) shown below:

[pic]

Alternatively, R can be used in “batch” mode, by typing a series of commands in an external script (text) file and then running some/all the commands in that file at once. This option opens up the real power of the software.

3. Using R Interactively

To submit commands to R interactively, simply type the relevant command (after the > prompt) in the R Console window and hit the enter button.

As an example, type in the following commands (hitting the enter key after each line):

x ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download