Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Problem Set 01

Applied Econometrics I

Due on 18-09

1    Introduction to python

1.  Read the slides in O1 slides/class1.slides.html

2.  Finish the exercises from the notebook O2 Exercises/Exos.ipynb

2    Data management with python

1.  Read the slides O2 slides/datacergy.slides.html

2.  Do the exercise in the notebook O4 Exercises/class 4 - Exercise - world cup.ipynb

3    Introduction to stata

Read the following introduction: http://tutorials.iq.harvard.edu/stata/stata Ⅰntro/stataⅠntro.html

3.1    part A

1.  using stata (if possible)

2.  create a do ile to save your code and write a script

3.  a) to load the dataset Housing DB   clean.csv in the folder O3 slides

4. b) Drop the observations with no values for price and surface

5.  c) compute the price per square meters

6.  d) compute the quantiles with the function xtile and drop the Top and Bottom O.1%

7. e) In the dataset, the identity of each district is given by codegeo, compute the average rent per square meter for each district and save it in a separate ile.   (hint:  you  can  use the commands bysort : egen mean = , preserve, restore and save might be helpful )

8.  f)create a scatter plot between price and surface and export it to a png ile, specify the legend of the axis

9. g)create this scatter plot adding the linear regression line

1O.  h)create this scatter plot adding the quadratic regression line

11.  i)Estimate the relationship between price and surface with OLs with and without neigborhood ixed efects and export your regression results in a Table in Latex and xls (hint, when using reg command use the , absorb(codegeo) to absorb neighborhood ixed efects.  To export you results eststo and esttab commands might be useful )

3.2    part B

1.  create a new do ile to save your code and write a script

2.  a) Load and save the two iles worldcupMatches.csv and worldcupplayers.csv as dta iles

3. b) Merge the two datasets

4.  c) calculate the number of participating teams at each world cup and save it in a separate ile

5.  d) use the match dataset, create the variable total goals and create a table with two diferent methods summarizing the average, standard devriation, minimum, maximum and median of the Total Goals, hometeam goals, away team goals, halftime home goals and halftime away goals and export it to latex and csv