15 Fixed Effects

This file demonstrates three approaches to estimating “fixed effects” models (remember this is what economists call “fixed effects”, but other disciplines use “fixed effects” to refer to something different). We’re going to use the wbstats package to download country-level data from the World Bank for 2017 - 2020 (the most recently available for the variables I chose). We’ll then estimate models with country fixed effects, with year fixed effects, and with both country and year fixed effects. We’ll estimate each model three ways: using the within transformation, using dummy variables, and using the plm package to apply the within transformation for us. If you don’t know what these are, go through LN5 first.

Note that the model we’ll estimate isn’t a great model in terms of producing interesting, reliable result. This is by design. Part of this chapter is introducing you to another API you can use to get data. You’ve worked with the US Census Bureau’s API to get data on US counties. Now from this chapter you will have experience getting data on countries from the World Bank. You are free to use either source for data for your RP. If the model here was a great one, it might take away something you want to do for your RP. This way you get experience with fixed effects models and with getting data from the World Bank, but don’t waste any potential ideas you might have for your RP. So just don’t read too much into the results. They likely suffer from reverse causation and omitted variable bias (both violations of ZCM). If you’re interested in cross-country variation in life expectancy you’ll need to dig much deeper than we’ll go in this chapter.

So what do you have to do? First, go through the details of the models with country fixed effects. I already did it for you, but you should go through it (together with going through LN5) to make sure you understand. After you feel you understand country fixed effects, try to estimate the models with Year Fixed Effects yourself. Once you’ve figured that out, try to estimate the models with both Country and Year Fixed Effects yourself. Just look for the code chunk comments that say “YOUR CODE GOES HERE”. That’s where you need to write code (mostly copy/pasting from what comes before it, making changes as appropriate).

Note that I have you the code for the stargazer tables, but until you estimate all the models it will display an error. For example, until you estimate yearDummies, you’ll get an error message: “object ‘yearDummies’ not found”. When you’re done all error messages should be gone.

library(wbstats) # To get data from the World Bank API
library(plm) # To estimate fixed effects models
library(formattable) # to make colorful tables similar to Excel's conditional formatting
library(stargazer)
library(tidyverse)

## Set how many decimals at which R starts to use scientific notation 
options(scipen=3)
## This shows you a lot of what's available from the World Bank API
# listWBinfo <- wb_cachelist

## List of countries in the World Bank data
countryList <- wb_countries()

## List of all available variables (what they call "indicators")
availableIndicators <- wb_cachelist$indicators

## Sometimes it's easier to look through the indicator list if you write it to CSV and open it in Excel (you can do the same thing with the US Census data). The following does that: 
# write.csv(select(availableIndicators,indicator_id, indicator, indicator_desc),"indicators.csv")

## NOTE: if you use any of these (the full list of variables, exporting it to CSV), make sure you do NOT leave that in your final code. It doesn't belong in your RMD file. I just put these things in here so you see how to get to this information. 

## We'll use the following variables: 
# SP.DYN.LE00.IN    Life expectancy at birth, total (years)
# NY.GDP.PCAP.KD    GDP per capita (constant 2017 US$)
# SP.POP.TOTL   Population, total
# SP.POP.TOTL.FE.ZS Population, female (% of total population)
# SP.RUR.TOTL.ZS    Rural population (% of total population)


## Create named vector of indicators to download
indicatorsToDownload <- c(
  lifeExp = "SP.DYN.LE00.IN", 
  gdpPerCapita ="NY.GDP.PCAP.KD", 
  pop = "SP.POP.TOTL",
  pctFemale = "SP.POP.TOTL.FE.ZS",
  pctRural = "SP.RUR.TOTL.ZS"
)

## Download descriptions of on World Bank indicators (i.e., variables)
indicatorInfo <- availableIndicators %>% 
                  filter(indicator_id %in% indicatorsToDownload)


## Build description of our variables that we'll output in the HTML body
sDesc <- ""
for(i in 1:nrow(indicatorInfo)){
  sDesc <- paste0(sDesc
                  ,"<b>",
                  indicatorInfo$indicator[i],
                  " (",indicatorInfo$indicator_id[i]
                  , ")</b>: "
                  ,indicatorInfo$indicator_desc[i]
                  ,"<br>")
}
## Download data
mydataOrig <- wb_data(indicatorsToDownload, 
                      start_date = 2017, 
                      end_date = 2020)

## get vector of TRUE and FALSE where FALSE indicates there's one or more NA
noNAs <- complete.cases(mydataOrig)

## When writing this code, I first checked how many rows do have NAs, and then out of how many rows 
# sum(noNAs)
## out of how many rows:
# nrow(noNAs)

## keep rows without any NA
mydata <- mydataOrig[noNAs,]

## get count of rows for each country
countOfYearsByCountry <-  mydata %>% count(country)

## merge the count variable with the data
mydata <- inner_join(mydata,countOfYearsByCountry, by="country")

## keep only countries that have all 4 years complete
mydata <- mydata %>% filter(n==4)

## drop count variable (since all are now 4)
mydata <- mydata %>% select(-n)


## For the purposes of this chapter, let's only examine one group of countries 
## so that we can output results without it taking up hundreds of lines
## Normally you don't want to get rid of countries like this
## but doing so will make things run much more quickly,
## so for the purposes of the BP we're going to only keep one region

## Merge in country info (e.g., region)
mydata <- inner_join(mydata,select(countryList,country,region),by="country")

## Keep only region "Latin America & Caribbean" (so we end up with only 31 countries)
mydata <- mydata %>% filter(region == "Latin America & Caribbean") %>% select(-region)

mydata <- mydata %>% rename(year=date)

## Change scale of variables. This re-scales regression coefficients (instead of getting 0.00000123)
####  Measure population in millions of people instead of people
####  Measure GDP per Capita in thousands of 2010 US $ (instead of 2010 US $)
mydata <- mydata %>% mutate(pop=pop/1000000, 
                            gdpPerCapita=gdpPerCapita/1000)
## Display results of selected variables in stargazer table
## (without converting it to a data frame it doesn't display anything)
mydata %>% select(lifeExp, gdpPerCapita, pop, pctFemale, pctRural) %>% 
  as.data.frame() %>%
  stargazer(., type = "html",summary.stat = c("n","mean","sd", "min", "p25", "median", "p75", "max"))
Statistic N Mean St. Dev. Min Pctl(25) Median Pctl(75) Max
lifeExp 136 74.529 3.542 63.854 72.718 74.229 77.264 80.350
gdpPerCapita 136 11.547 8.686 1.323 5.865 8.448 14.972 36.273
pop 136 18.012 40.809 0.040 0.387 4.644 11.650 213.196
pctFemale 136 50.684 1.040 48.814 49.927 50.434 51.092 53.086
pctRural 136 34.779 21.572 4.061 18.474 33.243 47.490 81.388

15.1 Variables

Variable descriptions from the World Bank API. These descriptions do not reflect two changes we made (that are reflected in the table of summary statistics above and in the regression results that follow): population is measured in millions of people and GDP per capita is measured in thousands of 2010 US dollars.

