Activity 2 - CEDE Uniandes Panel Dataset (2005)

Author

Mauricio Bustos, Karen Aldana y Jefferson Velandia

editor: visual

1 Dataset

 [1] "coddepto"           "codmpio"            "depto"             
 [4] "municipio"          "ano"                "ao_crea"           
 [7] "pobl_rur"           "pobl_urb"           "pobl_tot"          
[10] "altura"             "discapital"         "disbogota"         
[13] "pib_percapita_cons" "gini"               "pobreza"           

2 Data cleaning and variable construction

3 1. Scatterplot: GDP per capita vs Gini

# A tibble: 3 × 2
  municipio  pib_percapita_cons
  <chr>                   <dbl>
1 Aratoca                  69.3
2 Jordán                   31.4
3 Villanueva               44.7

The graph shows the relationship between GDP per capita and the Gini index for Colombian municipalities in 2005. The trend line points slightly downward, meaning that municipalities with higher income per person tend to show somewhat lower inequality. That said, the points are very spread out, so the relationship is weak and there is a lot of variation that GDP per capita alone does not explain.

There are also three municipalities that stand out on the right side of the graph with much higher GDP per capita than the rest. These are probably municipalities with large extractive industries like oil or mining, which can inflate income figures without necessarily reducing inequality. Their presence likely pulls the regression line and makes the negative slope look a bit stronger than it really is for the rest of the country.

4 2. Scatterplot: GDP per capita vs Municipality foundation year

The graph shows how GDP per capita in 2005 relates to the year each municipality was created. Municipalities founded a long time ago appear on the left, while more recently created ones appear on the right.

The trend line goes downward, so older municipalities tend to have higher GDP per capita. This makes some sense: municipalities that were founded earlier had more time to develop institutions, build infrastructure and accumulate economic activity over the years. Even so, the data is very spread out and there are many exceptions, which suggests that the year of foundation explains only part of the story.

5 3. Simple regression


Call:
lm(formula = pib_percapita_cons ~ ao_crea, data = df_reg1)

Residuals:
   Min     1Q Median     3Q    Max 
-6.249 -2.774 -0.709  1.567 62.525 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 13.381918   2.674566   5.003  6.6e-07 ***
ao_crea     -0.003758   0.001432  -2.624  0.00883 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 5.132 on 1051 degrees of freedom
Multiple R-squared:  0.006507,  Adjusted R-squared:  0.005561 
F-statistic: 6.883 on 1 and 1051 DF,  p-value: 0.008826
# A tibble: 2 × 5
  term        estimate std.error statistic     p.value
  <chr>          <dbl>     <dbl>     <dbl>       <dbl>
1 (Intercept) 13.4       2.67         5.00 0.000000660
2 ao_crea     -0.00376   0.00143     -2.62 0.00883    

The coefficient on ao_crea tells us how much GDP per capita changes on average for each additional year in the municipality’s foundation date, without holding anything else constant. A negative coefficient means that municipalities created earlier tend to have higher GDP per capita.

The R-squared is probably low here, which is expected given how scattered the data looks. Foundation year alone is not enough to explain differences in economic performance across municipalities, but it does capture something about historical institutional development that seems to matter.

6 4. Regression with controls


Call:
lm(formula = pib_percapita_cons ~ ao_crea + porc_rural + altura + 
    discapital + disbogota, data = df_reg2)

Residuals:
   Min     1Q Median     3Q    Max 
-7.679 -2.333 -0.822  1.250 64.003 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)  1.290e+01  2.733e+00   4.719 2.69e-06 ***
ao_crea     -5.844e-05  1.456e-03  -0.040    0.968    
porc_rural  -6.750e+00  6.818e-01  -9.900  < 2e-16 ***
altura      -2.032e-04  2.072e-04  -0.981    0.327    
discapital   3.904e-04  2.787e-03   0.140    0.889    
disbogota   -7.416e-03  8.985e-04  -8.253 4.61e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 4.772 on 1047 degrees of freedom
Multiple R-squared:  0.1443,    Adjusted R-squared:  0.1402 
F-statistic: 35.32 on 5 and 1047 DF,  p-value: < 2.2e-16
# A tibble: 6 × 5
  term          estimate std.error statistic  p.value
  <chr>            <dbl>     <dbl>     <dbl>    <dbl>
1 (Intercept) 12.9        2.73        4.72   2.69e- 6
2 ao_crea     -0.0000584  0.00146    -0.0401 9.68e- 1
3 porc_rural  -6.75       0.682      -9.90   3.78e-22
4 altura      -0.000203   0.000207   -0.981  3.27e- 1
5 discapital   0.000390   0.00279     0.140  8.89e- 1
6 disbogota   -0.00742    0.000899   -8.25   4.61e-16

