Kyoto, Carbon Leakage and bilateral Trade

user.name = '' # set to your user name

library(RTutor)
check.problem.set('Kyoto', ps.dir, ps.file, user.name=user.name, reset=FALSE)

# Run the Addin 'Check Problemset' to save and check your solution

Author: Sebastian Kiesel

Welcome to this Problem Set which is part of my master thesis at the University Ulm. It analyses the effect of carbon leakage after the Kyoto Protocol. It is developed from the paper "Kyoto and Carbon Leakage: An Empirical Analysis of the Carbon Content of Bilateral Trade" written by Rahel Aichele and Gabriel Felbermayr, published in November 2011. You can download the paper from mitpressjournals.org/doi/abs/10.1162/REST_a_00438?journalCode=rest The Stata Code can be downloaded from dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/27349

You're free to skip or start with the exercise you want. But it is advisable to solve the exercises in the given order. Later chapters could build up on previous exercises and you need the knowledge of these parts to understand the relationships. But you have to solve the individual tasks in the given order. To start an exercise, you just need to press the edit button from the first task. All quizzes in this Problem Set are optional and you can skip them if you want. How the problem set works will be explained starting with the first task. How to solve this problem set on your own computer is described on github.

Exercise content

  1. Overview

1.1 Example: Germany and China

  1. Determinants of Imports

  2. Before/After Comparison

  3. Mathematical Background

4.1 Consumers

4.2 Firms

4.3 International Trade Flows

4.4 The carbon content of bilateral trade

4.5 Climate policy and the CO2 content of bilateral trade

  1. Improvements of the Model

5.1 One Kyoto Country

5.2 The USA as an additional Kyoto Country

  1. MRIO

  2. Several sectors

  3. Conclusion

  4. References

Exercise 1 -- Overview

In this Problem Set we want to analyse carbon leakage through the Kyoto Protocol. Carbon leakage is the effect that the production of carbon-intensive goods from countries with a stricter climate policy shifts to other countries without such a strict climate policy. Here, an indicator for stricter climate policy is the Kyoto Protocol. Countries whith a stricter climate policy would import more carbon-intensive goods from countries without such a strict climate policy, to fulfil their climate targets. To analyse this effect, we will look at the bilateral trades and look at the quantity of the imports, the carbon content of these imports and on the carbon intensity of these imports.

This exercise will give you a first overview about the dataset, the most important variables and a first example with two countries.

Given Data

Before we can say something about the data, we need to read in the dataset. The dataset is an .rds file, so the function readRDS() could be helpful. If you need further advice with this function you can click on the info box below. All info boxes are optional and contain more details about some important functions or background information.

info("readRDS()") # Run this line (Strg-Enter) to show info

Since this is the beginning, and every beginning is hard, the basic structure of the first commands are already given. Before you start entering your code you need to press the edit button. This needs to be done in every first exercise of a chapter.

Task: Use the command readRDS() to read in the dataset intro.rds. Store it into the variable dat. If you need help how to use readRDS() check the above info box. When you are finished, click the check button. If you need further advice, click the hint button, which contains more detailed information. If the hint does not help you, you can always access the solution with the solution button.

#...=readRDS("...")

The dataset includes $14$ different variables with over $200 000$ observations. The values of this dataset are given in US Dollars (the imports and exports) or in tons of $CO_2$ (like the bilateral emissions embodied in the imports). We also have some indicator variables for the membership under Kyoto and some factor variables for sectors and trades which belonging together. For descriptions of the variables in the dataset, you can click on the data button on top of a code chunk. There are detailed information about the datasets you loaded in the current exercise and press Description for the descriptions of the variables. Let's take a look at the dataset.

Task: Use the function head() to show the first rows of our dataset.

# head(...)

Here we can see the first six rows of the $14$ columns. The first variable is sid, which is the sector identifier. Trades between an importer country with a specific exporter country in the same sector have the same sector identifier, we can see that trades between the importer Argentina and the exporter Australia in the first sector have the sector identifier $1$. The variable importer stands for the importer country, the variable exporter for the exporter country, which traded in the given years. The variable year stands for the particular year and the variable sector stands for the given sector. For example sector $1$ is the sector for agriculture, forestry and fishing. The other variables like imp for the imports will be explained later, when we need them.

a) Period

We see that the first trade in the dataset is between Argentina and Australia in the year $1995$. This is also the first year in the complete dataset. But how long is the complete period in this dataset?

Task: Find out, what is the last year of the dataset. For the following Quiz you can enter whatever you want in the following code chunk: If you need help, you can click on the hint button.

# enter your code here

! addonquizEnd of the Dataset


So the period in the dataset is from the year $1995$ till $2007$, all in all $13$ years. Within this period, the climate conference in Kyoto was $1997$. The result was the Kyoto Protocol. But was the start of the protocol also in the same year? To analyse this the function filter() from the package dplyr could be helpful. If you need further advice with the filter() function you can click on the info box below.

info("filter()") # Run this line (Strg-Enter) to show info

But not all countries signed the Kyoto commitment. To differentiate between committed and non-committed countries, there are two indicator variables for the Kyoto status of the importer and the exporter country, respectively. These variables are kyotom for the importer and kyotox for the exporter country. If the importer country is committed under Kyoto, then the variable kyotom would be equal to one. Until $1997$, before the Kyoto conference, all of these indicator variables are equal to zero. The variables are first equal to one for committed countries, when the Kyoto commitments started. Not all committed countries started at the same year.

Task: Find out at which year the variable kyotom is not equal to zero the first time. You can use the filter() function from the package dplyr. The variable kyotom is the Kyoto status of the importer and could be helpful.

# enter your code here

! addonquizStart of commitments


So we can see that the period in this dataset is from $1995$ till $2007$, the climate conference in Kyoto was $1997$. But the first start of the commitment for a specific country was in the year $2001$. It is good to know that not all Kyoto commitments started at the year $2001$. But most of them started till the year $2003$. To analyse the effect of carbon leakage, it is good to have a period before and a period after the signing of the commitment. So we will later analyse the periods from $1997$ till $2000$ and from $2004$ until $2007$.

The start wasn't directly $1997$, since the commitments become effective if minimum $55$ countries with a minimum of $55\%$ of the $CO_2$ emissions in the base year $1990$ ratified the protocol. So the first starts of the commitments were after the climate change conference of Marrakech $2001$.

b) Sectors

Not only the period is interesting, we also have different kinds of sectors. We already know that the data is sorted by the sector identifier sid. The same value in the variable sid stands for a trade between one of the importer countries with a specific exporter country in a specific sector. So it is an identifier of a country pair and a specific sector. We already know that the value $1$ stands for the importer country Argentina, the exporter country Australia and the sector $1$.

The variable sector stands for the different sectors. For example, the first sector stands for agriculture, forestry and fishing, the second sector stands for electricity, gas and water, supply, mining and quarrying. You don't need to remember all sectors, later in Exercise $7$ we will analyse the effect of carbon leakage on all several sectors.

Task: Find out for what the sid value $1000$ stands.

# enter your code here

! addonquizvariable sid


! addonquizsectors


c) Countries

Now, we know the period of the dataset, but which countries take trade? In the first fraction of the dataset we saw two countries: Australia and Austria. The different countries are in the columns importer and exporter, these variables stand for the importer and the exporter country, respectively. To show the different countries, the function unique() could be helpful to show only different values.

Task: Show the different countries, which take trade in the dataset. To solve the following quiz you may use this code chunk. You can enter whatever you want. If you need help you can click the hint button.

# enter your code here

! addonquizintro2


The dataset is sorted by the sector identifier sid. But sometimes it could be helpful to group the data by the importer countries importer. The function group_by() from the package dplyr could be helpful. If you need further advice you can click on the info box below.

info("group_by()") # Run this line (Strg-Enter) to show info

Sometimes it is good to summarise a column of the data, to get the mean, the sum or the maximum of a column. Here the function summarise(), also from the package dplyr could be helpful. You also can combine these two functions to group the data, and then summarise it. Of course you can do other operations with grouped data, too. If you need further advice with the function summarise() you can click on the info box below.

info("summarise()") # Run this line (Strg-Enter) to show info

Now, we want to show the countries of the dataset on a world map, to get a better overview of the different countries. For this we want to group the data by the importer country importer and summarise with the minimum of the variable kyotom to get the standard situation before Kyoto. Remember the indicator variable kyotom is the Kyoto status of the importer country. Until $1997$ all values of kyotom are equal to zero, so the minimum of the variable is equal to zero for all countries.

Task: Group the data by the variable importer and summarise the minimum of the variable kyotom, store this minimum under val and store the complete grouped dataset under dat1. To learn this structure of the function you just need to click the check button.

dat1=dat%>%
      group_by(importer)%>%
      summarise(val=min(kyotom))

With this summarised dataset it is possible to show the countries on the world map. Here the package rworldmap is very helpful. To make it easier there is a self-written function map2col() to plot such a world map. You have to give the summarised dataset as an argument. If you want to see the complete function click on the note box below. Note boxes are also optional, they contain the self-written functions to see how such a function works.

! start_note "self-written function 'map2col()'"

In the following you can see the handwritten function map2col() to plot a world map with two different colours red and green. The function only works for a column importer and a column val.

map2col=function(data,car){
  library(rworldmap)
  par(mai=c(0,0,0.2,0),xaxs="i",yaxs="i")
  a1=joinCountryData2Map(data, joinCode="NAME", nameJoinColumn="importer")
  op=palette(c('red','green'))
  cutVector=quantile(a1@data[["val"]],na.rm=TRUE)
  a1@data[["valcat"]]=cut(a1@data[["val"]], c(0,0.5,1), include.lowest=TRUE)
  levels(a1@data[["valcat"]])=c('not committed','committed')
  mapCountryData(a1, nameColumnToPlot='valcat',catMethod='categorial',mapTitle="car", colourPalette='palette',oceanCol='lightblue',missingCountryCol='white')

}

! end_note

Task: Show the world map with the given countries, the written function map2col() and the argument dat1, the title is already given.

# ...(...,"Situation before Kyoto")

All red countries are part of the dataset. To analyse the effect of carbon leakage we will examine the trades between these countries. All of these countries are not yet committed under Kyoto, since this is the beginning of the dataset before the conference of Kyoto.

d) Kyoto Status

Before we can analyse the effect of carbon leakage we need to know more about the Kyoto Protocol and the commitments. The Kyoto Protocol is a reaction to the global warming through anthropogenic $CO_2$ emissions. The main idea was, that a centralised solution would be more effective than a decentralized, national solution, since it is a global problem all over the world. The goal was a reduction of some greenhouse gases like $CO_2$, $CH_4$, $HFCs$, $PFCs$, $N_2O$, and $SF_6$. The agreement sets binding emission targets for $37$ industrial countries and the European Union (EU). The reference year for the binding targets is $1990$. The worldwide target is a reduction of $5\%$ in relation to the base year $1990$. If you want to know more about the targets and the wished development of the different greenhouse emissions you can take a look at Sardemann (1999).

Since the beginning from $1997$ on, there was a lot of criticism because the commitment sets different targets for the committed countries and no targets for emerging and developing countries. For example Germany and Denmark had the most optimistic aims with a reduction of $21\%$ in relation to the base year $1990$. But there are other goals like an increase in emissions of $15\%$ in Spain in relation to the base year $1990$. Since only developed countries have binding targets, there is no variable for the detailed size of the commitments and the size of the commitments is not used later in the analysis. Within this Problem Set we cannot say something about the achievment of the goals from the several countries.

Since not all countries have binding targets and some countries didn't sign the contract, we cannot say we have a global solution for this problem. This is the main criticism point. A centralised solution with all countries could positive affect the carbon emissions worldwide. But the solution without all countries is again decentralized, and such a solution couldn't be good, if there is carbon leakage. Some of the big countries which are not committed are China, India or the United States. If you want to know more about the Kyoto Protocol you can take a look at Oberthuer and Ott (1999). Nordhaus et al. (1999) gives also a good summary of the Kyoto Protocol. They focused on the financial aspect of the commitment. Nordhaus et al. estimated the overall costs of the Kyoto Protocol to over $700$ billion US-Dollars and the Protocol would be very cost intensive. The relation between cost and utility would be seven to one.

The Kyoto commitment has other disadvantages like the possible loss of competitiveness in production of carbon-intensive goods. The United States and France considered some regulations. One idea was a Border Tax Adjustment against the advantage of non-committed countries. But it was never implemented, since they feared the reaction of the non-committed countries which could resort to retaliation.

So we know a lot about the period, the participating countries and the different sectors and the sector identifier of the dataset. But we should know something about the Kyoto status of several countries.

Task: Find out, how many of the $40$ participating countries in the dataset are committed under Kyoto. You may use the following code chunk and you can enter whatever you want. If you need help you can click the hint button.

# enter your code here

! addonquizHow many countries


There is another variable for the Kyoto status for country pair data: dk. To solve the following quiz you can click on the data button and then on the data description to get the right answer.

! addonquizvariables


The variable dk stands for the difference in the Kyoto Status of the country paired data. A value of $-1$ stands for the case, where only the exporter country is committed under Kyoto. Zero stands for the case, where both or no countries are committed and the $1$ for the case, where only the importer country is committed.

Now we want to show again the world map, but now, after the start of the Kyoto commitments. First we need to group again the data by the variable importer and summarise the maximum of kyotom.

Task: Group the dataset dat by the variable importer, store it under dat2 and summarise the data with the maximum value of kyotom, store this value again under val.

# ...=dat%>%
#   group_by(...)%>%
#   summarise(kyotom=...)

With this summarised dataset we can plot the world map with the participating countries and differentiate between committed and non-committed countries.

Task: Plot the world map with all participating countries, plot the non-committed countries in red and the committed countries in green. You only have to call the self-written function map2col() with the dataset dat2 as argument, the title is already given.

# ...(..., "Situation after Kyoto")

The Kyoto committed countries are green. In North and South America only Canada is committed under Kyoto. Europe, except Turkey, seems to be committed completely. So all countries of the EU in this dataset are committed. The only participating country of Africa is South Africa, which is not committed under Kyoto. Australia is committed, but you should notice that Australia signed the contract not until $2007$.

The only non-committed countries, which are members in the EU are Cyprus and Malta, but these small countries are not part of our dataset dat. So in our case, all members from the EU are committed under Kyoto. The poorest country, which is committed, is Romania. The richest countries, which are not committed are countries like the United States or Israel.

Exercise 1.1 -- Example: Germany and China

First we want to analyse the effect of carbon leakage on an example dataset. This dataset contains only two countries, Germany and China.

Task: We have to read in the dataset intro.rds again with the function readRDS(), you just have to press the edit button first and then the check button.

dat=readRDS("intro.rds")

Task: Generate now a dataset where the importer and exporter countries are only Germany and China. For this, use the function filter() from the package dplyr to generate a dataset that only contains these cases. The variable importer contains the name of the importer country. importer and exporter are string columns in our dataset, so you need quotation marks around it. Store it into gc.

#...=filter(dat,...&...&...)

Task: Show the first rows of the dataset gc with the function head().

# head(...)

The trades between the importer country China and the exporter country Germany in sector $1$ have the sector identifier $3853$. Until $2000$, both indicator variables for the commitments under Kyoto are equal to zero.

a) Kyoto Status

To analyse the effect of carbon leakage on this example dataset we should know something about the Kyoto status of these two countries.

Task: Find out whether one of these two countries is committed under Kyoto. To solve the following Quiz you can enter whatever you want. If you need help you can click on the hint button.

# enter your code here

! addonquizexample status


! addonquizStart of Germany


b) Quantity of the Imports

Now, we should look on the quantity of the imports of Germany and China. The variables imp and exp stands for the imports and exports, respectively. The values are in current million US-Dollars. These imports are measured from the OECD for the $40$ countries of this dataset, the members of the OECD and other countries like Brazil, India or China. These Input-Output tables exist every five years, $1995$, $2000$ and $2005$. The authors take the values of $1995$ for the years $1995-97$, the values from $2000$ for the years $1998-2002$ and the values from $2005$ for $2003-07$. To show specific columns of a dataset the function select() from the package dplyr could be helpful. If you need further advice you can click on the info box below.

info("select()") # Run this line (Strg-Enter) to show info

Task: Use the function select() from the package dplyr to show the first rows of the dataset gc. Select the variables year, importer, exporter, imp and exp

# ...(select(gc,...))

China imported goods of over $4$ million US-Dollars from Germany $1995$ in sector $1$, which means the sector for agriculture, forestry and fishing. In this small fraction, it seems to be an incredible increase in the imports in China from Germany till the year $2000$. But with this small fraction we cannot say something about the complete imports or the effect of carbon leakage.

Task: For the following quiz you can enter whatever you want to solve the questions, the function summarise() could be helpful.

# enter your code here

! addonquizimports


! addonquizimports2