GDP per capita (constant 2010 US$) (NY.GDP.PCAP.KD): GDP per capita is gross domestic product divided by midyear population. GDP is the sum of gross value added by all resident producers in the economy plus any product taxes and minus any subsidies not included in the value of the products. It is calculated without making deductions for depreciation of fabricated assets or for depletion and degradation of natural resources. Data are in constant 2010 U.S. dollars.
Life expectancy at birth, total (years) (SP.DYN.LE00.IN): Life expectancy at birth indicates the number of years a newborn infant would live if prevailing patterns of mortality at the time of its birth were to stay the same throughout its life.
Population, total (SP.POP.TOTL): Total population is based on the de facto definition of population, which counts all residents regardless of legal status or citizenship. The values shown are midyear estimates.
Population, female (% of total population) (SP.POP.TOTL.FE.ZS): Female population is the percentage of the population that is female. Population is based on the de facto definition of population, which counts all residents regardless of legal status or citizenship.
Rural population (% of total population) (SP.RUR.TOTL.ZS): Rural population refers to people living in rural areas as defined by national statistical offices. It is calculated as the difference between total population and urban population.

Source of data definitions: wbstats package

Note that if you displayed the exact wording of others without quotation marks in a paper, it would be plagiarism (and if you added quotation marks it wouldn’t be plagiarism, but it would make for a bad paper). However, for our purposes here, we’re just printing out a convenient list of definitions so we have it all in one place (i.e., this isn’t a paper).

15.2 OLS

Our focus is fixed effects models, but often when estimating fixed effects models we also estimate regular OLS without fixed effects for comparison.

ols <- lm(data=mydata,lifeExp~gdpPerCapita+pop+pctFemale+pctRural)

15.3 Country Fixed Effects

Our basic OLS model is the following: \[ lifeExp_{it} = \beta_0+\beta_1 gdpPerCapita_{it} + \beta_2 pop_{it} + \beta_3 pctFemale_{it} + \beta_4 pctRural_{it} + v_{it} \] To save on notation, we’ll use generic variables (and I wrote out the “composite error term”), i.e.,

\[ y_{it} = \beta_0+\beta_1 x_{1it} + \beta_2 x_{2it} + \beta_3 x_{2it} + \beta_4 x_{4it} + (c_i + u_{it}) \]

Below there are 3 equations. The first is for country \(i\) in year \(t\) (the same as the one above). The second equation is the average over the four years for country \(i\), where \(\bar{y}_{i}=\sum_{t=2017}^{2020}y_{it}\) is the average value of \(y_{it}\) over the 4 years for country \(i\), \(\bar{x}_{ji}=\sum_{t=2017}^{2020}x_{jti}\) is the average value of \(x_{jti}\) over the 4 years for country \(i\) for the four explanatory variables \(j\in\{1,2,3,4\}\), \(\bar{c}_{i}=\sum_{t=2017}^{2020}c_{i}=c_i\) is the average value of \(c_{i}\) over the 4 years for country \(i\) (which just equals \(c_i\) because \(c_i\) is the same in all years for country \(i\)), and \(\bar{u}_{i}=\sum_{t=2017}^{2020}u_{it}\) is the average value of \(u_{it}\) over the 4 years for country \(i\). For the final equation, subtract country \(i\)’s average from the value in each year \(t\).

\[ \begin{align} y_{it} &= \beta_0+\beta_1 x_{1it} + \beta_2 x_{2it} + \beta_3 x_{2it} + \beta_4 x_{4it} + (c_i + u_{it}) \\ \bar{y}_{i} &= \beta_0+\beta_1 \bar{x}_{1i} + \beta_2 \bar{x}_{2i} + \beta_3 \bar{x}_{3i} + \beta_4 \bar{x}_{4i} + (\bar{c}_i + \bar{u}_{i}) \\ y_{it}-\bar{y}_{i} &= (\beta_0-\beta_0)+\beta_1 (x_{1it}-\bar{x}_{1i}) + \beta_2 (x_{2it}-\bar{x}_{2i}) + \beta_3 (x_{3it}-\bar{x}_{3i}) \\ &\hspace{6cm} + \beta_4 (x_{4it}-\bar{x}_{4i}) + (c_i-\bar{c}_i + u_{it}-\bar{u}_{i}) \end{align} \]

This final equation simplifies to the “within transformation” for country \(i\), \[ y_{it}-\bar{y}_{i} = \beta_1 (x_{1it}-\bar{x}_{1i}) + \beta_2 (x_{2it}-\bar{x}_{2i}) + \beta_3 (x_{3it}-\bar{x}_{3i}) + \beta_4 (x_{4it}-\bar{x}_{4i}) + (u_{it}-\bar{u}_{i}) \] because \(\beta_0-\beta_0=0\) and \(c_i-\bar{c}_i=0\), where \(\bar{c}_i=c_i\) because \(c_i\) is the same in all years for country \(i\). Mathematically, this is why the fixed effects model allows us to control for observable factors that do not change of time (or whatever is measured by \(t=1,,,,.T\)). If \(c_i\) is not constant for all time periods, then \(\bar{c}_i=c_i\) isn’t correct and it doesn’t drop out of the final equation. That means it remains in the equations we estimate, and our coefficients are biased.

At the end of this file there are tables that demonstrate the within transformation for our dataset. There is a table for each variable. Look at the table for Life expectancy. Find the row for Argentina (iso3c code ARG). It’s average value of life expectancy is 76.75. In 2017, their value was 76.83, which is 0.08 below Argentina’s four-year average value of 76.75. In 2017, Argentina’s life expectancy was 76.83, which is 0.08 above Argentina’s four-year average. Below this table for life expectancy is a similar table for each explanatory variable. When economists say a model has country “fixed effects”, they mean estimating an OLS regression using data transformed by this “within” transformation.

Alternatively, a model with country “fixed effects” can be estimated using the original OLS equation with the addition of a dummy variable for each country (omitting one).

\[ y_{it} = \beta_0+\beta_1 x_{1it} + \beta_2 x_{2it} + \beta_3 x_{2it} + \beta_4 x_{4it} + \sum_{i=2}^{50}\sigma_idC_i + (c_i + u_{it}) \]

where \(dC_i\) is a dummy variable with a value of 1 if that observation is country \(i\) and equals 0 otherwise (and \(\sigma_i\) is the coefficient on dummy variable \(dC_i\)).

These two models, the “within transformation” and the model with a dummy variable for each country, are mathematically and empirically equivalent. To see that they are empirically equivalent, we’ll estimate both models and compare the results. Note that the standard errors and \(R^2\) values are not equivalent, as discussed below.

Note that when we create the within-transformed variables, we’re going to store them in a new dataframe mydataCountry so that we can use the same variable names. By keeping the same variable names, when we use the variables in the regression and display the results in stargazer, the coefficients will go on the same rows as the other two models.

## Dummy variable for each country (it automatically omits one)
countryDummies <- lm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural+factor(country),data=mydata)

## Within transformation (subtract country averages from each observation for each variable)

## Create country averages and add them to mydata
mydata <- mydata %>%
  group_by(country) %>%
  mutate(cAvg_lifeExp=mean(lifeExp),
         cAvg_gdpPerCapita=mean(gdpPerCapita),
         cAvg_pop=mean(pop),
         cAvg_pctFemale=mean(pctFemale),
         cAvg_pctRural=mean(pctRural)
         ) %>%
  ungroup()

## Within transformation (stored in its own dataframe so can use the same names)
mydataCountry <- mydata %>%
  mutate(lifeExp=lifeExp-cAvg_lifeExp,
         gdpPerCapita=gdpPerCapita-cAvg_gdpPerCapita,
         pop=pop-cAvg_pop,
         pctFemale=pctFemale-cAvg_pctFemale,
         pctRural=pctRural-cAvg_pctRural
         ) 

