代做ECON 102: Second Assignment Assignment 2帮做R编程

2024-11-20 代做ECON 102: Second Assignment Assignment 2帮做R编程

ECON 102:  Second Assignment

Assignment 2

For this assignment, create one PDF le with your preferred text processor and insert your charts and discussions when needed. For each chart that you create, add a main title and axis titles. When the chart contains more than one line, use a diferent color and shape for each line and add a legend.

Important  For the diferent discussions, we evaluate your efort more than what you write. Therefore, there is no reason for you to try to get the right answer from another student. Besides, each student will be working with a diferent dataset, so it is unlikely that someone else’s answer is the right answer for you.

Part A: The Cost of Living

For this part, use the le WageXYZ.csv, where XYZ is the number that is assigned to you by the Quiz on Learn. The file contains annual series of average nominal hourly wages for males and females in a particular province and industry expressed in dollars per hour.  The specific province and industry for your dataset is described in the WageDescriptions.csv file.  Look for the row associated by your assigned number. The file also contains the annual series of the consumer price index base 100 = 2002 in that province (Statistics Canada, 2020).

1. Plot the evolution of the hourly nominal wage for males and females on the same chart. Interpret what you see: what kind of trending behaviour, is there a diference between males and females in terms of trends or 丑uctuations, etc.

2. Plot the evolution of hourly real wage in dollars of 2002 for males and females on the same chart. Interpret what you see and compare this chart with the one you obtained in the previous question. Which chart between this one and the one produced in the previous question provides a better picture of the evolution of the standard of living of individuals working in that industry? Explain.

3. Fit a linear trend to both real wage series and plot the two trends on the same graph. Interpret what you see: is the wage gap changing on average? What is the annual change on average over that period for males and females? Discuss (Hint: To answer the question, you can look at the coe伍cient of time of the trend equations).

4. Detrend the real wage series using the linear trends computed in the previous question.  Since the series are annual, the detrended series are the cyclical components.  Using a scatter plot, analyze the comovement between the two cyclical components. Try to explain your results: e.g. why there is a positive, negative or no comovement between the two variables?

Part B: Business Cycle, Growth and Inequality

For this part, use the le RealGDP.csv. The le contains annual series of real per capita GDP for 152 countries from 1970 to 2017 expressed in international dollars of 2011 (Feenstra et al., 2015).  Each student has to analyze four diferent countries.  Your four countries are the ones on the row of the file assignedCountries.csv where the value in the assigned  number column is equal to XYZ, where XYZ is the same number used in Part A. On the same row, you will also find the assigned years for questions 5 and 6.

1. What are the complete names of the four countries that are represented by the three-letter codes? In the following questions, refer to the countries by their full names, not by their codes.

2. Plot the evolution of the real per capita GDP of the four countries on the same chart using the log-scale. Describe the diferences and similarities that you observe.

3. Compute the cyclical component of each series expressed in logs using a quadratic trend, and plot them on either 4 diferent line charts or on the same one. The choice is yours and it depends on which option provides a clearer approach to compare the cycles.  Discuss what you see by answering the following questions:

•  Do you observe a positive, negative or no comovement between the diferent business cycles?

•  If you observe no comovement between two business cycles, can it be explained by the two countries being poor trading partners? You may have to search the internet to answer that question.

•  If you observe a strong positive comovement between two business cycles, can it be explained by the two countries being strong trading partners? You may also have to search the internet to answer that question.

•  Do you observe common periods of recession?  Are they world wide recessions?  You may also have to search the internet to answer that question.

Hint: Cyclical components of annual time series are simply the detrended series.

4. Compute the average annual growth rate between 1970 and 2017 for all four countries.  Then, produce a scatter plot with the 1970 real per capita GDP’s expressed in logs on the x-axis and the average growth rates on the y-axis (you should have four points).  Discuss the results by answering the following questions:

•  Are the four countries converging to each other?

•  Using countries’ characteristics such as the level of education, life expectancy, economic freedom, etc., try to justify why some are converging and why some are not. You can use that data files from the module on Growth and Development or get the information from a reliable internet source (like the World Bank).

5. For this question, you have to compare the distribution of real per capita GDP across all 152 countries in the two assigned years expressed in thousands of international dollars of 2011 (the choice of units is to make the x-axis labels more readable).  Create two histograms (with the option breaks=25), one for each year and interpret what you see. Do you see a diference in terms of inequality? Do you see a change in the proportion of poor countries?

6. For this question, you have to compare the distribution of real per capita GDP across all 152 countries in the two assigned years expressed logs.  Create two histograms (with the option breaks=25), one for each year and interpret what you see.  Do you see a diference in terms of inequality?  Do you see a change in the proportion of poor countries?  Also, explain why the histograms are diferent when the real per capita GDP’s are expressed in logs.

References

R. C. Feenstra, R. Inklaar, and M. P. Timmer. The next generation of the penn world table. American Economic Review, 105(10):3150–3182, 2015. Available for download at www.ggdc.net/pwt.

Statistics Canada.  Table 18-10-0005-01, Consumer Price Index, annual average, not seasonally ad- justed. 2020. doi: 10.25318/1810000501-eng.