ECON 304 – Economic Statistics
Course outline
- Index number
- Time series data
- Simple Regression Analysis
- Multiple Regression
- Writing the economic statistics report
Grading
- A >= 80
- B+ >= 75
- B >= 70
- C+ >= 65
- C >= 60
- D+ >= 55
- D >= 50
- F <= 50
Assessment
- Midterm = 30
- Final = 30
- Quiz = 10
- Course Projects (Time series and regression) = 20
- Attention = 10
Exam
Midterm: 1st October 2017 15:30 – 18:30 hours, ECB 1207
Final: 7th December 2017 12:00 – 15:00 hours
Textbooks
- Enrico Giovannini, 2008. Understanding Economic Statistics: An OECDPerspective. (download)
Assignments
- Time Series
In a group of three, pick a country of origin and analyse number of tourist arrivals to Thailand by applying index number and time series decomposition technique. Submit a report of 1,000 words with associated outputs (numbers and graphs) –
Due date: before the midterm exam - Regression Model
In a group of three students, please develop a multiple regression model to predict any economic variable using atleast five predictors Then write a 1,000 words of report. In the report, there should be a section explaining the duty of each member.
Due date: before the Final exam
See a sample here
Template: doc, pdf
Quiz
Slide
1. Introduction to Economic Statistics
download pdf slide of index here
2. Index number
- World Bank Data of Inflation of the OECD countries
- Code
- Examples : OECD’s consumer price index
- Thailand: Key economic performance indicator by Bank of Thailand
- Energy data of Thailand
Introduction to R programming
#hashtag will be ignored by R # R is object oriented. # Everything will be kept as an object # create an object called 'econ' econ &amp;amp;lt;- 10 # R is case sensitive Econ &amp;amp;lt;- 11 # new command will replace the old one econ &amp;amp;lt;- 12 Econ &amp;amp;lt;- c(10, 11, 12) Econ * econ ECON &amp;amp;lt;- Econ * econ Econo &amp;amp;lt;- (Econ * econ)^n n &amp;amp;lt;- 5 Econo # Now we will import the data gold_data &amp;amp;lt;- read.csv(C:/Users/ECB2401-TEACHER/econ304/gold_data.csv) names(gold_data) # Create price relative as a new column gold_data$price_relative &amp;amp;lt;- gold_data$price/gold_data[1, 2] # Your turn is to create price index (base of 1/1/1860) ??? # And shout out the price index of 1/6/2014 # just copy the old code and change the row from 1 to 121 gold_data$price_relative1960 &amp;amp;lt;- gold_data$price/gold_data[121, 2] gold_data$price_index1960 &amp;amp;lt;- gold_data$price_relative1960 * 100 # for the new base year of 1990 (30*12) gold_data$price_relative1990 &amp;amp;lt;- gold_data$price/gold_data[481, 2] gold_data$price_index1990 &amp;amp;lt;- gold_data$price_relative1990*100
3. Time Series
Data: Tourist Arrivals to Thailand by Nationality (dropbox link)
R -Code
# ECON304 # Time Series Analysis # Import data chinese_data &amp;amp;lt;- read.csv(&amp;amp;amp;amp;amp;quot;~/Dropbox/Works/CMU/CMSE/Teaching/ECON 304/Data/Time Series/raw_chinese_tourists_data_only.csv&amp;amp;amp;amp;amp;quot;, sep=&amp;amp;amp;amp;amp;quot;&amp;amp;amp;amp;amp;quot;) # Transform to time serie data format chin.ts &amp;amp;lt;- ts(chinese_data, start = c(2008,1), end = c(2016, 5), frequency = 12) # plot the time serie data plot(chin.ts) # Moving average install.packages("forecast") # install packages &amp;amp;amp;amp;amp;quot;forecast&amp;amp;amp;amp;amp;quot; (if not available) library(forecast) # load the forecast package to use &amp;amp;amp;amp;amp;quot;ses&amp;amp;amp;amp;amp;quot; function # use ses function to calculate exponential smoothing wits specified alpha fit1 &amp;amp;amp;amp;amp;lt;- ses(chin.ts, alpha=0.2, initial=&amp;amp;amp;amp;amp;quot;simple&amp;amp;amp;amp;amp;quot;, h=3) # ses = simple exponetial smoothing fit2 &amp;amp;amp;amp;amp;lt;- ses(chin.ts, alpha=0.6, initial=&amp;amp;amp;amp;amp;quot;simple&amp;amp;amp;amp;amp;quot;, h=3) fit3 &amp;amp;amp;amp;amp;lt;- ses(chin.ts, alpha=0.8, initial=&amp;amp;amp;amp;amp;quot;simple&amp;amp;amp;amp;amp;quot;,h=3) # plot the calculated exponential smoothing with 3 alpha value in a single plot plot(fit1, plot.conf=FALSE, ylab=&amp;amp;amp;amp;amp;quot;Chinese Tourist Arrival to Thailand&amp;amp;amp;amp;amp;quot;, xlab=&amp;amp;amp;amp;amp;quot;Year&amp;amp;amp;amp;amp;quot;, main=&amp;amp;amp;amp;amp;quot;&amp;amp;amp;amp;amp;quot;, fcol=&amp;amp;amp;amp;amp;quot;white&amp;amp;amp;amp;amp;quot;, type=&amp;amp;amp;amp;amp;quot;o&amp;amp;amp;amp;amp;quot;) lines(fitted(fit1), col=&amp;amp;amp;amp;amp;quot;blue&amp;amp;amp;amp;amp;quot;, type=&amp;amp;amp;amp;amp;quot;o&amp;amp;amp;amp;amp;quot;) # add line lines(fitted(fit2), col=&amp;amp;amp;amp;amp;quot;red&amp;amp;amp;amp;amp;quot;, type=&amp;amp;amp;amp;amp;quot;o&amp;amp;amp;amp;amp;quot;) # add line lines(fitted(fit3), col=&amp;amp;amp;amp;amp;quot;green&amp;amp;amp;amp;amp;quot;, type=&amp;amp;amp;amp;amp;quot;o&amp;amp;amp;amp;amp;quot;) # add line lines(fit1$mean, col=&amp;amp;amp;amp;amp;quot;blue&amp;amp;amp;amp;amp;quot;, type=&amp;amp;amp;amp;amp;quot;o&amp;amp;amp;amp;amp;quot;) # add mean lines(fit2$mean, col=&amp;amp;amp;amp;amp;quot;red&amp;amp;amp;amp;amp;quot;, type=&amp;amp;amp;amp;amp;quot;o&amp;amp;amp;amp;amp;quot;) # add mean lines(fit3$mean, col=&amp;amp;amp;amp;amp;quot;green&amp;amp;amp;amp;amp;quot;, type=&amp;amp;amp;amp;amp;quot;o&amp;amp;amp;amp;amp;quot;) # add mean # add legend of the plottoed lines legend(&amp;amp;amp;amp;amp;quot;topleft&amp;amp;amp;amp;amp;quot;,lty=1, col=c(1,&amp;amp;amp;amp;amp;quot;blue&amp;amp;amp;amp;amp;quot;,&amp;amp;amp;amp;amp;quot;red&amp;amp;amp;amp;amp;quot;,&amp;amp;amp;amp;amp;quot;green&amp;amp;amp;amp;amp;quot;), c(&amp;amp;amp;amp;amp;quot;data&amp;amp;amp;amp;amp;quot;, expression(alpha == 0.2), expression(alpha == 0.6), expression(alpha == 0.8)),pch=1) # Time series decomposition chin.decmp.add &amp;amp;amp;amp;amp;lt;- decompose(chin.ts, type = c(&amp;amp;amp;amp;amp;quot;additive&amp;amp;amp;amp;amp;quot;)) # additive model plot(chin.decmp.add) chin.decmp.mul &amp;amp;amp;amp;amp;lt;- decompose(chin.ts, type = c(&amp;amp;amp;amp;amp;quot;multiplicative&amp;amp;amp;amp;amp;quot;)) # multiplicative model plot(chin.decmp.mul)
Test 1: Descriptive analysis (pdf)
4. Correlation and Regression Model
5. Data Visulisation
In this era of data-driven economy, there are tons of data floating around the Internet. One of the key things is to develop a reader-friendly data visualisation (Data Viz) to present complicated data in an easy to digest way.
One of the exampole is the motion bubble chart by Hans Rosling. His TED talk below is aphenomenon. Please have a look.
Data
- International Tourist Arrivals to Thailand
- chn2tha_2006-2015
- Example: Chinese Tourist arrivals to Thailand_1997-2015
- c2t_month
- ex_epo_smoothing
- NIE paper data (Paper) (R Code used for SEM in NIE paper)
- AER package
- Chinese time serie data for R programming
R Code
Resources for R Programming
- คู่มือวิเคราะห์สถิติและเศรษฐมิติประยุกต์ด้วยโปรแกรม R
- Pairach’s R style guide
- A list of of Free R tutorials
- Forecasting: principles and practice
- My example of GoogleVis in R to visualise tourism data
- Example of GoogleVis by Mages
- Handbook of googleVis package
- World Bank’s Open Data
- Google Visualisation project
- ggplot2
Online Courses
Additional readings
- STATISTICS FOR ECONOMISTS: A BEGINNING by John E. Floyd
- Understanding ECONOMIC STATISTICS: AN OECD PERSPECTIVE by Enrico Giovannini
- MIT online resource: Introduction to Statistical Method in Economics by Herman Bennett
- 10 points about forecasting and why we stink at it. by Barry Ritzholthz
One Comment
Post a comment
I have noticed you don’t monetize your page, don’t waste your traffic, you can earn additional bucks every month
because you’ve got hi quality content. If you want to know how to make extra money, search for: Boorfe’s tips best
adsense alternative