We saw something about the overall quantity of the imports in the dataset. But we want to analyse the effect of the Kyoto Protocol on the quantity. So we should analyse the mean of the quantity of the imports before and after the start of the commitment. In Germany the start of Kyoto was $2002$, so we compare the period before and the period after the start of the commitment.

Task: Use the function group_by() from the package dplyr to analyse the mean of the imports before and after the signing. You first have to filter the example dataset gc to the importer Germany. Group the data by the variable kyotom.

#gc%>%
# filter(...)%>%
# group_by(...)%>%
# summarise(mean(...),mean(...))

We can see a big increase in the imports and also the exports of Germany with the trade partner China after the signing of the commitment in $2002$. So only the quantity of the imports isn't helpful alone to say something about carbon leakage.

Task: Use the function group_by() from the package dplyr to group the dataset gc to year and importer and summarise the data with the function summarise() to get the means of the imports imp. Store the result under a1 and show the head of a1.

# ...=gc%>%
# group_by(...,...)%>%
# summarise(imp=...,)

#enter your code here

Are there some hints for carbon leakage on our small example dataset? Of course, this is not the evidence. But if we can see carbon leakage on our example with Germany and China, it is possible that there is carbon leakage in the complete dataset. It's still hard to interpret, so we want to plot the result.

Task: Plot the imports from China in red and the imports from Germany in blue from our summarised example dataset a1 with the function ggplot() from the package ggplot2. You only have to run the following code.

ggplot(data=a1, aes(x=year, y=imp, group=importer, shape=importer, colour=importer)) + geom_line(aes(linetype=importer), size=1) + geom_point(size=2) +scale_colour_hue(l=25) + xlab("year") + ylab("Imports in current US Dollars") + ggtitle("Imports from the other Country") + theme_bw()

We cannot see a real difference only in the quantity of imports, the imports of both countries are increasing, especially after the year $2001$. Only the imports of China have a little bend in the year $2005$. So we cannot say something about carbon leakage, if we only look at the quantity of the imports in our small example. But take a look at the carbon content of these imports.

c) Carbon Content of the Imports

There are two variables for the carbon content of the trades: BEIM and BEEX. BEIM stands for the bilateral emissions embodied in imports, BEEX stands for the bilateral emissions embodied in exports. The values are measured in tons of $CO_2$. Such bilateral I-O-tables to take other countries' upstream emissions into account for the carbon content of the imports are not available. The authors of the paper calculated these two variables. They observed the share of imports in a country from another country in a sector in relation to the complete imports. For example, if Germany imports $20\%$ of its steel absorption from China and a sector uses steel as intermediate product, then the author assumed $20\%$ of this steel was sourced in China. The author use data about sectoral carbon emissions from the International Energy Agency IEA and about sectoral output from the OECD's Structural Analysis Database. With these two databases and the first assumption the author computed the variables BEIM and BEEX.

Task: Use the function select() from the package dplyr to show the first rows of the dataset gc. Select the variables year, importer, exporter, BEIM and BEEX.

# ...(select(gc,...))

The imports of China with the trade partner Germany contained over $1300$ tons of $CO_2$ in the year $1995$ in sector $1$. Again, we can see a great increase in the carbon content of the imports from China in this small fraction.

More interesting is again the mean of the carbon content before and after the signing of the commitment.

Task: Use the function group_by() to group the data by the variable kyotom to give the mean of the bilateral emissions embodied in imports from before and after the signing of the commitment, you need again the function filter().

#...%>%
# filter(...)%>%
# group_by(...)%>%
# summarise(...)

So again we can see a great increase in the bilateral emissions embodied in imports and in the exports. But the carbon content of the imports is much greater than the exports. So there is a lot of more carbon content in the trades from China to Germany than in trades from Germany to China. For better interpretations we want to plot these developments, for this we want to group the data by year and the importer country.

Task: Group the dataset gc by the variables year and importer. First you have to filter the dataset to the importer Germany. Then summarise the means of the variables BEIM and BEEX, store these variables under BEIM and BEEX, respectively. Store the new dataset under a1and show the first rows of a1.

# ...=gc%>%
#     filter(...==...)%>%
#     group_by(...,...)%>%
#     summarise(BEIM=mean(...), BEEX=mean(...))

# enter your code here

To interpret this, we want to plot the development of the bilateral emissions embodied in imports and exports.

Task: Plot now the carbon content of the imports from the grouped dataset a1. You just have to press the check button.

ggplot(data=a1, aes(x=year, y=BEIM, group=importer, shape=importer, colour=importer)) + geom_line(aes(linetype=importer), size=1) + geom_point(size=2) +scale_colour_hue(l=25) + xlab("year") + ylab("Carbon content in tons of CO2") + ggtitle("Bilateral Emissions embodied in Imports") + theme_bw()

Now this is very interesting. The first plot for the quantity of the imports looks very similar for the imports of China and Germany. Both curves are great increasing. But when we look at the second plot about the bilateral emissions embodied in these imports, we can see a great difference. Till $2002$, the carbon content of the imports is constant, Germany imported more carbon emissions than China. But then after $2002$ we have a great increase in the carbon content of the imports from Germany. The imports in China are still constant or just a little bit increasing. Remember that the Kyoto commitments started in $2001$. This could be a sign of carbon leakage. It is also possible to plot the carbon intensity of the imports.

d) Carbon Intensity of the Imports

There is also a variable for the carbon intensity of the imports: int_imp. The value is in tons of $CO_2$ per US-Dollar. The intensity is the fraction of the carbon content and the quantity of the imports: $\textrm{int_imp} = \frac{\textrm{BEIM}}{\textrm{imp} \cdot 1000000}$

Task: Use the function select() to show the first rows of the dataset gc with the selected variables year, importer, exporter and int_imp. Show also the variables imp and BEIM to see how the intensity is computed.

# ...(select(gc,year,importer,...))

Remember that the values of int_imp are in tons per US-Dollar. In $1995$ and sector $1$ the imports of China with trade partner Germany has a value of $0.000322$. This means, that an import of $1$ US-Dollar contains $0.000322$ tons of $CO_2$. So the import of $1$ US-Dollar was produced with $0.322$ kg of $CO_2$.

To analyse also the carbon intensity we want to group again the data by year and importer country and generate the means of the carbon intensity.

Task: Group the data by the variables year and importer, store it under a1. Summarise the means of the variable int_imp and store it under int_imp and show the first rows of the grouped dataset.

#...=gc%>%
#     group_by(...,...)%>%
#     summarise(int_imp=...)

# enter your code here

For better interpretations it is again better to plot the means of the carbon intensity.

Task: Plot the carbon intensity of the imports of China and Germany with the function ggplot(), you just have to press the check button.

ggplot(data=a1, aes(x=year, y=int_imp, group=importer, shape=importer, colour=importer)) + geom_line(aes(linetype=importer), size=1) + geom_point(size=2) +scale_colour_hue(l=25) + xlab("year") + ylab("Carbon intensity in tons of CO2 per US-Dollar") + ggtitle("Emission intensity in Imports") + theme_bw()

This is very interesting. The carbon intensity from the imports of Germany is very high. But this intensity is decreasing, although the start of the Kyoto commitments. But after the start of the commitments $2002$ the decrease is obvious smaller than in the years before, this could be a sign for carbon leakage. But the carbon intensity of the imports of China is also decreasing after the Kyoto commitment, the reason is the commitment of Germany. Germany cannot export many carbon-intensive goods than before. The reason for the decrease in Germany could be the technical progress in China.

We can also plot the logarithm of the intensity to observe better results for percentage changes.

Task: Plot the carbon intensity of the imports from Germany and China with the function ggplot(), but now with the logarithm of the carbon intensity, you just have to press the check button.

ggplot(data=a1, aes(x=year, y=int_imp, group=importer, shape=importer, colour=importer)) + geom_line(aes(linetype=importer), size=1) + geom_point(size=2) +scale_colour_hue(l=25) + xlab("year") + ylab("Carbon intensity in tons of CO2 per US-Dollar") + ggtitle("Emission intensity in Imports") + theme_bw() + scale_y_log10()

Here we can see better percentage changes. The logarithm makes the difference clearer. Until $2001$ the carbon intensity for the German imports was strong decreasing, the intensity in China was increasing. But after $2001$ the carbon intensity in the imports from China are decreasing. At the same time we can see a little bend in the carbon intensity of the imports in Germany. The decrease is slower, now. This could also be a sign for carbon leakage.

With these four plots we can see some signs for carbon leakage in the two countries case with Germany and China. The aim of this Problem Set is to provide evidence of carbon leakage on the complete dataset for the $40$ countries.

Complete Dataset

The problem of carbon leakage could be very important, if trade costs are low and falling. Through the commitment, the prices for carbon-intensive goods could increase, hence the production of these goods shifts to non-committed countries. So the reduction of domestic greenhouse gases in committed countries could lead to an increase in greenhouse gases in non-committed countries. If the trade partner country has old carbon intensive technologies, it is possible that there is a global increase in greenhouse emissions.

To observe indicators for carbon leakage, we want to look at the carbon content of the imports. Until now in the example case, we observed some signs for carbon leakage with two specific countries. Now we want to look at the complete dataset and compare the imports from committed against non-committed exporter countries. The status of the importer country is first irrelevant.

For the next part, the variable statusx could be helpful. It is a character variable, for committed versus non-committed exporter countries. The variable is equal to "committed" for committed countries also in the years before the start of the Protocol.

Task: To solve the following Quiz you can enter whatever you want. If you need help you can click on the hint button.

# enter your code here

! addonquizcontent before


! addonquizcarbon emission


We also can make a plot like in the exercise before. We could plot the carbon intensity of the imports from committed versus non-committed exporter countries.

Task: Group the dataset dat by the variables year and statusx, summarise the means of the carbon intensity, store the means under int_imp and the complete dataset under a1.

#a1=dat%>%
# group_by(...)%>%
# summarise(int_imp=...)%>%

Task: Plot the logarithmic carbon intensity of the imports from committed versus non-committed exporter countries with the function ggplot(). You just need to press the check button.

ggplot(data=a1, aes(x=year, y=int_imp, group=statusx, shape=statusx, colour=statusx)) + geom_line(aes(linetype=statusx), size=1) + geom_point(size=2) +scale_colour_hue(l=25) + xlab("year") + ylab("Carbon intensity in tons of CO2 per US-Dollar") + ggtitle("Emission intensity in Imports") + theme_bw() + scale_y_log10()

We can see that the carbon intensity of the imports is greater from non-committed exporter countries. After the start of the Kyoto Protocol it is also slower decreasing and in the last year even increasing. The carbon intensity from imports of committed exporter countries are constant decreasing after the start of the commitments.


We can see that the bilateral emissions in imports are after the Kyoto commitments circa half as much as before the Kyoto Protocol from non-committed exporter countries. This could be a sign that the committed countries couldn't produce such many carbon intensive goods and so they couldn't sell such products. This is also a sign for carbon leakage.

In a second study of Aichele and Felbermayr (2013) they examined the influence of the Kyoto Protocol to the carbon emissions worldwide. The result was a weak significant negative impact to the carbon emissions. Higher prices for fuel and different energy mixes in the Kyoto-countries supported this result. This weak significant influence is also very small. We can see this, if we look at the study from Santilli et al. (2005). They compared the carbon reduction in relation to the loss in forest. The results are, that the yearly deforestation would equalize $80\%$ of the saved emissions. So a proposal could be to offer the timberland owners a compensation to save greenhouse emissions.

Exercise 2 -- Determinants of Imports

In this chapter we want to develop a model to estimate the effect of carbon leakage after the commitments of the Kyoto Protocol through the quantity of the imports.

First, we need to load the dataset trades, which is similar to the first dataset with some extra variables, this dataset is also an .rds file, so the function readRDS() is again helpful.

Task: Load the dataset trades.rds and store it under the variable dat. Use again the readRDS() function.

#...=readRDS("...")


a) Kyoto Status

First we want to get the influence of the Kyoto Status to the quantity of the imports. We already know the variable dk, which describes the Difference in the Kyoto Status of the exporter and the importer country. A naive approach could be an ordinary least squares (OLS) regression of the imports with the variable dk. So we could see the influence of the Kyoto Status. An alternative are the variables kyotom and kyotox for the Kyoto status of the importer and exporter country, respectively. But first, we want to look at the influence of the Kyoto Protocol on the complete trades and not only the influence of the importer and exporter country alone. The only interesting cases are when the variable dk is equal to $-1$ or $1$, this means, if only the exporter or only the importer country is committed under Kyoto. Later in Exercise $4$ we will analyse also the influence of the Kyoto status of the importer and the exporter country on their own.

Also the time effect could be very important, since the Kyoto Protocol started $2001$ and we have a period before and a period after the start. For the time effect we can take the variable year.

Then, this is the first model:

$$\begin{eqnarray} \textrm{imp}_i = \beta_0 & + & \beta_1 \cdot \textrm{dk}_i + \gamma_j \cdot \textrm{year}_j + \varepsilon \end{eqnarray}$$ with $i \in {1,...,223499}$ and $j \in {1,...,13}$

$i$ stands for the observations, we have $40$ different countries, all of them have $39$ possible trade partners, a period of $13$ years and $12$ different sectors. If no observation would be missing, we would have $40 \cdot 39 \cdot 13 \cdot 12 = 243360$ observations. Since some observations are missing or between some countries are no trades in specific years, we have $223499$ observations. $j$ stands for the different years.

! addonquizimpact1


To make a standard OLS, the function lm() could be helpful. If you need further advice with this function, you can click on the info box below.

info("lm()") # Run this line (Strg-Enter) to show info

Task: Do a standard OLS with the function lm() to get the influence of the variable dk to the quantity of the imports and use the dataset dat and store it under reg1.

# reg1=lm(...~..., data=)

We want to see some details about our regression. To get such a summary, the function stargazer() could be helpful. If you need some help with the function stargazer() from the package stargazer you can click on the info box below.

info("stargazer()") # Run this line (Strg-Enter) to show info

Task: Show the summary statistics from the regression reg1 with the function stargazer() from the package stargazer. Use the type html.

# enter your code here


First some general information about the summary of the regression. The summary starts with the dependent variable. Here the dependent variable is imp, which describes the quantity of imports in current million US Dollars. Then it starts with the independent variables, in our first regression we only have the variable dk for the difference of the exporter and the importer country in the Status of the Kyoto Protocol and the different years as independent variables. On the right side of the independent variables are two numbers and possibly some stars. The stars stands for the significance level of the variables. Three stars stands for very high significance, one star stands for weak significance and zero star for no significance. Here only the constant is high significant, the independent variable dk isn't significant, it has no star. The numbers in brackets stands for the standard deviation of the variables. The first number is the most important one. If the independent variable would be one unit greater, then the dependent variable would change for the number units.

In our case, an increase of one in the variable dk means that first only the exporter country was committed under Kyoto, and then both countries, or that first no country was committed and then only the importer country. Such an increase has a higher quantity of imports of over $7$ million US Dollars. The constant is for the case, if all independent variables, here only the variable dk, are equal to zero. In this case if no country is committed or both countries are committed under Kyoto we would have imports of over $140$ million US Dollars in the mean. But economically it isn't recommended to make such statements about non-significant variables.

The next part are the observations. Like we expect, we have more than $200000$ observations, like in our dataset. The next four values are important to analyse how good the model is. The detailed information about these values are in the info box below. $R^2$ and the adjusted $R^2$ explain how much of the variance could be explained by the given model. The values are between zero and one, only the adjusted $R^2$ could be also negative. Here it is good to have a high value near to one. In reg1 we have a value of zero, so this naive model is very bad.

If you want to know more about the test statistics you can click on the info box below.

info("statistics") # Run this line (Strg-Enter) to show info

In the summary statistics are several values for the different years. But why doesn't count the variable year as a value into the regression?

Task: Show the classification of the variable year with the function class().

# ...(dat$...)

The variable year has the classification character. This means that the several years are no values but characters. R take the characters as extra independent variables, automatically. So we get a time effect without some indicator variables for each year.

So only with the variables dk and year we don't get a good model. To have a good model, we need all explanatory variables for the imports to avoid endogeneity. Endogeneity describes the problem, that not all explanatory variables are in the model, and so the missing variable would has an influence on the error term $\varepsilon$.

b) GDP per capita

Of course, the quantity of the imports of a country depends on more than the Kyoto status or the time. So we have a problem with endogeneity. This means, that some variables are missing. An idea is to take the GDP of the importer and the GDP of the exporter country into the model. In our dataset there are the variables gdpm and gdpx for the GDP of the importer and the exporter, respectively. The values are in constant 2000 US Dollars.

Task: Use the function select() to show the first rows of the dataset dat with the variables year, importer, exporter, gdpm and gdpx.

# ...(select(dat,importer,exporter,...))

