Displaying 1 result from an estimated 1 matches for "polity4".
Did you mean:
polity2
2012 Nov 01
2
Subsetting year range
...f someone can point out what I am doing wrong with
this part, or somewhere else that I am coding wrong.
Thanks,
Full code:
###########
TableAP <- read.csv("AnnualPanel.csv")
TableAP <- data.frame(TableAP)
TableAP
nrow (TableAP)
install.packages("zoo")
require(zoo)
Lagpolity4AP1 <- lag(zoo(TableAP$polity4), -1)
Lagpolity4AP2 <- lag(zoo(TableAP$polity4), -2)
Lagpolity4AP3 <- lag(zoo(TableAP$polity4), -3)
Lagpolity4AP4 <- lag(zoo(TableAP$polity4), -4)
Lagpolity4AP5 <- lag(zoo(TableAP$polity4), -5)
LaglrgdpchAP1 <- lag(zoo(TableAP$lrgdpch), -1)
Laglrgdpch...