We will try to combine these topics with a focus on survey sampling and estimation.
| Day | Time | Topic |
|---|---|---|
| Monday | 14.00-17.00 | Introduction to R and RStudio |
| Datatypes in R and basic syntax | ||
| Tuesday | 09.00-13.00 | Introduction to survey sampling |
| 14.00-16.00 | Stratification | |
| wednesday | 09.00-13.00 | Allocation and basic estimation |
| 14.00-16.00 | Continued | |
| Thursday | 09.00-13.00 | Calibration for non-response |
| 14.00-16.00 | Making reports | |
| Friday | 09.00-13.00 | Wrapping up |
In this lecture we will look at:
Created in New Zealand to teach statistics in 1993
R is a language and environment made for statistical computing and for graphics
GNU project (100% free software)
Managed by the R Foundation for Statistical Computing, Vienna, Austria.
Community-driven
Based on the object-oriented language S (1975)
R works with objects that consist of elements. The smallest elements are numbers and characters.
Assigning things in R is very straightforward:
<-For example, if you assign the value 100 (an element) to object a, you would type
a <- 100
<- in an R fileCalling things in R is also very straightforward:
For example, we assigned the value 100 to object a. To call object a, we would type
a
## [1] 100
This is why we use R-Studio.
Everything that is published on the Comprehensive R Archive Network (CRAN) and is aimed at R users, must be accompanied by a help file.
If you know the name of the function that performs an operation, e.g. mean(), then you just type ?mean or help(mean) in the console.
If you do not know the name of the function: type ?? followed by your search criterion. For example ??mean returns a list of all help pages that contain the word ‘mean’
Alternatively, the internet will tell you almost everything you’d like to know (and then some)
Sites such as http://www.stackoverflow.com and http://www.stackexchange.com, as well as Google can be of tremendous help.
R related issues; use ‘R:’ as a prefix in your search term