$1995$, Argentina had a GDP per capita in constant 2000 US-Dollars of over $7$ thousand US-Dollars over all sectors. The GDP per capita of Australia at the same was a little bit greater with over $18$ thousand US-Dollars. The GDP of Australia is increasing, while the GDP of Argentina is approximately constant.

! addonquizimpact2


The new model with the GDP: $$\begin{eqnarray} \textrm{imp}_i = \beta_0 & + & \beta_1 \cdot \textrm{dk}_i + \beta_2 \cdot \textrm{gdpm}_i + \beta_3 \cdot \textrm{gdpx}_i + \gamma_j \cdot \textrm{year}_j + \varepsilon \end{eqnarray}$$ with $i \in {1,...,223499}$ and $j \in {1,...,13}$

Task: Make again an OLS estimation for the quantity of the imports also with the new variables gdpm and gdpx with the function lm(), store it under reg2 and use the dataset dat.

#...=lm(imp~dk+...+year, data=dat)

Task: Show the summary statistic of reg2 with the stargazer() function, use the type html and omit the variable year, you just have to press the check button.

stargazer(reg2, type="html", omit="year", omit.labels="Year Dummies")


We can see a strong positive significant influence of the GDPs of the exporter and the importer country, respectively. The Kyoto status is again not significant, so an interpretation of the influence of the Kyoto status to the quantity isn't reasonable. But are this enough variables which affect the quantity of imports?

c) FTA, WTO and EU

! addonquizvariables2


Are there other variables which could have an influence on the imports? An idea is to use some indicator variables for joint membership in the EU or WTO or an indicator variable for a free trade agreement between two countries. The variable eu is an indicator variable for joint membership in the European Union EU. The variable wto stands for joint membership in the World Trade Organization WTO and fta is an indicator variable for a free trade agreement between two countries.

Task: Show the first rows of the dataset dat and select the variables importer, exporter, fta, wto and eu.

# ...(select(dat, importer, exporter,...))

There is no free trade agreement between Argentina and Australia, but both countries are members in the WTO. Since Argentina and Australia are both not in Europe, both countries aren't members in the EU.

! addonquizimpact3


The updated model also with these three new variables: $$\begin{eqnarray} \textrm{imp}_i = \beta_0 & + & \beta_1 \cdot \textrm{dk}_i + \beta_2 \cdot \textrm{gdpm}_i + \beta_3 \cdot \textrm{gdpx}_i + \beta_4 \cdot \textrm{fta}_i + \beta_5 \cdot \textrm{wto}_i + \beta_6 \cdot \textrm{eu}_i + \gamma_j \cdot \textrm{year}_j + \varepsilon \end{eqnarray}$$ with $i \in {1,...,223499}$ and $j \in {1,...,13}$

Task: Make now an OLS regression with these three new variables, store it under reg3, use the function lm() and the dataset dat. You only have to add the new variables and delete the commentary sign.

#...=lm(imp~dk+gdpm+gdpx+...+year, data=dat)

Task: Show the summary statistics of reg1, reg2 and reg3 with the stargazer() function, use the type html and omit the variable year, you just have to press the check button.

stargazer(reg1, reg2, reg3, type="html", omit="year", omit.labels="Year Dummies")


Here we can see the development of our model. The Kyoto status isn't still significant. The influence of the variable dk falls from over $7$ million US Dollars down to ca. $2.7$ million US Dollars. But the non-significance make it hard to interpret. The GDP of the exporter and the importer are again significant, but in model reg3 with a little bit lower values.

The new variables for joint membership in the EU and WTO, respectively and the free trade agreements are all very significant. But the value for joint WTO membership is negative, this is very surprising, since trade within such an organisation should be easier. The influence of the joint EU membership is very high, this is not surprising, since within the EU are many developed countries which have many imports and exports. Are this all factors which could affect the quantity of trade?

d) Distance, Contiguity and Common Language

We could also take some variables about the distance between the countries, or an indicator variable for joint common language and a variable for contiguity. This seems to be helpful, because it is easier and often cheaper to take trade with a country in the neighbourhood. The three variables are dist, comlang and contig, respectively.

Task: Show the first rows of the dataset dat, select the variables year, importer, exporter, dist, comlang and contig.

# enter your code here

The variable dist describes the simple distance of the most populated cities in km. The most populated cities of Argentina and Australia are over $11000$ km away. Since the native language of Argentina is Spanish and from Australia it is English, the indicator variable for common language is here equal to zero. And the indicator variable for contiguity is equal to one for trades between neighbouring countries, since Argentina and Australia are no neighbours, the indicator variable is here equal to zero.

The new model with these variables:

$$\begin{eqnarray} \textrm{imp}i = \beta_0 & + & \beta_1 \cdot \textrm{dk}_i + \beta_2 \cdot \textrm{gdpm}_i + \beta_3 \cdot \textrm{gdpx}_i + \beta_4 \cdot \textrm{fta}_i + \beta_5 \cdot \textrm{wto}_i + \beta_6 \cdot \textrm{eu}_i \\ & + & \beta{7} \cdot \textrm{dist}i + \beta{8} \cdot \textrm{contig}i + \beta{9} \cdot \textrm{comlang}_i + \gamma_j \cdot \textrm{year}_j + \varepsilon \end{eqnarray}$$ with $i \in {1,...,223499}$ and $j \in {1,...,13}$

Task: Make an OLS regression with the function lm() with the additional three variables and store it under reg4 and use the dataset dat. Again, you only have to add the new variables.

#...=lm(imp~dk+gdpm+gdpx+fta+wto+eu+...+year, data=dat)

Task: Show the summary statistics of all regressions reg1, reg2, reg3 and reg4 with the stargazer() function, use the type html and omit the variable year, you just have to press the check button.

stargazer(reg1, reg2, reg3, reg4, type="html", omit="year", omit.labels="Year Dummies")


Here we have some differences, but first we want to analyse the new variables. All three new variables seems to be very significant. The distance has a significant negative influence, since for long distances you need much transportation costs. The variable for contiguity is also very significant and positive, this sounds great, since the trade with a neighbouring country is much easier. And the variable for common language is also strong significant, since you need interpreter to communicate in other languages, which leads to extra costs.

But now, the joint WTO membership isn't significant anymore and the variable dk is again not significant but also negative. A negative influence of the Kyoto Status would be the contrary of which we want to demonstrate. Are this enough variables to explain the quantity of imports?

e) Multilateral Resistance

At least there are some variables about multilateral resistance for the joint membership in the organisations and the variables for distance, contiguity and the common language. These variables are mrdis, mrcon, mrcom, mrwto, mrfta and mreu. These variables are calculated from Baier and Bergstrand (2009).

These variables are to create barriers of trade between the countries. It is a barrier in their trade with all other countries. We need the multilateral resistance instead of the bilateral resistance, since we have also trade of intermediates. Possible barriers in trade could be the distance, for example, if Germany trades with a country far away, then the multilateral resistance of the distance of Germany would decrease. If Germany would have more trades with a neighbour country, then the multilateral resistance of the distance would increase.

The new model with the multilateral resistance:

$$\begin{eqnarray} \textrm{imp}i = \beta_0 & + & \beta_1 \cdot \textrm{dk}_i + \beta_2 \cdot \textrm{gdpm}_i + \beta_3 \cdot \textrm{gdpx}_i + \beta_4 \cdot \textrm{fta}_i + \beta_5 \cdot \textrm{wto}_i + \beta_6 \cdot \textrm{eu}_i \\ & + & \beta_7 \cdot \textrm{mrdis}_i + \beta_8 \cdot \textrm{mrcon}_i + \beta_9 \cdot \textrm{mrcom}_i + \beta{10} \cdot \textrm{mrwto}i + \beta{11} \cdot \textrm{mrfta}i + \beta{12} \cdot \textrm{mreu}i \\ & + & \beta{13} \cdot \textrm{dist}i + \beta{14} \cdot \textrm{contig}i + \beta{15} \cdot \textrm{comlang}_i + \gamma_j \cdot \textrm{year}_j + \varepsilon \end{eqnarray}$$ with $i \in {1,...,223499}$ and $j \in {1,...,13}$

Task: Make now the OLS regression with all variables, use the function lm(), the dataset dat and store it under reg5. Add the new variables.

#...=lm(imp~dk+gdpm+gdpx+fta+wto+eu+...+dist+contig+comlang+year, data=dat)

Task: Show the summary statistics of reg4 and reg5 with the stargazer() function, use the type html and omit the variable year, you just have to press the check button.

stargazer(reg4, reg5, type="html", omit="year", omit.labels="Year Dummies")


The variables for multilateral resistance are all very significant. And finite, we have a weak significance for the Kyoto Status. But the influence here is negative. And the joint membership of the WTO is here again significant. Are there other variables to explain the quantity of imports?

f) Logarithm

In our dataset is no other variable which could explain the quantity of the imports, but we can improve the model. An idea is to take the logarithm of the imports and some variables. Possible are the GDP of the importer and exporter, respectively, and the distance between the countries. The model with the logarithm:

$$\begin{eqnarray} \textrm{ln(imp)}i = \beta_0 & + & \beta_1 \cdot \textrm{dk}_i + \beta_2 \cdot \textrm{ln(gdpm)}_i + \beta_3 \cdot \textrm{ln(gdpx)}_i + \beta_4 \cdot \textrm{fta}_i + \beta_5 \cdot \textrm{wto}_i + \beta_6 \cdot \textrm{eu}_i \\ & + & \beta_7 \cdot \textrm{mrdis}_i + \beta_8 \cdot \textrm{mrcon}_i + \beta_9 \cdot \textrm{mrcom}_i + \beta{10} \cdot \textrm{mrwto}i + \beta{11} \cdot \textrm{mrfta}i + \beta{12} \cdot \textrm{mreu}i \\ & + & \beta{13} \cdot \textrm{ln(dist)}i + \beta{14} \cdot \textrm{contig}i + \beta{15} \cdot \textrm{comlang}_i + \gamma_j \cdot \textrm{year}_j + \varepsilon \end{eqnarray}$$ with $i \in {1,...,223499}$ and $j \in {1,...,13}$

To make it easier, there are extra variables with the logarithm of these variables in another dataset logtrades.rds, which is again an .rds file. The variable for the logarithm of the imports is limp, the variables for the logarithm of the GDPs are lgdpm and lgdpx and the variable for the logarithm of the distance is ldist.

Task: Load the dataset logtrades.rds. Store the new dataset under datlog, use again the function readRDS().

# datlog=readRDS(...)

The new model with the new dataset:

$$\begin{eqnarray} \textrm{limp}i = \beta_0 & + & \beta_1 \cdot \textrm{dk}_i + \beta_2 \cdot \textrm{lgdpm}_i + \beta_3 \cdot \textrm{lgdpx}_i + \beta_4 \cdot \textrm{fta}_i + \beta_5 \cdot \textrm{wto}_i + \beta_6 \cdot \textrm{eu}_i \\ & + & \beta_7 \cdot \textrm{mrdis}_i + \beta_8 \cdot \textrm{mrcon}_i + \beta_9 \cdot \textrm{mrcom}_i + \beta{10} \cdot \textrm{mrwto}i + \beta{11} \cdot \textrm{mrfta}i + \beta{12} \cdot \textrm{mreu}i \\ & + & \beta{13} \cdot \textrm{ldist}i + \beta{14} \cdot \textrm{contig}i + \beta{15} \cdot \textrm{comlang}_i + \gamma_j \cdot \textrm{year}_j + \varepsilon \end{eqnarray}$$ with $i \in {1,...,223499}$ and $j \in {1,...,13}$

Task: Make an OLS with the function lm() with the logarithm of the given variables, use the dataset dat and store it under reg6.

#...=lm(...~dk+...+fta+wto+eu+mrdis+mrcon+mrcom+mrwto+mrfta+mreu+...+contig+comlang+year, data=dat)

Task: Show the summary statistics of reg5 and reg6 with the stargazer() function, use the type html and omit the variable year, you just have to press the check button.

stargazer(reg5, reg6, type="html", omit="year", omit.labels="Year Dummies")


Finally, the variable dk is strong significant with a positive value. But now the logarithms have to be interpreted differently. Now an increase of one in the variable dk would lead to $7.1\%$ higher imports. The variables for the GDP are also a logarithm, now. So here, a one percent higher GDP of the importer would lead to $0.304\%$ higher imports.

All variables, except the variable for joint WTO membership seem to be very significant and the joint membership in the EU has a negative influence, now. It is possible to improve the model?

g) Fixed Effects

The dataset contains panel data. The variable sid is a variable for country pairs and a specific sector. With the standard normal OLS we cannot get great findings for panel data. There is another function felm() from the package lfe to make regressions for panel data. If you need further advice with the function felm() you can click on the info box below.

info("felm()") # Run this line (Strg-Enter) to show info

In the regression for panel data we haven't a constant anymore, so the new model for the imports looks like this: $$\begin{eqnarray} \textrm{limp}{j,s} = \beta_1 \cdot \textrm{dk}{j,s} & + & \beta_2 \cdot \textrm{lgdpm}{j,s} + \beta_3 \cdot \textrm{lgdpx}{j,s} + \beta_4 \cdot \textrm{fta}{j,s} + \beta_5 \cdot \textrm{wto}{j,s} + \beta_6 \cdot \textrm{eu}{j,s} \\ & + & \beta_7 \cdot \textrm{mrdis}{j,s} + \beta_8 \cdot \textrm{mrcon}{j,s} + \beta_9 \cdot \textrm{mrcom}{j,s} + \beta_{10} \cdot \textrm{mrwto}{j,s} + \beta{11} \cdot \textrm{mrfta}{j,s} + \beta{12} \cdot \textrm{mreu}{j,s} \\ & + & \beta{13} \cdot \textrm{ldist}{j,s} + \beta{14} \cdot \textrm{contig}{j,s} + \beta{15} \cdot \textrm{comlang}_{j,s} + \varepsilon \end{eqnarray}$$ with $j \in {1,...,13}$ and $s \in {1,...,18720}$

$s$ stands for the different values of the sector identifier, and $j$ stands for the different years.

Task: Make the regression with the function felm() from the package lfe, the fixed effects are the variables sid and year and store the result under felm1.

#...=...(limp~dk+lgdpm+lgdpx+fta+wto+eu+mrdis+mrcon+mrcom+mrwto+mrfta+mreu+ldist+contig+comlang+year | ..., data=dat)

Task: Show the summary statistics of reg6 and felm1 with the stargazer() function, use the type html and omit the variable year, you just have to press the check button.

stargazer(reg6, felm1, type="html", omit="year", omit.labels="Year Dummies")


Finally, we have a very good model, the variable dk is again very significant with an influence of $6\%$ on the quantity of the imports. Also, the joint EU membership seems to be not significant any more. And we have no F-statistic on the regression for panel data here. A look into the adjusted $R^2$ and the standard error should be enough to compare the models.

We can see that the variables for distance, contiguity and common language have no influence on the imports. The global world could be a reason. This is the model without these three variables: $$\begin{eqnarray} \textrm{limp}{i,s} = \beta_1 \cdot \textrm{dk}{i,s} & + & \beta_2 \cdot \textrm{lgdpm}{i,s} + \beta_3 \cdot \textrm{lgdpx}{i,s} + \beta_4 \cdot \textrm{fta}{i,s} + \beta_5 \cdot \textrm{wto}{i,s} + \beta_6 \cdot \textrm{eu}{i,s} \\ & + & \beta_7 \cdot \textrm{mrdis}{i,s} + \beta_8 \cdot \textrm{mrcon}{i,s} + \beta_9 \cdot \textrm{mrcom}{i,s} + \beta_{10} \cdot \textrm{mrwto}{i,s} + \beta{11} \cdot \textrm{mrfta}{i,s} + \beta{12} \cdot \textrm{mreu}{i,s} \\ & + & \gamma_j \cdot \textrm{year}{j} + \varepsilon \end{eqnarray}$$ with $i \in {1,...,12}$, $j \in {1,...,13}$ and $s \in {1,...,18720}$

In an estimation without these three variables are no changes in the significance and the values of the variables and on the test statistics. The reason is, that R automatically take the non-significant variables for the distance, contiguity and common language outside the regression and made the regression automatically without these three variables.

With a higher value for dk of one, we would have $6\%$ more imports. The variables lgdpm and lgdpx have a high significant influence and really high values. But this seems reasonable. A higher GDP of one percent of the importer would lead to higher imports of $1.857\%$ in the importer country. The indicator variables for joint EU and WTO membership aren't significant any more.

h) Problems

All in all the model looks pretty good, but we have some problems: - We do not know all factors, which could affect the quantity of the imports and then also the carbon content of the imports. It is impossible to take all needed variables into account. And to take the Kyoto Status as an argument for the climate policy is not perfect, non-committed countries could also try to lower the carbon emissions, so we will expect a bias in direction to zero, so we expect an underestimation.

To minimize this measure error we will take a look at some periods before and after the start of the Kyoto commitments $2001$, later in Exercise $3$.