## Estimate within transformation using the transformed data (stored in mydataCountry)
countryWithin <- lm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural,data=mydataCountry)

## Using plm package
countryPlm <- plm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural,data=mydata, index=c("country"), model = "within", effect="individual")
stargazer(countryDummies,countryWithin,countryPlm, 
          type = "html", 
          report=('vcs*'),
          single.row = TRUE,
          digits = 4,
          keep.stat = c("n","rsq","adj.rsq"), 
          notes = "Standard Errors reported in parentheses, <em>&#42;p&lt;0.1;&#42;&#42;p&lt;0.05;&#42;&#42;&#42;p&lt;0.01</em>", 
          notes.append = FALSE,
          title = "Country Fixed Effects",
          model.numbers = FALSE, 
          column.labels = c("Dummies", "Within", "PLM"))
Country Fixed Effects
Dependent variable:
lifeExp
OLS panel
linear
Dummies Within PLM
gdpPerCapita 0.0900 (0.0628) 0.0900 (0.0543) 0.0900 (0.0628)
pop -0.4733 (0.1579)*** -0.4733 (0.1366)*** -0.4733 (0.1579)***
pctFemale -2.1202 (1.4166) -2.1202 (1.2252)* -2.1202 (1.4166)
pctRural 0.3120 (0.1870)* 0.3120 (0.1617)* 0.3120 (0.1870)*
factor(country)Argentina 36.8322 (12.9819)***
factor(country)Aruba 3.2085 (3.6178)
factor(country)Bahamas, The 11.0853 (11.1266)
factor(country)Barbados 0.3067 (1.4296)
factor(country)Belize -2.9219 (6.2887)
factor(country)Bolivia 3.7256 (9.7247)
factor(country)Brazil 113.0163 (31.2008)***
factor(country)Chile 26.1992 (12.2132)**
factor(country)Colombia 36.0983 (11.4601)***
factor(country)Costa Rica 15.6737 (11.5754)
factor(country)Cuba 17.1208 (10.6059)
factor(country)Dominican Republic 12.7092 (11.8415)
factor(country)Ecuador 13.7459 (8.4867)
factor(country)El Salvador 12.5940 (8.5814)
factor(country)Grenada -4.4895 (4.6702)
factor(country)Guatemala 7.2957 (6.0704)
factor(country)Guyana -10.7639 (2.2026)***
factor(country)Haiti -2.2784 (6.8433)
factor(country)Honduras 4.0415 (8.0515)
factor(country)Jamaica 1.2156 (7.0965)
factor(country)Mexico 68.8268 (18.8581)***
factor(country)Nicaragua 6.4130 (7.1391)
factor(country)Panama 9.6286 (9.4964)
factor(country)Paraguay 5.0919 (8.5307)
factor(country)Peru 25.8367 (10.5201)**
factor(country)Puerto Rico 22.8753 (12.7279)*
factor(country)St. Lucia -10.5471 (2.7030)***
factor(country)St. Vincent and the Grenadines -3.0417 (8.1815)
factor(country)Suriname 3.1347 (9.2037)
factor(country)Trinidad and Tobago 1.7582 (6.4361)
factor(country)Turks and Caicos Islands 12.1813 (14.5975)
factor(country)Uruguay 21.4987 (13.3973)
factor(country)Virgin Islands (U.S.) 22.7825 (13.2532)*
Constant 164.4820 (79.7294)** 0.0000 (0.0551)
Observations 136 136 136
R2 0.9680 0.2319 0.2319
Adjusted R2 0.9560 0.2085 -0.0581
Note: Standard Errors reported in parentheses, *p<0.1;**p<0.05;***p<0.01

We’ve changed a few of the stargazer options for this chapter. We’re displaying standard errors instead of p-values so that we can use only one row per variable (it lets us report coefficient and standard error on one line, but not if we use p-values instead). I modified the note to say that standard errors are reported in parentheses.

Now look at the coefficient estimates. The 3 models all have the same coefficients on gdpPerCapita, pop, pctFemale, and pctRurla. In LN5 we discuss how the within transformation is equivalent to including dummy variables for each group (in this case, countries). That’s exactly what see in the table. The PLM package estimates the within transformation for us (so this is usually what you want to use in practice…we’re just doingit by hand here to help you better understand the models).

You also may notice that the standard errors (and statistical significance stars) are different in the middle column. When we estimate the model with dummy variables (column 1), the regular OLS standard errors are correct. But when we apply the within transformation, we need to adjust the standard errors to account for the within transformation. This would be a bit difficult for us to do. Thankfully, the PLM package correctly adjusts the standard errors (and thus p-values) for us. Thus, in practice we won’t actually want to apply the within transformation ourselves. We’re doing it in this chapter so you can see exactly what it is in practice and see that the coefficient estimates for all 3 versions result in the same coefficients.

If you compare the \(R^2\) values across models, you’ll notice that the \(R^2\) for the model with dummy variables is much higher. Including all the dummy variables makes it artificially high. We want to use the \(R^2\) from the within transformation. The PLM model does this for us.

Another reason we want to use the PLM model when we estimate fixed effects models is that we often don’t want to see all of the coefficients on the dummy variables. For country fixed effects, the coefficient on each country dummy is estimated off of only 4 observations. Thus, it is not a reliable estimate of the effect of being Argentina (or Belize, etc). It still allows us to estimate the model with country fixed effects, even if we don’t care about the coefficient estimates themselves. However, if we had not dropped all countries except South America, we would have hundreds of dummy variables. If we were estimating a model using US county data, we would have over 3000. R probably wouldn’t even let us estimate a model with that many variables. This again makes the PLM package preferable.

15.4 Year Fixed Effects

Above you saw how to estimate models with country fixed effects in three different ways. Here, you should estimate models with year fixed effects in the same three ways. Hint: you just have to switch “country” with “year” and everything else is the same. If you’ve done it correctly, the coefficients will be identical in all three models (and the standard errors will be identical in the “dummies” and “PLM” models).

## Dummy variable for each year (it automatically omits one)
yearDummies <- lm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural+factor(year),data=mydata)

## Within transformation (subtract year averages from each observation for each variable)

## Create year averages and add them to mydata
mydata <- mydata %>%
  group_by(year) %>%
  mutate(yAvg_lifeExp=mean(lifeExp),
         yAvg_gdpPerCapita=mean(gdpPerCapita),
         yAvg_pop=mean(pop),
         yAvg_pctFemale=mean(pctFemale),
         yAvg_pctRural=mean(pctRural)
         ) %>%
  ungroup()

## Within transformation (stored in its own dataframe so can use the same names)
mydataYear <- mydata %>%
  mutate(lifeExp=lifeExp-yAvg_lifeExp,
         gdpPerCapita=gdpPerCapita-yAvg_gdpPerCapita,
         pop=pop-yAvg_pop,
         pctFemale=pctFemale-yAvg_pctFemale,
         pctRural=pctRural-yAvg_pctRural
         ) 


## Estimate within transformation using the transformed data
yearWithin <- lm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural,data=mydataYear)

