<blockquote>
  <p>My problem is: because Brazil is the origin for the exports to all other countries, GDP_O, POP_O and any other variables representing Brazilian data will be equal for all observations and as such there will be perfect multicollinearity.</p>
</blockquote>

<p>This isn't perfect multicollinearity. It's a lack of time/space variation.  Multicollinearity occurs between features, not observations.  You would of course not have space variation in any given year, for the reason you note - but in a comment you said you ran a panel regression, so you should have that time variation.</p>

<blockquote>
  <p>I want to regress exports as a function of, among other things, Brazil's GDP. As such, I want to see the effect of GDP on Brazil's exports and not the effect of GDP on exports to each country </p>
</blockquote>

<p>Then, why are you using a gravity model for trade flows? Doing so spreads the effect size across a bunch of variables you seem to be uninterested in.  Total exports is just a number that relates to GDP through the accounting identity.  Since that identity is additive, a log-log form for your regression does not make sense.</p>

CC BY-SA 4.0
2019-11-20T13:43:35.017Z
Hi, @heh! I've since changed my model extensively and this post has lost its purpose. I solved my problems by expanding my data into a panel with 50 countries and data for all the bilateral flows between each of the countries. Thank you anyway! Just in case anyone is facing similar problems, the GDP should not be used as an explanatory variable, as pointed out in Baldwin & Taglioli (2011) and the model should be estimated in its exponential form (Silva & Tenreyro (2006)).
Pedro Cunha
CC BY-SA 4.0
2019-11-20T18:07:53.840Z
It looks like you took the analysis in the more interesting direction. Glad you sorted it out!
heh
CC BY-SA 4.0
2019-11-18T16:08:09.610Z
2019-11-18T16:08:09.610Z
heh
<p>They will simply be sucked up into one variable. To "fix" this, you could simply drop all of Brazil's characteristics and leave a constant in: <span class="math-container">$\ln(EXP_D) = c + \beta_1 \ln(GDP_D) + \beta_2 \ln(POP_D) + \ldots$</span></p>

<h2>Edit</h2>

<p>Just understood the question from the comments below.</p>

<p>If you have only a cross-sectional data, you cannot distinguish the effects of GDP, population, etc. of the origin country (Brazil) on its exports.</p>

<p>One way you could do this is to run a panel regression... then you'll have variation in GDP, population, exports, etc.</p>

<p>In order to do this, you need to assume that the relationship remains the same throughout your sample period. If, for example, you have a change in government, then you might need to control for that, etc.</p>

CC BY-SA 4.0
2019-10-19T04:28:31.823Z
That's what I did, but I think it's wrong. Because if I want, for instance, to see the impact of Brazil's GDP on exports I won't be able to.
Pedro Cunha
CC BY-SA 4.0
2019-10-19T06:01:55.483Z
You mean you want to see impact of Brazil's GDP on export to each destination?
Art
CC BY-SA 4.0
2019-10-19T10:20:47.893Z
No. I want to regress exports as a function of, among other things, Brazil's GDP. As such, I want to see the effect of GDP on Brazil's exports and not the effect of GDP on exports to each country
Pedro Cunha
CC BY-SA 4.0
2019-10-19T10:25:51.583Z
Got it. Please see if the edit makes sense.
Art
CC BY-SA 4.0
2019-10-19T10:52:34.323Z
It does make sense to me, it is what I think. However, I refer you once again to the article I linked, on which the authors estimated all these coefficients in a cross sectional regression. EDIT: please look at the table I've annexed in my original post.
Pedro Cunha
CC BY-SA 4.0
2019-10-19T17:31:54.993Z
I was able to build a panel. However, the same problem still persists. Although the variables change each year, they remain constant in a given year. For instance: the value of $PIB_{O_{2009}}$ will be the same for all observations in 2009; in 2010, $PIB_{O_{2010}}$ will be the same for all and so on
Pedro Cunha
CC BY-SA 4.0
2019-10-19T17:45:06.360Z
Quick reply: for panel regression, one time period is one observation. So it's exports in 2010 on gdp in 2010, pop 2010, etc.
Art
CC BY-SA 4.0
2019-10-19T17:52:42.693Z
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/100071/discussion-between-pedro-cunha-and-art).
Pedro Cunha
CC BY-SA 4.0
2019-10-19T04:25:54.657Z
2019-10-19T10:25:35.213Z
2019-10-19T10:25:35.213Z
Art
<p>everyone!</p>

<p>I am estimating a gravity model in order to analyze the impacts of tighter environmental regulations on international trade. More specifically, I am analyzing Brazil's trade flow.</p>

<p>My (linearized) model is as follows:</p>

<p><span class="math-container">$ \ln(EXP) = \ln(GDP_O) +  \ln(GDP_D) +  \ln(POP_O) + \ln(POP_D) + \dots $</span></p>

<p>In other words, the exports from Brazil (origin) to a country D (destination) depend on both countries GDPs,Populations, Total Area and  another couple of variables.</p>

<p>My problem is: because Brazil is the origin for the exports to all other countries, GDP_O, POP_O and any other variables representing Brazilian data will be equal for all observations and as such there will be perfect multicollinearity.</p>

<p>How do I circumvent this? Every gravity model uses both the exporter and importer variables in order to explain the bilateral trade flow.</p>