For the second problem we need another variable to estimate the influence of the Kyoto Status on our imports with an instrumental variable for dk. An idea is to look at the Rome Statute governing membership of the International Criminal Court. We can estimate dk with the same variables but also with this new variable dICC: - dICC: Difference in ICC ratification (=ICCm-ICCx) - ICCm: Indicator variable for importer's ratification of Rome Statute governing membership to the International Criminal Court - ICCx: Indicator variable for exporter's ratification of Rome Statute governing membership to the International Criminal Court

If you want to know more about the instrumental variable regression with the function felm() from the package lfe click on the info box below.

info("felm()2") # Run this line (Strg-Enter) to show info

The regression for the difference in the Kyoto Status dk looks like: $$\begin{eqnarray} \textrm{dk}{j,s} = \beta_1 \cdot \textrm{dICC}{j,s} & + & \beta_2 \cdot \textrm{lgdpm}{j,s} + \beta_3 \cdot \textrm{lgdpx}{j,s} + \beta_4 \cdot \textrm{fta}{j,s} + \beta_5 \cdot \textrm{wto}{j,s} + \beta_6 \cdot \textrm{eu}{j,s} \\ & + & \beta_7 \cdot \textrm{mrdis}{j,s} + \beta_8 \cdot \textrm{mrcon}{j,s} + \beta_9 \cdot \textrm{mrcom}{j,s} + \beta_{10} \cdot \textrm{mrwto}{j,s} \\ & + & \beta{11} \cdot \textrm{mrfta}{j,s} + \beta{12} \cdot \textrm{mreu}_{j,s} + \gamma_j \cdot \textrm{year}_j + \varepsilon \end{eqnarray}$$ with $j \in {1,...,13}$ and $s \in {1,...,18720}$

Task: Make the regression for the logarithm of the imports with instrumental variable estimation with the function felm() from the package lfe and use as instrumental variable for dk the additional variable dICC. Store it under felm2.

#...=felm(limp~lgdpm+lgdpx+fta+wto+eu+mrdis+mrcon+mrcom+mrwto+mrfta+mreu+year | sid | (...~...+lgdpm+lgdpx+fta+wto+eu+mrdis+mrcon+mrcom+mrwto+mrfta+mreu+year), data=datlog)

Task: Show the summary statistic of felm1 and felm2 with the stargazer() function, use the type html and omit the variable year, you just have to press the check button.

stargazer(felm1, felm2, type="html", omit="year", omit.labels="Year Dummies")


There are similar values like in felm1. But here we have a good value for dk with $6.9\%$ and the model looks similar to the model before. We see a real high influence of lgdpm and lgdpx. This sounds realistic. The indicator variables for joint WTO and EU membership are again not significant.

So we can see that the last regression was the best one, but the second last was also very good. So for simplicity we take the model without an instrumental variable as the final model. And of course we have given values for the Kyoto status and so we don't have to expect this value with another one.

i) Alternative

Alternatively not only the variables sid and year could be the fixed effects. We also can take the variables for the importer and exporter countries importer and exporter as fixed effect. Since it is possible with the function felm() to have more than one fixed effect variable, we can modify the regression formula. If we make the countries as a fixed effect, the GDP shouldn't be significant any more. Also the multilateral resistances are not needed.

The new formula with fixed effects about sid, year, importer and exporter looks then like this: $$\textrm{limp}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \beta_4 \cdot \textrm{eu}_{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

Task: estimate the effect of the Kyoto status on the logarithm of the quantity of the imports with the felm() function and the fixed effects sid, year, importer and exporter. Store the result under felm3.

# ...=felm(...~...| sid+... , data=datlog)

Task: Show the summary statistic of felm1 and felm3 with the stargazer() function, use the type html and omit the variable year, you just have to press the check button.

stargazer(felm1, felm3, type="html", omit="year", omit.labels="Year Dummies")


The Kyoto status is also very significant and the influence is a little bit greater with $7.1\%$. All other variables are also strong significant.

So we can see that the Kyoto Status of the countries has a strong significant influence on the quantity of their imports. We found a good model to get this influence. We want to use this model in the next exercise also for the carbon content of the imports and the carbon intensity of the imports to get an empirical evidence of carbon leakage through the commitments of Kyoto.

Exercise 3 -- Before/After Comparison

In this Chapter we want to analyse the impact of the Kyoto commitments on the quantity of the imports (like in Exercise $2$), on the bilateral emissions embodied in imports, on the carbon intensity of the imports and on an extra variable, which will be explained later.

We want to estimate the impact of the Kyoto Protocol on these four different important variables with our model from Exercise $2$ and make some plots to compare the different results.

a) Quantity

Task: First we need again the dataset logtrades.rds. Use again the function readRDS() to read in the dataset and store it under dat.

#enter your code here


The complete regression for the logarithm of the imports should looks like this, in the paper are two different options:

$$\begin{eqnarray} \textrm{limp}{i,s} = \beta_1 \cdot \textrm{dk}{i,s} & + & \beta_2 \cdot \textrm{lgdpm}{i,s} + \beta_3 \cdot \textrm{lgdpx}{i,s} + \beta_4 \cdot \textrm{fta}{i,s} + \beta_5 \cdot \textrm{wto}{i,s} + \beta_6 \cdot \textrm{eu}{i,s} \\ & + & \beta_7 \cdot \textrm{mrdis}{i,s} + \beta_8 \cdot \textrm{mrcon}{i,s} + \beta_9 \cdot \textrm{mrcom}{i,s} + \beta_{10} \cdot \textrm{mrwto}{i,s} \\ & + & \beta{11} \cdot \textrm{mrfta}{i,s} + \beta{12} \cdot \textrm{mreu}_{i,s} + \gamma_j \cdot \textrm{year}_j + \varepsilon \end{eqnarray}$$ with $i \in {1,...,12}$, $j \in {1,...,13}$ and $s \in {1,...,18720}$

$$\textrm{limp}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \beta_4 \cdot \textrm{eu}_{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

The authors from the paper decided to the second option, because it is easier to run this regression in Stata. To be congruent we will also estimate with the second option. Later in Exercise $4$ we will also take the first model to get better results about the significance of some variables.

Task: Make a regression with the second option for the quantity of the imports limp, use the function felm() from the package lfe and take the variables dk, fta, wto and eu. Store it under felm_imp. The fixed effects should be again the variables sid, year, importer and exporter. Use the dataset dat.

#felm_...=felm(...~... | sid+..., data=dat)

Task: Show the summary statistic of felm_imp with the stargazer() function, use the type html and omit the variable year, you just have to press the check button.

stargazer(felm_imp, type="html", omit="year", omit.labels="Year Dummies")


dk has an influence of $7.1\%$ with high significance. We want now to plot these results and look at the means of the years $1997$ till $2000$ and from $2004$ till $2007$. Because most of the starts of the Kyoto commitments are between $2001$ and $2003$, so we have a period before and a period after the start of the commitment. For this we use again the function filter() from the package dplyr and define two subsets of our dataset only with these years.

Task: Define two subsets with the function filter() from the package dplyr out of the dataset dat for the years $1997$ till $2000$ and one for $2004$ till $2007$ and store the results in dat1 and dat2

#dat1=filter(...)

#dat2=filter(dat, ...)

We want to plot the changes in the means of the imports from the years $1997$ till $2000$ and $2004$ till $2007$ for the different possible values of dk. And we will also put a regression line into the plot.

Since the data is country-pair trade data, every observation stands for a trade between two countries. On this trades, it is important to know, whether no country, only the importer or exporter country, or both countries are committed under Kyoto. These indicator variables are also defined before $2001$. These indicator variables are nonein, impin, expin and bothin. Only one of these four variables is equal to one at the same time, all other three variables are then equal to zero.

Task: We want to define three new subsets with the function filter() from the package dplyr for the different cases of dk. Define three new subsets dat1_minus, dat1_null and dat1_plus where only the exporter is under Kyoto, both or no country is under Kyoto and for only the importer is under Kyoto, respectively. You only have to run the code.

dat1_minus=filter(dat1, expin==1)
dat1_null=filter(dat1, bothin==1 | nonein==1)
dat1_plus=filter(dat1, impin==1)

We make the same for the second dataset

Task: Make the same for the second dataset dat2.

#enter your code here

# enter your code here

Task: Plot the differences of the imports, use the package ggplot2, you only have to run the first part of the code. There is an extra written function changes() as extra code, so you only have to run the function with the needed variable as a character and the complete dataset dat, but you need quotation marks around the wanted variable. Store the resulting plot under p1. First you only have to click the check button and show the plot.

p1=changes("limp",dat)
# enter your code here

The plot is saved under p1. If you want to see the self-written function you can click on the note box below.

! start_note "Note: The code of the self-written function changes()"

This note shows how the function changes() is implemented:

changes = function(car,data){
 library(ggplot2)
 library(dplyr)
 library(lfe)
   dat1=filter(data, year>=1997 & year<=2000)
   dat2=filter(data, year>=2004 & year<=2007)
   dat1_minus=filter(dat1, expin==1)
   dat1_null=filter(dat1, bothin==1 | nonein==1)
   dat1_plus=filter(dat1, impin==1)
   dat2_minus=filter(dat2, expin==1)
   dat2_null=filter(dat2, bothin==1 | nonein==1)
   dat2_plus=filter(dat2, impin==1)
   dk=c(-1,0,1)
   AA=car
  switch(AA, 
         "limp"={
           felm_imp=felm(limp~dk+fta+wto+eu | sid+year+importer+exporter, data=data)
           in_limp=c(mean(dat2_minus$limp)-mean(dat1_minus$limp),mean(dat2_null$limp)-mean(dat1_null$limp),mean(dat2_plus$limp)-mean(dat1_plus$limp))
           data.limp=data.frame(dk,in_limp )
           p1<<-ggplot(data.limp, aes(x = dk, y = in_limp)) + stat_summary(fun.y=mean,geom="bar", aes(width=0.5)) + scale_y_continuous("Changes in imports",limits=c(0,1),breaks=seq(-1, 1, .1)) + geom_abline(aes(intercept=mean(dat2$limp)-mean(dat1$limp), slope=coef(felm_imp)[1]), color="red", size=1.5) + ggtitle("Change in Imports after Kyoto") + theme_bw()
           p1
           return(p1)
         },
         "lint"={
           felm_int=felm(lint~dk+fta+wto+eu | sid+year+importer+exporter, data=data)
           in_lint=c(mean(dat2_minus$lint)-mean(dat1_minus$lint),mean(dat2_null$lint)-mean(dat1_null$lint),mean(dat2_plus$lint)-mean(dat1_plus$lint))
           data.lint=data.frame(dk,in_lint )
           p2<<-ggplot(data.lint, aes(x = dk, y = in_lint)) + stat_summary(fun.y=mean,geom="bar", aes(width=0.5)) + scale_y_continuous("Changes in intensity",limits=c(-1,0),breaks=seq(-1, 1, .1)) + geom_abline(aes(intercept=mean(dat2$lint)-mean(dat1$lint), slope=coef(felm_int)[1]), color="red", size=1.5) + ggtitle("Change in Carbon Intensity of the Imports") + theme_bw()
           p2
           return(p2)
         },
         "lbeim"={
           felm_beim=felm(lbeim~dk+fta+wto+eu | sid+year+importer+exporter, data=data)
           in_lbeim=c(mean(dat2_minus$lbeim)-mean(dat1_minus$lbeim),mean(dat2_null$lbeim)-mean(dat1_null$lbeim),mean(dat2_plus$lbeim)-mean(dat1_plus$lbeim))
           data.lbeim=data.frame(dk,in_lbeim )
           p3<<-ggplot(data.lbeim, aes(x = dk, y = in_lbeim)) + stat_summary(fun.y=mean,geom="bar", aes(width=0.5)) + scale_y_continuous("Changes in content",limits=c(-0.3,0.7),breaks=seq(-1, 1, .1)) + geom_abline(aes(intercept=mean(dat2$lbeim)-mean(dat1$lbeim), slope=coef(felm_beim)[1]), color="red", size=1.5) + ggtitle("Change in Carbon Content of the Imports") + theme_bw()
           p3
           return(p3)
         },
         "lant"={
           felm_ant=felm(lant~dk | sid+year+importer+exporter, data=data)
           dat1_minus=filter(dat1_minus, lant!="NA")
           dat1_null=filter(dat1_null, lant!="NA")
           dat1_plus=filter(dat1_plus, lant!="NA")
           dat2_minus=filter(dat2_minus, lant!="NA")
           dat2_null=filter(dat2_null, lant!="NA")
           dat2_plus=filter(dat2_plus, lant!="NA")
           in_lant=c(mean(dat2_minus$lant)-mean(dat1_minus$lant),mean(dat2_null$lant)-mean(dat1_null$lant),mean(dat2_plus$lant)-mean(dat1_plus$lant))
           data.lant=data.frame(dk,in_lant )
           p4<<-ggplot(data.lant, aes(x = dk, y = in_lant)) + stat_summary(fun.y=mean,geom="bar", aes(width=0.5)) + scale_y_continuous("Changes of lant",limits=c(-0.5,0.5),breaks=seq(-1, 1, .1)) + geom_abline(aes(intercept=data.lant$in_lant[2], slope=coef(felm_ant)[1]), color="red", size=1.5) + ggtitle("Change in 'lant'") + theme_bw()
           p4
           return(p4)
         },
         {
           print('default')
         }
  )
}

! end_note


We see, that a change in the dk value leads to a higher increase in the quantity of imports. From $1997$ till $2000$ we have a higher increase for a high value in dk. So we can say, that the Kyoto Status is really important for the quantity of the imports. Countries, where only the importer is committed under Kyoto have the highest increase in imports. The red line shows the regression line of our estimation. We can see that for dk equal to one, which means that only the exporter is under Kyoto, the increase in the quantity of the imports is very small, only ca. $40\%$. But if only the importer is under Kyoto, then we have an increase in imports of ca. $80\%$, which is twice as much.

We can also look at the world map of the first and the second dataset. We need to group the dataset by the variable importer and then summarise the means of the quantity of the imports.

Task: Group the dataset for the first period dat1 to the variable importer and summarise the means of the quantity of the imports. Hint: we need the original value and not the logarithm. Store the means under val and the complete dataset under quantity1.

#...=dat1%>%
#     group_by(...)%>%
#     summarise(val=...)

We need to do the same for the second dataset dat2 after the start of the Kyoto Protocol.

To plot the world map with $4$ different countries, there is again a self-written function map4col() with the grouped dataset and the title as arguments. If you want to see the complete function you can click on the note box below.

! start_note "self-written Function 'map4col()'"

Here you can see the written function 'map4col()' to plot a world map with four different colours. As arguments you need the grouped dataset and the title. In the dataset you need the columns 'importer' and 'val'.

map4col=function(data,car){
  library(rworldmap)
  par(mai=c(0,0,0.2,0),xaxs="i",yaxs="i")
  a1=joinCountryData2Map(data, joinCode="NAME", nameJoinColumn="importer")
  op=palette(c('green','yellow','orange','red'))
  cutVector=quantile(a1@data[["val"]],na.rm=TRUE)
  a1@data[["valcat"]]=cut(a1@data[["val"]], cutVector, include.lowest=TRUE)
  levels(a1@data[["valcat"]])=c('low','med','high','very high')
  mapCountryData(a1, nameColumnToPlot='valcat',mapTitle=car, catMethod='categorial', colourPalette='palette',oceanCol='lightblue',missingCountryCol='white')
}

! end_note

Task: Plot the world map before the start of the Kyoto Protocol for the quantity of the imports, you just need to call the function map4col() with the dataset quantity1 as argument, the title is already given.

# ...(..., "Quantity before Kyoto")

North America is complete red, also many parts of the EU like Germany. Chile, Argentina and South Africa are green. To compare the situations before and after we need to group the dataset dat2 also by importer country and summarise the means of the quantity of the imports.

Task: Group the dataset dat2 by the importer country and calculate the means of the quantity of the imports, store the means under val, store the complete dataset under quantity2.

#...=dat2%>%
#   group_by(...)%>%
#   summarise(val=mean(...))

With this summarised dataset we can again plot the world map with the situation after the start of the Kyoto Protocol.

Task: Use the function map4col() to plot the worldmap from the situation after the start of the Kyoto Protocol with the dataset quantity2, the title is already given.

# ...(..., "Quantity after Kyoto")

We can see that Germany is again red. So in both periods, Germany have a very high quantity of imports. Also most of the other countries in Europe are again red. Our other example country is China. Here we can see that the situation in China worsened. Now, China has, in relation to the other countries, a higher quantity of imports.

Most of the Kyoto committed Countries worsened the situation or are consistent. Kyoto countries, which worsened the situation are for example Russia or Greece. But there is one exception. Japan improved he situation in relation to the other countries. Also Australia improved the situation, but remember that Australia's commitments started in $2007$, so for this analysis we cannot take Australia as a Kyoto country.

Non-committed countries like Mexico or Brazil improved their situation, while other non-committed countries like China or India worsened their situation.

b) Intensity

