# Econometrics

## [2020] Rudens semestras

2020-09-19 09:12

Namų darbų užduotys (atnaujinamos semestro eigoje): [LINK]

## [PE I] 2020 Fall Semester

2020-09-13 18:18

This is the page for the course Practical Econometrics with R and Python 2020 Autumn Semester. Lectures are held remotely via MS Teams.

This page, as well as the one on moodle, will be updated throughout the course.

## [2019] Rudens semestras

2019-10-15 12:43

Namų darbai Nr. 4:  4.1; 4.2; 4.4; 7.1 (a) + (b) + (c)

Namų darbai Nr. 3:  3.7;   3.12;   3.15

# Pranešimai:

Vertinimai įkelti.

# Vertinimai:

2019-08-17 10:27

## Announcements

• Midterm I: results added (see above file);
• Midterm II: results added (see above file);
• Exam: results added (see above file). Grades will be added in the system on Saturday, around 14:00.

ERASMUS students, who want to use R + RStudio, can use RStudio and verify that everything works by downloading the [.Rmd] file and inputting their student code and pressing the “Knit” button in RStudio to generate a .html file.

## Course Information

Important: from 2019 the course is taught in English.

R_vs_Python
Setup R, Python and JupyterLab on MIF Linux computersLink
2Lecture Notes (usually updated throughout the course)Link
3Template files on how to separately write down various formulas, as well as format text/comments alongside your code blocks/chunks and its output.

The code is provided only as a simple example to see how it visually looks like alongside some random comments.
Python: JupyterLab
(HTML output)

R: JupyterLab
(HTML output)

R: RStudio
(HTML output)

## Lecture Files

1Univariate Regression:
General Concepts, OLS, R & Python implementation
2Univariate Regression:
OLS, Regression Models & Interpretation
3Univariate Regression:
MLE, Confidence Intervals and Hypothesis Testing
4Univariate Regression:
Hypothesis Testing (Review), OLS Prediction and Prediction Intervals, GoF
📊Univariate Regression:
Data Subsampling & Chapter Review
5Multivariable Regression:
Model Specification
6Multivariable Regression:
OLS, Confidence Intervals, Hypothesis Testing & GoF
7Multivariable Regression:
Restricted Least Squares, Multicollinearity
8Multivariable Regression:
Generalized Least Squares, Heteroskedastic and Autocorrelated Errors
9Multivariable Regression:
General Modelling Difficulties
Part I
Part II
📊Multivariable Regression:
Chapter R Code Review
10Discrete Response Models:
Binary Response Variables - Logit, Probit & Parameter Interpretation
see lecture
notes
11Discrete Response Models:
Binary Response Variables - Goodness-Of-Fit
see lecture
notes
12
13
14

4An Introduction to Statistical Learning with Applications in REnglishLink (Homepage)
5The Elements of Statistical Learning: Data Mining, Inference, and Prediction (2nd Ed.)EnglishLink (Homepage)
Terminology and overview of descriptive statistics and probability theoryLithuanianLink
Čekanavičius V. ir Murauskas G., Statistika ir jos taikymai, II knygaLithuanianMIF library
Čekanavičius V. ir Murauskas G., Statistika ir jos taikymai, III knygaLithuanianMIF library

Note: in the past, there were free DataCamp courses available (as introductions to R and Python programming languages). Unfortunately, as of around Q1 of 2019 this is no longer the case.

Consequently, the lecture notes are updated to include links to alternative freely available interactive courses for R (using `swirl` package) and Python (using PyCharm Edu) programming languages.

2018-09-25 15:47

# Reikalavimai namų darbų sprendimams

Užduočių sprendimai turi būti atsiųsti dvejais formatais:

• Ataskaitos *.R arba *.Rmd (RMarkdown) failas. Faile turi būti pateikiami komentarai, kad būtų aišku, koks kodas ir kur naudojamas. Kode taip pat gali būti pateikiamos išvados ir komentarai. Tuo atveju, jei užduotis atliekama su RMarkdown – *.Rmd failas turi susikompiliuotas į pateiktosios ataskaitos *.pdf failą. Jeigu pateikiamas *.R failas, jo struktūra galėtų būti pvz.:
• ``` ## Užduotis 9.8 <Kodas duomenų užkrovimui> ### (a) <Kodas (9.8) užduoties (a) dalies sprendimui> ### (b) <Kodas (9.8) užduoties (b) dalies sprendimui> ## Užduotis 9.9 <Kodas duomenų užkrovimui> ir t.t. ```
• Ataskaitos gali būti anglų arba lietuvių kalba.

# Namų darbai

• Sudaro 40% kaupiamojo balo.
• Užduotys iš: Tsay, R.S. (2010)Analysis of Financial Time Series. 3rd Edition“, John Wiley & Sons, Hoboken. Atkreiptike dėmesį, kad užduotys turi būti iš trečiojo leidimo.
• Duomenis galima rasti: http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/

## Namų darbai  Nr. 1

Užduotys: (1.1), (1.2), (1.3).

(1.1) Užduotis: failas “d-3stocks9908.txt“:``` P11 <- read.table("http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/d-3stocks9908.txt", as.is = TRUE, header = TRUE) ```
(1.2) Užduotis: failas “m-gm3dx7508.txt“:``` P12 <- read.table("http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/m-gm3dx7508.txt", as.is = TRUE, header = TRUE) ```

(1.3) Užduotis: failas tas pats kaip ir (1.2).``` P13 <- P12 ```

## Namų darbai  Nr. 2 (atsiųsti iki 2018-10-04 23:59)