## Using plm package (for year, still use model = "within", effect="individual")
yearPlm <- plm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural,data=mydata, index=c("year"), model = "within", effect="individual")
stargazer(yearDummies,yearWithin,yearPlm,
          type = "html",
          report=('vcs*'),
          single.row = TRUE,
          digits = 4,
          keep.stat = c("n","rsq","adj.rsq"),
          notes = "Standard Errors reported in parentheses, <em>&#42;p&lt;0.1;&#42;&#42;p&lt;0.05;&#42;&#42;&#42;p&lt;0.01</em>",
          notes.append = FALSE,
          title = "Year Fixed Effects",
          model.numbers = FALSE,
          column.labels = c("Dummies", "Within", "PLM"))
Year Fixed Effects
Dependent variable:
lifeExp
OLS panel
linear
Dummies Within PLM
gdpPerCapita 0.2188 (0.0427)*** 0.2188 (0.0422)*** 0.2188 (0.0427)***
pop 0.0029 (0.0070) 0.0029 (0.0069) 0.0029 (0.0070)
pctFemale -0.2107 (0.3303) -0.2107 (0.3265) -0.2107 (0.3303)
pctRural -0.0276 (0.0137)** -0.0276 (0.0135)** -0.0276 (0.0137)**
factor(year)2018 0.0406 (0.7187)
factor(year)2019 -0.0377 (0.7187)
factor(year)2020 -0.6330 (0.7217)
Constant 83.7468 (16.2846)*** -0.0000 (0.2511)
Observations 136 136 136
R2 0.3367 0.3282 0.3282
Adjusted R2 0.3004 0.3077 0.2915
Note: Standard Errors reported in parentheses, *p<0.1;**p<0.05;***p<0.01

15.5 Country and Year Fixed Effects

Now that you’ve estimated the models with year fixed effects, estimate models with both country and year fixed effects. It works the same way as above, just doing it for both country and year. If you’ve done it correctly, the coefficients will be identical in all three models (and the standard errors will be identical in the “dummies” and “PLM” models).

## Dummy variable for each country and each year (it automatically omits one of each)
countryyearDummies <- lm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural+factor(country) + factor(year),data=mydata)


## Within transformation (subtract country AND year averages from each observation for each variable)
## We already created the country averages and year averages above so we don't need to create them again

## Within transformation (stored in its own dataframe so can use the same names)
mydataCountryYear <- mydata %>%
  mutate(lifeExp=lifeExp-(cAvg_lifeExp + yAvg_lifeExp),
         gdpPerCapita=gdpPerCapita-(cAvg_gdpPerCapita + yAvg_gdpPerCapita),
         pop=pop-(cAvg_pop + yAvg_pop),
         pctFemale=pctFemale-(cAvg_pctFemale + yAvg_pctFemale),
         pctRural=pctRural-(cAvg_pctRural + yAvg_pctRural)) 

##Estimate within transformation using the transformed data
countryYearWithin <- lm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural,data=mydataCountryYear)

##Using plm package (using index = both country and year, joined together in c(), and model = "within", effect="twoways")
countryYearPlm <- plm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural,data=mydata, index=c("country", "year"), model = "within", effect="twoways")
stargazer(countryyearDummies,countryYearWithin, countryYearPlm,
          type = "html",
          report=('vcs*'),
          single.row = TRUE,
          digits = 4,
          keep.stat = c("n","rsq","adj.rsq"),
          notes = "Standard Errors reported in parentheses, <em>&#42;p&lt;0.1;&#42;&#42;p&lt;0.05;&#42;&#42;&#42;p&lt;0.01</em>",
          notes.append = FALSE,
          title = "Country and Year Fixed Effects",
          model.numbers = FALSE,
          column.labels = c("Dummies", "Within", "PLM"))
Country and Year Fixed Effects
Dependent variable:
lifeExp
OLS panel
linear
Dummies Within PLM
gdpPerCapita -0.0704 (0.0704) -0.0704 (0.0600) -0.0704 (0.0704)
pop -0.3946 (0.1551)** -0.3946 (0.1321)*** -0.3946 (0.1551)**
pctFemale -0.5436 (1.4104) -0.5436 (1.2010) -0.5436 (1.4104)
pctRural 0.0999 (0.2234) 0.0999 (0.1903) 0.0999 (0.2234)
factor(country)Argentina 21.2984 (16.3411)
factor(country)Aruba 0.5606 (4.2232)
factor(country)Bahamas, The 1.0147 (12.9565)
factor(country)Barbados -0.7431 (1.5709)
factor(country)Belize -4.9971 (6.1860)
factor(country)Bolivia -4.8505 (10.8915)
factor(country)Brazil 84.3095 (34.6748)**
factor(country)Chile 13.9461 (14.4837)
factor(country)Colombia 21.2555 (14.5854)
factor(country)Costa Rica 6.7259 (12.8247)
factor(country)Cuba 6.9584 (12.2187)
factor(country)Dominican Republic 2.5359 (13.3432)
factor(country)Ecuador 5.9974 (9.6765)
factor(country)El Salvador -0.0694 (10.8784)
factor(country)Grenada -4.3725 (4.3990)
factor(country)Guatemala 1.2754 (6.9496)
factor(country)Guyana -10.6697 (2.0421)***
factor(country)Haiti -9.1464 (7.7599)
factor(country)Honduras -1.4736 (8.5577)
factor(country)Jamaica -4.3666 (7.6684)
factor(country)Mexico 48.0995 (22.3130)**
factor(country)Nicaragua -1.1306 (8.1671)
factor(country)Panama 3.4956 (10.2697)
factor(country)Paraguay -0.9080 (9.1765)
factor(country)Peru 13.2779 (13.0052)
factor(country)Puerto Rico 9.6851 (15.2576)
factor(country)St. Lucia -7.2339 (2.9615)**
factor(country)St. Vincent and the Grenadines -4.8714 (8.0114)
factor(country)Suriname -3.5265 (9.9234)
factor(country)Trinidad and Tobago -1.9381 (6.8513)
factor(country)Turks and Caicos Islands 3.1359 (15.8335)
factor(country)Uruguay 7.2292 (15.8516)
factor(country)Virgin Islands (U.S.) 9.8187 (15.7264)
factor(year)2018 0.2033 (0.1781)
factor(year)2019 0.2684 (0.2104)
factor(year)2020 -0.6243 (0.2922)**
Constant 100.6734 (75.8390) -106.5271 (61.6526)*
Observations 136 136 136
R2 0.9734 0.0849 0.0849
Adjusted R2 0.9622 0.0570 -0.3004
Note: Standard Errors reported in parentheses, *p<0.1;**p<0.05;***p<0.01

15.6 Comparison of all models

Below we have comparisons of the four models: ols, country fixed effects, year fixed effects, and country and year fixed effects. The comparisons are done three times, one for each method of estimating the models.

15.6.1 Within Transformation

stargazer(ols,countryWithin,yearWithin,countryYearWithin,
          type = "html",
          report=('vcs*'),
          single.row = TRUE,
          digits = 3,
          keep.stat = c("n","rsq","adj.rsq"),
          notes = "Standard Errors reported in parentheses, <em>&#42;p&lt;0.1;&#42;&#42;p&lt;0.05;&#42;&#42;&#42;p&lt;0.01</em>",
          notes.append = FALSE,
          title = "Fixed Effects Models: Within Transformation",
          model.numbers = FALSE,
          column.labels = c("OLS", "Country FE", "Year FE", "Country+Year FE"))