We know already the variable for the carbon intensity int_imp. For simplicity, in the new dataset is again a variable with the logarithm of the carbon intensity lint.

Take a look at the model for the carbon intensity. To get the influence of the Kyoto Protocol to the carbon intensity of the imports the same variables like in the regression for the quantity of the imports could be helpful. Then the regression for the carbon intensity of imports looks like:

$$\textrm{lint}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \beta_4 \cdot \textrm{eu}_{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$ and $m,x \in {1,...,40}$ and $m \neq x$

Task: Now make an estimation with the function felm() from the package lfe for the variable for the carbon intensity lint, similar to the regression for limp. The fixed effects are again the variables sid, year, importer and exporter and use the dataset dat.

#...=felm(...~... | sid+..., data=dat)

Task: Show the summary statistic of felm_int with the stargazer() function, use the type html and omit the variable year, you just have to press the check button.

stargazer(felm_int, type="html", omit="year", omit.labels="Year Dummies")


We have a value for dk with $2.9\%$. This means, that for a higher value of $1$ in the variable dk leads to a higher carbon intensity of the imports of $2.9\%$.

Also very interesting is here, that the GDP of the importer country is indeed significant but very small in comparison to the model for the quantity of imports. The reason is here, that only the technical development of the exporter country is important for the carbon intensity of the imports of a country. And with a higher GDP the country has more opportunities and have more money to reach such a technical development. So the GDP of the importer country has only a small influence on the carbon intensity of the imports but a very great influence on the quantity of the imports. We want to see again the differences of the means from the period before and the period after the signing of the commitment in the different values for the variable dk.

Task: Plot again the changes in the means of the carbon intensity, using the function changes(). Remember you need quotation marks around lint and use the dataset dat. Store it under p2 and show it.

#enter your code here

# enter your code here

This plot is saved under p2. We can see, that the emission intensity decrease over years, but it decrease slower for a high value in dk. When only the importer country is under Kyoto, then the decrease of the carbon intensity of the imports is smaller than otherwise. The decrease is biggest, if both countries are under Kyoto or no country is under Kyoto. But it is only a small difference to the case where only the exporter is under Kyoto. In the first two cases the decrease is over $50\%$ and for the case where only the importer is under Kyoto we have a decrease of over $35\%$, so there are big differences between these cases.

Task: Group the dataset dat1 by the importer country and generate the means of the carbon intensity of the imports, store the means under val and the complete dataset under intensity1

#...=dat1%>%
#   group_by(...)%>%
#   summarise(val=...)

Task: Plot the world map with the situation before the Kyoto Protocol with the function map4col() and the dataset intensity1.

# ...(..., "Carbon intensity before Kyoto")

To compare the situations we should group also the second dataset by the importer country and generate the means of the carbon intensity of the imports.

Task: Group the dataset dat2 by the importer countries and summarise the means of the carbon intensity of the imports. Store the means under val and store the complete dataset under intensity2.

#...=dat2%>%
#   group_by(...)%>%
#   summarise(val=mean(...))

Task: Plot again the world map from the situation after the start of the Kyoto Protocol with the function map4col() and the dataset intensity2.

# ...(..., "Carbon intensity after Kyoto")

Germany is in both cases again red, so the carbon intensity of the German imports is in both periods very high, also the other countries of Europe don't look good, there is a lot of red. But our second example country China looks very good.

Many Kyoto countries worsened their situation in relation to the other countries. For example Canada, France or Greece are such countries. Also for the carbon intensity is an exception, Poland improved their situation.

Non-committed countries like the United States improved their situation, other non-committed countries like Brazil worsened their situation.

So we can see that most of the Kyoto-committed countries are already red in period $1$, or worsened their situation after the start of the Kyoto commitments.

c) Content

We already know the variable for the carbon emissions embodied in imports, BEIM. In the new dataset is again a variable for the logarithm of the carbon emissions embodied in imports, lbeim.

The regression for the carbon content of the imports includes the same variables: $$\textrm{lbeim}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \beta_4 \cdot \textrm{eu}_{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

Task: Do again the regression for the carbon content lbeim, use the function felm() from the package lfe, use sid, year, importer and exporter as fixed effects and use the dataset dat.

#...=felm(...~... | sid+..., data=dat)

Task: Show the summary statistic of felm_beim with the stargazer() function, use the type html and omit the variable year, you just have to press the check button.

stargazer(felm_beim, type="html", omit="year", omit.labels="Year Dummies")


We have a significant value for dk with $9.9\%$. This means that a higher value of $1$ in the variable dk would lead to higher bilateral emissions embodied in imports of $9.9\%$. Here, the variable lgdpx for the GDP for the exporter country is not significant any more. So the GDP of the exporter has only a significant influence on the quantity of imports and on the carbon intensity of imports, but not on the bilateral emissions embodied in imports. But the GDP of the importer country has a very big, significant influence on the carbon content, but not on the carbon intensity. We want to look again at the differences in the means of the period before and after the signing of the commitment in the different values of dk.

Task: Plot now the changes of the bilateral emissions embodied in imports with the function changes() and the dataset dat, store it under p3 and show the plot.

#enter your code here

# enter your code here

The plot is saved under p3. The differences here, are really big. Again, if only the importer country is under Kyoto, then the increase of the carbon content of the imports is the biggest one. The red line is again the regression line from our estimation. Here we have a decrease if only the exporter is under Kyoto. This seems reasonable, because these countries are committed and want to reduce their carbon emissions. If only the importer is under Kyoto, then we have an increase of carbon content in the imports of over $40\%$, in the first case we have a value of over $-10\%$. This is a real big difference.

Task: Again, we want to plot the world map. For this we need to group the dataset dat1 by the importer country and generate the means of the carbon content, store the means under val and the complete dataset under content1.

# ...=dat1%>%
#   group_by(...)%>%
#   summarise(val=...)

Task: Plot the world map from the situation before the Kyoto Protocol about the carbon content of the imports with the function map4col() and the dataset content1.

# ...(..., "Content before Kyoto")

Task: Group the second dataset dat2 by the variable importer and summarise the means of the carbon content, store the means under val and the complete dataset under content2.

# ...=dat2%>%
#   group_by(...)%>%
#   summarise(val=...)

Task: Plot the world map with the situation after the start of the Kyoto Protocol with the function map4col() and the dataset content2.

# ...(..., "Carbon content after Kyoto")

Germany is again in both situations red. So the carbon content of German imports is consistent. The situation of the second example country China worsened.

Some Kyoto countries improved their situation in relation to other countries. Such countries are Sweden, Portugal or Italy. But the main reason for this is the higher carbon content of the imports in Kyoto countries, which was already red in the situation before, like Germany. A Kyoto country which worsened the situation is for example Russia.

Also some non-committed countries worsened their situation like South Africa or China.

d) Antweiler Variable

There is another variable which could be interesting, it is the Antweiler variable: $$\textrm{ant} = \frac{\frac{BEEX}{exp}}{\frac{BEIM}{imp}}$$ in $t$ of $CO_2$ per US Dollar.

In the new dataset is again an extra variable for the logarithm of the Antweiler variable lant. This is a variable about the share of the carbon content of the exports of a country compared with the share of carbon content of the imports of the country. A big value for ant means, that we have more carbon content in the exports of the country than in the imports. So the country produce many carbon-intensive products and export them in other countries. A small value for ant means, that the country imports more carbon intensive products than they produce. So they need to import the carbon intensive products from other countries. The regression for this variable is a little bit different, because the transnational variables are not interesting for the value of this variable. So we can leave the indicator variables wto, fta and eu out:

$$\textrm{lant}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

! addonquizExpectation


Let us test the influence of the Kyoto commitments to the Antweiler variable.

Task: Estimate the influence of the Kyoto Protocol to the variable lant with the function felm() of the package lfe but without the variables wto, fta and eu. The fixed effects are sid, year, importer and exporter and use the dataset dat.

#...=felm(...~... | sid+..., data=dat)

Task: Show the summary statistic of felm_ant with the stargazer() function, use the type html and omit the variable year, you just have to press the check button.

stargazer(felm_ant, type="html", omit="year", omit.labels="Year Dummies")


How we expect, the value for dk is negative and has an influence of $-5.8\%$ again with a high significance. This means that with a one unit greater value of dk the share of carbon exports would decrease for $5.8\%$ relative to the carbon imports. Here is also interesting, that we have less observations than before. The reason is, that we have some gaps in the dataset, where the values for this variable are not available. So before we can plot our results, we need to delete the cases where some values are not available to generate the means. This is also a part in the given function changes().

Task: Plot again the changes in the Antweiler variable lant after the Kyoto Protocol with the given function changes() and the dataset dat. Store it under p4 and show the plot.

# enter your code here

# enter your code here

This is very interesting. If only the exporter is under Kyoto, then we have an increasing in lant. This make sense, because then the importer country isn't under Kyoto and can easy produce the carbon-intensive products on their own. But if only the importer is under Kyoto, then the value for lant is decreasing, this makes also sense, because then the importer have to import many of the carbon-intensive products. And for the case when both countries are committed or no country is committed we have no change. The reason is, if both countries are committed then both countries have to reduce their carbon emissions and if no country is under Kyoto, then both can produce the carbon-intensive goods on their own.

Task: Group the dataset dat1 by the importer country and summarise the means of the Antweiler variable, store the means under val and the complete dataset under antweiler1. First we have to delete the rows with values which are not available.

#dat1=filter(dat1, ant!=\"NA\")
# ...=dat1%>%
#   group_by(...)%>%
#   summarise(val=...)

Task: Plot the world map with the Antweiler variable from the situation before the Kyoto Protocol with the function map4col() and the dataset antweiler1.

# ...(..., "Antweiler variable before Kyoto")

Task: Group the dataset dat2 by the importer country and summarise the means of the Antweiler variable, store the means under val and the complete dataset under antweiler2, first you have to delete the non-available values from the dataset.

#dat2=filter(...)
#...=dat2%>%
#   group_by(...)%>%
#   summarise(val=...)

Task: Plot again the world map with the function map4col() and the dataset antweiler2.

# ...(..., "Antweiler variable after Kyoto")

The colour green stands for more carbon content in the imports in relation to the carbon content of the exports. Germany is in both situations yellow. Other committed countries like Spain, United Kingdom, Finland or Japan have now more carbon content in their imports than in their exports. Since they are committed, they need to import more carbon-intensive goods, now. Non-committed countries like Chile or New Zealand can export more carbon intensive goods, since they are not committed and can produce many of the carbon-intensive goods on their own.

For better interpretations we want to show the four bar plots together. For this we need the function grid.arrange() from the package gridExtra

Task: Show all plots p1, p2, p3 and p4 at the same time with the function grid.arrange() from the package gridExtra() in two rows.

#enter your code here

We see that the status of dk has a real great influence on all of these four variables. We can see that the quantity of the imports is in all cases increasing, the reason is that trade in general is increasing. But for small values of dk, the quantity of imports are lower increasing than for higher values of dk. The carbon intensity of these imports are decreasing. But it is lower decreasing for high values of dk. The carbon content has a real high influence. For dk equal to $-1$, we have a decrease in the bilateral emissions embodied in the imports. But for a high value of the dk we have a real higher increase in the carbon content of the imports. The last one is the Antweiler variable. That's really interesting. For values of dk smaller than zero, we have an increase in the Antweiler variable, but for a value of dk equal to one, we have a decrease. And in all regressions the variable dk has a high significant influence on the location of the carbon emissions. So we can say that with these regressions there is a high significant influence through the Kyoto Protocol on the quantity of imports, the carbon intensity of the imports and on the bilateral emissions embodied in imports. In the next exercise we try to look at the mathematical background and analyse whether it is possible, that the Kyoto Protocol affected the location of carbon emissions.

So all in all we can say that there is an effect of carbon leakage. We can compare this result with some ex ante studies. Ex ante studies have real different results, like a leakage rate between $5\%$ and $20\%$ from Barker et al. (2007) till $130\%$ from Babiker (2005), Babiker also estimated a global increase in carbon emissions. Our study shows, that we also have a moderate leakage rate, the result is more likely the result of Barker et al.

We saw that carbon leakage after the Kyoto Protocol is a big problem. Some countries tried to react and considered some different activities against carbon leakage. These activities were again decentralised. And so the decentralised activities also failed. If you want to know more about these activities you can take a look at Antimiani et al. (2013). They say, that only a central, global activity would be useful. All of the decentralised activities failed.

Exercise 4 -- Mathematical Background

With these fixed effects regressions for panel data we have some insights to the influence of the Kyoto Protocol on the quantity of the imports, on the carbon intensity of the imports, on the carbon content of these imports and on the Antweiler variable. Now we want to go further with our analysis. This chapter is only for the theoretical background, if you are not interested in, you can skip this exercise and start with exercise $5$, which is about some improvements of the model.

The goal of this exercise is to analyse, whether stricter climate policies, here the Kyoto Protocol, can affect the imports and the carbon content of these imports. We will develop a model for indirect bilateral trade in $CO_2$ emissions for domestic and foreign goods, too. We want to develop such an equation for the carbon content of the imports and decompose it into scale and technique effects.

To analyse carbon leakage with bilateral trade through stricter climate policies it is important to know the mathematical background of bilateral trade. We will start with the perspective of the consumer, then with the perspective of the firms. With these two perspectives it is possible to get an equation for the quantity of imports and then also for the carbon content of these imports. This formula can be decomposed into different effects, scale and technique.

Exercise 4.1 -- Consumers