<p>EDIT: See for instance the estimation carried out here:  <a href="https://drive.google.com/file/d/1DczfoFI_mkI8Tm4H0WcaVZTz9ZXLGb2K/view?usp=drivesdk" rel="nofollow noreferrer">https://drive.google.com/file/d/1DczfoFI_mkI8Tm4H0WcaVZTz9ZXLGb2K/view?usp=drivesdk</a></p>

<p>EDIT2: Specifically, here:</p>

<p>[Regression table] (<a href="https://i.sstatic.net/TQDA3.png" rel="nofollow noreferrer">https://i.sstatic.net/TQDA3.png</a>)</p>

<p>I appreciate any help!</p>

<p>Kind regards,
Pedro!</p>

<econometrics><international-trade>
Perfect multicollinearity when estimating a gravity model
Pedro Cunha
# Perfect multicollinearity when estimating a gravity model

(Asked by: username_0 on 2019-10-19)

everyone!

I am estimating a gravity model in order to analyze the impacts of tighter environmental regulations on international trade. More specifically, I am analyzing Brazil's trade flow.

My (linearized) model is as follows:

$ \ln(EXP) = \ln(GDP\_O) + \ln(GDP\_D) + \ln(POP\_O) + \ln(POP\_D) + \dots $

In other words, the exports from Brazil (origin) to a country D (destination) depend on both countries GDPs,Populations, Total Area and another couple of variables.

My problem is: because Brazil is the origin for the exports to all other countries, GDP\_O, POP\_O and any other variables representing Brazilian data will be equal for all observations and as such there will be perfect multicollinearity.

How do I circumvent this? Every gravity model uses both the exporter and importer variables in order to explain the bilateral trade flow.

EDIT: See for instance the estimation carried out here: <https://drive.google.com/file/d/1DczfoFI_mkI8Tm4H0WcaVZTz9ZXLGb2K/view?usp=drivesdk>

EDIT2: Specifically, here:

[Regression table] (<https://i.sstatic.net/TQDA3.png>)

I appreciate any help!

Kind regards,
Pedro!

**Tags:** econometrics, international-trade

---

## 2 answers

### Answer by username_1 on 2019-11-18. Score: 1

> My problem is: because Brazil is the origin for the exports to all other countries, GDP\_O, POP\_O and any other variables representing Brazilian data will be equal for all observations and as such there will be perfect multicollinearity.

This isn't perfect multicollinearity. It's a lack of time/space variation. Multicollinearity occurs between features, not observations. You would of course not have space variation in any given year, for the reason you note - but in a comment you said you ran a panel regression, so you should have that time variation.

> I want to regress exports as a function of, among other things, Brazil's GDP. As such, I want to see the effect of GDP on Brazil's exports and not the effect of GDP on exports to each country

Then, why are you using a gravity model for trade flows? Doing so spreads the effect size across a bunch of variables you seem to be uninterested in. Total exports is just a number that relates to GDP through the accounting identity. Since that identity is additive, a log-log form for your regression does not make sense.

> **Comments:**
> **username_0**: Hi, @heh! I've since changed my model extensively and this post has lost its purpose. I solved my problems by expanding my data into a panel with 50 countries and data for all the bilateral flows between each of the countries. Thank you anyway! Just in case anyone is facing similar problems, the GDP should not be used as an explanatory variable, as pointed out in Baldwin & Taglioli (2011) and the model should be estimated in its exponential form (Silva & Tenreyro (2006)).  
> **username_1**: It looks like you took the analysis in the more interesting direction. Glad you sorted it out!  

---

### Answer by username_2 on 2019-10-19. Score: 0

They will simply be sucked up into one variable. To "fix" this, you could simply drop all of Brazil's characteristics and leave a constant in: $\ln(EXP\_D) = c + \beta\_1 \ln(GDP\_D) + \beta\_2 \ln(POP\_D) + \ldots$

## Edit

Just understood the question from the comments below.

If you have only a cross-sectional data, you cannot distinguish the effects of GDP, population, etc. of the origin country (Brazil) on its exports.

One way you could do this is to run a panel regression... then you'll have variation in GDP, population, exports, etc.

In order to do this, you need to assume that the relationship remains the same throughout your sample period. If, for example, you have a change in government, then you might need to control for that, etc.

> **Comments:**
> **username_0**: That's what I did, but I think it's wrong. Because if I want, for instance, to see the impact of Brazil's GDP on exports I won't be able to.  
> **username_2**: You mean you want to see impact of Brazil's GDP on export to each destination?  
> **username_0**: No. I want to regress exports as a function of, among other things, Brazil's GDP. As such, I want to see the effect of GDP on Brazil's exports and not the effect of GDP on exports to each country  
> **username_2**: Got it. Please see if the edit makes sense.  
> **username_0**: It does make sense to me, it is what I think. However, I refer you once again to the article I linked, on which the authors estimated all these coefficients in a cross sectional regression. EDIT: please look at the table I've annexed in my original post.  
> **username_0**: I was able to build a panel. However, the same problem still persists. Although the variables change each year, they remain constant in a given year. For instance: the value of $PIB_{O_{2009}}$ will be the same for all observations in 2009; in 2010, $PIB_{O_{2010}}$ will be the same for all and so on  
> **username_2**: Quick reply: for panel regression, one time period is one observation. So it's exports in 2010 on gdp in 2010, pop 2010, etc.  
> **username_0**: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/100071/discussion-between-pedro-cunha-and-art).  

---