Fixed Effects Models: Within Transformation
Dependent variable:
lifeExp
OLS Country FE Year FE Country+Year FE
gdpPerCapita 0.224 (0.042)*** 0.090 (0.054) 0.219 (0.042)*** -0.070 (0.060)
pop 0.003 (0.007) -0.473 (0.137)*** 0.003 (0.007) -0.395 (0.132)***
pctFemale -0.243 (0.327) -2.120 (1.225)* -0.211 (0.327) -0.544 (1.201)
pctRural -0.027 (0.014)** 0.312 (0.162)* -0.028 (0.014)** 0.100 (0.190)
Constant 85.145 (16.113)*** 0.000 (0.055) -0.000 (0.251) -106.527 (61.653)*
Observations 136 136 136 136
R2 0.331 0.232 0.328 0.085
Adjusted R2 0.310 0.208 0.308 0.057
Note: Standard Errors reported in parentheses, *p<0.1;**p<0.05;***p<0.01

15.6.2 PLM Package

stargazer(ols,countryPlm,yearPlm,countryYearPlm,
          type = "html",
          report=('vcs*'),
          single.row = TRUE,
          digits = 3,
          keep.stat = c("n","rsq","adj.rsq"),
          notes = "Standard Errors reported in parentheses, <em>&#42;p&lt;0.1;&#42;&#42;p&lt;0.05;&#42;&#42;&#42;p&lt;0.01</em>",
          notes.append = FALSE,
          title = "Fixed Effects Models: PLM Package",
          model.numbers = FALSE,
          column.labels = c("OLS", "Country FE", "Year FE", "Country+Year FE"))
Fixed Effects Models: PLM Package
Dependent variable:
lifeExp
OLS panel
linear
OLS Country FE Year FE Country+Year FE
gdpPerCapita 0.224 (0.042)*** 0.090 (0.063) 0.219 (0.043)*** -0.070 (0.070)
pop 0.003 (0.007) -0.473 (0.158)*** 0.003 (0.007) -0.395 (0.155)**
pctFemale -0.243 (0.327) -2.120 (1.417) -0.211 (0.330) -0.544 (1.410)
pctRural -0.027 (0.014)** 0.312 (0.187)* -0.028 (0.014)** 0.100 (0.223)
Constant 85.145 (16.113)***
Observations 136 136 136 136
R2 0.331 0.232 0.328 0.085
Adjusted R2 0.310 -0.058 0.291 -0.300
Note: Standard Errors reported in parentheses, *p<0.1;**p<0.05;***p<0.01

15.6.3 Dummy Variables

stargazer(ols,countryDummies,yearDummies,countryyearDummies,
          type = "html",
          report=('vcs*'),
          single.row = TRUE,
          digits = 3,
          keep.stat = c("n","rsq","adj.rsq"),
          notes = "Standard Errors reported in parentheses, <em>&#42;p&lt;0.1;&#42;&#42;p&lt;0.05;&#42;&#42;&#42;p&lt;0.01</em>",
          notes.append = FALSE,
          title = "Fixed Effects Models: Dummy Variables",
          model.numbers = FALSE,
          column.labels = c("OLS", "Country FE", "Year FE", "Country+Year FE"))
Fixed Effects Models: Dummy Variables
Dependent variable:
lifeExp
OLS Country FE Year FE Country+Year FE
gdpPerCapita 0.224 (0.042)*** 0.090 (0.063) 0.219 (0.043)*** -0.070 (0.070)
pop 0.003 (0.007) -0.473 (0.158)*** 0.003 (0.007) -0.395 (0.155)**
pctFemale -0.243 (0.327) -2.120 (1.417) -0.211 (0.330) -0.544 (1.410)
pctRural -0.027 (0.014)** 0.312 (0.187)* -0.028 (0.014)** 0.100 (0.223)
factor(country)Argentina 36.832 (12.982)*** 21.298 (16.341)
factor(country)Aruba 3.209 (3.618) 0.561 (4.223)
factor(country)Bahamas, The 11.085 (11.127) 1.015 (12.957)
factor(country)Barbados 0.307 (1.430) -0.743 (1.571)
factor(country)Belize -2.922 (6.289) -4.997 (6.186)
factor(country)Bolivia 3.726 (9.725) -4.851 (10.892)
factor(country)Brazil 113.016 (31.201)*** 84.310 (34.675)**
factor(country)Chile 26.199 (12.213)** 13.946 (14.484)
factor(country)Colombia 36.098 (11.460)*** 21.255 (14.585)
factor(country)Costa Rica 15.674 (11.575) 6.726 (12.825)
factor(country)Cuba 17.121 (10.606) 6.958 (12.219)
factor(country)Dominican Republic 12.709 (11.841) 2.536 (13.343)
factor(country)Ecuador 13.746 (8.487) 5.997 (9.677)
factor(country)El Salvador 12.594 (8.581) -0.069 (10.878)
factor(country)Grenada -4.489 (4.670) -4.372 (4.399)
factor(country)Guatemala 7.296 (6.070) 1.275 (6.950)
factor(country)Guyana -10.764 (2.203)*** -10.670 (2.042)***
factor(country)Haiti -2.278 (6.843) -9.146 (7.760)
factor(country)Honduras 4.041 (8.052) -1.474 (8.558)
factor(country)Jamaica 1.216 (7.097) -4.367 (7.668)
factor(country)Mexico 68.827 (18.858)*** 48.099 (22.313)**
factor(country)Nicaragua 6.413 (7.139) -1.131 (8.167)
factor(country)Panama 9.629 (9.496) 3.496 (10.270)
factor(country)Paraguay 5.092 (8.531) -0.908 (9.177)
factor(country)Peru 25.837 (10.520)** 13.278 (13.005)
factor(country)Puerto Rico 22.875 (12.728)* 9.685 (15.258)
factor(country)St. Lucia -10.547 (2.703)*** -7.234 (2.961)**
factor(country)St. Vincent and the Grenadines -3.042 (8.182) -4.871 (8.011)
factor(country)Suriname 3.135 (9.204) -3.527 (9.923)
factor(country)Trinidad and Tobago 1.758 (6.436) -1.938 (6.851)
factor(country)Turks and Caicos Islands 12.181 (14.597) 3.136 (15.834)
factor(country)Uruguay 21.499 (13.397) 7.229 (15.852)
factor(country)Virgin Islands (U.S.) 22.783 (13.253)* 9.819 (15.726)
factor(year)2018 0.041 (0.719) 0.203 (0.178)
factor(year)2019 -0.038 (0.719) 0.268 (0.210)
factor(year)2020 -0.633 (0.722) -0.624 (0.292)**
Constant 85.145 (16.113)*** 164.482 (79.729)** 83.747 (16.285)*** 100.673 (75.839)
Observations 136 136 136 136
R2 0.331 0.968 0.337 0.973
Adjusted R2 0.310 0.956 0.300 0.962
Note: Standard Errors reported in parentheses, *p<0.1;**p<0.05;***p<0.01

15.7 Data Summary by Country

The remainder of this file has summaries of the data that are included to illustrate the within transformation. The colors in the tables for each variable make it easy to see the variation used when we use the within transformation, and thus that is used for identification in fixed effects models. For each variable, for each country you can clearly see which years are above that countries average and which years are below that country’s average.

15.7.1 Standard Summary Statistics