Let`s start with the perspective of the consumers. We will develop an equation for the overall utility of the consumer. The consumers can differentiate between two different kinds of goods, a manufacturing good and a homogenous good. The manufacturing good is a Cobb-Douglas composite of goods $M^s_i$ from different sectors. If you want to know more about Cobb-Douglas you can click on the info box below. - $i,j,k=1,...,K$ are the indexes for the countries. In our dataset $K=40$ - $M_i$ is the manufacturing good in country $i$ - $H_i$ is the homogenous good in country $i$ - $s=1,...,S$ are the different tradeable sectors, in our dataset $S=12$

info("Cobb-Douglas") # Run this line (Strg-Enter) to show info

Now we can give a first formula for the overall utility of the consumer country $i$:

$$U_i=(H_i)^{(1-\omega)} \cdot (M_i)^\omega$$

This is the overall utility from both goods and $\omega \in (0,1)$. The size of $\omega$ depends on the share of homogenous and manufacturing goods, respectively. But there are different manufacturing goods from different sectors. So we can give a formula for the manufacturing goods with the help of Cobb-Douglas.

$$M_i=\prod^S_{s=1}(M^s_i)^{\mu^s}$$

The manufacturing goods are domestic as well as imported. So we need a formula for the manufacturing goods in the different sectors with respective varieties in the different countries and respective asked quantities.

$$M^s_i=\sum^K_{j=1} N^s_j \cdot (q^s_{ij})^{\frac{\sigma^s-1}{\sigma^s}}$$

info("Elasticity of Substitution") # Run this line (Strg-Enter) to show info

Dual to the manufacturing goods $M_i$, it could be helpful to look at the price index for country $i$. Here it is again important to differentiate over sectors, $\mu^s$ is again the expenditure share.

$$\Pi=\prod^S_{s=1}(P^s_i)^{\mu^s}$$

There are again domestic as well as imported goods, here domestic as well as imported prices for the goods.

$$P^s_i=(\sum^K_{j=1}N^s_j\cdot(p^s_{ij})^{(1-\sigma^s)})^{\frac{1}{1-\sigma^s}}$$

$p^s_{ij}$ is the required price from country $j$ to $i$ in sector $s$.

$$p^s_{ij} = \tau^s_{ij} \cdot p^s_j$$

info("iceberg trade cost factor") # Run this line (Strg-Enter) to show info

So we have complete formulas for the overall utility of the consumer in country $i$ over all sectors with domestic as well as imported goods, in the first case with the manufacturing goods and in the second case with the price index of the manufacturing goods.

$$U_i = H_i^{1-\omega} \cdot (\prod^S_{s=1}(\sum^K_{j=1}N^s_j \cdot (q^s_{ij})^{\frac{\sigma^s-1}{\sigma^s}})^{\mu^s})^{\omega}$$

$$U_i = H_i^{1-\omega} \cdot (\prod^S_{s=1}((\sum^K_{j=1}N^s_j \cdot (\tau^s_{ij} \cdot p^s_j)^{1-\sigma^s})^{\frac{1}{1-\sigma^s}})^{\mu^s})^{\omega}$$

! addonquizFormula 1

Exercise 4.2 -- Firms

To analyse the effect of stricter climate policies to carbon leakage we need to look at the perspective of the firms to understand the actions of the firms. We will analyse the costs of the firms, want to maximize their profits, look on the optimal price of the goods and then get a formula for the optimal size of the firm.

The homogenous goods $H_i$ acts here like the numeraire. It can be consumed or used as an input like fuel. We assume that these homogenous goods are produced under perfect competition from labour in every of our $40$ countries and are freely tradeable. Since we have perfect competition the wage rates are equalized to unity, $w_i=1$. Also the output of the homogenous goods has a constant productivity of $1$.

In each sector are an endogenous number of symmetric firms. Each firm produces a distinct variety. To get the minimum costs of the firm we need a cost function $c_i[\Pi_i,b_i,w_i]$ which depends on the price index for the manufacturing goods, the wage rates and a variable for the fossil fuel.

So the overall costs from a firm in country $i$ and sector $s$:

$$C^s_i = c^s_i[\Pi_i,t_i,1] \cdot y^s_i + f^s$$

Now we have a formula for the total costs of the firm. Then we get a formula for the profits or utility of the firm:

$$U_i = (p^s_i-c^s_i[...]) \cdot y^s_i - f^s$$

According to Game Theory, a firm wants to maximize their profits. If you want to know more about Game Theory and the derivation of this formula you can take a look at Gibbons. Maximizing of the formula for the profit leads to this optimal price:

$$p^s_i=\frac{c^s_i \cdot \sigma^s}{\sigma^s-1}$$

Remember, we assumed that we have perfect competition and free entry into the market, so this forces in equality profits of zero. With these profits of zero we get a formula for the perfect size of the firm in country $i$ and sector $s$:

$$\bar{y}^s_i=\frac{(\sigma^s-1) \cdot f^s}{c^s_i}$$

! addonquizformula 2

Exercise 4.3 -- International trade flows

Now we want to get a deeper insight into the international trade flows. Is it possible that a stricter climate policy like the Kyoto Protocol influences these trade flows. If it can be influenced, how can it be affected? We want to look at the demand structure of the importer country and on the optimal quantity of the imports in country $i$.

Because of clarity we will suppress the index $s$ for the sectors whenever possible. Now we look at a two countries case with an importer and an exporter country. The importer country is indexed with $m$ and the exporter country with $x$. The importer country $m$ wants to maximizes his utility. This leads to a demand structure on varieties from country $x$ as a consumer.

$$d_{mx}=N_x \cdot \frac{\mu \cdot \omega \cdot L_m}{P_m} \cdot (\frac{p_{mx}}{P_m})^{-\sigma}$$

The differentiated goods are also used for inputs in the production. So firms have the same demand structure like the consumers but with one additional assumption. The cost function of the firms is a Cobb-Douglas composition of intermediates and fuel.

$$c_i[\Pi_i,t_i,1] = \Pi_i^{\alpha} \cdot t_i^{\beta}$$

So all in all we get a theoretical gravity equation for the quantity of country $m$'s total sectoral imports from country $x$.

$$Q_{mx} = Z \cdot (1+g_m) \cdot L_m \cdot (P_m)^{(\sigma-1)} \cdot N_x \cdot (c_x[...])^{-\sigma} \cdot (\tau_{mx})^{-\sigma}$$

This formula has some differences to the first equations. $Q_{mx}$ is the quantity of bilateral trade and not the value, so the exponent on trade costs is $-\sigma$ and not $(1-\sigma)$. $g_m$ is a trade multiplier. It accounts for trade in intermediates and increases in the cost share of the final good. The trade multiplier $g_m$ also reflects the comparative advantage in dirty versus clean goods production.

In this formula we can see, that stricter climate policies can affect the imports in country $m$ from country $x$. The quantities directly depends on the market and the supply capacity of the importer and exporter respectively. Stricter climate policies, like the Kyoto Protocol in our case, for a country, leads to more production and more exports of the homogenous clean goods. So the supply capacity of the manufacturing goods is decreasing and the market capacity for the manufacturing goods is increasing. So also stricter climate policies of the trade partners will affect the quantities of imports in the country without the change in climate policy.

The model is closed with $S$ goods market clearing conditions in each country $i$, which leads to the optimal size of a firm: $$\bar{y}i = \frac{(\sigma - 1) \cdot f}{c_i} = \sum^K{m=1} (1+g_m) \cdot \frac{\mu \cdot \omega \cdot L_m}{P_m} \cdot (\frac{p_{mi}}{P_m})^{-\sigma} \cdot \tau_{mi}$$ with $i=1,...,K$

This formula shows, that the supply of a variety has not only to equal its demand. It also has to equal the trade costs from all importing countries.

! addonquizformula 3

Exercise 4.4 -- The carbon content of bilateral trade

We have a formula for the quantity of the imports and know, that the climate policy can affect these quantities. But now we want to get a formula for the carbon content of the imports. Do the climate policy also affect the carbon content of the imports?

In this part we want to empirical analyse whether the carbon policies affect the location of emissions. In our case, have the Kyoto Protocol affected the location of the emissions? We will analyse it with the help of bilateral trade of goods.

Sectors are linked between Input-Output (I-O) linkages. First we need to understand the carbon content of trade, i.e. the quantity of $CO_2$ which is embodied in the trade flows of a country. Upstream sectors produce intermediates and sell them to other firms, direct sectors produce the final product. Empirically, the carbon emissions of the upstream markets are often very greater than the carbon emissions of the direct ones. But some upstream market products often cannot be traded international, like the market for electricity. But this market is very carbon intensive.

To understand the quantity of $CO_2$ in the trade flows of a country, we differentiate between two accounting methods.

The SRIO approach uses the I-O-table $B_x$ of the exporter in dimension $S \times S$. The input requirements of the importer are calculated with the Leontief inverse:

$$A_x = (I-B_x)^{-1}$$

The MRIO approach uses a multi-regional I-O-table $B$ with dimension $K \cdot B \times K \cdot B$. The elements of this matrix are bilateral I-O-matrices $B_{ij}$. These matrices records country $j$'s usage of intermediate goods supplied from country $i$. The main difference of these two methods is the dimensionality of the input requirement matrix.

Now we can develop a formula for the $CO_2$ content in imports of country $m$ from country $x$.

$$E^s_{mx} = \eta^s_x \cdot Q^s_{mx}$$

So with the equation for the quantity of the imports we get two new complete equations for the carbon content of these imports, the first one equation for the SRIO approach and the second one for the MRIO approach.

$$E^s_{mx} = e^s_x \cdot A^s_x \cdot \mu \cdot \omega \cdot (\frac{\sigma-1}{\sigma})^{\sigma} \cdot (1 + g_m) \cdot L_m \cdot P_m^{\sigma - 1} \cdot N_x \cdot (c_x[...])^{-\sigma} \cdot \tau^{-\sigma}{mx}$$ $$ E^s{mx} = e^s \cdot \tilde{A}^s_x \cdot \mu \cdot \omega \cdot (\frac{\sigma - 1}{\sigma})^{\sigma} \cdot (1 + g_m) \cdot L_m \cdot P_m^{\sigma - 1} \cdot N_x \cdot (c_x[...])^{-\sigma} \cdot \tau^{-\sigma}_{mx}$$

So we can see that stricter climate policy affects also the carbon content of trade through the emission intensities $\eta_x$ and $\eta_m$, the market and supply capacity like in the part before and also on the intermediates multiplier. Through these mathematical background we can say, that climate policy affect the quantity of the imports and also the quantity of $CO_2$ in the imports.

The MRIO approach is required if you are interested in the complete carbon footprint of a country. But the authors in this paper preferred the SRIO approach. The reason is, that a change in $CO_2$ content of trade affects only the emissions of the trade partners. So the SRIO approach allows a conclusion on the amount of direct and upstream emissions relocated to a trade partner, if country $i$ strengthens its climate policy, so this is useful to show carbon leakage.

The biggest disadvantage from the MRIO approach is that effects in the trade partner countries, cannot easily disentangled from other effects in third countries. But the SRIO approach ignores the fact, that stricter climate policy of a country $i$ also affects the purchase behaviour of the trade partners and other countries. But this also affects the location of the carbon emissions. For this reason we will analyse also the MRIO approach in Exercise $6$.

! addonquizformula 4

Exercise 4.5 -- Climate policy and the CO2 content of bilateral trade

Now we want to decompose the sectoral effect of environmental policy in the presence of bilateral trade into two terms:

Both effects are affected by domestic as well as foreign carbon taxes. If we use the SRIO approach and neglect third effects we can get an estimator for the carbon content of the imports.

$$\hat{E}{mx} = \kappa{(\eta,m)} \cdot \hat{t}m + \kappa{(\eta,x)} \cdot \hat{t}x + \kappa{(Q,m)} \cdot \hat{t}m + \kappa{(Q,x)} \cdot \hat{t}_x$$

The first two parts are the technique effects, and the last two parts are the scale effects.

It is not possible to find a solution for the elasticities in the estimator for the $CO_2$ quantities in the imports because we would need to solve for the number of varieties $N_i$ in the equation for the optimal size of a firm. But in a special case of no intermediate products, this means no transition countries and the cost share $\alpha$ is zero, we can analyse the expressions for the scale and technique effects. The cost function of a firm only depends on the domestic climate policy.

$$c_x[...]=t^{\beta}_x$$

We can write a formula for the emission intensity in the special case with no transition countries. We will analyse this special case with no transition countries also in Exercise $7$. Remember that $\alpha$ is equal to zero and we only have direct imports.

$$\eta_x = e_x = \beta \cdot (t_x)^{\beta-1}$$

With these simplifications in the special case in the equation for the quantity of imports $Q_{mx}$, the bilateral trade volume is $$Q_{mx} = (\frac{\sigma - 1}{\sigma})^{(\sigma + 1)} \cdot \mu \cdot \omega \cdot L_m \cdot (\tau_{mx})^{-\sigma} \cdot (t_x)^{-\beta} \cdot (\sum_j \phi_{mj} \cdot \frac{F_j}{F_x})^{-1}$$

The trade volume directly depends on the exporter's carbon tax $t_x$ with an exponent of $-\beta$. Climate policy of all countries enters through the last term. It is a measure of the exporter's centrality, which is size-, distance-, and cost-weighted, relative to all countries. A change in the climate policy of a country affects its costs and therefore its proximity to other countries.

The technique and scale elasticities of carbon taxes in the importer and the exporter countries are given by $$\kappa_{(\eta,m)}=0$$ $$\kappa_{(Q,m)}=\frac{\beta \cdot (\sigma - 1) \cdot F_m - \sum_j \phi_{mj} \cdot F_j \cdot \kappa_{(\lambda,m)}}{\sum_j \phi_{mj} \cdot F_j}$$ $$\kappa_{(\eta,x)}=-(1-\beta)<0$$ $$\kappa_{(Q,x)}=-\sigma \cdot \beta - \frac{\sum_j \phi_{mj} \cdot F_j \cdot \kappa_{(\lambda,x)}}{\sum_j \phi_{mj} \cdot F_j}$$

For better understanding, let`s take a look at some examples:

  1. The importer country $m$ releases a carbon tax and the exporter country stays inactive, in our case the importer country is committed under Kyoto and the exporter country not. From Exercise $3$ we expect more imports and also more emission content in these imports. I.e. $i=m$, $\hat{t}m>0$, $\hat{t}_x=0$, if we assume that a country which is not committed under Kyoto has no carbon taxes, which is a hard assumption. Here is no technique effect, since the carbon taxes of country $m$ does not have any price effect in country $x$, so $\kappa{(\eta,m)}=0$. The sign of the scale effect $\kappa_{(Q,m)}$ depends on the effect of increased costs in country $m$ and on $x$'s relative proximity, which depends on all bilateral trade costs. In the two country case, country $x$ increases the share of varieties it produces and so increases the competitiveness in manufacturing goods, so the imports $Q_{mx}$ increase and so $\kappa_{(Q,m)}>0$

  2. Now the exporter has carbon taxes, which means the exporter country is committed under Kyoto and the importer stays outside and has no carbon taxes, $i=x$, $\hat{t}x>0$ and $\hat{t}_m=0$. The carbon imports of country $m$ from country $x$ decreased by the technique effects, since $x$ lowers its carbon intensity with an elasticity of $\kappa{(\eta,x)}=-(1-\beta)<0$. The sign of the scale effect $\kappa_{(Q,x)}$ is also ambiguous. But in the two country case with $\hat{t}x>0$, then the scale effect $\kappa{(Q,x)}<0$ is negative, since country $x$ loses competitiveness and the volumes of its sales falls.

Summarizing we saw, that stricter climate policies like the Kyoto Protocol affect the quantity of imports $Q_{mx}$ and also the $CO_2$ content of the imports $E_{mx}$ and also the carbon intensity of the imports $\eta$. So we expect that the carbon content of imports increases if the importer is committed under Kyoto and decreases if the exporter is committed. The higher the elasticities of substitution $\sigma$ and the higher the carbon intensity of a sector $\beta$, the stronger is the reaction to stricter climate policy in the carbon content of trade. But don't forget, that these predictions are made under strong assumptions.

! addonquizformula 5

We saw that the estimation of the carbon content of the imports $\hat{E}_{mx}$ is dependent on the elasticities $\kappa$ for the quantity and intensity for the exporter and importer country. Now we want to compute these elasticities $\kappa$ in our dataset. First we need to read in the dataset again.

Task: First we need again to load our dataset logtrades.rds. Load it again with the function readRDS() and store it under the variable dat.

#enter your code here

We want to compute the $\kappa$ in our regressions for the quantity of the imports and on the carbon intensity of the imports. But we have different kinds of $\kappa$ not only for the quantity and intensity, we have different kinds also for the importer and the exporter country. So it is not sufficient to estimate the effect of the Kyoto Protocol on the quantity and the intensity, now we need the particular status of the exporter and the importer country, respectively. So we need the variables kyotom and kyotox and estimate the effect with the first option of Exercise $2$. Then this is the new regression for the quantity of the imports $Q_{mx}$: $$\begin{eqnarray} \textrm{limp}{j,s} = \alpha_1 \cdot \textrm{kyotom}{j,s} + \alpha_2 \cdot \textrm{kyotox}{j,s} & + & \beta_2 \cdot \textrm{lgdpm}{j,s} + \beta_3 \cdot \textrm{lgdpx}{j,s} + \beta_4 \cdot \textrm{fta}{j,s} + \beta_5 \cdot \textrm{wto}{j,s} + \beta_6 \cdot \textrm{eu}{j,s} \\ & + & \beta_7 \cdot \textrm{mrdis}{j,s} + \beta_8 \cdot \textrm{mrcon}{j,s} + \beta_9 \cdot \textrm{mrcom}{j,s} + \beta{10} \cdot \textrm{mrwto}{j,s} \\ & + & \beta{11} \cdot \textrm{mrfta}{j,s} + \beta{12} \cdot \textrm{mreu}_{j,s} + \varepsilon \end{eqnarray}$$ with $j \in {1,...,13}$ and $s \in {1,...,18720}$

Task: Estimate the impact of the Kyoto status from the exporter and importer country, respectively, with the function felm() from the package lfe, the fixed effect are here only the variables sid and year and use the dataset dat. Store it under felm_imp.

# ...=felm(...~...+mrdis+mrcon+mrcom+mrwto+mrfta+mreu | sid+year, data=dat)

Task: Show the summary statistic of felm_imp with the stargazer() function, use the type html and omit the variable year, you just have to press the check button.

stargazer(felm_imp, type="html", omit="year", omit.labels="Year Dummies")


Now we can see how the status of the importer and the exporter country affect the quantity of the imports, respectively. The impact of the status of the importer country is strong significant with a small positive influence of $2.2\%$. The status of the exporter country is strong significant with a negative influence of $-9.8\%$. These values are the overall elasticities. We want to get the elasticities for scale and technology. We know that the technology effect is part of the intensity, so let's have a look on the estimation of the impact of the Kyoto status on the carbon intensity. The regression for the carbon intensity $\eta$:

$$\begin{eqnarray} \textrm{lint}{j,s} = \alpha_1 \cdot \textrm{kyotom}{j,s} + \alpha_2 \cdot \textrm{kyotox}{j,s} & + & \beta_2 \cdot \textrm{lgdpm}{j,s} + \beta_3 \cdot \textrm{lgdpx}{j,s} + \beta_4 \cdot \textrm{fta}{j,s} + \beta_5 \cdot \textrm{wto}{j,s} + \beta_6 \cdot \textrm{eu}{j,s} \\ & + & \beta_7 \cdot \textrm{mrdis}{j,s} + \beta_8 \cdot \textrm{mrcon}{j,s} + \beta_9 \cdot \textrm{mrcom}{j,s} + \beta{10} \cdot \textrm{mrwto}{j,s} \\ & + & \beta{11} \cdot \textrm{mrfta}{j,s} + \beta{12} \cdot \textrm{mreu}_{j,s} + \varepsilon \end{eqnarray}$$ with $j \in {1,...,13}$ and $s \in {1,...,18720}$

