-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.R
289 lines (229 loc) · 17.3 KB
/
script.R
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# Package installation
install.packages("plm")
install.packages("stargazer")
install.packages("robustbase")
install.packages("tidyverse")
install.packages("lmtest")
install.packages("ipumsr")
install.packages("rmarkdown")
install.packages("tesseract")
install.packages("pdftools")
install.packages("sf")
library(sf)
library(plm)
library(stargazer)
library(pdftools)
library(rmarkdown)
library(robustbase)
library(tidyverse)
library(lmtest)
library(ipumsr)
library(tesseract)
# convert this into a rmd but first try with the .tex file
#use pandoc_convert"thesis.tex", to= "markdown", output = "thesis.md", citeproc = TRUE) and try to add the .bib
# and see if it can load the bibliography too
# check the path inside the .tex file in case it gives you some problems
#indicate the paths of the data and shape for the ipumsr functions to read from
pathshp <- "nhgis0027_shape.zip"
pathcsv <- "nhgis0027_csv.zip"
# indicating layer identifiers for `read_nhgis*` functions
layers <- c("ds9","ds10","ds13","ds14","ds16","ds17","ds22","ds23")
years <- as.character(seq(1850,1880, by = 10))
# reading the data through a loop that runs the `read_nhgis` function
# with the different layers in `data_layer=contains(X)`
csvfiles <- map(layers, ~ read_nhgis(data_file = pathcsv, contains(.x)))
#merging the csv datasets
csv1850 <- left_join(csvfiles[[1]],csvfiles[[2]], by = "GISJOIN")
csv1860 <- left_join(csvfiles[[3]],csvfiles[[4]], by = "GISJOIN")
csv1870 <- left_join(csvfiles[[5]],csvfiles[[6]], by = "GISJOIN")
csv1880 <- left_join(csvfiles[[7]],csvfiles[[8]], by = "GISJOIN")
#uploading shape files with same loop as before
shpfiles <- map(years, ~ read_ipums_sf(shape_file = pathshp, contains((.x))))
#joining csv and shape
data1850 <- ipums_shape_inner_join(data = csv1850,shape_data = shape1850, by = "GISJOIN", verbose=TRUE)
data1860 <- ipums_shape_inner_join(data = csv1860,shape_data = shape1860, by = "GISJOIN", verbose=TRUE)
data1870 <- ipums_shape_inner_join(data = csv1870,shape_data = shape1870, by = "GISJOIN", verbose=TRUE)
data1880 <- ipums_shape_inner_join(data = csv1880,shape_data = shape1880, by = "GISJOIN", verbose=TRUE)
tabletobcot <- pdftools::pdf_convert('https://www2.census.gov/library/publications/1960/compendia/hist_stats_colonial-1957/hist_stats_colonial-1957-chK.pdf',page = 46, dpi = 1200) %>%
tesseract::ocr(engine = tesseract("eng")) %>% cat() %>% write.table()
# #cotton price per pound 1870
# cottonprice70 <- 12.1
# Transforming and creating variables
data60ag$FARMS <- rowSums(data60ag[,c(30:36)])
data60ag$FORATIO <- (data60ag$AH5004+data60ag$AH5005+data60ag$AH5006)/data60ag$AG3001
data70ag$FORATIO <- data70ag$ALB002/data70ag$AJ3001
data60ag$SLAVES <- data60ag$AGU001/data60ag$AG3001
data60ag$SLAVES[is.na(data60ag$SLAVES)]<-0
# Merging slave data in the 1870 dataframe
SLAVES60 <- data60ag[,c(1:7,ncol(data60ag))]
SLAVES60$YEAR <- 1870
data70ag <- merge(data70ag,SLAVES60)
# Calculating the farm price index in 1860's level
index70=112/77
# Renaming variables in 1860 dataframe
data60ag <- rename(data60ag, STOT=AGU001)
data60ag <- rename(data60ag, TOTPOP=AG3001)
data60ag$FORPOP <- rowSums(data60ag[, c(23:25)])
data60ag <- rename(data60ag, LIVESTOCK=AGX001)
data60ag <- rename(data60ag, AGOUT2=AG2002)
data60ag <- rename(data60ag, AGOUT1=AG2001)
data60ag <- rename(data60ag, AGOUT3=AGQ001)
data60ag$AMEN <- 0
data60ag <- rename(data60ag, MACHINE=AGV002)
# Renaming variables in 1870 dataframe
data70ag <- rename(data70ag, TOTPOP=AJR001)
data70ag <- rename(data70ag, FORPOP=ALB002)
data70ag <- rename(data70ag, LIVESTOCK=AJZ001)
data70ag <- rename(data70ag, AGOUT3=AJX001)
data70ag$LIVESTOCK <- data70ag$LIVESTOCK/index70
data70ag$AGOUT3 <- data70ag$AGOUT3/index70
data70ag$AMEN <- 1
data70ag <- rename(data70ag, FARMS=AKP001)
data70ag <- rename(data70ag, MACHINE=AJV002)
data70ag$MACHINE <- data70ag$MACHINE/index70
# Calculating population change
data60ag$MALEPOP60 <- rowSums(data60ag[,c(40:51)])
data70ag <- rename(data70ag, MALEPOP70=AKH001)
MALEPOPGROWTH60 <- data60ag[,c(1,3:7,74)]
MALEPOPGROWTH70 <- data70ag[,c(1,3:7,21)]
MALEPOPGROWTH <- merge(MALEPOPGROWTH60,MALEPOPGROWTH70)
MALEPOPGROWTH$POPGROWTH <- log(MALEPOPGROWTH$MALEPOP70)-log(MALEPOPGROWTH$MALEPOP60)
MALEPOPGROWTH <- MALEPOPGROWTH[,c(1:6,9)]
data60ag <- merge(data60ag,MALEPOPGROWTH)
data70ag=merge(data70ag,MALEPOPGROWTH)
rm(MALEPOPGROWTH60,MALEPOPGROWTH70)
#Creating ratios of products over total production
data60part <- read.csv("https://raw.githubusercontent.com/enrique95/TFG/master/nhgis0023_ds13_1860_county.csv")
data60ag <- merge(data60ag,data60part)
data60ag$WHEATRAT <- data60ag$AG1001/data60ag$AGOUT3
data60ag$RYERAT <- data60ag$AG1002/data60ag$AGOUT3
data60ag$CORNRAT <- data60ag$AG1003/data60ag$AGOUT3
data60ag$OATRAT <- data60ag$AG1004/data60ag$AGOUT3
data60ag$RICERAT <- data60ag$AG1005/data60ag$AGOUT3
data60ag$TOBACCORAT <- data60ag$AG1006/data60ag$AGOUT3
data60ag$COTTONRAT <- data60ag$AG1007/data60ag$AGOUT3
data60ag$WOOLRAT <- data60ag$AG1008/data60ag$AGOUT3
data60ag$PEARAT <- data60ag$AG1009/data60ag$AGOUT3
data60ag$IRPOTATORAT <- data60ag$AG1010/data60ag$AGOUT3
data60ag$SWPOTATORAT <- data60ag$AG1011/data60ag$AGOUT3
data60ag$BARLEYRAT <- data60ag$AG1012/data60ag$AGOUT3
data60ag$BUCKWHEATRAT <- data60ag$AG1013/data60ag$AGOUT3
data60ag$WINERAT <- data60ag$AG1014/data60ag$AGOUT3
data60ag$BUTTERRAT <- data60ag$AG1015/data60ag$AGOUT3
data60ag$CHEESERAT <- data60ag$AG1016/data60ag$AGOUT3
data60ag$HAYRAT <- data60ag$AG1017/data60ag$AGOUT3
data60ag$CLOVERRAT <- data60ag$AG1018/data60ag$AGOUT3
data60ag$GRASSRAT <- data60ag$AG1019/data60ag$AGOUT3
data60ag$HOPSRAT <- data60ag$AG1020/data60ag$AGOUT3
data60ag$DEWHEMPRAT <- data60ag$AG1021/data60ag$AGOUT3
data60ag$WATERHEMPRAT <- data60ag$AG1022/data60ag$AGOUT3
data60ag$OTHERHEMPRAT <- data60ag$AG1023/data60ag$AGOUT3
data60ag$FLAXRAT <- data60ag$AG1024/data60ag$AGOUT3
data60ag$FLAXSEEDRAT <- data60ag$AG1025/data60ag$AGOUT3
data60ag$SILKRAT <- data60ag$AG1026/data60ag$AGOUT3
data60ag$MAPLESUGARRAT <- data60ag$AG1027/data60ag$AGOUT3
data60ag$CANESUGARRAT <- data60ag$AG1028/data60ag$AGOUT3
data60ag$MAPLEMOLRAT <- data60ag$AG1029/data60ag$AGOUT3
data60ag$CANEMOLRAT <- data60ag$AG1030/data60ag$AGOUT3
data60ag$SORGHUMMOLRAT <- data60ag$AG1031/data60ag$AGOUT3
data60ag$BEESWAXRAT <- data60ag$AG1032/data60ag$AGOUT3
data60ag$HONEYRAT <- data60ag$AG1033/data60ag$AGOUT3
data70part <- read.csv("https://raw.githubusercontent.com/enrique95/TFG/master/nhgis0023_ds16_1870_county.csv")
data70ag <- merge(data70ag,data70part)
data70ag$WHEAT <- data70ag$AJ1001+data70ag$AJ1002
data70ag$WHEATRAT <- (data70ag$WHEAT*1.04)/data70ag$AGOUT3
data70ag$RYERAT <- (data70ag$AJ1003*0.805)/data70ag$AGOUT3
data70ag$CORNRAT <- (data70ag$AJ1004*0.52)/data70ag$AGOUT3
data70ag$OATRAT <- (data70ag$AJ1005*0.43)/data70ag$AGOUT3
data70ag$BARLEYRAT<- (data70ag$AJ1006*0.85)/data70ag$AGOUT3
data70ag$BUCKWHEATRAT <- (data70ag$AJ1007*0.797)/data70ag$AGOUT3
data70ag$TOBACCORAT <- (data70ag$AJ1009*9.7/100)/data70ag$AGOUT3
data70ag$COTTONRAT <- (data70ag$AJ1010*9.71/100*400)/data70ag$AGOUT3
data70ag$WOOLRAT <- (data70ag$AJ1011*22.2/100)/data70ag$AGOUT3
data70ag$IRPOTATORAT <- (data70ag$AJ1013*1.180*0.60)/data70ag$AGOUT3
data70ag$SWPOTATORAT <- (data70ag$AJ1014*1.610*0.50)/data70ag$AGOUT3
data70ag$BUTTERRAT <- (data70ag$AJ1016*38.1/100)/data70ag$AGOUT3
data70ag$HAYRAT <- (data70ag$AJ1019*14.45)/data70ag$AGOUT3
# Combining both dataframes
common_cols <- intersect(colnames(data60ag), colnames(data70ag))
datotalag <- rbind(data60ag[common_cols],data70ag[common_cols])
# Clasifying states
datotalag$CSA=ifelse(datotalag$STATE%in%c("South Carolina","Mississippi", "Florida","Alabama","Georgia", "Louisiana", "Texas","Virginia","Arkansas","Tennessee","North Carolina", "Missouri", "Kentucky"),1,0)
#try with CSA= datotalag$STATE%in%c("South Carolina","Mississippi", "Florida",
#"Alabama","Georgia", "Louisiana", "Texas","Virginia","Arkansas","Tennessee",
#"North Carolina", "Missouri", "Kentucky")
#and then subset in the model
# Creating the interactions
datotalag$SLADUM=ifelse(datotalag$SLAVES>0,1,0)
datotalag$DID=datotalag$SLADUM*datotalag$AMEN
datotalag$DIDRAT=datotalag$SLAVES*datotalag$AMEN
# Creating logarithms
datotalag = datotalag %>% mutate(LAGOUT3=log(AGOUT3))
datotalag = datotalag %>% mutate(LMACHINE=log(MACHINE))
datotalag = datotalag %>% mutate(LLIVESTOCK=log(LIVESTOCK))
datotalag = datotalag %>% mutate(LFARMS=log(FARMS))
# Eliminating NA and INF values
datotalag <- datotalag[is.finite(rowSums(datotalag[,c(8:ncol(datotalag))])),]
#--------------
#Linear models without population growth
DIDRATNOPOP=lm(LAGOUT3~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO, data = datotalag)
#DIDRATNOPOP=lmrob(LAGOUT3~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO, data = datotalag)
DIDRATCOTTONNOPOP <- update(DIDRATNOPOP, COTTONRAT ~ .)
DIDRATTOBACCONOPOP <- update(DIDRATNOPOP, TOBACCORAT ~ .)
# Heterogeneity analysis in the south
DIDRATSOUTHNOPOP=lm(LAGOUT3~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO, data = datotalag[datotalag$CSA==1,])
DIDRATCOTTONSOUTHNOPOP <- update(DIDRATSOUTHNOPOP, COTTONRAT ~ .)
DIDRATTOBACCOSOUTHNOPOP <- update(DIDRATSOUTHNOPOP, TOBACCORAT ~.)
#--------
# Creating the linear models with population
#DIDRAT=lmrob(LAGOUT3~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO+POPGROWTH, data = datotalag)
DIDRAT=lm(LAGOUT3~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO+POPGROWTH, data = datotalag)
DIDRATCOTTON=update(DIDRAT,COTTONRAT ~ .)
DIDRATTOBACCO=update(DIDRAT,TOBACCORAT ~ .)
# Heterogeneity analysis in the south
#DIDRATSOUTH=lmrob(LAGOUT3~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO+POPGROWTH, data = datotalag[datotalag$CSA==1,])
DIDRATSOUTH=lm(LAGOUT3~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO+POPGROWTH, data = datotalag[datotalag$CSA==1,])
DIDRATCOTTONSOUTH=update(DIDRATSOUTH, COTTONRAT~.)
DIDRATTOBACCOSOUTH=update(DIDRATSOUTH, TOBACCORAT~.)
#-----
# panel data
paneldatotal=pdata.frame(datotalag, index = c("GISJOIN","YEAR"))
didrand=plm(LAGOUT3~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO+POPGROWTH, data = paneldatotal, model = "random")
didfix=plm(LAGOUT3~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO+POPGROWTH, data = paneldatotal, model = "within")
phtest(didfix,didrand)
pFtest(didfix,DIDRATNOPOP)
# now creating linear models with fixed effects
DIDFIXNOPOP=plm(LAGOUT3~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO, data = paneldatotal, model = "within")
DIDFIXCOTTONNOPOP=plm(COTTONRAT~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO, data = paneldatotal, model = "within")
DIDFIXTOBACCONOPOP=plm(TOBACCORAT~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO, data = paneldatotal, model = "within")
# Heterogeneity analysis in the south
DIDFIXSOUTHNOPOP=plm(LAGOUT3~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO, data = paneldatotal[datotalag$CSA==1,], model = "within")
DIDFIXCOTTONSOUTHNOPOP=plm(COTTONRAT~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO, data = paneldatotal[datotalag$CSA==1,], model = "within")
DIDFIXTOBACCOSOUTHNOPOP=plm(TOBACCORAT~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO, data = paneldatotal[datotalag$CSA==1,], model = "within")
#with population
DIDFIX=plm(LAGOUT3~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO+POPGROWTH, data = paneldatotal, model = "within")
DIDFIXCOTTON=plm(COTTONRAT~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO+POPGROWTH, data = paneldatotal, model = "within")
DIDFIXTOBACCO=plm(COTTONRAT~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO+POPGROWTH, data = paneldatotal, model = "within")
# Heterogeneity analysis in the south
DIDFIXSOUTH=plm(LAGOUT3~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO+POPGROWTH, data = paneldatotal[datotalag$CSA==1,], model = "within")
DIDFIXCOTTONSOUTH=plm(COTTONRAT~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO+POPGROWTH, data = paneldatotal[datotalag$CSA==1,], model = "within")
DIDFIXTOBACCOSOUTH=plm(TOBACCORAT~SLAVES+AMEN+DIDRAT+LMACHINE+LLIVESTOCK+LFARMS+FORATIO+POPGROWTH, data = paneldatotal[datotalag$CSA==1,], model = "within")
#Testing for heteroskedasticity in the models
models <- mget(ls(pattern = "DID"))
heterotests <- lapply(models, bptest)
# Making tables for LaTeX with stargazer package
stargazer(DIDRATNOPOP,DIDFIXNOPOP,dep.var.labels=c("Agregate agricultural output (logs)"),title="Total agricultural production" , covariate.labels=c("Slave ratio","Before the 13th Amendment","Diff-in-diff estimator","Implements and machinery (logs)","Livestock (logs)","Number of farms (logs)", "Foreign people ratio"),omit.stat=c("LL","ser","aic","bic"),no.space=TRUE,report = ('vc*p'))
stargazer(DIDRATCOTTONNOPOP,DIDFIXCOTTONNOPOP,dep.var.labels=c("Cotton ratio"),title="Cotton production per total agricultural production" , covariate.labels=c("Slave ratio","Before the 13th Amendment","Diff-in-diff estimator","Implements and machinery (logs)","Livestock (logs)","Number of farms (logs)", "Foreign people ratio"),omit.stat=c("LL","ser","aic","bic"),no.space=TRUE,report = ('vc*p'))
stargazer(DIDRATTOBACCONOPOP,DIDFIXTOBACCONOPOP,dep.var.labels=c("Tobacco ratio"),title="Tobacco production per total agricultural production" , covariate.labels=c("Slave ratio","Before the 13th Amendment","Diff-in-diff estimator","Implements and machinery","Livestock","Number of farms", "Foreign people ratio"),omit.stat=c("LL","ser","aic","bic"),no.space=TRUE,report = ('vc*p'))
#Making tables with population
stargazer(DIDRAT,DIDFIX,dep.var.labels=c("Agregate agricultural output (logs)"),title="Total agricultural production including population growth" , covariate.labels=c("Slave ratio","Before the 13th Amendment","Diff-in-diff estimator","Implements and machinery (logs)","Livestock (logs)","Number of farms (logs)", "Foreign people ratio", "Population growth rate 1860-1870"),omit.stat=c("LL","ser","aic","bic"),no.space=TRUE,report = ('vc*p'))
stargazer(DIDRATCOTTON,DIDFIXCOTTON,dep.var.labels=c("Cotton ratio"),title="Cotton production per total agricultural production including population growth" , covariate.labels=c("Slave ratio","Before the 13th Amendment","Diff-in-diff estimator","Implements and machinery (logs)","Livestock (logs)","Number of farms (logs)", "Foreign people ratio", "Population growth rate 1860-1870"),omit.stat=c("LL","ser","aic","bic"),no.space=TRUE,report = ('vc*p'))
stargazer(DIDRATTOBACCO,DIDFIXTOBACCO,dep.var.labels=c("Tobacco ratio"),title="Tobacco production per total agricultural production including population growth" , covariate.labels=c("Slave ratio","Before the 13th Amendment","Diff-in-diff estimator","Implements and machinery (logs)","Livestock (logs)","Number of farms (logs)", "Foreign people ratio", "Population growth rate 1860-1870"),omit.stat=c("LL","ser","aic","bic"),no.space=TRUE,report = ('vc*p'))
#Stargazer heterogeneity and south
stargazer(DIDRATSOUTHNOPOP,DIDFIXSOUTHNOPOP,dep.var.labels=c("Agregate agricultural output (logs)"),title="Total agricultural production in confederate states" , covariate.labels=c("Slave ratio","Before the 13th Amendment","Diff-in-diff estimator","Implements and machinery (logs)","Livestock (logs)","Number of farms (logs)", "Foreign people ratio"),omit.stat=c("LL","ser","aic","bic"),no.space=TRUE,report = ('vc*p'))
stargazer(DIDRATCOTTONSOUTHNOPOP,DIDFIXCOTTONSOUTHNOPOP,dep.var.labels=c("Cotton ratio"),title="Cotton production per total agricultural production in confederate states" , covariate.labels=c("Slave ratio","Before the 13th Amendment","Diff-in-diff estimator","Implements and machinery (logs)","Livestock (logs)","Number of farms (logs)", "Foreign people ratio"),omit.stat=c("LL","ser","aic","bic"),no.space=TRUE,report = ('vc*p'))
stargazer(DIDRATTOBACCOSOUTHNOPOP,DIDFIXTOBACCOSOUTHNOPOP,dep.var.labels=c("Tobacco ratio"),title="Tobacco production per total agricultural production in confederate states" , covariate.labels=c("Slave ratio","Before the 13th Amendment","Diff-in-diff estimator","Implements and machinery (logs)","Livestock (logs)","Number of farms (logs)", "Foreign people ratio"),omit.stat=c("LL","ser","aic","bic"),no.space=TRUE,report = ('vc*p'))
#Stargazer heterogeneity, south and population
stargazer(DIDRATSOUTH,DIDFIXSOUTH,dep.var.labels=c("Agregate agricultural output (logs)"),title="Total agricultural production in confederate states including population growth" , covariate.labels=c("Slave ratio","Before the 13th Amendment","Diff-in-diff estimator","Implements and machinery (logs)","Livestock (logs)","Number of farms (logs)", "Foreign people ratio", "Population growth rate 1860-1870"),omit.stat=c("LL","ser","aic","bic"),no.space=TRUE,report = ('vc*p'))
stargazer(DIDRATCOTTONSOUTH,DIDFIXCOTTONSOUTH,dep.var.labels=c("Cotton ratio"),title="Cotton production per total agricultural production in confederate states including population growth" , covariate.labels=c("Slave ratio","Before the 13th Amendment","Diff-in-diff estimator","Implements and machinery (logs)","Livestoc (logs)k","Number of farms (logs)", "Foreign people ratio", "Population growth rate 1860-1870"),omit.stat=c("LL","ser","aic","bic"),no.space=TRUE,report = ('vc*p'))
stargazer(DIDRATTOBACCOSOUTH,DIDFIXTOBACCOSOUTH,dep.var.labels=c("Tobacco ratio"),title="Tobacco production per total agricultural production in confederate states including population growth" , covariate.labels=c("Slave ratio","Before the 13th Amendment","Diff-in-diff estimator","Implements and machinery (logs)","Livestock (logs)","Number of farms (logs)", "Foreign people ratio", "Population growth rate 1860-1870"),omit.stat=c("LL","ser","aic","bic"),no.space=TRUE,report = ('vc*p'))