Statistic N Mean St. Dev. Min Pctl(25) Median Pctl(75) Max
lifeExp 136 74.529 3.542 63.854 72.718 74.229 77.264 80.350
gdpPerCapita 136 11.547 8.686 1.323 5.865 8.448 14.972 36.273
pop 136 18.012 40.809 0.040 0.387 4.644 11.650 213.196
pctFemale 136 50.684 1.040 48.814 49.927 50.434 51.092 53.086
pctRural 136 34.779 21.572 4.061 18.474 33.243 47.490 81.388

15.7.2 Average Values for Each Country

country Avg
lifeExp
Avg
gdpPerCapita
Avg
pop
Avg
pctFemale
Avg
pctRural
Antigua and Barbuda 78.58 16.17 0.09 52.28 75.44
Argentina 76.75 12.69 44.71 50.49 8.07
Aruba 75.99 29.89 0.11 52.81 56.51
Bahamas, The 72.83 28.93 0.40 52.08 16.92
Barbados 77.16 16.67 0.28 52.10 68.84
Belize 73.51 5.63 0.39 49.66 54.20
Bolivia 66.94 3.13 11.69 49.76 30.40
Brazil 74.82 8.46 210.91 50.83 13.31
Chile 80.05 13.51 18.85 50.37 12.39
Colombia 76.23 6.22 49.69 50.63 19.06
Costa Rica 79.39 12.36 5.06 49.91 20.31
Cuba 77.55 7.78 11.32 50.25 22.92
Dominican Republic 73.19 7.78 10.82 49.70 18.57
Ecuador 75.88 5.80 17.16 50.00 36.09
El Salvador 72.12 3.95 6.28 52.33 27.63
Grenada 74.84 8.84 0.12 49.88 63.66
Guatemala 72.55 4.16 16.47 50.47 48.75
Guyana 68.79 6.91 0.79 50.97 73.35
Haiti 64.04 1.39 11.09 50.40 44.27
Honduras 72.46 2.36 9.88 49.47 42.59
Jamaica 71.84 5.13 2.81 50.36 44.16
Mexico 73.12 9.82 124.48 51.08 19.70
Nicaragua 73.31 2.01 6.62 50.72 41.35
Panama 77.53 14.23 4.20 49.94 32.11
Paraguay 73.50 6.22 6.49 49.76 38.26
Peru 75.43 6.31 32.48 50.44 21.99
Puerto Rico 79.03 29.44 3.25 52.56 6.42
St. Lucia 73.34 10.40 0.18 50.38 81.28
St. Vincent and the Grenadines 73.35 8.01 0.11 48.87 47.59
Suriname 72.44 8.30 0.60 50.10 33.91
Trinidad and Tobago 74.17 15.46 1.51 50.63 46.80
Turks and Caicos Islands 75.87 23.34 0.04 49.52 6.78
Uruguay 77.79 15.91 3.43 51.62 4.62
Virgin Islands (U.S.) 79.59 35.38 0.11 52.88 4.23

15.7.3 Variable-Specific Values and Within Transformation for Each Country

For each variable, display each country’s values in 2017, 2018, 2019, and 2020, followed by the country’s average. These 5 columns are shaded from red (lowest) to green (highest) for each country. Then, in the final 4 columns display the within transformation (i.e., subtract the country’s average from each year’s value). These last 4 columns are also shaded for each country.

15.7.4 Life expectancy

iso3c 2017
Life Exp
2018
Life Exp
2019
Life Exp
2020
Life Exp
Avg
Life Exp
2017
Within
2018
Within
2019
Within
2020
Within
ABW 75.90 76.07 76.25 75.72 75.99 -0.08 0.09 0.26 -0.26
ARG 76.83 77.00 77.28 75.89 76.75 0.08 0.25 0.53 -0.86
ATG 78.27 78.51 78.69 78.84 78.58 -0.31 -0.07 0.11 0.26
BHS 73.63 73.81 71.20 72.68 72.83 0.80 0.98 -1.62 -0.15
BLZ 73.56 73.70 73.93 72.85 73.51 0.05 0.19 0.42 -0.66
BOL 67.70 67.75 67.84 64.47 66.94 0.76 0.81 0.90 -2.47
BRA 74.83 75.11 75.34 74.01 74.82 0.01 0.29 0.52 -0.81
BRB 76.94 77.07 77.26 77.39 77.16 -0.23 -0.10 0.09 0.23
CHL 80.35 80.13 80.33 79.38 80.05 0.30 0.09 0.28 -0.67
COL 76.65 76.75 76.75 74.77 76.23 0.42 0.52 0.52 -1.46
CRI 79.38 79.48 79.43 79.28 79.39 -0.01 0.09 0.04 -0.11
CUB 77.53 77.50 77.61 77.57 77.55 -0.02 -0.05 0.06 0.02
DOM 73.06 73.23 73.58 72.89 73.19 -0.13 0.04 0.39 -0.30
ECU 76.97 77.09 77.30 72.15 75.88 1.09 1.22 1.42 -3.73
GRD 74.76 74.81 74.86 74.92 74.84 -0.08 -0.03 0.02 0.08
GTM 72.55 72.73 73.13 71.80 72.55 0.00 0.18 0.58 -0.75
GUY 68.67 68.90 69.12 68.49 68.79 -0.13 0.10 0.33 -0.31
HND 72.69 72.81 72.88 71.46 72.46 0.23 0.35 0.42 -1.00
HTI 63.85 64.02 64.25 64.05 64.04 -0.19 -0.03 0.21 0.01
JAM 71.91 71.79 71.77 71.87 71.84 0.08 -0.04 -0.07 0.03
LCA 73.13 73.36 73.44 73.42 73.34 -0.21 0.02 0.11 0.08
MEX 74.14 74.02 74.20 70.13 73.12 1.02 0.89 1.08 -2.99
NIC 73.55 73.85 74.05 71.80 73.31 0.24 0.54 0.74 -1.52
PAN 77.80 77.86 77.81 76.66 77.53 0.26 0.33 0.28 -0.87
PER 75.88 76.01 76.16 73.67 75.43 0.45 0.58 0.73 -1.76
PRI 79.26 79.77 79.06 78.04 79.03 0.22 0.74 0.03 -0.99
PRY 73.64 73.57 73.62 73.18 73.50 0.14 0.06 0.12 -0.32
SLV 72.31 72.56 72.56 71.06 72.12 0.19 0.43 0.44 -1.06
SUR 72.42 72.55 72.24 72.56 72.44 -0.03 0.11 -0.20 0.12
TCA 76.70 76.44 75.33 75.00 75.87 0.83 0.58 -0.54 -0.87
TTO 74.23 73.80 74.23 74.41 74.17 0.06 -0.36 0.06 0.24
URY 77.62 77.61 77.51 78.43 77.79 -0.17 -0.18 -0.29 0.64
VCT 74.31 74.13 72.83 72.13 73.35 0.96 0.78 -0.51 -1.22
VIR 79.37 79.52 79.67 79.82 79.59 -0.23 -0.07 0.07 0.23

15.7.5 GDP per capita