With the controls included, the coefficient on ao_crea now reflects the relationship between foundation year and GDP per capita after accounting for differences in rural population share, altitude, distance to the departmental capital, and distance to Bogota.

Comparing this result with the simple regression from point 3 is useful: if the coefficient changes a lot, it means those geographic variables were confounding the original estimate. For example, more remote or mountainous municipalities might have been created more recently and also tend to be poorer, so without controls we would be mixing up the effect of foundation year with the effect of geography. Adding these variables helps separate those things.

7 5. Merge: CEDE dataset with PDET municipalities


  0   1 
952 170 

After the merge, the dataset now includes the PDET variable, which equals 1 for municipalities that were heavily affected by the armed conflict and 0 for the rest. Municipalities that did not appear in the PDET dataset were assigned a 0. This variable is our main proxy for exposure to violence at the municipal level.

8 6. Differences in GDP per capita by exposure to violence

# A tibble: 2 × 4
   PDET     n mean_pib sd_pib
  <dbl> <int>    <dbl>  <dbl>
1     0   952     6.71   5.32
2     1   170     4.37   3.32

    Welch Two Sample t-test

data:  pib_percapita_cons by PDET
t = 7.1754, df = 287.95, p-value = 6.134e-12
alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
95 percent confidence interval:
 1.692787 2.972493
sample estimates:
mean in group 0 mean in group 1 
       6.705025        4.372385 
[1] 170
[1] 1122

  0   1 
952 170 

The table shows the average GDP per capita for PDET and non-PDET municipalities separately. If PDET municipalities have a lower average, that would suggest that exposure to violence is associated with lower economic performance.

The t-test checks whether that difference is statistically significant or could just be due to chance. If the p-value is below 0.05, we can say the difference between the two groups is unlikely to be random. A significant negative gap would be consistent with the idea that years of armed conflict hurt local economic development.

9 7. Simple Regression: GDP per capita on PDET


Call:
lm(formula = pib_percapita_cons ~ PDET, data = df_reg3)

Residuals:
   Min     1Q Median     3Q    Max 
-6.677 -2.837 -0.724  1.652 62.625 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)   6.7050     0.1690  39.672  < 2e-16 ***
PDET         -2.3326     0.4508  -5.174 2.74e-07 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 5.084 on 1051 degrees of freedom
Multiple R-squared:  0.02484,   Adjusted R-squared:  0.02391 
F-statistic: 26.77 on 1 and 1051 DF,  p-value: 2.74e-07
# A tibble: 2 × 5
  term        estimate std.error statistic   p.value
  <chr>          <dbl>     <dbl>     <dbl>     <dbl>
1 (Intercept)     6.71     0.169     39.7  4.13e-211
2 PDET           -2.33     0.451     -5.17 2.74e-  7

The coefficient on PDET gives the average difference in GDP per capita between conflict-affected municipalities and the rest. This number should be the same as the difference in means from point 6, and the t-statistic should match as well.

If the coefficient is negative and significant, it means that municipalities classified as PDET tend to have lower GDP per capita on average. The problem with this regression is that it does not control for other factors that could explain both why a municipality ended up being PDET and why it is poorer, which is why we add controls in the next point.

10 8. Regression with Controls


Call:
lm(formula = pib_percapita_cons ~ PDET + porc_rural + altura + 
    discapital + disbogota, data = df_reg4)

Residuals:
   Min     1Q Median     3Q    Max 
-7.861 -2.334 -0.755  1.293 63.882 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) 12.8265441  0.5784351  22.175  < 2e-16 ***
PDET        -1.6262921  0.4530331  -3.590 0.000346 ***
porc_rural  -6.5576059  0.6691317  -9.800  < 2e-16 ***
altura      -0.0003425  0.0002017  -1.698 0.089818 .  
discapital   0.0017243  0.0027940   0.617 0.537263    
disbogota   -0.0069592  0.0008950  -7.776 1.79e-14 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 4.743 on 1047 degrees of freedom
Multiple R-squared:  0.1547,    Adjusted R-squared:  0.1507 
F-statistic: 38.33 on 5 and 1047 DF,  p-value: < 2.2e-16
# A tibble: 6 × 5
  term         estimate std.error statistic  p.value
  <chr>           <dbl>     <dbl>     <dbl>    <dbl>
1 (Intercept) 12.8       0.578       22.2   1.27e-89
2 PDET        -1.63      0.453       -3.59  3.46e- 4
3 porc_rural  -6.56      0.669       -9.80  9.37e-22
4 altura      -0.000342  0.000202    -1.70  8.98e- 2
5 discapital   0.00172   0.00279      0.617 5.37e- 1
6 disbogota   -0.00696   0.000895    -7.78  1.79e-14