Task: Estimate the impact of the Kyoto status of the importer and exporter country on the carbon intensity of the imports with the function felm(), the fixed effect are the variables sid an year and use dataset dat. Store it under felm_int.

#...=felm(...~...+mrdis+mrcon+mrcom+mrwto+mrfta+mreu | sid+year, data=dat)

Task: Show the summary statistic of felm_int with the stargazer() function, use the type html and omit the variable year, you just have to press the check button.

stargazer(felm_int, type="html", omit="year", omit.labels="Year Dummies")


Here, the status of the importer country isn't significant any more. The technical progress of the importer country isn't really important for the carbon intensity of the imports. It is only important for the exporter country. The status of the exporter country is very significant with a negative influence of $-7.8\%$. These are directly the technique effects for the estimation of the carbon content. We can say that $\kappa_{\eta,x} = -0.08$ is the elasticity for the technique effect of the exporter country. The effect of the importer country is not significant, so we can say that $\kappa_{\eta,m} = 0$. So with the overall effect on the quantities we can compute the scale effects.

Task: Compute the scale effects for the importer countries. Remember the overall effect consists of the technique and the scale effect. Store the results under kappaQm.

# enter your code here

# enter your code here

So we can see that the scale effect $\kappa_{Q,m}$ is equal to $0.0222$. So we have a positive impact of $2.22\%$.

Task: Compute now the scale effect of the exporter countries and store it under kappaQx and show the result.

# enter your code here

# enter your code here

The scale effect $\kappa_{Q,x}$ is $-0.0196$. So there is a negative influence of $-1.96\%$. Remember the estimation formula for the carbon content:

$$\hat{E}{mx} = \kappa{(\eta,m)} \cdot \hat{t}m + \kappa{(\eta,x)} \cdot \hat{t}x + \kappa{(Q,m)} \cdot \hat{t}m + \kappa{(Q,x)} \cdot \hat{t}_x$$

Now we can insert the computed values into this formula:

$$\hat{E}_{mx} = 0 \cdot \hat{t}_m - 0.0782 \cdot \hat{t}_x + 0.0222 \cdot \hat{t}_m - 0.0196 \cdot \hat{t}_x$$

The Kyoto commitments are like carbon taxes for stricter climate policy. The higher the carbon taxes of the exporter $x$ are, here if the exporter is committed under Kyoto, the smaller are the carbon content of the imports in country $m$ from this exporter country $x$. The reason are technical and scale effects. Committed exporter countries try to produce less carbon intensive products and then they cannot export so many carbon intensive products. And on the other side they try to update their technology to produce with less carbon emissions through better technology. So we have technique and scale effects from the exporter country.

For the importer country we only have scale effects. This make sense, since own technical progress doesn't influence the carbon content of the imports. There is only a scale effect. The higher the carbon taxes are, here the commitment under Kyoto, the higher are the carbon content of imports. The importer country also tries to update the technology, but this has no significant influence on the carbon content of the imports. Higher carbon taxes lead to less production of carbon intensive goods and so to more imports of such goods.

Exercise 5 -- Improvements of the Model

In this Chapter we want to improve our estimations on the effect of the Kyoto Protocol by taking a look at only the interesting cases. The bilateral trade between two committed countries or the trade between two non-committed countries isn't really interesting to show the effect of carbon leakage. So we want to look only at the cases where exactly one country is committed, the exporter or the importer country. But we should not forget that some developed countries, which are not under Kyoto, tried to reduce their carbon emissions, too. So it could be helpful to take such countries also into the regression.

In the second part, we will look at the special case from the United States. the United States didn't sign the commitments but also tried to reduce their carbon emissions. We will take the United States as an additional Kyoto Country.

Another idea could be to exclude the trades with China, since they had massive increases in exports and imports. China is a net exporter of carbon. But the imports are more polluting. If you want to know more about the effect of the Kyoto Protocol to China you can take a look at He and Fu (2014). In this study they compared the trade of $16$ manufacturing sectors in China from $1996 - 2004$ with the most important international trade partners Japan, the United States and the European Union. They examine the reason for the enormous increase in exports of China. They conclude that only with the trade of the European Union, the carbon intensity has an influence. So there is an influence of the Kyoto Protocol with the trade to the EU. But they estimated no significant influence on carbon emissions to the trade with Japan and the United States. They estimated that the significant factor for the increase of exports would be in the labour-intensive sectors. They say, that the main reason for the surplus of carbon emissions would be the current international production division, which is organized with little consideration for the environmental performance of the producers in different countries.

Since the main reason for the increase in exports is in the labour-intensive sectors, we won't do this part in the Problem Set. But I can say, that such an analysis also supports the findings from Exercise $3$.

Exercise 5.1 -- One Kyoto Country

Task: First we need again to load our dataset logtrades.rds. Load it again with the function readRDS() and store it under the variable dat.

#enter your code here


Now we want to reduce our dataset to these special cases. The developed countries, which could be helpful, are the United States USA, Australia, Israel and South Korea. Australia is indeed a Kyoto country, but started $2007$, so all in all we need to take Australia separately into the new reduced dataset. Remember that the variable dk is equal to zero, until the year $2001$, so we need again the variables expin, impin, bothin and nonein for only the exporter is committed under Kyoto, only the importer is committed under Kyoto, both countries are committed or no country is committed, respectively. In the original dataset from the authors was a little mistake. The variables expin and impin were equal. But when we look at the description of these variables, then this cannot be true. Here we work with updated values. This is also a reason, that in this Problem Set are a little bit different results, but the trend is the same.

Task: Use again the function filter() from the package dplyr to create a subset of our dataset dat where only the exporter is under Kyoto (expin is equal to one) or only the importer is under Kyoto (impin is equal to one) or no country is under Kyoto (nonein is equal to one) but one of our four developed countries take trade. This means that the exporter and/or the importer is one of the four countries. (importer or exporter should be equal to USA, Australia, Israel or South Korea) and store the resulting subset under dat_USA and compute the number of observations of this subset with the fuction length() and the column dk.

#...=filter(dat, ... | ... | (dat$nonein==1 $ (dat$importer=="USA" | dat$importer=="Australia" | dat$importer=="Israel" | dat$importer=="South Korea" | dat$exporter==... | ... | ...)))

# length(...)

Here we can see directly, that we deleted over $100$ thousand observations, which seems to be not very interesting to get the effect of the Kyoto Protocol through bilateral trade, since the deleted cases are all about both countries are committed or no country is committed and also not one of our developed countries take trade.

a) Quantity

Now we have a smaller subset and we can estimate the effect of the Kyoto Protocol on our important variables with this new reduced subset. Note that every country of the dataset within the EU is under Kyoto, our four developed countries are not from the EU, so in our reduced subset we have no case where both countries are in the EU, so the variable here is constant to zero and we can leave it out in our estimation. The formula looks similar to the regression in exercise $3$, only with the new reduced subset.

Then the regression for the imports looks again like the model before, but without the indicator variable eu: $$\textrm{limp}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

Task: Estimate the effect of the Kyoto Protocol on the imports limp with the function felm() from the package lfe and use the dataset dat_USA. The fixed effect is again the variable sid . Store it again under felm_imp and give a summary. In this case don't use the variable eu, because eu is here constant to zero, we have no case, where a country from the EU isn't under Kyoto.

#...=felm(...~... | sid+..., ...)

Task: Show the summary statistic of felm_imp with the stargazer() function, use the type html and just show the variable dk, you just have to press the check button.

stargazer(felm_imp, type="html", keep=c("dk"))


This result should be better than in exercise $3$, since we have only important and interesting cases within the reduced dataset but we have less observations. We have a value for the variable dk with $7.8\%$. This means that with a higher value of $1$ in the variable dk the quantity of imports will be $7.8\%$ greater. So we can see, that only with important cases in our subset the result is a little bit greater, remember we had a value of $7.1\%$ in Exercise $3$.

! addonquizEstimation


b) Intensity

We want to look now at the carbon intensity of the imports with this reduced subset. The regression looks like this, again without the indicator variable eu: $$\textrm{lint}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

Task: Now estimate the influence of the Kyoto Protocol on the carbon intensity lint of the imports. Use again the function felm() from the package lfe, the fixed effects are again the variables sid, year, importer and exporter. Don't use again the variable eu and store it under felm_int. Use the dataset dat_USA.

#...=felm(...~... | sid+..., ...)

Task: Show the summary statistic of felm_int with the stargazer() function, use the type html and just show the variable dk, you just have to press the check button.

stargazer(felm_int, type="html", keep=c("dk"))


Here is the value again a little bit greater than in the exercise before. dk has now a value of $3.5\%$. So only with important cases the value is minimal greater than in the exercise before with $2.9\%$. We can say that this reduced subset supports our estimation in Exercise $3$.

c) Content

Last but not least, take a look at the carbon content of the imports. The regression looks like this, again without the indicator variable eu: $$\textrm{lbeim}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

Task: Estimate now the influence of the Kyoto Protocol with the carbon content lbeim with the function felm() from the package lfe without the variable eu, use the dataset dat_USA, the fixed effects are the variables sid, year, importer and exporter. Store it under felm_beim.

#...=felm(...~... | sid+..., ...)

Task: Show the summary statistic of felm_beim with the stargazer() function, use the type html and just show the variable dk, you just have to press the check button.

stargazer(felm_beim, type="html", keep=c("dk"))


We have here again a little bit greater value for dk with $11.3\%$. In the last exercise we had a value of $9.9\%$, but it is really near together.

So we can see that the findings are very similar to the findings in Exercise $3$. So the reduced dataset only with important cases, where exactly one of the trade partners is committed under Kyoto or one of the four developed countries United States, Australia, Israel or South Korea take trade, supports the results from Exercise $3$. The biggest difference is about $1.4$ percentage points of influence, which is very small. So here we have a little bit greater influence of the Kyoto Protocol on all three important variables, to the quantity of imports, on the bilateral emissions embodied in imports and on the carbon intensity of the imports.


Exercise 5.2 -- The USA as an additional Kyoto Country

Let's take a deeper insight on the United States. The USA is a special case under Kyoto. We already know, that the USA didn't ratify the Kyoto commitments. There are three different possible reasons why the United States didn't sign the Kyoto Protocol. Hovi et al. (2012) analysed this. They interviewed $26$ observers from Germany, Norway and the United States. The three possible reasons: - Kyoto delegations mistakenly thought the Senate was bluffing when adopting Byrd-Hagel, in which they criticised the fact, that only the developed countries had binding commitments and that the contract would put a disadvantage to their economy. - Europeans preferred a more ambitious agreement without the US participation to a less ambitious agreement with US participation. - In Kyoto, the Clinton-Gore administration gave up on Senate ratification and essentially pushed for an agreement that would provide them a climate-friendly face.

They preferred the third possible reason in their study. But to provide a climate-friendly face, the USA also tried to reduce its carbon emissions with some decentralised activities. They discussed to pay timberland owners an amount, if they don't cut down the forest for $50$ years. Nepal et al. (2013) analysed this. They compared different scenarios with $0, 5, 10 and 15 US Dollars$ per tons of wood which wouldn't cut down. The total amount would be $3$ billion dollars. The scenarios are from $2010$ till $2060$. The carbon increase would significant decrease, especially for the scenario with $15$ Dollars. But for this scenario, the USA would have a very high leakage rate. So they would have a lower increase in carbon emissions, but a high rate of carbon leakage.

Since this and other decentralised activities to reduce their carbon emissions, we could take the United States as an additional Kyoto country into account, although they didn't sign it. And we saw, that the results from the reduced dataset are very similar to the results with the complete dataset. So we can take for further estimations again the complete dataset dat.

To take the USA as an additional Kyoto country, we could change the variable dk for cases with the USA as a trade partner. The United States will be accounted as an extra country which would be committed under Kyoto. Note, that here was another mistake in the original paper. The authors defined the equation for the variable dk_USA not correctly. So this is also a reason to get a little bit different results here, but the trend is similar.

Task: First we need again our dataset logtrades.rds. Use again the function readRDS() to read in the dataset and store it under dat, you just have to press the check button.

dat=readRDS("logtrades.rds")


Task: Create the new variable dk_USA. Remember: dk is equal to the difference of kyotom and kyotox. For dk_USA we need special values for the cases with the USA. All other cases are equal to the normal dk. Hint: You have to take a look at the variables importer and exporter. You only have to run the first part of the code, and then show the last rows of the dataset with the columns importer, exporter, dk_USA, dk and nonein.

dat$dk_USA=dat$dk
dat$dk_USA[dat$importer=="USA" & dat$kyotox==0]=1
dat$dk_USA[dat$exporter=="USA" & dat$kyotom==0]=-1
# enter your code here

The last trades in the dataset are between the importer South Africa and the exporter USA. The primary variable dk is here equal to zero, since none of these countries are committed under Kyoto, which we can see in the column nonein, this value is equal to $1$, which means that no country is committed under Kyoto. But the new variable dk_USA is here equal to $-1$, since the United States are here as an additional committed country.

a) Quantity

Now with the complete dataset, but with the USA as an additional Kyoto country, we want to estimate the influence of the Kyoto Protocol with the additional country USA on the imports. The regression looks like this: $$\textrm{limp}{s,t,m,x} = \beta_1 \cdot \textrm{dk_USA}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \beta_4 \cdot \textrm{eu}_{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

Task: Now we want to estimate the effect of the Kyoto Protocol with the additional country USA and the complete dataset on the important dependent variables with the new variable dk_USA. Estimate now the effect on the imports limp with the function felm() from the package lfe with the variable dk_USA and the other independent variables, use the dataset dat, the fixed effects are the variables sid, year, importer and exporter. Store it under felm_imp.

#...=felm(...~... | sid+..., data=dat)

Task: Show the summary statistic of felm_imp with the stargazer() function, use the type html and just show the variable dk, you just have to press the check button.

stargazer(felm_imp, type="html", keep=c("dk_USA"))


We have here a real smaller value for dk with $5.0\%$ and it's also very significant. So we can see, that if we assume the USA as an additional Kyoto country, the influence is even smaller. Remember the result from Exercise $3$, we had an influence of $7.1\%$.

b) Intensity

Take a look at the regression for the effect of the Kyoto Protocol on the carbon intensity of the imports with the new variable dk_USA. $$\textrm{lint}{s,t,m,x} = \beta_1 \cdot \textrm{dk_USA}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \beta_4 \cdot \textrm{eu}_{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

Task: Estimate now the effect of the Kyoto Protocol with the additional country USA on the intensity lint with the function felm() from the package lfe. Use the variable dk_USA instead of dk. Use the complete dataset dat, the fixed effects are the variables sid, year, importer and exporter. Store it under felm_int.

#...=felm(...~... | sid+..., data=dat)

Task: Show the summary statistic of felm_int with the stargazer() function, use the type html and just show the variable dk_USA, you just have to press the check button.

stargazer(felm_int, type="html", keep=c("dk_USA"))


Our value for the intensity is here very equal with $3.0\%$. In Exercise $3$ we had a little bit smaller value of $2.9\%$. So the influence of the Kyoto Protocol with the additional country USA is smaller on the quantity of imports, but a little bit greater on the carbon intensity of these imports.

c) Content

Last but not least we want to take a look at the carbon content of the imports. What we expect? We have a smaller influence on the quantity of imports but a little bit greater influence on the emission intensity, so maybe the value is a little bit smaller than our value before. Let's take a look at the new regression: $$\textrm{lbeim}{s,t,m,x} = \beta_1 \cdot \textrm{dk_USA}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \beta_4 \cdot \textrm{eu}_{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

Task: Estimate now the influence on the carbon content of the imports lbeim with the function felm() from the package lfe. Use the independent variable dk_USA instead of dk. Use the complete dataset dat, the fixed effects are again the variables sid, year, importer and exporter. Store it under felm_beim.

#...=felm(...~... | sid+..., data=dat)

Task: Show the summary statistic of felm_beim with the stargazer() function, use the type html and just show the variable dk_USA, you just have to press the check button.

stargazer(felm_beim, type="html", keep=c("dk_USA"))


We have again a high significant value for dk with $8.0\%$, it is a smaller value than in Exercise $3$ with $9.9\%$. So we can say that here with the USA as an additional Kyoto country the influence of the Kyoto Status to the carbon content of the imports is real smaller.

All in all we can see, that with the USA as an additional country under Kyoto and with only the cases where exactly one country is under Kyoto or one of the four developed countries USA, Australia, South Korea or Israel take trade, we have again very significant values for the influence of the Kyoto Status and this is again a sign for carbon leakage. In the first case with only the cases where exactly one country is under Kyoto or one of the four developed countries USA, Australia, South Korea or Israel take trade, we have very similar values like in Exercise $3$, only all influences are a little bit greater. The results with this new reduced subset supports our results from Exercise $3$.