iso3c 2017
GDP per Capita
2018
GDP per Capita
2019
GDP per Capita
2020
GDP per Capita
Avg
GDP per Capita
2017
Within
2018
Within
2019
Within
2020
Within
ABW 30270.94 31705.28 31762.73 25823.63 29890.65 0.38 1.81 1.87 -4.07
ARG 13595.04 13105.40 12716.22 11341.27 12689.48 0.91 0.42 0.03 -1.35
ATG 15962.68 16967.09 17697.23 14040.37 16166.84 -0.20 0.80 1.53 -2.13
BHS 30371.58 30705.60 31082.81 23566.58 28931.64 1.44 1.77 2.15 -5.37
BLZ 5806.07 5756.85 5907.35 5040.12 5627.60 0.18 0.13 0.28 -0.59
BOL 3135.03 3219.20 3242.95 2920.20 3129.34 0.01 0.09 0.11 -0.21
BRA 8470.95 8553.88 8592.22 8204.20 8455.31 0.02 0.10 0.14 -0.25
BRB 17430.87 17220.93 17168.15 14855.69 16668.91 0.76 0.55 0.50 -1.81
CHL 13615.52 13906.77 13765.12 12767.30 13513.68 0.10 0.39 0.25 -0.75
COL 6280.66 6320.76 6403.88 5865.65 6217.74 0.06 0.10 0.19 -0.35
CRI 12267.16 12470.96 12662.42 12058.00 12364.64 -0.10 0.11 0.30 -0.31
CUB 7865.37 8048.02 8042.95 7172.52 7782.21 0.08 0.27 0.26 -0.61
DOM 7461.65 7894.96 8205.14 7571.78 7783.38 -0.32 0.11 0.42 -0.21
ECU 6012.80 5976.25 5863.91 5331.98 5796.23 0.22 0.18 0.07 -0.46
GRD 8933.23 9252.68 9247.91 7915.21 8837.26 0.10 0.42 0.41 -0.92
GTM 4091.27 4163.48 4263.08 4124.70 4160.63 -0.07 0.00 0.10 -0.04
GUY 6038.27 6127.71 6348.70 9126.81 6910.37 -0.87 -0.78 -0.56 2.22
HND 2373.79 2423.27 2446.11 2190.97 2358.53 0.02 0.06 0.09 -0.17
HTI 1425.05 1429.23 1386.52 1322.81 1390.90 0.03 0.04 0.00 -0.07
JAM 5172.92 5264.20 5307.51 4765.47 5127.52 0.05 0.14 0.18 -0.36
LCA 10942.25 11211.60 11095.35 8361.39 10402.65 0.54 0.81 0.69 -2.04
MEX 9997.69 10120.36 10013.70 9147.05 9819.70 0.18 0.30 0.19 -0.67
NIC 2153.61 2052.13 1947.41 1886.51 2009.92 0.14 0.04 -0.06 -0.12
PAN 14634.84 14922.13 15122.52 12230.04 14227.38 0.41 0.69 0.90 -2.00
PER 6400.12 6530.50 6550.53 5749.02 6307.54 0.09 0.22 0.24 -0.56
PRI 29809.22 29687.21 30181.27 28094.60 29443.07 0.37 0.24 0.74 -1.35
PRY 6226.69 6338.51 6229.22 6095.39 6222.45 0.00 0.12 0.01 -0.13
SLV 3921.32 4009.72 4104.92 3761.75 3949.43 -0.03 0.06 0.16 -0.19
SUR 8425.68 8750.92 8756.07 7275.29 8301.99 0.12 0.45 0.45 -1.03
TCA 24726.95 25080.16 25438.78 18122.43 23342.08 1.38 1.74 2.10 -5.22
TTO 16134.89 15716.91 15576.43 14397.55 15456.45 0.68 0.26 0.12 -1.06
URY 16088.00 16142.05 16192.16 15197.96 15905.04 0.18 0.24 0.29 -0.71
VCT 7890.82 8152.38 8213.16 7798.53 8013.72 -0.12 0.14 0.20 -0.22
VIR 34435.49 35183.24 36273.10 35620.87 35378.17 -0.94 -0.19 0.89 0.24

15.7.6 Population

iso3c 2017
Population
2018
Population
2019
Population
2020
Population
Avg
Population
2017
Within
2018
Within
2019
Within
2020
Within
ABW 105439 105962 106442 106585 106107.00 0.00 0.00 0.00 0.00
ARG 44044811 44494502 44938712 45376763 44713697.00 -0.67 -0.22 0.23 0.66
ATG 91119 91626 92117 92664 91881.50 0.00 0.00 0.00 0.00
BHS 399020 401906 404557 406471 402988.50 0.00 0.00 0.00 0.00
BLZ 374693 382066 389095 394921 385193.75 -0.01 0.00 0.00 0.01
BOL 11435533 11606905 11777315 11936162 11688978.75 -0.25 -0.08 0.09 0.25
BRA 208504960 210166592 211782878 213196304 210912683.50 -2.41 -0.75 0.87 2.28
BRB 279187 279688 280180 280693 279937.00 0.00 0.00 0.00 0.00
CHL 18368577 18701450 19039485 19300315 18852456.75 -0.48 -0.15 0.19 0.45
COL 48351671 49276961 50187406 50930662 49686675.00 -1.34 -0.41 0.50 1.24
CRI 4993842 5040734 5084532 5123105 5060553.25 -0.07 -0.02 0.02 0.06
CUB 11336405 11328244 11316697 11300698 11320511.00 0.02 0.01 0.00 -0.02
DOM 10647244 10765531 10881882 10999664 10823580.25 -0.18 -0.06 0.06 0.18
ECU 16696944 17015672 17343740 17588595 17161237.75 -0.46 -0.15 0.18 0.43
GRD 120921 121838 122724 123663 122286.50 0.00 0.00 0.00 0.00
GTM 16087418 16346950 16604026 16858333 16474181.75 -0.39 -0.13 0.13 0.38
GUY 763252 785514 798753 797202 786180.25 -0.02 0.00 0.01 0.01
HND 9626842 9792850 9958829 10121763 9875071.00 -0.25 -0.08 0.08 0.25
HTI 10863543 11012421 11160438 11306801 11085800.75 -0.22 -0.07 0.07 0.22
JAM 2808376 2811835 2813773 2820436 2813605.00 -0.01 0.00 0.00 0.01
LCA 177163 177888 178583 179237 178217.75 0.00 0.00 0.00 0.00
MEX 122839258 124013861 125085311 125998302 124484183.00 -1.64 -0.47 0.60 1.51
NIC 6480532 6572233 6663924 6755895 6618146.00 -0.14 -0.05 0.05 0.14
PAN 4096063 4165255 4232532 4294396 4197061.50 -0.10 -0.03 0.04 0.10
PER 31605486 32203944 32824861 33304756 32484761.75 -0.88 -0.28 0.34 0.82
PRI 3325286 3193354 3193694 3281538 3248468.00 0.08 -0.06 -0.05 0.03
PRY 6355404 6443328 6530026 6618695 6486863.25 -0.13 -0.04 0.04 0.13
SLV 6266654 6276342 6280217 6292731 6278986.00 -0.01 0.00 0.00 0.01
SUR 587559 593715 600301 607065 597160.00 -0.01 0.00 0.00 0.01
TCA 39844 41487 43080 44276 42171.75 0.00 0.00 0.00 0.00
TTO 1478607 1504709 1519955 1518147 1505354.50 -0.03 0.00 0.01 0.01
URY 3422200 3427042 3428409 3429086 3426684.25 0.00 0.00 0.00 0.00
VCT 105549 105281 104924 104632 105096.50 0.00 0.00 0.00 0.00
VIR 107281 107001 106669 106290 106810.25 0.00 0.00 0.00 0.00

15.7.7 Percent female