With the controls added, the coefficient on PDET now reflects the difference in GDP per capita between conflict-affected and non-conflict municipalities after accounting for rurality, altitude, distance to the departmental capital, and distance to Bogota.

This matters because PDET municipalities are often more rural and more geographically isolated, and those characteristics alone could explain lower GDP per capita. If the coefficient on PDET stays negative and significant after controlling for all of that, it suggests that conflict itself has an effect on economic performance beyond just the geographic disadvantages. If it drops a lot or becomes insignificant, then much of the gap from point 7 was probably explained by geography rather than violence.

11 9. Institutions and Violence


Call:
lm(formula = pib_percapita_cons ~ ao_crea, data = dep_reg1)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.7558 -1.3629 -0.7189  0.8583  8.1170 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)   
(Intercept) 13.189734   4.449916   2.964   0.0043 **
ao_crea     -0.005848   0.002359  -2.479   0.0159 * 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.914 on 62 degrees of freedom
Multiple R-squared:  0.09016,   Adjusted R-squared:  0.07549 
F-statistic: 6.144 on 1 and 62 DF,  p-value: 0.01592
# A tibble: 2 × 5
  term        estimate std.error statistic p.value
  <chr>          <dbl>     <dbl>     <dbl>   <dbl>
1 (Intercept) 13.2       4.45         2.96 0.00430
2 ao_crea     -0.00585   0.00236     -2.48 0.0159 

Call:
lm(formula = pib_percapita_cons ~ PDET, data = dep_reg2)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.3052 -1.3290 -0.5636  0.9582  7.0579 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)   2.6400     0.2644   9.983 1.59e-14 ***
PDET         -1.8581     0.5289  -3.513 0.000832 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.832 on 62 degrees of freedom
Multiple R-squared:  0.166, Adjusted R-squared:  0.1526 
F-statistic: 12.34 on 1 and 62 DF,  p-value: 0.0008322
# A tibble: 2 × 5
  term        estimate std.error statistic  p.value
  <chr>          <dbl>     <dbl>     <dbl>    <dbl>
1 (Intercept)     2.64     0.264      9.98 1.59e-14
2 PDET           -1.86     0.529     -3.51 8.32e- 4

Call:
lm(formula = pib_percapita_cons ~ PDET + porc_rural + altura + 
    discapital + disbogota, data = dep_reg3)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.4231 -1.0680 -0.2203  0.9200  5.8604 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)  9.7345559  3.0656717   3.175 0.002397 ** 
PDET        -0.0899495  0.8764506  -0.103 0.918611    
porc_rural  -5.3197732  1.2883327  -4.129 0.000118 ***
altura       0.0005678  0.0004343   1.308 0.196201    
discapital  -0.0093645  0.0090758  -1.032 0.306445    
disbogota   -0.0081933  0.0062564  -1.310 0.195498    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.595 on 58 degrees of freedom
Multiple R-squared:  0.4086,    Adjusted R-squared:  0.3577 
F-statistic: 8.016 on 5 and 58 DF,  p-value: 8.496e-06
# A tibble: 6 × 5
  term         estimate std.error statistic  p.value
  <chr>           <dbl>     <dbl>     <dbl>    <dbl>
1 (Intercept)  9.73      3.07         3.18  0.00240 
2 PDET        -0.0899    0.876       -0.103 0.919   
3 porc_rural  -5.32      1.29        -4.13  0.000118
4 altura       0.000568  0.000434     1.31  0.196   
5 discapital  -0.00936   0.00908     -1.03  0.306   
6 disbogota   -0.00819   0.00626     -1.31  0.195   

For Nariño, the departmental analysis shows whether the national patterns also hold within a single department. At the national level, older municipalities appeared to have higher GDP per capita, but that effect disappeared after adding controls, meaning that geography and rurality explained much of the result. In Nariño, this relationship is likely weaker because municipalities inside the same department are more similar to each other than municipalities in the whole country.

For violence, the national analysis showed that PDET municipalities have lower GDP per capita, both in the simple regression and in the regression with controls. This suggests that conflict exposure is negatively associated with economic development. In Nariño, this is particularly important because the department has several municipalities historically affected by conflict. If the PDET coefficient remains negative, this would confirm that municipalities with greater exposure to violence also tend to perform worse economically even inside the department. Therefore, compared with the national results, the main difference is that the institutional proxy may become weaker at the departmental level, while the effect of violence is still expected to remain relevant.

12 10. Peace Agreement

