17 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 2015 - 2018 (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 you 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 like 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” or “Un-comment this out after you estimate the models.”
Solutions are posted in Moodle. The bare minimum you need to do is copy what I have in the solutions and paste it into this file. Doing that will not be considered cheating (in some classes that would be considered cheating, so always make sure you know whether using posted solutions is ok or not). If all you do is copy the solutions, however, you clearly won’t come away with a better understanding of the material, so I strongly encourage you to try to work through the questions on your own before looking at the solutions. But when you’re stuck or just can’t figure out what I’m asking, use the solutions rather than wasting time.
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
<- wb_countries()
countryList
# List of all available variables (what they call "indicators")
<- wb_cachelist$indicators
availableIndicators
## 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 thigns 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 2016 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
<- c(
indicatorsToDownload 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)
<- availableIndicators %>%
indicatorInfo 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)){
<- paste0(sDesc
sDesc "<b>",
,$indicator[i],
indicatorInfo" (",indicatorInfo$indicator_id[i]
")</b>: "
, $indicator_desc[i]
,indicatorInfo"<br>")
,
}
## Download data
<- wb_data(indicatorsToDownload,
mydataOrig start_date = 2015,
end_date = 2018)
## get vector of TRUE and FALSE where FALSE indicates there's one or more NA
<- complete.cases(mydataOrig)
noNAs
## 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
<- mydataOrig[noNAs,]
mydata
## get count of rows for each country
<- mydata %>% count(country)
countOfYearsByCountry
## merge the count variable with the data
<- inner_join(mydata,countOfYearsByCountry, by="country")
mydata
## keep only countries that have all 4 years complete
<- mydata %>% filter(n==4)
mydata
## drop count variable (since all are now 4)
<- mydata %>% select(-n)
mydata
## For the purposes of this chapter, lets only examine one group of countries
## so that we can output results without it taking up hundreds of lines
## If this weren't a BP chapter we wouldn't do this
## Merge in country info (e.g., region)
<- inner_join(mydata,select(countryList,country,region),by="country")
mydata
## Keep only region "Latin America & Caribbean" (so we end up with only 31 countries)
<- mydata %>% filter(region == "Latin America & Caribbean") %>% select(-region)
mydata
<- mydata %>% rename(year=date)
mydata
## 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 %>% mutate(pop=pop/1000000,
mydata gdpPerCapita=gdpPerCapita/1000)
%>% select(lifeExp, gdpPerCapita, pop, pctFemale, pctRural) %>% as.data.frame() %>%
mydata 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 | 124 | 74.780 | 3.419 | 62.485 | 73.206 | 74.799 | 76.821 | 80.095 |
gdpPerCapita | 124 | 9.122 | 6.447 | 1.261 | 4.838 | 7.664 | 11.188 | 28.845 |
pop | 124 | 19.394 | 41.699 | 0.094 | 0.575 | 6.315 | 15.632 | 209.469 |
pctFemale | 124 | 50.600 | 0.892 | 49.071 | 49.962 | 50.566 | 51.090 | 53.114 |
pctRural | 124 | 36.488 | 20.834 | 4.666 | 20.210 | 33.952 | 47.906 | 81.485 |
17.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 this is not how you would describe your variables in a paper, but for the purposes of this assignment, it’s an easy way to get an accurate description of each variable)
17.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.
<- lm(data=mydata,lifeExp~gdpPerCapita+pop+pctFemale+pctRural) ols
17.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=2015}^{2018}y_{it}\) is the average value of \(y_{it}\) over the 4 years for country \(i\), \(\bar{x}_{ji}=\sum_{t=2015}^{2018}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=2015}^{2018}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=2015}^{2018}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 unobservable 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.3. In 2015, their value was 76.07, which is 0.23 below Argentina’s four-year average value of 76.3. In 2016, Argentina’s life expectancy was 76.22, 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.
## Dummy variable for each country (it automatically omits one)
<- lm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural+factor(country),data=mydata)
countryDummies
## Within transformation (subtract country averages from each observation for each variable)
## Create Country Averages
<- 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
<- mydata %>%
mydataCountry mutate(lifeExp=lifeExp-cAvg_lifeExp,
gdpPerCapita=gdpPerCapita-cAvg_gdpPerCapita,
pop=pop-cAvg_pop,
pctFemale=pctFemale-cAvg_pctFemale,
pctRural=pctRural-cAvg_pctRural
%>%
) ungroup()
## Estimate within transformation using the transformed data
<- lm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural,data=mydataCountry)
countryWithin
## Using plm package
<- plm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural,data=mydata, index=c("country"), model = "within", effect="individual") countryPlm
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>*p<0.1;**p<0.05;***p<0.01</em>",
notes.append = FALSE)
Dependent variable: | |||
lifeExp | |||
OLS | panel | ||
linear | |||
(1) | (2) | (3) | |
gdpPerCapita | 0.0781 (0.0567) | 0.0781 (0.0490) | 0.0781 (0.0567) |
pop | 0.0757 (0.0290)** | 0.0757 (0.0251)*** | 0.0757 (0.0290)** |
pctFemale | -0.1519 (0.4495) | -0.1519 (0.3887) | -0.1519 (0.4495) |
pctRural | -0.3383 (0.0388)*** | -0.3383 (0.0335)*** | -0.3383 (0.0388)*** |
factor(country)Argentina | -26.1200 (2.5877)*** | ||
factor(country)Bahamas, The | -24.0784 (2.1213)*** | ||
factor(country)Barbados | -0.0934 (0.2628) | ||
factor(country)Belize | -8.9356 (1.6161)*** | ||
factor(country)Bolivia | -21.0753 (2.4996)*** | ||
factor(country)Brazil | -37.6904 (5.5544)*** | ||
factor(country)Chile | -19.6422 (2.4795)*** | ||
factor(country)Colombia | -21.9239 (2.3659)*** | ||
factor(country)Costa Rica | -15.1925 (2.5761)*** | ||
factor(country)Cuba | -16.1903 (2.4769)*** | ||
factor(country)Dominican Republic | -22.2571 (2.6692)*** | ||
factor(country)Ecuador | -14.1840 (2.1316)*** | ||
factor(country)El Salvador | -18.9725 (1.8990)*** | ||
factor(country)Grenada | -8.0250 (1.3951)*** | ||
factor(country)Guatemala | -12.2289 (1.5310)*** | ||
factor(country)Guyana | -7.4116 (1.1430)*** | ||
factor(country)Haiti | -23.4308 (1.7766)*** | ||
factor(country)Honduras | -12.5249 (1.9995)*** | ||
factor(country)Jamaica | -12.4726 (1.8348)*** | ||
factor(country)Mexico | -29.5143 (3.4670)*** | ||
factor(country)Nicaragua | -13.7110 (1.9065)*** | ||
factor(country)Panama | -13.3533 (2.1755)*** | ||
factor(country)Paraguay | -15.3045 (2.3842)*** | ||
factor(country)Peru | -20.3696 (2.4266)*** | ||
factor(country)Puerto Rico | -21.6200 (2.3663)*** | ||
factor(country)St. Lucia | 1.4818 (0.5706)** | ||
factor(country)St. Vincent and the Grenadines | -13.3274 (2.0799)*** | ||
factor(country)Suriname | -19.1217 (2.3163)*** | ||
factor(country)Trinidad and Tobago | -13.5569 (1.3738)*** | ||
factor(country)Uruguay | -23.2122 (2.7061)*** | ||
Constant | 108.8921 (24.8138)*** | 0.0000 (0.0115) | |
Observations | 124 | 124 | 124 |
R2 | 0.9986 | 0.6407 | 0.6407 |
Adjusted R2 | 0.9981 | 0.6286 | 0.5034 |
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.
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.
17.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 everythign else is the same.
## Dummy variable for each year (it automatically omits one)
<- lm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural+factor(year),data=mydata)
yearDummies
## Within transformation (subtract year averages from each observation for each variable)
## Create Year Averages
<- mydata %>%
mydata group_by(year) %>%
mutate(yrAvg_lifeExp=mean(lifeExp),
yrAvg_gdpPerCapita=mean(gdpPerCapita),
yrAvg_pop=mean(pop),
yrAvg_pctFemale=mean(pctFemale),
yrAvg_pctRural=mean(pctRural)
%>%
) ungroup()
## Within transformation
<- mydata %>%
mydataYear mutate(lifeExp=lifeExp-yrAvg_lifeExp,
gdpPerCapita=gdpPerCapita-yrAvg_gdpPerCapita,
pop=pop-yrAvg_pop,
pctFemale=pctFemale-yrAvg_pctFemale,
pctRural=pctRural-yrAvg_pctRural
%>%
) ungroup()
## Estimate within transformation using the transformed data
<- lm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural,data=mydataYear)
yearWithin
## Using plm package
<- plm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural,data=mydata, index=c("year"), model = "within", effect="individual") yearPlm
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>*p<0.1;**p<0.05;***p<0.01</em>",
notes.append = FALSE)
Dependent variable: | |||
lifeExp | |||
OLS | panel | ||
linear | |||
(1) | (2) | (3) | |
gdpPerCapita | 0.1938 (0.0498)*** | 0.1938 (0.0492)*** | 0.1938 (0.0498)*** |
pop | -0.0009 (0.0072) | -0.0009 (0.0071) | -0.0009 (0.0072) |
pctFemale | 0.2027 (0.3512) | 0.2027 (0.3468) | 0.2027 (0.3512) |
pctRural | -0.0347 (0.0149)** | -0.0347 (0.0147)** | -0.0347 (0.0149)** |
factor(year)2016 | 0.1555 (0.7745) | ||
factor(year)2017 | 0.2926 (0.7746) | ||
factor(year)2018 | 0.4222 (0.7747) | ||
Constant | 63.8247 (17.6194)*** | -0.0000 (0.2704) | |
Observations | 124 | 124 | 124 |
R2 | 0.2497 | 0.2474 | 0.2474 |
Adjusted R2 | 0.2045 | 0.2221 | 0.2020 |
Note: | Standard Errors reported in parentheses, *p<0.1;**p<0.05;***p<0.01 |
17.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.
## Dummy variable for each country and each year (it automatically omits one of each)
<- lm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural+factor(year)+factor(country),data=mydata)
countryyearDummies
## 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
<- mydata %>%
mydataCountryYear mutate(lifeExp=lifeExp-cAvg_lifeExp-yrAvg_lifeExp,
gdpPerCapita=gdpPerCapita-cAvg_gdpPerCapita-yrAvg_gdpPerCapita,
pop=pop-cAvg_pop-yrAvg_pop,
pctFemale=pctFemale-cAvg_pctFemale-yrAvg_pctFemale,
pctRural=pctRural-cAvg_pctRural-yrAvg_pctRural
%>%
) ungroup()
##Estimate within transformation using the transformed data
<- lm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural,data=mydataCountryYear)
countryYearWithin
##Using plm package
<- plm(lifeExp~gdpPerCapita+pop+pctFemale+pctRural,data=mydata, index=c("country","year"), model = "within", effect="twoways") countryYearPlm
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>*p<0.1;**p<0.05;***p<0.01</em>",
notes.append = FALSE)
Dependent variable: | |||
lifeExp | |||
OLS | panel | ||
linear | |||
(1) | (2) | (3) | |
gdpPerCapita | -0.0727 (0.0365)** | -0.0727 (0.0310)** | -0.0727 (0.0365)** |
pop | -0.0108 (0.0188) | -0.0108 (0.0160) | -0.0108 (0.0188) |
pctFemale | -0.5372 (0.2734)* | -0.5372 (0.2324)** | -0.5372 (0.2734)* |
pctRural | -0.1683 (0.0270)*** | -0.1683 (0.0230)*** | -0.1683 (0.0270)*** |
factor(year)2016 | 0.1390 (0.0239)*** | ||
factor(year)2017 | 0.2773 (0.0277)*** | ||
factor(year)2018 | 0.4118 (0.0335)*** | ||
factor(country)Argentina | -11.7615 (1.9356)*** | ||
factor(country)Bahamas, The | -12.2177 (1.5912)*** | ||
factor(country)Barbados | 1.2681 (0.1922)*** | ||
factor(country)Belize | -7.5257 (0.9843)*** | ||
factor(country)Bolivia | -15.1800 (1.5823)*** | ||
factor(country)Brazil | -10.2146 (4.0039)** | ||
factor(country)Chile | -7.7168 (1.7726)*** | ||
factor(country)Colombia | -9.6142 (1.7322)*** | ||
factor(country)Costa Rica | -7.0988 (1.6843)*** | ||
factor(country)Cuba | -8.0607 (1.6304)*** | ||
factor(country)Dominican Republic | -13.7683 (1.7485)*** | ||
factor(country)Ecuador | -8.2193 (1.3730)*** | ||
factor(country)El Salvador | -11.7421 (1.2833)*** | ||
factor(country)Grenada | -7.7944 (0.8441)*** | ||
factor(country)Guatemala | -8.5278 (0.9716)*** | ||
factor(country)Guyana | -9.1034 (0.7054)*** | ||
factor(country)Haiti | -19.9505 (1.1098)*** | ||
factor(country)Honduras | -8.8861 (1.2436)*** | ||
factor(country)Jamaica | -9.0430 (1.1426)*** | ||
factor(country)Mexico | -10.3310 (2.5908)*** | ||
factor(country)Nicaragua | -9.7683 (1.1949)*** | ||
factor(country)Panama | -6.9810 (1.4088)*** | ||
factor(country)Paraguay | -10.9304 (1.4829)*** | ||
factor(country)Peru | -10.4522 (1.6648)*** | ||
factor(country)Puerto Rico | -7.4365 (1.8210)*** | ||
factor(country)St. Lucia | -0.7730 (0.3896)* | ||
factor(country)St. Vincent and the Grenadines | -10.9295 (1.2721)*** | ||
factor(country)Suriname | -13.7941 (1.4627)*** | ||
factor(country)Trinidad and Tobago | -8.8542 (0.9102)*** | ||
factor(country)Uruguay | -10.9637 (1.9026)*** | ||
Constant | 118.0087 (15.0183)*** | -108.9780 (12.1646)*** | |
Observations | 124 | 124 | 124 |
R2 | 0.9995 | 0.3170 | 0.3170 |
Adjusted R2 | 0.9993 | 0.2941 | 0.0232 |
Note: | Standard Errors reported in parentheses, *p<0.1;**p<0.05;***p<0.01 |
17.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.
17.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>*p<0.1;**p<0.05;***p<0.01</em>",
notes.append = FALSE)
Dependent variable: | ||||
lifeExp | ||||
(1) | (2) | (3) | (4) | |
gdpPerCapita | 0.194 (0.049)*** | 0.078 (0.049) | 0.194 (0.049)*** | -0.073 (0.031)** |
pop | -0.001 (0.007) | 0.076 (0.025)*** | -0.001 (0.007) | -0.011 (0.016) |
pctFemale | 0.202 (0.347) | -0.152 (0.389) | 0.203 (0.347) | -0.537 (0.232)** |
pctRural | -0.035 (0.015)** | -0.338 (0.034)*** | -0.035 (0.015)** | -0.168 (0.023)*** |
Constant | 64.066 (17.414)*** | 0.000 (0.011) | -0.000 (0.270) | -108.978 (12.165)*** |
Observations | 124 | 124 | 124 | 124 |
R2 | 0.248 | 0.641 | 0.247 | 0.317 |
Adjusted R2 | 0.222 | 0.629 | 0.222 | 0.294 |
Note: | Standard Errors reported in parentheses, *p<0.1;**p<0.05;***p<0.01 |
17.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>*p<0.1;**p<0.05;***p<0.01</em>",
notes.append = FALSE)
Dependent variable: | ||||
lifeExp | ||||
OLS | panel | |||
linear | ||||
(1) | (2) | (3) | (4) | |
gdpPerCapita | 0.194 (0.049)*** | 0.078 (0.057) | 0.194 (0.050)*** | -0.073 (0.036)** |
pop | -0.001 (0.007) | 0.076 (0.029)** | -0.001 (0.007) | -0.011 (0.019) |
pctFemale | 0.202 (0.347) | -0.152 (0.449) | 0.203 (0.351) | -0.537 (0.273)* |
pctRural | -0.035 (0.015)** | -0.338 (0.039)*** | -0.035 (0.015)** | -0.168 (0.027)*** |
Constant | 64.066 (17.414)*** | |||
Observations | 124 | 124 | 124 | 124 |
R2 | 0.248 | 0.641 | 0.247 | 0.317 |
Adjusted R2 | 0.222 | 0.503 | 0.202 | 0.023 |
Note: | Standard Errors reported in parentheses, *p<0.1;**p<0.05;***p<0.01 |
17.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>*p<0.1;**p<0.05;***p<0.01</em>",
notes.append = FALSE)
Dependent variable: | ||||
lifeExp | ||||
(1) | (2) | (3) | (4) | |
gdpPerCapita | 0.194 (0.049)*** | 0.078 (0.057) | 0.194 (0.050)*** | -0.073 (0.036)** |
pop | -0.001 (0.007) | 0.076 (0.029)** | -0.001 (0.007) | -0.011 (0.019) |
pctFemale | 0.202 (0.347) | -0.152 (0.449) | 0.203 (0.351) | -0.537 (0.273)* |
pctRural | -0.035 (0.015)** | -0.338 (0.039)*** | -0.035 (0.015)** | -0.168 (0.027)*** |
factor(country)Argentina | -26.120 (2.588)*** | -11.762 (1.936)*** | ||
factor(country)Bahamas, The | -24.078 (2.121)*** | -12.218 (1.591)*** | ||
factor(country)Barbados | -0.093 (0.263) | 1.268 (0.192)*** | ||
factor(country)Belize | -8.936 (1.616)*** | -7.526 (0.984)*** | ||
factor(country)Bolivia | -21.075 (2.500)*** | -15.180 (1.582)*** | ||
factor(country)Brazil | -37.690 (5.554)*** | -10.215 (4.004)** | ||
factor(country)Chile | -19.642 (2.480)*** | -7.717 (1.773)*** | ||
factor(country)Colombia | -21.924 (2.366)*** | -9.614 (1.732)*** | ||
factor(country)Costa Rica | -15.193 (2.576)*** | -7.099 (1.684)*** | ||
factor(country)Cuba | -16.190 (2.477)*** | -8.061 (1.630)*** | ||
factor(country)Dominican Republic | -22.257 (2.669)*** | -13.768 (1.749)*** | ||
factor(country)Ecuador | -14.184 (2.132)*** | -8.219 (1.373)*** | ||
factor(country)El Salvador | -18.972 (1.899)*** | -11.742 (1.283)*** | ||
factor(country)Grenada | -8.025 (1.395)*** | -7.794 (0.844)*** | ||
factor(country)Guatemala | -12.229 (1.531)*** | -8.528 (0.972)*** | ||
factor(country)Guyana | -7.412 (1.143)*** | -9.103 (0.705)*** | ||
factor(country)Haiti | -23.431 (1.777)*** | -19.951 (1.110)*** | ||
factor(country)Honduras | -12.525 (2.000)*** | -8.886 (1.244)*** | ||
factor(country)Jamaica | -12.473 (1.835)*** | -9.043 (1.143)*** | ||
factor(country)Mexico | -29.514 (3.467)*** | -10.331 (2.591)*** | ||
factor(country)Nicaragua | -13.711 (1.906)*** | -9.768 (1.195)*** | ||
factor(country)Panama | -13.353 (2.176)*** | -6.981 (1.409)*** | ||
factor(country)Paraguay | -15.304 (2.384)*** | -10.930 (1.483)*** | ||
factor(country)Peru | -20.370 (2.427)*** | -10.452 (1.665)*** | ||
factor(country)Puerto Rico | -21.620 (2.366)*** | -7.436 (1.821)*** | ||
factor(country)St. Lucia | 1.482 (0.571)** | -0.773 (0.390)* | ||
factor(country)St. Vincent and the Grenadines | -13.327 (2.080)*** | -10.930 (1.272)*** | ||
factor(country)Suriname | -19.122 (2.316)*** | -13.794 (1.463)*** | ||
factor(country)Trinidad and Tobago | -13.557 (1.374)*** | -8.854 (0.910)*** | ||
factor(country)Uruguay | -23.212 (2.706)*** | -10.964 (1.903)*** | ||
factor(year)2016 | 0.156 (0.775) | 0.139 (0.024)*** | ||
factor(year)2017 | 0.293 (0.775) | 0.277 (0.028)*** | ||
factor(year)2018 | 0.422 (0.775) | 0.412 (0.034)*** | ||
Constant | 64.066 (17.414)*** | 108.892 (24.814)*** | 63.825 (17.619)*** | 118.009 (15.018)*** |
Observations | 124 | 124 | 124 | 124 |
R2 | 0.248 | 0.999 | 0.250 | 1.000 |
Adjusted R2 | 0.222 | 0.998 | 0.204 | 0.999 |
Note: | Standard Errors reported in parentheses, *p<0.1;**p<0.05;***p<0.01 |
17.7 Data Summary by Country
stargazer(as.data.frame(mydata) , type = "html",digits = 2 ,summary.stat = c("n","mean","sd", "min", "median", "max"))
Statistic | N | Mean | St. Dev. | Min | Median | Max |
year | 124 | 2,016.50 | 1.12 | 2,015 | 2,016.5 | 2,018 |
gdpPerCapita | 124 | 9.12 | 6.45 | 1.26 | 7.66 | 28.85 |
lifeExp | 124 | 74.78 | 3.42 | 62.48 | 74.80 | 80.10 |
pop | 124 | 19.39 | 41.70 | 0.09 | 6.31 | 209.47 |
pctFemale | 124 | 50.60 | 0.89 | 49.07 | 50.57 | 53.11 |
pctRural | 124 | 36.49 | 20.83 | 4.67 | 33.95 | 81.48 |
cAvg_lifeExp | 124 | 74.78 | 3.41 | 63.08 | 74.80 | 79.84 |
cAvg_gdpPerCapita | 124 | 9.12 | 6.44 | 1.27 | 7.63 | 28.10 |
cAvg_pop | 124 | 19.39 | 41.70 | 0.09 | 6.34 | 206.98 |
cAvg_pctFemale | 124 | 50.60 | 0.89 | 49.13 | 50.57 | 53.05 |
cAvg_pctRural | 124 | 36.49 | 20.83 | 4.81 | 33.95 | 81.41 |
yrAvg_lifeExp | 124 | 74.78 | 0.19 | 74.52 | 74.78 | 75.03 |
yrAvg_gdpPerCapita | 124 | 9.12 | 0.11 | 9.00 | 9.10 | 9.28 |
yrAvg_pop | 124 | 19.39 | 0.23 | 19.08 | 19.39 | 19.71 |
yrAvg_pctFemale | 124 | 50.60 | 0.01 | 50.59 | 50.60 | 50.61 |
yrAvg_pctRural | 124 | 36.49 | 0.29 | 36.10 | 36.49 | 36.87 |
17.7.1 Average Values for Each Country
country |
Avg lifeExp |
Avg gdpPerCapita |
Avg pop |
Avg pctFemale |
Avg pctRural |
---|---|---|---|---|---|
Antigua and Barbuda | 76.68 | 14.15 | 0.09 | 51.83 | 75.21 |
Argentina | 76.30 | 10.32 | 43.82 | 51.26 | 8.31 |
Bahamas, The | 73.43 | 28.10 | 0.38 | 51.45 | 17.12 |
Barbados | 78.94 | 16.11 | 0.29 | 51.73 | 68.81 |
Belize | 74.28 | 4.24 | 0.37 | 50.14 | 54.44 |
Bolivia | 70.77 | 2.46 | 11.11 | 49.76 | 31.09 |
Brazil | 75.34 | 11.12 | 206.98 | 50.80 | 13.83 |
Chile | 79.84 | 14.84 | 18.34 | 50.75 | 12.54 |
Colombia | 76.82 | 7.63 | 48.57 | 50.96 | 19.73 |
Costa Rica | 79.83 | 9.61 | 4.92 | 49.99 | 21.88 |
Cuba | 78.64 | 6.64 | 11.33 | 50.32 | 23.04 |
Dominican Republic | 73.57 | 7.16 | 10.45 | 49.97 | 20.16 |
Ecuador | 76.47 | 5.22 | 16.64 | 49.96 | 36.39 |
El Salvador | 72.76 | 3.41 | 6.37 | 53.05 | 29.13 |
Grenada | 72.41 | 8.63 | 0.11 | 49.58 | 63.87 |
Guatemala | 73.67 | 3.27 | 15.96 | 50.78 | 49.49 |
Guyana | 69.53 | 5.53 | 0.77 | 49.90 | 73.48 |
Haiti | 63.08 | 1.27 | 10.91 | 50.64 | 46.14 |
Honduras | 74.80 | 2.14 | 9.35 | 50.06 | 43.87 |
Jamaica | 74.23 | 4.78 | 2.91 | 50.32 | 44.75 |
Mexico | 74.94 | 10.22 | 124.04 | 51.09 | 20.28 |
Nicaragua | 73.96 | 1.89 | 6.34 | 50.71 | 41.80 |
Panama | 78.05 | 11.29 | 4.07 | 49.88 | 32.80 |
Paraguay | 73.91 | 5.17 | 6.82 | 49.13 | 38.83 |
Peru | 76.16 | 6.29 | 31.21 | 50.34 | 22.37 |
Puerto Rico | 79.57 | 27.54 | 3.35 | 52.30 | 6.40 |
St. Lucia | 75.83 | 8.89 | 0.18 | 50.75 | 81.41 |
St. Vincent and the Grenadines | 72.25 | 6.71 | 0.11 | 49.14 | 48.42 |
Suriname | 71.41 | 8.11 | 0.57 | 49.70 | 33.95 |
Trinidad and Tobago | 73.17 | 15.74 | 1.38 | 50.57 | 46.76 |
Uruguay | 77.57 | 14.28 | 3.43 | 51.75 | 4.81 |
17.7.2 Variable-Specific Values and Within Transformation for Each Country
For each variable, display each country’s values in 2015, 2016, 2017, and 2018, 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.
17.7.3 Life expectancy
iso3c |
2015 Life Exp |
2016 Life Exp |
2017 Life Exp |
2018 Life Exp |
Avg Life Exp |
2015 Within |
2016 Within |
2017 Within |
2018 Within |
|
---|---|---|---|---|---|---|---|---|---|---|
ARG | 76.07 | 76.22 | 76.37 | 76.52 | 76.30 | -0.23 | -0.07 | 0.08 | 0.22 | |
ATG | 76.48 | 76.62 | 76.75 | 76.89 | 76.68 | -0.20 | -0.07 | 0.07 | 0.20 | |
BHS | 73.09 | 73.33 | 73.55 | 73.75 | 73.43 | -0.34 | -0.10 | 0.12 | 0.32 | |
BLZ | 74.03 | 74.22 | 74.36 | 74.50 | 74.28 | -0.24 | -0.06 | 0.09 | 0.22 | |
BOL | 70.28 | 70.63 | 70.94 | 71.24 | 70.77 | -0.49 | -0.15 | 0.17 | 0.47 | |
BRA | 74.99 | 75.23 | 75.46 | 75.67 | 75.34 | -0.34 | -0.11 | 0.12 | 0.33 | |
BRB | 78.80 | 78.89 | 78.98 | 79.08 | 78.94 | -0.14 | -0.05 | 0.04 | 0.14 | |
CHL | 79.65 | 79.78 | 79.91 | 80.04 | 79.84 | -0.20 | -0.06 | 0.07 | 0.20 | |
COL | 76.53 | 76.73 | 76.92 | 77.11 | 76.82 | -0.29 | -0.09 | 0.10 | 0.28 | |
CRI | 79.56 | 79.74 | 79.91 | 80.10 | 79.83 | -0.26 | -0.09 | 0.09 | 0.27 | |
CUB | 78.56 | 78.61 | 78.66 | 78.73 | 78.64 | -0.08 | -0.03 | 0.02 | 0.09 | |
DOM | 73.24 | 73.47 | 73.69 | 73.89 | 73.57 | -0.33 | -0.10 | 0.12 | 0.32 | |
ECU | 76.14 | 76.36 | 76.58 | 76.80 | 76.47 | -0.33 | -0.11 | 0.11 | 0.33 | |
GRD | 72.44 | 72.41 | 72.39 | 72.38 | 72.41 | 0.04 | 0.00 | -0.02 | -0.02 | |
GTM | 73.25 | 73.54 | 73.81 | 74.06 | 73.67 | -0.42 | -0.12 | 0.14 | 0.40 | |
GUY | 69.26 | 69.45 | 69.62 | 69.77 | 69.53 | -0.27 | -0.07 | 0.10 | 0.25 | |
HND | 74.50 | 74.70 | 74.90 | 75.09 | 74.80 | -0.30 | -0.09 | 0.10 | 0.29 | |
HTI | 62.48 | 62.90 | 63.29 | 63.66 | 63.08 | -0.60 | -0.19 | 0.21 | 0.58 | |
JAM | 74.10 | 74.17 | 74.27 | 74.37 | 74.23 | -0.13 | -0.05 | 0.04 | 0.14 | |
LCA | 75.60 | 75.75 | 75.91 | 76.06 | 75.83 | -0.23 | -0.08 | 0.08 | 0.23 | |
MEX | 74.90 | 74.92 | 74.95 | 74.99 | 74.94 | -0.04 | -0.02 | 0.01 | 0.05 | |
NIC | 73.65 | 73.86 | 74.07 | 74.28 | 73.96 | -0.31 | -0.10 | 0.11 | 0.31 | |
PAN | 77.78 | 77.96 | 78.15 | 78.33 | 78.05 | -0.28 | -0.09 | 0.09 | 0.27 | |
PER | 75.79 | 76.04 | 76.29 | 76.52 | 76.16 | -0.37 | -0.12 | 0.13 | 0.36 | |
PRI | 79.35 | 79.49 | 79.63 | 79.78 | 79.57 | -0.21 | -0.07 | 0.07 | 0.21 | |
PRY | 73.66 | 73.84 | 73.99 | 74.13 | 73.91 | -0.24 | -0.07 | 0.09 | 0.23 | |
SLV | 72.41 | 72.64 | 72.87 | 73.10 | 72.76 | -0.34 | -0.11 | 0.12 | 0.34 | |
SUR | 71.25 | 71.36 | 71.46 | 71.57 | 71.41 | -0.16 | -0.05 | 0.05 | 0.16 | |
TTO | 72.94 | 73.10 | 73.25 | 73.38 | 73.17 | -0.23 | -0.07 | 0.08 | 0.21 | |
URY | 77.37 | 77.50 | 77.63 | 77.77 | 77.57 | -0.20 | -0.07 | 0.06 | 0.20 | |
VCT | 72.10 | 72.19 | 72.30 | 72.42 | 72.25 | -0.16 | -0.06 | 0.05 | 0.16 |
17.7.4 GDP per capita
iso3c |
2015 GDP per Capita |
2016 GDP per Capita |
2017 GDP per Capita |
2018 GDP per Capita |
Avg GDP per Capita |
2015 Within |
2016 Within |
2017 Within |
2018 Within |
|
---|---|---|---|---|---|---|---|---|---|---|
ARG | 10568.16 | 10239.48 | 10419.46 | 10049.56 | 10319.16 | 0.25 | -0.08 | 0.10 | -0.27 | |
ATG | 13328.15 | 13917.95 | 14220.50 | 15134.88 | 14150.37 | -0.82 | -0.23 | 0.07 | 0.98 | |
BHS | 27583.41 | 27705.93 | 28282.52 | 28845.26 | 28104.28 | -0.52 | -0.40 | 0.18 | 0.74 | |
BLZ | 4300.56 | 4216.98 | 4211.60 | 4217.21 | 4236.59 | 0.06 | -0.02 | -0.02 | -0.02 | |
BOL | 2361.06 | 2425.56 | 2490.96 | 2559.51 | 2459.27 | -0.10 | -0.03 | 0.03 | 0.10 | |
BRA | 11431.15 | 10965.97 | 11021.72 | 11079.71 | 11124.64 | 0.31 | -0.16 | -0.10 | -0.04 | |
BRB | 15836.38 | 16202.12 | 16254.24 | 16136.91 | 16107.41 | -0.27 | 0.09 | 0.15 | 0.03 | |
CHL | 14722.37 | 14777.15 | 14741.19 | 15111.70 | 14838.10 | -0.12 | -0.06 | -0.10 | 0.27 | |
COL | 7580.28 | 7633.39 | 7620.92 | 7694.43 | 7632.25 | -0.05 | 0.00 | -0.01 | 0.06 | |
CRI | 9219.39 | 9509.74 | 9775.85 | 9936.58 | 9610.39 | -0.39 | -0.10 | 0.17 | 0.33 | |
CUB | 6522.74 | 6550.27 | 6666.33 | 6816.90 | 6639.06 | -0.12 | -0.09 | 0.03 | 0.18 | |
DOM | 6661.87 | 7026.18 | 7273.35 | 7697.72 | 7164.78 | -0.50 | -0.14 | 0.11 | 0.53 | |
ECU | 5330.54 | 5176.06 | 5205.76 | 5180.60 | 5223.24 | 0.11 | -0.05 | -0.02 | -0.04 | |
GRD | 8194.24 | 8449.31 | 8775.90 | 9091.76 | 8627.80 | -0.43 | -0.18 | 0.15 | 0.46 | |
GTM | 3210.87 | 3242.64 | 3286.74 | 3338.55 | 3269.70 | -0.06 | -0.03 | 0.02 | 0.07 | |
GUY | 5257.46 | 5429.80 | 5604.56 | 5825.04 | 5529.21 | -0.27 | -0.10 | 0.08 | 0.30 | |
HND | 2067.29 | 2111.19 | 2176.30 | 2219.44 | 2143.55 | -0.08 | -0.03 | 0.03 | 0.08 | |
HTI | 1260.60 | 1265.23 | 1277.37 | 1282.24 | 1271.36 | -0.01 | -0.01 | 0.01 | 0.01 | |
JAM | 4722.05 | 4761.94 | 4785.65 | 4855.26 | 4781.23 | -0.06 | -0.02 | 0.00 | 0.07 | |
LCA | 8491.99 | 8786.51 | 9046.27 | 9237.37 | 8890.54 | -0.40 | -0.10 | 0.16 | 0.35 | |
MEX | 10042.14 | 10183.03 | 10277.88 | 10385.83 | 10222.22 | -0.18 | -0.04 | 0.06 | 0.16 | |
NIC | 1836.01 | 1895.20 | 1957.84 | 1857.05 | 1886.53 | -0.05 | 0.01 | 0.07 | -0.03 | |
PAN | 10765.91 | 11107.22 | 11530.07 | 11755.11 | 11289.58 | -0.52 | -0.18 | 0.24 | 0.47 | |
PER | 6114.23 | 6262.37 | 6314.29 | 6453.56 | 6286.11 | -0.17 | -0.02 | 0.03 | 0.17 | |
PRI | 27518.77 | 27702.08 | 27561.05 | 27362.43 | 27536.09 | -0.02 | 0.17 | 0.02 | -0.17 | |
PRY | 4944.19 | 5089.61 | 5272.36 | 5379.58 | 5171.44 | -0.23 | -0.08 | 0.10 | 0.21 | |
SLV | 3314.70 | 3382.52 | 3441.31 | 3507.06 | 3411.40 | -0.10 | -0.03 | 0.03 | 0.10 | |
SUR | 8464.76 | 7912.69 | 7972.84 | 8100.37 | 8112.66 | 0.35 | -0.20 | -0.14 | -0.01 | |
TTO | 16840.12 | 15696.90 | 15261.87 | 15161.07 | 15739.99 | 1.10 | -0.04 | -0.48 | -0.58 | |
URY | 13938.79 | 14124.14 | 14437.38 | 14617.46 | 14279.45 | -0.34 | -0.16 | 0.16 | 0.34 | |
VCT | 6580.82 | 6686.64 | 6730.90 | 6852.60 | 6712.74 | -0.13 | -0.03 | 0.02 | 0.14 |
17.7.5 Population
iso3c |
2015 Population |
2016 Population |
2017 Population |
2018 Population |
Avg Population |
2015 Within |
2016 Within |
2017 Within |
2018 Within |
|
---|---|---|---|---|---|---|---|---|---|---|
ARG | 43131966 | 43590368 | 44044811 | 44494502 | 43815411.75 | -0.68 | -0.23 | 0.23 | 0.68 | |
ATG | 93566 | 94527 | 95426 | 96286 | 94951.25 | 0.00 | 0.00 | 0.00 | 0.00 | |
BHS | 374206 | 377931 | 381761 | 385640 | 379884.50 | -0.01 | 0.00 | 0.00 | 0.01 | |
BLZ | 360933 | 368400 | 375769 | 383071 | 372043.25 | -0.01 | 0.00 | 0.00 | 0.01 | |
BOL | 10869730 | 11031813 | 11192854 | 11353142 | 11111884.75 | -0.24 | -0.08 | 0.08 | 0.24 | |
BRA | 204471769 | 206163058 | 207833831 | 209469333 | 206984497.75 | -2.51 | -0.82 | 0.85 | 2.48 | |
BRB | 285324 | 285796 | 286233 | 286641 | 285998.50 | 0.00 | 0.00 | 0.00 | 0.00 | |
CHL | 17969353 | 18209068 | 18470439 | 18729160 | 18344505.00 | -0.38 | -0.14 | 0.13 | 0.38 | |
COL | 47520667 | 48175048 | 48909844 | 49661056 | 48566653.75 | -1.05 | -0.39 | 0.34 | 1.09 | |
CRI | 4847804 | 4899345 | 4949954 | 4999441 | 4924136.00 | -0.08 | -0.02 | 0.03 | 0.08 | |
CUB | 11324781 | 11335109 | 11339259 | 11338138 | 11334321.75 | -0.01 | 0.00 | 0.00 | 0.00 | |
DOM | 10281680 | 10397743 | 10513131 | 10627165 | 10454929.75 | -0.17 | -0.06 | 0.06 | 0.17 | |
ECU | 16212020 | 16491115 | 16785361 | 17084357 | 16643213.25 | -0.43 | -0.15 | 0.14 | 0.44 | |
GRD | 109599 | 110261 | 110874 | 111454 | 110547.00 | 0.00 | 0.00 | 0.00 | 0.00 | |
GTM | 15567419 | 15827690 | 16087418 | 16346950 | 15957369.25 | -0.39 | -0.13 | 0.13 | 0.39 | |
GUY | 767432 | 771366 | 775221 | 779004 | 773255.75 | -0.01 | 0.00 | 0.00 | 0.01 | |
HND | 9112916 | 9270795 | 9429013 | 9587522 | 9350061.50 | -0.24 | -0.08 | 0.08 | 0.24 | |
HTI | 10695542 | 10839970 | 10982366 | 11123176 | 10910263.50 | -0.21 | -0.07 | 0.07 | 0.21 | |
JAM | 2891021 | 2906238 | 2920853 | 2934855 | 2913241.75 | -0.02 | -0.01 | 0.01 | 0.02 | |
LCA | 179126 | 180024 | 180955 | 181889 | 180498.50 | 0.00 | 0.00 | 0.00 | 0.00 | |
MEX | 121858258 | 123333376 | 124777324 | 126190788 | 124039936.50 | -2.18 | -0.71 | 0.74 | 2.15 | |
NIC | 6223240 | 6303974 | 6384855 | 6465513 | 6344395.50 | -0.12 | -0.04 | 0.04 | 0.12 | |
PAN | 3968487 | 4037078 | 4106771 | 4176873 | 4072302.25 | -0.10 | -0.04 | 0.03 | 0.10 | |
PER | 30470734 | 30926032 | 31444297 | 31989256 | 31207579.75 | -0.74 | -0.28 | 0.24 | 0.78 | |
PRI | 3473232 | 3406672 | 3325286 | 3193354 | 3349636.00 | 0.12 | 0.06 | -0.02 | -0.16 | |
PRY | 6688746 | 6777872 | 6867062 | 6956071 | 6822437.75 | -0.13 | -0.04 | 0.04 | 0.13 | |
SLV | 6325124 | 6356143 | 6388122 | 6420744 | 6372533.25 | -0.05 | -0.02 | 0.02 | 0.05 | |
SUR | 559136 | 564883 | 570501 | 575987 | 567626.75 | -0.01 | 0.00 | 0.00 | 0.01 | |
TTO | 1370328 | 1377564 | 1384072 | 1389858 | 1380455.50 | -0.01 | 0.00 | 0.00 | 0.01 | |
URY | 3412009 | 3424132 | 3436646 | 3449299 | 3430521.50 | -0.02 | -0.01 | 0.01 | 0.02 | |
VCT | 109148 | 109459 | 109827 | 110210 | 109661.00 | 0.00 | 0.00 | 0.00 | 0.00 |
17.7.6 Percent female
iso3c |
2015 %Female |
2016 %Female |
2017 %Female |
2018 %Female |
Avg %Female |
2015 Within |
2016 Within |
2017 Within |
2018 Within |
|
---|---|---|---|---|---|---|---|---|---|---|
ARG | 51.27 | 51.26 | 51.25 | 51.24 | 51.26 | 0.02 | 0.01 | -0.01 | -0.02 | |
ATG | 51.88 | 51.84 | 51.81 | 51.79 | 51.83 | 0.05 | 0.01 | -0.02 | -0.04 | |
BHS | 51.47 | 51.45 | 51.44 | 51.43 | 51.45 | 0.02 | 0.01 | -0.01 | -0.02 | |
BLZ | 50.09 | 50.12 | 50.16 | 50.19 | 50.14 | -0.05 | -0.02 | 0.02 | 0.05 | |
BOL | 49.74 | 49.75 | 49.77 | 49.78 | 49.76 | -0.02 | -0.01 | 0.01 | 0.02 | |
BRA | 50.77 | 50.79 | 50.81 | 50.83 | 50.80 | -0.03 | -0.01 | 0.01 | 0.03 | |
BRB | 51.79 | 51.75 | 51.71 | 51.67 | 51.73 | 0.06 | 0.02 | -0.02 | -0.06 | |
CHL | 50.78 | 50.76 | 50.75 | 50.73 | 50.75 | 0.02 | 0.01 | -0.01 | -0.03 | |
COL | 50.99 | 50.97 | 50.95 | 50.93 | 50.96 | 0.03 | 0.01 | -0.01 | -0.03 | |
CRI | 49.97 | 49.98 | 49.99 | 50.01 | 49.99 | -0.02 | -0.01 | 0.01 | 0.02 | |
CUB | 50.31 | 50.31 | 50.32 | 50.33 | 50.32 | -0.01 | 0.00 | 0.00 | 0.01 | |
DOM | 49.94 | 49.96 | 49.98 | 50.01 | 49.97 | -0.04 | -0.01 | 0.01 | 0.04 | |
ECU | 49.94 | 49.95 | 49.96 | 49.97 | 49.96 | -0.01 | 0.00 | 0.00 | 0.01 | |
GRD | 49.56 | 49.58 | 49.59 | 49.61 | 49.58 | -0.03 | -0.01 | 0.01 | 0.02 | |
GTM | 50.81 | 50.79 | 50.78 | 50.76 | 50.78 | 0.02 | 0.01 | -0.01 | -0.02 | |
GUY | 50.00 | 49.92 | 49.86 | 49.81 | 49.90 | 0.10 | 0.03 | -0.04 | -0.09 | |
HND | 50.07 | 50.07 | 50.06 | 50.05 | 50.06 | 0.01 | 0.00 | 0.00 | -0.01 | |
HTI | 50.64 | 50.64 | 50.65 | 50.65 | 50.64 | -0.01 | 0.00 | 0.00 | 0.01 | |
JAM | 50.30 | 50.32 | 50.33 | 50.34 | 50.32 | -0.02 | -0.01 | 0.01 | 0.02 | |
LCA | 50.76 | 50.75 | 50.75 | 50.75 | 50.75 | 0.00 | 0.00 | 0.00 | 0.00 | |
MEX | 51.10 | 51.10 | 51.09 | 51.09 | 51.09 | 0.00 | 0.00 | 0.00 | 0.00 | |
NIC | 50.71 | 50.71 | 50.71 | 50.71 | 50.71 | 0.00 | 0.00 | 0.00 | 0.00 | |
PAN | 49.85 | 49.87 | 49.89 | 49.91 | 49.88 | -0.03 | -0.01 | 0.01 | 0.03 | |
PER | 50.33 | 50.35 | 50.35 | 50.34 | 50.34 | -0.01 | 0.01 | 0.00 | 0.00 | |
PRI | 52.16 | 52.24 | 52.34 | 52.45 | 52.30 | -0.14 | -0.06 | 0.04 | 0.15 | |
PRY | 49.11 | 49.12 | 49.14 | 49.15 | 49.13 | -0.02 | -0.01 | 0.00 | 0.02 | |
SLV | 52.98 | 53.03 | 53.07 | 53.11 | 53.05 | -0.07 | -0.02 | 0.02 | 0.07 | |
SUR | 49.69 | 49.70 | 49.71 | 49.72 | 49.70 | -0.01 | 0.00 | 0.01 | 0.01 | |
TTO | 50.54 | 50.56 | 50.57 | 50.59 | 50.57 | -0.02 | -0.01 | 0.01 | 0.02 | |
URY | 51.77 | 51.75 | 51.74 | 51.72 | 51.75 | 0.02 | 0.01 | -0.01 | -0.02 | |
VCT | 49.07 | 49.11 | 49.16 | 49.21 | 49.14 | -0.06 | -0.03 | 0.02 | 0.07 |
17.7.7 Percent rural
iso3c |
2015 %Rural |
2016 %Rural |
2017 %Rural |
2018 %Rural |
Avg %Rural |
2015 Within |
2016 Within |
2017 Within |
2018 Within |
|
---|---|---|---|---|---|---|---|---|---|---|
ARG | 8.50 | 8.37 | 8.25 | 8.13 | 8.31 | 0.18 | 0.06 | -0.06 | -0.18 | |
ATG | 75.00 | 75.15 | 75.29 | 75.40 | 75.21 | -0.21 | -0.06 | 0.08 | 0.19 | |
BHS | 17.25 | 17.17 | 17.08 | 16.98 | 17.12 | 0.14 | 0.05 | -0.04 | -0.14 | |
BLZ | 54.59 | 54.51 | 54.40 | 54.28 | 54.44 | 0.15 | 0.06 | -0.04 | -0.17 | |
BOL | 31.61 | 31.26 | 30.92 | 30.58 | 31.09 | 0.52 | 0.17 | -0.17 | -0.52 | |
BRA | 14.23 | 13.96 | 13.69 | 13.43 | 13.83 | 0.40 | 0.13 | -0.14 | -0.40 | |
BRB | 68.75 | 68.81 | 68.84 | 68.85 | 68.81 | -0.06 | -0.01 | 0.03 | 0.04 | |
CHL | 12.64 | 12.58 | 12.51 | 12.44 | 12.54 | 0.10 | 0.04 | -0.03 | -0.11 | |
COL | 20.24 | 19.89 | 19.55 | 19.22 | 19.73 | 0.51 | 0.17 | -0.17 | -0.50 | |
CRI | 23.14 | 22.26 | 21.44 | 20.66 | 21.88 | 1.26 | 0.39 | -0.44 | -1.22 | |
CUB | 23.10 | 23.07 | 23.02 | 22.96 | 23.04 | 0.06 | 0.03 | -0.02 | -0.08 | |
DOM | 21.43 | 20.56 | 19.72 | 18.93 | 20.16 | 1.27 | 0.40 | -0.44 | -1.24 | |
ECU | 36.60 | 36.47 | 36.33 | 36.18 | 36.39 | 0.21 | 0.07 | -0.06 | -0.22 | |
GRD | 64.00 | 63.93 | 63.84 | 63.73 | 63.87 | 0.13 | 0.05 | -0.04 | -0.15 | |
GTM | 50.03 | 49.68 | 49.32 | 48.95 | 49.49 | 0.54 | 0.19 | -0.17 | -0.55 | |
GUY | 73.56 | 73.52 | 73.46 | 73.39 | 73.48 | 0.08 | 0.03 | -0.02 | -0.09 | |
HND | 44.84 | 44.19 | 43.54 | 42.90 | 43.87 | 0.97 | 0.32 | -0.32 | -0.96 | |
HTI | 47.57 | 46.60 | 45.65 | 44.72 | 46.14 | 1.43 | 0.47 | -0.48 | -1.42 | |
JAM | 45.17 | 44.90 | 44.62 | 44.33 | 44.75 | 0.41 | 0.15 | -0.13 | -0.43 | |
LCA | 81.48 | 81.44 | 81.39 | 81.32 | 81.41 | 0.08 | 0.03 | -0.02 | -0.09 | |
MEX | 20.72 | 20.42 | 20.13 | 19.84 | 20.28 | 0.44 | 0.14 | -0.15 | -0.43 | |
NIC | 42.10 | 41.91 | 41.70 | 41.48 | 41.80 | 0.31 | 0.11 | -0.10 | -0.32 | |
PAN | 33.30 | 32.97 | 32.63 | 32.29 | 32.80 | 0.50 | 0.17 | -0.17 | -0.51 | |
PER | 22.64 | 22.46 | 22.28 | 22.09 | 22.37 | 0.27 | 0.09 | -0.09 | -0.28 | |
PRI | 6.38 | 6.40 | 6.41 | 6.42 | 6.40 | -0.03 | 0.00 | 0.01 | 0.02 | |
PRY | 39.25 | 38.97 | 38.70 | 38.42 | 38.83 | 0.42 | 0.14 | -0.13 | -0.42 | |
SLV | 30.30 | 29.50 | 28.73 | 27.98 | 29.13 | 1.17 | 0.37 | -0.40 | -1.15 | |
SUR | 33.94 | 33.96 | 33.96 | 33.94 | 33.95 | -0.01 | 0.01 | 0.01 | -0.01 | |
TTO | 46.68 | 46.75 | 46.80 | 46.82 | 46.76 | -0.08 | -0.01 | 0.03 | 0.06 | |
URY | 4.96 | 4.86 | 4.76 | 4.67 | 4.81 | 0.15 | 0.05 | -0.05 | -0.14 | |
VCT | 49.04 | 48.63 | 48.22 | 47.80 | 48.42 | 0.62 | 0.21 | -0.20 | -0.62 |
17.8 Bookdown Style Note
To get the above tables to display in bookdown I added HTML code to allow the maximum width to be larger than the default setting. If you find this messes with the rest of your book, you can remove from here to the bottom of this file instide the HTML “style” tag.