Užduotys: (2.4); (2.5) + išnagrinėti |r_t|, (r_t)^2 koreliacijas bei Teiloro Efektą; (2.10)

(2.4) Užduotis: failas “m-deciles08.txt“:``` P21 <- read.table("http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/m-deciles08.txt", as.is = TRUE, header = TRUE) ```
(2.5) Užduotis: failas “d-ibm3dx7008.txt“:``` P22 <- read.table("http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/d-ibm3dx7008.txt", as.is = TRUE, header = TRUE)```

+ Papildomai ištirti: |r_t| ir (r_t)^2 koreliacijas ir Taylor’o efektą.

(2.10) Užduotis: failai “w-Aaa.txt” ir “w-Baa.txt“: ``` P23A <- read.table("http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/w-Aaa.txt", as.is = TRUE, header = FALSE)```
`P23B <- read.table("http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/w-Baa.txt", as.is = TRUE, header = FALSE)`

## Namų darbai  Nr. 3 (atsiųsti iki 2018-10-18 23:59)

Užduotys: (3.5); (3.6); (3.12).

(3.5) Užduotis: failas “m-intc7308.txt“:``` P31 <- read.table("http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/m-intc7308.txt", as.is = TRUE, header = TRUE)```

(3.6) Užduotis: failas “m-mrk4608.txt“:``` P32 <- read.table("http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/m-mrk4608.txt", as.is = TRUE, header = TRUE)```

(3.12) Užduotis: failas “d-gmsp9908.txt“:``` P33 <- read.table("http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/d-gmsp9908.txt", as.is = TRUE, header = TRUE)```

## Namų darbai  Nr. 4 (atsiųsti iki 2018-11-08 23:59)

Užduotys: (3.8); (4.1); (4.2).

(3.8) Užduotis: failas “m-gmsp5008.txt“:``` P41 <- read.table("http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/m-gmsp5008.txt", as.is = TRUE, header = TRUE)```

(4.1) Užduotis: failas “d-jnj9808.txt“:``` P42 <- read.table("http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/d-jnj9808.txt", as.is = TRUE, header = TRUE)```

(4.2) Užduotis: failas “m-ge2608.txt“:``` P43 <- read.table("http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/m-ge2608.txt", as.is = TRUE, header = TRUE)```

2018-06-21 16:53

## Announcements

• The results and final grades added. The results will also appear in the system either on the 23rd, or the 24th.

Important: from 2020 the course is taught in English.

Worth (Points)Info
Midterm I302020-03-10
Midterm II302020-04-28
Exam402020-06-12 (exam schedule)
- 2020-05-30
Total100 + 5 (from EXTRA)Minimum of 45 for passing grade, from which at least 5 are from the exam.

## Course Information

1Course IntroductionFile
Setup R, Python and JupyterLab on MIF Linux computersLink
2Template files on how to separately write down various formulas, as well as format text/comments alongside your code blocks/chunks and its output.

The code is provided only as a simple example to see how it visually looks like alongside some random comments.
Python: JupyterLab
(HTML output)

R: JupyterLab
(HTML output)

R: RStudio
(HTML output)

## Lecture Files

Practical Econometrics Lecture Notes: PE II (Spring semester) only.
Contains the exercises and examples, will eventually contain the notes from the slides.
Practical Econometrics Lecture Notes: PE I (Fall semester) only.
Will be eventually combined with PE II.

Review+
2Time series with trend and seasonality componentsLink
Part II
Example
6Multivariate models: Granger causality, VAR and VECM modelsLink
Summary
Unit Root & Cointegration
Example (R)
Example (Python, incomplete)
7Endogeneity problem[SKIPPED]
8Simultaneous equations[SKIPPED]
Example (R)
10Additional Topics in Econometrics and Machine Learning modellingTBA
R_code
P_code

1Introduction to Time Series and ForecastingEnglishHomepage
2Time Series Analysis and Its Applications: With R ExamplesEnglishHomepage (DL)
4PREVIOUS MATERIAL: R.Lapinskas, Practical Econometrics II. Time Series Analysis (Lecture Notes)EnglishLink
5PREVIOUS MATERIAL: Lapinskas, Practical: Econometrics II. Time Series Analysis (Computer Labs)EnglishLink

### Lectures From The Previous (2019) Year

Slides from ~topic 5 are expected to change the most in the 2020 updated course.

Example code will also be updated and moved to the lecture notes to clearly distinguish optional information, as well as easier R and Python comparison in the 2020 updated course.

Again, when preparing for the course – use the updated slides in the “Lecture Files” section and only evaluate the table below for a rough estimate of the lessons to come.

1 Statistical data and their modelsPDF--
2Stationary time seriesPDF_1;
PDF_2
.Rmd   || R_out
.ipynb || P_out
HTML
3Time series with trend and seasonality componentsPDF_1;
PDF_2
.Rmd   || R_out
.ipynb || P_out
HTML
4Time series with unit rootPDF_1;
PDF_2
PDF_3
.ipynb || R_out
.ipynb || P_out
HTML
5Regressions with time lagsPDF⇓⇓⇓⇓⇓⇓
6Regressions with time series variablesPDF.ipynb || R_out
.ipynb || P_out
sim.ipynb || R_sim_out
HTML
7Multivariate models: Granger causality, VAR and VECM modelsPDFR_out
R_summary
HTML
8Endogeneity problemPDF--
9Simultaneous equationsPDF--
10Panel data modelsPDFR_outHTML
11Additional Topics in Econometrics and Machine Learning modellingPDF--