Point 1.1 of the Peace Agreement focuses on access to and use of land, the formalization of rural property, and the updating of the rural cadastre. These policies are especially important in Nariño because several of its municipalities were deeply affected by conflict, weak state presence, and rural exclusion, particularly those classified as PDET.

In these municipalities, one central problem has been insecure land tenure. Many rural households work the land without formal property titles, which limits their access to credit, public programs, and productive investment. For that reason, the Land Fund and the formalization of small and medium rural property are essential policies. They can help reduce informality, strengthen legal security over land, and create better incentives for agricultural production.

A second key policy is the updating of the cadastre. In many conflict-affected municipalities, land information is incomplete or outdated, which makes territorial planning more difficult and weakens local fiscal capacity. A more accurate cadastre can improve public administration, help identify land use conflicts, and support more effective local taxation and investment decisions.

In the case of Nariño, these policies are particularly relevant in PDET municipalities because conflict and illegal economies have historically distorted land access and weakened institutions. Therefore, the implementation of point 1.1 is not only a matter of rural development, but also a condition for long-term peacebuilding. Improving land access, property formalization, and cadastral information can help reduce inequality, strengthen the presence of the state, and create better opportunities for rural communities.

13 11. Expropriation of Land

When an armed group expropriates the family’s land, the household loses its main source of non-wage income. In the framework of the capacity curve, land serves as an asset that supplements nutrition independently of daily labor earnings. Without it, the entire curve shifts downward: at every level of inherited income, the family can now sustain less work capacity than before.

The most important implication is that a household that was previously above the poverty-trap threshold may now fall below it. If the curve no longer crosses the 45-degree line at a high-income equilibrium, the family gets trapped permanently at a low-income steady state. Expropriation therefore does not just reduce wealth in the short run — it can permanently eliminate the possibility of escaping poverty through work alone, which is precisely the mechanism the capacity-curve model highlights.

14 12. Conflict

If the father is hit by a stray bullet and permanently loses half his ability to work, the capacity curve is compressed downward. Because the father is the main income earner (the farmer), his reduced productivity means that the same level of inherited income now translates into much less work output and therefore much less future income.

Two consequences stand out. First, the upper equilibrium may disappear entirely: if the injured curve no longer crosses the 45-degree line at a high level of income, there is no longer a “good” stable equilibrium to converge to. Second, even if a high equilibrium still exists, the family’s current income may now be below the unstable middle threshold, placing them on the downward path toward the low-income trap. The injury thus acts as the kind of external shock discussed in the street-vendor example: a single event can permanently shift a household from the basin of attraction of the high equilibrium to that of the low one.

15 13. Nutrition

Given the two shocks described in points 11 and 12 — loss of land and loss of 50% of the father’s work capacity — the family faces a severe and permanent drop in total income. The capacity-curve framework highlights a painful trade-off: in the short run, reducing calorie consumption saves money, but it also reduces work capacity, which lowers future income further, potentially deepening the poverty trap.

What the family should ideally do:

  • Protect minimum nutritional thresholds, especially for the children. The capacity curve is particularly steep at low levels of nutrition, meaning that small reductions in food intake at the bottom have large negative effects on productivity. The family should prioritize keeping total calorie intake above the critical threshold where the curve intersects the 45-degree line from below. Cutting below that point would be self-defeating, as it would reduce work capacity more than it saves in consumption expenditure.

  • Reallocate consumption toward cheaper calorie-dense foods. As income falls, the family should substitute away from more expensive or higher-quality foods toward staples that maximize calories per peso spent. The evidence from Kenya (income elasticity of calorie intake between 0.4 and 0.8) suggests that poor households tend to do this naturally, but the family may need to do it more aggressively given the severity of the shocks.

  • Consider the role of the mother and children. With the father partially incapacitated and the land gone, the mother may need to enter the labor market and the children’s school attendance may be put at risk. From a capacity-curve perspective, any reduction in the children’s nutrition or schooling today will lower their future human capital and shift their own capacity curves downward, propagating the poverty trap into the next generation.

  • Seek transfers or public support to avoid falling below the nutritional threshold. If the family’s income falls into the region where the capacity curve lies below the 45-degree line, no amount of individual effort will be sufficient to escape the trap. This is exactly the situation where a one-time transfer — food aid, a cash transfer, access to credit — can push the household above the threshold and allow the self-reinforcing dynamic of the capacity curve to work in the positive direction rather than the negative one.

In summary, the family faces a situation where income losses make it tempting to cut food consumption, but doing so may permanently reduce work capacity and lock the household into a low-income equilibrium. The optimal adjustment involves protecting minimum nutrition, reallocating spending efficiently, and, if possible, accessing external support to bridge the gap created by the two shocks.