Introduction to R
- Control structures
- Input and output of data
- Simple Regressions
- For our practical examples (during the entire course) we will use the software environment R. I think that it is helpful to coordinate on one environment and R has the advantage of being free and rather powerful.
- Documentation for R is
provided via the built in help system but also through the
- The R Guide, Jason Owen (Easy to read, explains R with the help of examples from basic statistics)
- Simple R, John Verzani (Explains R with the help of examples from basic statistics)
- Einführung in R, Günther Sawitzki (In German. Rather compact introduction.)
- Econometrics in R, Grant V. Farnsworth (The introduction to R is rather compact and pragmatic.)
- An Introduction to R, W. N. Venables und D. M. Smith (The focus is more on R as a programming language)
- The R language definition (Concentrates only on R as a programming language.)
- We will use the following packages:
car, Ecdat, MASS (VR), UsingR, binom, relaimpo, lmtest, mvtnorm, lattice, clinfun, memisc, xtable. If, e.g., the command
library(Ecdat)generates an error message (
Error in library(Ecdat): There is no package called 'Ecdat'), you have to install the package.
- Installing packages with Microsoft Windows:
Rgui.exeand install packages from the menu
Packages / Install Packages).
- Installing packages from advanced operating systems:
- From within R use the command
install.packages("Ecdat"), e.g., to install the package
- In the lecture we will use RStudio as a front end.
- Documentation for R is provided via the built in help system but also through the R Homepage. Useful are