DemocracyIncome: The Relation Between Democraty and Income

Description Usage Format Source References Examples

Description

5-yearly observations of 211 countries from 1950 to 2000

number of observations : 2321

number of time-series : 11

country : world

package : panel

JEL codes: D72, O47

Chapter : 02, 07

Usage

1

Format

A dataframe containing:

country

country

year

the starting year of the 5-years period

democracy

democracy index

income

the log of the gdp per capita

sample

a dummy variable to select the subset used in the original article

Source

American Economic Association Data Archive : https://www.aeaweb.org/aer/

References

Daron Acemoglu, Simon Johnson, James A. Robinson and Pierre Yared (2008) “Income and Democracy”, American Economic Review, 98(3), 808-842, doi: 10.1257/aer.98.3.808 .

Examples

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#### Example 7-1

## ------------------------------------------------------------------------

## Not run: 
data("DemocracyIncome", package = "pder")

## ------------------------------------------------------------------------
data("DemocracyIncome", package="pder")
set.seed(1)
di2000 <- subset(DemocracyIncome, year == 2000,
                 select = c("democracy", "income", "country"))
di2000 <- na.omit(di2000)
di2000$country <- as.character(di2000$country)
di2000$country[- c(2,5, 23, 16, 17, 22, 71,  125, 37, 43, 44,
                   79, 98, 105, 50, 120,  81, 129, 57, 58,99)] <- NA

if(requireNamespace("ggplot2")){
    library("ggplot2")
    ggplot(di2000, aes(income, democracy, label = country)) + 
        geom_point(size = 0.4) + 
        geom_text(aes(y= democracy + sample(0.03 * c(-1, 1), 
                                            nrow(di2000), replace = TRUE)),
                  size = 2) +
        theme(legend.text = element_text(size = 6), 
              legend.title= element_text(size = 8),
              axis.title = element_text(size = 8),
              axis.text = element_text(size = 6))
}


## ------------------------------------------------------------------------
library("plm")
pdim(DemocracyIncome)
head(DemocracyIncome, 4)


#### Example 7-2

## ------------------------------------------------------------------------
mco <- plm(democracy ~ lag(democracy) + lag(income) + year - 1, 
           DemocracyIncome, index = c("country", "year"), 
           model = "pooling", subset = sample == 1)

## ------------------------------------------------------------------------
mco <- plm(democracy ~ lag(democracy) + lag(income), 
           DemocracyIncome, index = c("country", "year"), 
           model = "within", effect = "time",
           subset = sample == 1)
coef(summary(mco))


#### Example 7-3

## ------------------------------------------------------------------------
within <- update(mco, effect = "twoways")
coef(summary(within))


#### Example 7-4

## ------------------------------------------------------------------------
ahsiao <- plm(diff(democracy) ~ lag(diff(democracy)) + 
              lag(diff(income)) + year - 1  | 
              lag(democracy, 2) + lag(income, 2) + year - 1, 
              DemocracyIncome, index = c("country", "year"),
              model = "pooling", subset = sample == 1)
coef(summary(ahsiao))[1:2, ]


#### Example 7-5

## ------------------------------------------------------------------------
diff1 <- pgmm(democracy ~ lag(democracy) + lag(income) | 
              lag(democracy, 2:99)| lag(income, 2),
              DemocracyIncome, index=c("country", "year"), 
              model="onestep", effect="twoways", subset = sample == 1)
coef(summary(diff1))

## ------------------------------------------------------------------------
diff2 <- update(diff1, model = "twosteps")
coef(summary(diff2))


#### Example 7-7

## ------------------------------------------------------------------------
sys2 <- pgmm(democracy ~ lag(democracy) + lag(income) | 
             lag(democracy, 2:99)| lag(income, 2),
             DemocracyIncome, index = c("country", "year"), 
             model = "twosteps", effect = "twoways",
             transformation = "ld")
coef(summary(sys2))


#### Example 7-8

## ------------------------------------------------------------------------
sqrt(diag(vcov(diff2)))[1:2]
sqrt(diag(vcovHC(diff2)))[1:2]


#### Example 7-10

## ------------------------------------------------------------------------
mtest(diff2, order = 2)


#### Example 7-9

## ------------------------------------------------------------------------
sargan(diff2)
sargan(sys2)

## End(Not run)

pder documentation built on Jan. 27, 2022, 1:12 a.m.

Related to DemocracyIncome in pder...