But with the USA as an additional country we have again very significant values, but the influence of the Kyoto Status is here a little bit different. The influence on the quantity of the imports and on the carbon content of the imports is real smaller. Only the influence on the carbon intensity is a little bit greater. The results are a little bit different but all in all they also support the results from Exercise $3$, since they are also very significant and a sign for carbon leakage.

Exercise 6 -- MRIO

In this exercise we want to estimate the effect of the Kyoto Protocol to some other alternatives for the variables of carbon intensity and carbon content of the imports. Since in Exercise $4$, we know that there are two accounting methods to measure the carbon content of bilateral trade. The Single Region Input Output method SRIO and the Multi Region Input Output method MRIO. In this Problem Set we always took the values from the SRIO method. It is better to analyse the effect in the two country case of trade. So the changes are not affected from some activities from third countries. This method only takes upstream emissions from domestic suppliers.

But the SRIO approach neglect the complete carbon footprint of the countries and the effect of third countries, which could also affect the trades between two other countries (We saw this mathematically in Exercise $4$). The MRIO approach also consider the foreign upstream emissions caused by imports of intermediates. If you want to know more about the MRIO approach and the different MRIO databases you can take a look at Steen-Olsen et al. (2016).

Task: First we need a new the dataset MRIO.rds. Use again the function readRDS() to read in the dataset and store it again under dat.

#enter your code here


a) Intensity

There is an alternative variable for the carbon intensity of the imports with the MRIO approach: lint2, which is the logarithm of the carbon content intensity, measured with the Multi-Region Input-Output approach. The values are from such a MRIO database.

Task: Let's take a look at only the variables we need, to estimate the effect on the carbon intensity. For the intensity we used the variable lint. Our given alternative is the variable lint2. Give the first rows of the dataset only with these two columns. Use again the function select() from the package dplyr.

# head(select(dat,...))

We see very similar values for these two different variables, so we want to estimate the effect of the Kyoto Protocol on the second variable, the regression should look like this: $$\textrm{lint2}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \beta_4 \cdot \textrm{eu}_{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

Task: we see very similar values, so estimate now the effect on the intensity lint2 with the independent variables. Use again the function felm()from the package lfe, and store it under felm_int2. Use the dataset dat, the fixed effects are the variables sid, year, importer and exporter.

#...=felm(...~... | sid+..., data=dat)

Task: Show the summary statistic of felm_int2 with the stargazer() function, use the type html and just show the variable dk, you just have to press the check button.

stargazer(felm_int2, type="html", keep=c("dk"))


Here we have a result of $2.2\%$. Remind the result of Exercise $3$, there we had a result of $2.9\%$ So we are really near together and can say that the Kyoto status has a real high significance to the intensity of the imports also with the MRIO method, only with a little bit smaller influence.

b) Content

Now we need some alternatives for the carbon content of the imports. Some new variables could be helpful: - lmrio: Ln of BEIM_mrio - BEIM_mrio: Bilateral emissions embodied in imports (in t of CO2), multi-region input-output method - ltech: Ln of BEIM_tech - BEIM_tech: Bilateral emissions embodied in imports (in t of CO2), single-region input-output method, technology fixed in 2000 - BEIM_mrio2000: Bilateral emissions embodied in imports (in t of CO2), multiregion input-output method, input-output-table fixed in 2000 - ltechmrio: Ln of BEIM_mrio2000

So here we have more alternatives, one alternative with the MRIO method and the other alternative is with fixed technology in the year $2000$ and one alternative with fixed I-O-table, but with different technology. The last two variables show the scale and the technique effects, respectively.

Task: Now we want to estimate the influence of the Kyoto Protocol on some alternatives for the carbon content. Show the first rows of the dataset only with the variables lbeim, lmrio, ltech and ltechmrio. You just need to run the code

head(select(dat, lbeim, lmrio, ltech, ltechmrio))

We see some differences, but all in all, it is very similar. But take a look at the regressions: $$\textrm{lmrio}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \beta_4 \cdot \textrm{eu}_{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

$$\textrm{ltech}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \beta_4 \cdot \textrm{eu}_{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

$$\textrm{ltechmrio}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \beta_4 \cdot \textrm{eu}_{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

task: Now we want to estimate the effect on these three alternatives. Use again the function felm() from the package lfe and store the estimations under felm_mrio, felm_tech and felm_techmrio respectively. Use again the independent variables, use dataset dat, the fixed effects are again the variables sid, year, importer and exporter. Give a summary of all three regressions. You only have to run the code

felm_mrio=felm(lmrio~dk+fta+wto+eu | sid+year+importer+exporter, data=dat)
felm_tech=felm(ltech~dk+fta+wto+eu | sid+year+importer+exporter, data=dat)
felm_techmrio=felm(ltechmrio~dk+fta+wto+eu | sid+year+importer+exporter, data=dat)
stargazer(felm_mrio, felm_tech, felm_techmrio, type="html", keep=c("dk"))


In the exercise before, we had a value of ca. $9.9\%$ for dk with the carbon content measured with the SRIO method. With the MRIO method we have a smaller value of $9.3\%$. This is also significant and near to our value before.

But very interesting are the last two variables. The third variable is with fixed technology. With no technique effects we have also a strong significant influence of the Kyoto Status on the Carbon content of the imports with $7.0\%$. The last variable is with fixed I-O-tables in $2000$. This means that we have no scale effects in this variable. The Kyoto Status has again a strong significant influence on the carbon content of the imports about $9.4\%$. So we can see, that the technique effects have a greater influence on the carbon content.

Another idea could be to analyse the impact of the Kyoto commitments of the importer and the exporter country seperately with the MRIO aproach with fixed technology and fixed I-O tables, respectively, on the carbon content of the imports.

To get better values for the significance, we should use the first option of our two different models: $$\begin{eqnarray} \textrm{ltech}{j,s} = \alpha_1 \cdot \textrm{kyotom}{j,s} & + & \alpha \beta_2 \cdot \textrm{kyotox}{j,s} + \beta_2 \cdot \textrm{lgdpm}{j,s} + \beta_3 \cdot \textrm{lgdpx}{j,s} + \beta_4 \cdot \textrm{fta}{j,s} + \beta_5 \cdot \textrm{wto}{j,s} + \beta_6 \cdot \textrm{eu}{j,s} \\ & + & \beta_7 \cdot \textrm{mrdis}{j,s} + \beta_8 \cdot \textrm{mrcon}{j,s} + \beta_9 \cdot \textrm{mrcom}{j,s} + \beta{10} \cdot \textrm{mrwto}{j,s} \\ & + & \beta{11} \cdot \textrm{mrfta}{j,s} + \beta{12} \cdot \textrm{mreu}_{j,s} + \varepsilon \end{eqnarray}$$ with $j \in {1,...,13}$ and $s \in {1,...,18720}$

Task: Estimate the impact of the Kyoto status of the importer and the exporter country on the carbon content of the imports with the MRIO approach and fixed technology, take the first option of our different models. Use again the function felm(), fixed effects are sid and year, store it under felm1 and use dataset dat.

#...=felm(...~...+lgdpm+lgdpx+fta+wto+eu+mrdis+mrcom+mrcom+mrwto+mrfta+mreu+year | sid, data=dat)

Task: Show the summary statistic of felm1 with the stargazer() function, use the type html and just show the variables kyotom and kyotox, you just have to press the check button.

stargazer(felm1, type="html", keep=c("kyotom", "kyotox"))


We have a significant, small influence of the Kyoto status of the importer country on the carbon content of the imports with a positive influence of $2.2\%$. But there is a strong significant, big influence of the exporter country on the carbon content of the imports with a negative influence of $-9.8\%$. We can do the same for the variable with fixed I-O tables.

Task: Estimate the influence of the Kyoto Status of the exporter and the importer country on the carbon content of the imports with fixed I-O tables, use the function felm(), the dataset dat, the fixed effects sid and year and store it under felm2.

#...=felm(...~...+lgdpm+lgdpx+fta+wto+eu+mrdis+mrcon+mrcom+mrwto+mrfta+mreu+year | sid, data=dat)

Task: Show the summary statistic of felm2 with the stargazer() function, use the type html and just show the variables kyotom and kyotox, you just have to press the check button.

stargazer(felm2, type="html", keep=c("kyotom", "kyotox"))


Again, we have only a significant, small influence of the Kyoto Status of the importer country on the carbon content of the imports with fixed I-O tables. The influence is again small with $2.3\%$. The Kyoto Status of the exporter country is strong significant with a great influence of $-15.8\%$.

We can see that the Kyoto status of the exporter country has always a strong significant influence on the carbon content of the imports, with fixed technology and also with fixed I-O-tables. The Kyoto Status of the importer country is indeed strong significant but only very small, in relation to the influence of the exporter country. So we can see that the Kyoto commitments for the carbon content of the exports of a Kyoto committed country are very important, for the imports it is only very small. Since the overall effect of fixed technology was greater than the effect on the fixed I-O tables, we can say that the main reason of reduced carbon emissions are the technical progress of the exporter country and not the scale effects.

So we can see, that there are some differences between the SRIO and the MRIO method, but both opportunities are very significant and looks very similar together. And we can see the differences in scale and technique effects in our dataset, both are very significant and have a great influence on the bilateral emissions embodied in imports.

Exercise 7 -- Several sectors.

We saw a real significant influence of the Kyoto status on the quantity of the imports, on the carbon content of these imports and on the carbon intensity of the imports. But is this correct for all sectors of work? We already know from Exercise $1$ that we have $12$ different tradeable sectors.

The twelve different sectors are: - 01: Agriculture, forestry, fishing - 02: Electricity, gas and water supply, mining and quarrying - 03: Basic metals - 04: Chemicals and petrochemicals - 05: Other non-metallic mineral products - 06: Transport equipment - 07: Machinery - 08: Food products, beverages, tobacco - 09: Paper, paper products, pulp and printing - 10: Wood and wood products - 11: Textile and leather - 12: Non-specified industries

Non-traded sectors: - 13: Construction - 14: Transport - 15: Other services

Now, we want to estimate the influence of the Kyoto Protocol on the four variables for single sectors.

Task: First we need again our dataset logtrades.rds. Use again the function readRDS to read in this dataset and store it under dat.

#enter your code here

Remind the regressions for the four important variables from Exercise $3$: $$\textrm{limp}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \beta_4 \cdot \textrm{eu}_{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

$$\textrm{lint}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \beta_4 \cdot \textrm{eu}_{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

$$\textrm{lbeim}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \beta_2 \cdot \textrm{fta}{s,t,m,x} + \beta_3 \cdot \textrm{wto}{s,t,m,x} + \beta_4 \cdot \textrm{eu}_{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

$$\textrm{lant}{s,t,m,x} = \beta_1 \cdot \textrm{dk}{s,t,m,x} + \varepsilon$$ with $s \in {1,...,18720}$, $t \in {1995,...,2007}$, $m,x \in {1,...,40}$ and $m \neq x$

Task Estimate now the impact on the imports limp only for sector $1$, use again the function felm() from the package lfe. Use dataset dat, but we need the function filter() from the package dplyr, to regress the dataset to sector $1$. The fixed effect should be sid. Store it under felm_imp_01 and give a summary only with the independent variable dk. First you only have to run the code.

felm_imp_01=felm(limp~dk+fta+wto+eu | sid+year+importer+exporter, data=filter(dat, sector==1))
stargazer(felm_imp_01, keep=c("dk"), type="html")


Here we have directly a non-significant value! dk isn't significant and negative. So sector $1$ seems to be not significant to carbon leakage.

! start_note "self-written function 'sector()'"

This is the given function sector("cat") which analyses the effect of the Kyoto protocol to the single sectors of the imports, the bilateral emissions embodied in imports, the carbon intensity of the imports and on the variable lant. The summary with the stargazer() function automatically gives the summary only with the desired variable dk. Remember that you need brackets around the needed factor.

sector = function (cat){
  library(lfe)
  library(stargazer)
  library(dplyr)
  felm_limp=felm(limp~dk+fta+wto+eu | sid+year+importer+exporter, data=filter(dat, sector==cat))
  felm_lbeim=felm(lbeim~dk+fta+wto+eu | sid+year+importer+exporter, data=filter(dat, sector==cat))
  felm_lint=felm(lint~dk+fta+wto+eu | sid+year+importer+exporter, data=filter(dat, sector==cat))
  felm_lant=felm(lant~dk | sid+year+importer+exporter, data=filter(dat, sector==cat))
  stargazer(felm_limp, felm_lbeim, felm_lint, felm_lant, type="html", keep=c("dk"))
}

! end_note

Task: Do the same for sector equal to $9$. To make it easier, the function is written as extra code. You can call the function sector(cat) with the wanted sector. It automatically gives the summary for the variable dk and for all four dependent variables. If you want to see the complete function you can click on the note box above.

#enter your code here


Here we have significant values for dk, for example $19\%$ for the bilateral emissions in imports, so sector $9$ seems to be significant, sector $9$ is the sector of paper, paper products, pulp and printing.

Task: Feel free to estimate for every country you want the four dependent variables. You only have to change cat into the wanted sector, all sectors from $1$ till $12$ are possible. You don't need to solve it for every sector.

#sector(cat)

We can see, that the significant sectors are the sectors of electricity, basic metals, chemicals, other non-metallic minerals, transport equipment, machinery, paper and pulp and non-specified industries. It is highest in carbon-intensive industries like basic metals or paper and pulp. The other sectors are not so carbon-intensive and not so prone for carbon leakage.

Exercise 8 -- Conclusion

First we inspected the given dataset, looked at the period, the different sectors, the different participating countries and on the Kyoto status of these countries. We plotted a world map with the Kyoto status of the countries. To get a first insight, we defined an example dataset with Germany and China to have exactly one committed country in the example dataset. Within this dataset we analysed the development of the quantity of imports, the carbon content of the imports and the carbon intensity of the imports. We plotted all of these developments and obtained first signs of carbon leakage in the two countries case.

After this, we tried to find some determinants which explain the quantity of imports. Finally, we found some factors like the Kyoto status, the membership in the EU or WTO, some free trade agreements, the GDP of the exporter and the importer country, and the multilateral resistances for distance, common language, contiguity, EU-membership, WTO-membership and for the free trade agreement. Since we have panel data, we took the sector identifier and the years as fixed effects. But we also found an alternative. Instead of the GDPs and the multilateral resistances we took the importer and the exporter country as additional fixed effects.

Then we took this model and estimated the influence of the Kyoto Protocol on the quantity of imports, the carbon content of the imports, the carbon intensity of the imports and on the Antweiler variable. We get strong significant results for all four variables, so the Kyoto status seems to affect the location of carbon emissions. For better interpretations we plotted the changes in these variables from a period before and a period after the start of the commitments and also some world maps for detailed results.

Then we looked at the mathematical model behind. How is it possible that stricter climate policies could affect the carbon content of trade. We looked at the perspective of the consumers and on the perspective of the firms, analysed their utility and optimal size. Then we get some formulas for the quantity of imports, the carbon content of imports and the carbon intensity of imports. We get an estimator for the carbon content, this estimator contains four different elasticities for the estimated carbon taxes of the importer and the exporter country, respectively. Then we computed the elasticities in our dataset and saw, that the technical progress of the importer country doesn't affect the carbon content of trade.

Then we wanted to improve the model. First we took only cases, where the variabe dk would not be equal to zero. This means, if only the importer or the exporter country would be committed. Additionally we took some developed countries like the United States, Australia, Israel and South Korea into account. This analysis supported the results from Exercise $3$. The next step was to take the United States as an additional Kyoto Country. This improvement also suports the previous findings.

After this, we analysed the carbon content and the intensity with the MRIO approach. We additionally analysed the effect of fixed technology and fixed I-O tables for the carbon content of the imports. We saw, that the Kyoto status has a real great influence for the exporter country. The influence is not so great for the importer country. So the Kyoto Protocol more affects the exports of a committed country, such a country cannot export many carbon-intensive goods. Last but not least we analysed the effect of the Kyoto Protocol on different kinds of sectors. We found that some sectors like basic metals or paper and pulp are very prone to carbon leakage, other sectors like agriculture, forestry and fishing are not so prone to carbon leakage.

If you want to know more about the post-Kyoto-period from $2013-2020$ you can take a look at Perez de las Heras (2013). Some important agreements are the Treaty of Lisbon and "Europe 2020". Also important is the United Nations Framework Convention on Climate Change, 21st Conference of the Parties in Paris $2015$. The future of the greenhouse gases were discussed, in future the emissions trading will be more and more important to make the saving emissions cost-effective. If you want to know more about the Paris agreement you can take a look at Lerch (2016).

Task: If you want to see the totality of the awards that you collected during this problem set, just press edit and then check in the following code block. There were a total of $10$ awards to be earned.

awards()

I hope you had fun!

Exercise 9 -- References

Bibliography

R and Packages in R



SebKiesel/RTutorKyotoandLeakage documentation built on May 9, 2019, 1:19 p.m.