L1 - Econometrics at Illinois

A Gentle Introduction to R
Carlos Hurtado
Department of Economics
University of Illinois at Urbana-Champaign
[email protected]
Aug 26th, 2016
C. Hurtado (UIUC - Economics)
Applied Econometrics
On the Agenda
1
Introduction
2
Choosing a Statistical Software
3
Genesis
4
Rstudio
5
The Giffen Hypothesis
C. Hurtado (UIUC - Economics)
Applied Econometrics
Introduction
On the Agenda
1
Introduction
2
Choosing a Statistical Software
3
Genesis
4
Rstudio
5
The Giffen Hypothesis
C. Hurtado (UIUC - Economics)
Applied Econometrics
Introduction
Introduction
I My webpage: http://www.econ.uiuc.edu/˜hrtdmrt2/
I There you can find this slides and more about the TA.
I You can always email me: [email protected]
I Office Hours: Friday 10 - 11 am or by appointment (DKH Room 15).
C. Hurtado (UIUC - Economics)
Applied Econometrics
1/7
Introduction
Announcements
I Problem Set 1: due on Wednesday 08-31-2016
I Class presentations you should consider as mini-seminars, just 2-5
minutes using one or two transparencies, but attempting to make a
concise interpretation of the relevant material, mak ing effective use
of supporting numerical and graphical evidence
I Question Assignment for PS1 on my webpage.
I It is very important to upload the class presentation using the format:
netid_ps1_qi.pdf where qi is q1, q2, q3, ... depending on your
question assignment.
I On the class website you will find a tab Upload Presentation. Send
your presentation by 10 am on the due day fo the PS.
C. Hurtado (UIUC - Economics)
Applied Econometrics
2/7
Choosing a Statistical Software
On the Agenda
1
Introduction
2
Choosing a Statistical Software
3
Genesis
4
Rstudio
5
The Giffen Hypothesis
C. Hurtado (UIUC - Economics)
Applied Econometrics
Choosing a Statistical Software
Choosing a Statistical Software
I There are many options to choose: R, Matlab, SAS, SPSS and Stata.
I Some of these programs are better adapt for a specific type of
analysis.
I For example, Markov Chain Monte Carlo is doable in R, Matlab and
SAS
I You can always write your oun script, but that may be uneficient.
I Learning how to program in any software will give you the
foundations to program in all languages
C. Hurtado (UIUC - Economics)
Applied Econometrics
3/7
Genesis
On the Agenda
1
Introduction
2
Choosing a Statistical Software
3
Genesis
4
Rstudio
5
The Giffen Hypothesis
C. Hurtado (UIUC - Economics)
Applied Econometrics
Genesis
At the beginning it was S
I Rick Becker and John Chambers created a language call S during
their time at Bell Labs.
I S was initiated in 1976 as an internal statistical analysis enviroment
at Bell Labs implemented as a series of Fortran libraries.
I Basic idea of S language is that users enter comands in an interactive
enviroment.
I In 1991 Robert Gentleman and Ross Ihaka wanted to create their own
interpreter of S to run in their Macintosh teaching laboratory at
University of Auckland, New Zealand.
I The initial interpreter consisted of about 1000 lines of C code and
provided a good deal of the language functionality found in the
present version of R.
I In 1995 Martin Machler convinced Ross and Robert to use the GNU
General Public License to make R free software.
C. Hurtado (UIUC - Economics)
Applied Econometrics
4/7
Genesis
The Free Software
I People outside the free software movement frequently ask about the
practical advantages of free software.
I Some advantages are obvious:
1. The freedom to run the program as you wish, for whatever purpose.
2. The freedom to study the program’s ”source code”, and change it, so
the program does your computing as you wish.
3. The freedom to make and distribute exact copies when you wish.
4. The freedom to make and distribute copies of your modified versions,
when you wish.
C. Hurtado (UIUC - Economics)
Applied Econometrics
5/7
Rstudio
On the Agenda
1
Introduction
2
Choosing a Statistical Software
3
Genesis
4
Rstudio
5
The Giffen Hypothesis
C. Hurtado (UIUC - Economics)
Applied Econometrics
Rstudio
Rstudio
C. Hurtado (UIUC - Economics)
Applied Econometrics
6/7
Rstudio
Rstudio
C. Hurtado (UIUC - Economics)
Applied Econometrics
6/7
The Giffen Hypothesis
On the Agenda
1
Introduction
2
Choosing a Statistical Software
3
Genesis
4
Rstudio
5
The Giffen Hypothesis
C. Hurtado (UIUC - Economics)
Applied Econometrics
The Giffen Hypothesis
The Giffen Hypothesis
I You should think of the problem set assignments as opportunities to
begin to develop a style of writing empirical papers.
I Grading on the written problem sets and on the class presentations
will be based on clear exposition of empirical results and the quality
of the interpretation, not just ”getting the right numbers in the
computer output”
I Here is an idea:
a. Give a title to the problem set, e.g. ”Empirical study of bread and
meat consumption in 18th century England: the Giffen hypothesis”.
b. Try each question as a section of your paper.
c. Don’t forget about an Introduction and Conclusions
C. Hurtado (UIUC - Economics)
Applied Econometrics
7/7