iso3c 2017
%Female
2018
%Female
2019
%Female
2020
%Female
Avg
%Female
2017
Within
2018
Within
2019
Within
2020
Within
ABW 52.72 52.79 52.85 52.89 52.81 -0.09 -0.02 0.04 0.08
ARG 50.50 50.49 50.49 50.49 50.49 0.01 0.00 0.00 0.00
ATG 52.30 52.29 52.28 52.26 52.28 0.02 0.01 -0.01 -0.02
BHS 52.01 52.06 52.11 52.15 52.08 -0.07 -0.02 0.03 0.06
BLZ 49.67 49.65 49.64 49.66 49.66 0.01 0.00 -0.01 0.00
BOL 49.73 49.75 49.76 49.80 49.76 -0.03 -0.01 0.00 0.04
BRA 50.81 50.82 50.84 50.85 50.83 -0.02 -0.01 0.01 0.02
BRB 52.13 52.11 52.09 52.07 52.10 0.03 0.01 -0.01 -0.03
CHL 50.38 50.37 50.36 50.36 50.37 0.01 0.00 -0.01 -0.01
COL 50.62 50.62 50.63 50.64 50.63 -0.01 0.00 0.00 0.01
CRI 49.88 49.90 49.92 49.94 49.91 -0.03 -0.01 0.01 0.03
CUB 50.21 50.24 50.27 50.30 50.25 -0.04 -0.01 0.01 0.04
DOM 49.65 49.68 49.71 49.75 49.70 -0.04 -0.02 0.01 0.05
ECU 49.99 49.99 49.99 50.02 50.00 -0.01 -0.01 0.00 0.02
GRD 49.82 49.86 49.90 49.93 49.88 -0.06 -0.02 0.02 0.05
GTM 50.47 50.47 50.47 50.48 50.47 0.00 0.00 0.00 0.01
GUY 51.09 50.86 50.82 51.09 50.97 0.13 -0.11 -0.14 0.13
HND 49.46 49.46 49.47 49.49 49.47 -0.01 -0.01 0.00 0.02
HTI 50.37 50.39 50.40 50.42 50.40 -0.03 -0.01 0.01 0.03
JAM 50.34 50.35 50.36 50.37 50.36 -0.01 -0.01 0.01 0.02
LCA 50.31 50.35 50.40 50.44 50.38 -0.07 -0.02 0.02 0.07
MEX 51.05 51.07 51.08 51.12 51.08 -0.03 -0.01 0.00 0.04
NIC 50.72 50.72 50.71 50.72 50.72 0.00 0.00 0.00 0.00
PAN 49.93 49.94 49.95 49.96 49.94 -0.01 -0.01 0.00 0.02
PER 50.43 50.43 50.44 50.46 50.44 -0.01 -0.01 0.00 0.02
PRI 52.44 52.51 52.60 52.69 52.56 -0.12 -0.05 0.04 0.13
PRY 49.74 49.75 49.76 49.78 49.76 -0.02 -0.01 0.01 0.02
SLV 52.29 52.32 52.35 52.37 52.33 -0.04 -0.01 0.02 0.03
SUR 50.04 50.09 50.12 50.14 50.10 -0.06 -0.01 0.02 0.05
TCA 49.46 49.50 49.54 49.58 49.52 -0.06 -0.02 0.02 0.06
TTO 50.76 50.59 50.53 50.65 50.63 0.13 -0.05 -0.10 0.02
URY 51.65 51.63 51.61 51.59 51.62 0.03 0.01 -0.01 -0.03
VCT 48.81 48.85 48.88 48.93 48.87 -0.05 -0.02 0.01 0.06
VIR 52.69 52.81 52.94 53.09 52.88 -0.20 -0.07 0.06 0.20

15.7.8 Percent rural

iso3c 2017
%Rural
2018
%Rural
2019
%Rural
2020
%Rural
Avg
%Rural
2017
Within
2018
Within
2019
Within
2020
Within
ABW 56.71 56.59 56.45 56.30 56.51 0.19 0.08 -0.06 -0.21
ARG 8.25 8.13 8.01 7.89 8.07 0.18 0.06 -0.06 -0.18
ATG 75.29 75.40 75.49 75.57 75.44 -0.15 -0.04 0.06 0.13
BHS 17.08 16.98 16.87 16.75 16.92 0.16 0.06 -0.05 -0.16
BLZ 54.40 54.28 54.13 53.98 54.20 0.20 0.08 -0.06 -0.22
BOL 30.92 30.58 30.23 29.88 30.40 0.52 0.18 -0.17 -0.52
BRA 13.69 13.43 13.18 12.93 13.31 0.38 0.12 -0.13 -0.38
BRB 68.84 68.85 68.84 68.81 68.84 0.00 0.02 0.01 -0.03
CHL 12.51 12.44 12.36 12.27 12.39 0.12 0.04 -0.04 -0.12
COL 19.55 19.22 18.90 18.58 19.06 0.49 0.16 -0.17 -0.49
CRI 21.44 20.66 19.92 19.23 20.31 1.13 0.35 -0.39 -1.08
CUB 23.02 22.96 22.89 22.81 22.92 0.10 0.04 -0.03 -0.11
DOM 19.72 18.93 18.17 17.46 18.57 1.15 0.36 -0.40 -1.11
ECU 36.33 36.18 36.01 35.83 36.09 0.24 0.09 -0.08 -0.26
GRD 63.84 63.73 63.60 63.46 63.66 0.18 0.07 -0.05 -0.19
GTM 49.32 48.95 48.56 48.16 48.75 0.57 0.20 -0.19 -0.58
GUY 73.46 73.39 73.31 73.21 73.35 0.12 0.05 -0.03 -0.13
HND 43.54 42.90 42.27 41.64 42.59 0.95 0.31 -0.32 -0.95
HTI 45.65 44.72 43.81 42.91 44.27 1.38 0.45 -0.47 -1.36
JAM 44.62 44.33 44.02 43.69 44.16 0.46 0.16 -0.15 -0.47
LCA 81.39 81.32 81.25 81.16 81.28 0.11 0.04 -0.03 -0.12
MEX 20.13 19.84 19.56 19.27 19.70 0.43 0.14 -0.14 -0.43
NIC 41.70 41.48 41.24 40.99 41.35 0.35 0.13 -0.11 -0.36
PAN 32.63 32.29 31.94 31.59 32.11 0.52 0.18 -0.17 -0.53
PER 22.28 22.09 21.90 21.70 21.99 0.29 0.10 -0.09 -0.29
PRI 6.41 6.42 6.42 6.42 6.42 -0.01 0.00 0.00 0.00
PRY 38.70 38.42 38.12 37.82 38.26 0.44 0.15 -0.14 -0.45
SLV 28.73 27.98 27.25 26.56 27.63 1.10 0.35 -0.37 -1.07
SUR 33.96 33.94 33.91 33.85 33.91 0.05 0.03 -0.01 -0.06
TCA 7.18 6.90 6.64 6.39 6.78 0.40 0.12 -0.14 -0.39
TTO 46.80 46.82 46.81 46.79 46.80 -0.01 0.01 0.01 -0.02
URY 4.76 4.67 4.57 4.48 4.62 0.14 0.04 -0.05 -0.14
VCT 48.22 47.80 47.39 46.97 47.59 0.62 0.21 -0.21 -0.62
VIR 4.40 4.28 4.17 4.06 4.23 0.17 0.05 -0.06 -0.17