-
Notifications
You must be signed in to change notification settings - Fork 0
/
_targets.R
587 lines (569 loc) · 47.2 KB
/
_targets.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
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
library(targets)
library(tarchetypes)
library(tidyverse)
source("R/functionsDAG.R")
source("R/functionsSignal.R")
source("R/functionsReview.R")
source("R/functionsSimulation.R")
source("R/functionsReplications.R")
options(
clustermq.scheduler = "slurm",
clustermq.template = "slurm_clustermq.tmpl",
tidyverse.quiet = TRUE
)
tar_option_set(packages = c("brms", "cowplot", "conleyreg", "countrycode",
"dagitty", "geosphere", "ggdag", "ggrepel", "ggtext",
"haven", "lmtest", "papaja", "psych", "readxl",
"rstan", "sf", "sjlabelled", "tidybayes", "tidyverse"),
memory = "transient", garbage_collection = TRUE)
# targets for simulation (see below)
simulationTargets <-
tar_map(
# return nested list from tar_map()
unlist = FALSE,
# map simulation over different covariance matrices and different values of lambda and rho
values = expand_grid(covMat = rlang::syms(c("simGeoCov", "simLinCov")),
lambda = c(0.2, 0.5, 0.8),
rho = c(0.2, 0.5, 0.8),
r = c(0, 0.1, 0.3, 0.5)),
# simulation model
tar_target(simModel, fitSimulationModel(covMat, lambda, rho, r)),
# simulate data
tar_target(simData, simulateData(simModel, covMat, continent, iso, langFam,
geneticDistances, lambda, rho, r, iter)),
# ols analyses
tar_target(olsModel1, fitOLSModel(y ~ x, data = simData)),
tar_target(olsModel2, fitOLSModel(y ~ x + latitude, data = simData)),
tar_target(olsModel3, fitOLSModel(y ~ x + longitude, data = simData)),
tar_target(olsModel4, fitOLSModel(y ~ x + continent, data = simData)),
tar_target(olsModel5, fitOLSModel(y ~ x + langFamily, data = simData)),
tar_target(olsModel6, fitOLSModel(y ~ x + surroundingMean2000km, data = simData)),
# conley se analyses
tar_target(conleyModel1, fitConleyModel1(simData)),
tar_target(conleyModel2, fitConleyModel2(simData)),
# brms analyses
tar_target(brmsModel1, fitBrmsModel(brmsInitial1, simData)),
tar_target(brmsModel2, fitBrmsModel(brmsInitial2, simData)),
tar_target(brmsModel3, fitBrmsModel(brmsInitial3, simData))
)
# pipeline
list(
#### Causal model ####
tar_target(dag, plotDAG()),
#### Geographic and linguistic signal ####
# files
tar_target(fileISO, "data/countryData/countries_codes_and_coordinates.csv", format = "file"),
tar_target(fileGeo, "data/networks/1F Population Distance.xlsx", format = "file"),
tar_target(fileLin, "data/networks/2F Country Distance 1pml adj.xlsx", format = "file"),
tar_target(fileHDI, "data/hdi/2020_statistical_annex_all.xlsx", format = "file"),
tar_target(fileISOHDI, "data/hdi/iso.csv", format = "file"),
tar_target(fileWVS, "data/wvs/Integrated_values_surveys_1981-2021.sav", format = "file"),
tar_target(fileGDP, "data/gdp/API_NY.GDP.PCAP.CD_DS2_en_csv_v2_4666475.csv", format = "file"),
tar_target(fileGDPGrowth, "data/gdpGrowth/API_NY.GDP.PCAP.KD.ZG_DS2_en_csv_v2_4666256.csv", format = "file"),
tar_target(fileGini, "data/gini/API_SI.POV.GINI_DS2_en_csv_v2_4666600.csv", format = "file"),
tar_target(fileTightness, "data/tightness/Tightness_Scores.xlsx", format = "file"),
# isocodes (https://gist.github.com/tadast/8827699)
tar_target(iso, loadISO(fileISO)),
# load datasets for signal models
tar_target(hdi, loadHDIData(fileHDI, fileISOHDI)),
tar_target(wvs, haven::read_sav(fileWVS, encoding = "latin1")),
tar_target(gdp, loadGDPData(fileGDP, iso)),
tar_target(gdpGrowth, loadGDPGrowthData(fileGDPGrowth, iso)),
tar_target(gini, loadGiniData(fileGini, iso)),
tar_target(tightness, read_xlsx(fileTightness)),
# covariance matrices
tar_target(geoCov, loadCovMat(fileGeo, log = TRUE)),
tar_target(linCov, loadCovMat(fileLin, log = FALSE)),
# fit geographic and linguistic signal models
tar_target(signalHDI, fitHDISignal(hdi, geoCov, linCov)),
tar_target(signalGDP, fitGDPSignal(gdp, geoCov, linCov)),
tar_target(signalGrow, fitGDPGrowthSignal(gdpGrowth, geoCov, linCov)),
tar_target(signalGini, fitGiniSignal(gini, geoCov, linCov)),
tar_target(signalTrad, fitWVSSignal(wvs, outcome = "trad", geoCov, linCov)),
tar_target(signalSurv, fitWVSSignal(wvs, outcome = "surv", geoCov, linCov)),
tar_target(signalTight, fitTightnessSignal(tightness, geoCov, linCov)),
tar_target(signalInd, fitIndividualismSignal(fincherData, geoCov, linCov)),
# calculate geographic signal
tar_target(geoHDI, hypothesis(signalHDI, "(sd_isoGeo__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sd_iso__Intercept^2))=0", class = NULL)),
tar_target(geoGDP, hypothesis(signalGDP, "(sd_isoGeo__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sd_iso2__Intercept^2))=0", class = NULL)),
tar_target(geoGrow, hypothesis(signalGrow, "(sd_isoGeo__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sd_iso2__Intercept^2))=0", class = NULL)),
tar_target(geoGini, hypothesis(signalGini, "(sd_isoGeo__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sd_iso2__Intercept^2))=0", class = NULL)),
tar_target(geoTrad, hypothesis(signalTrad, "(sd_isoGeo__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sd_S009__Intercept^2))=0", class = NULL)),
tar_target(geoSurv, hypothesis(signalSurv, "(sd_isoGeo__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sd_S009__Intercept^2))=0", class = NULL)),
tar_target(geoTight, hypothesis(signalTight, "(sd_isoGeo__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sigma^2))=0", class = NULL)),
tar_target(geoInd, hypothesis(signalInd, "(sd_isoGeo__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sigma^2))=0", class = NULL)),
# calculate geographic signal
tar_target(linHDI, hypothesis(signalHDI, "(sd_isoLin__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sd_iso__Intercept^2))=0", class = NULL)),
tar_target(linGDP, hypothesis(signalGDP, "(sd_isoLin__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sd_iso2__Intercept^2))=0", class = NULL)),
tar_target(linGrow, hypothesis(signalGrow, "(sd_isoLin__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sd_iso2__Intercept^2))=0", class = NULL)),
tar_target(linGini, hypothesis(signalGini, "(sd_isoLin__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sd_iso2__Intercept^2))=0", class = NULL)),
tar_target(linTrad, hypothesis(signalTrad, "(sd_isoLin__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sd_S009__Intercept^2))=0", class = NULL)),
tar_target(linSurv, hypothesis(signalSurv, "(sd_isoLin__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sd_S009__Intercept^2))=0", class = NULL)),
tar_target(linTight, hypothesis(signalTight, "(sd_isoLin__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sigma^2))=0", class = NULL)),
tar_target(linInd, hypothesis(signalInd, "(sd_isoLin__Intercept^2/(sd_isoGeo__Intercept^2+sd_isoLin__Intercept^2+sigma^2))=0", class = NULL)),
# plot signal
tar_target(plotSignal, plotGeoLinSignal(geoHDI, geoGDP, geoGrow, geoGini,
geoTrad, geoSurv, geoTight, geoInd,
linHDI, linGDP, linGrow, linGini,
linTrad, linSurv, linTight, linInd)),
# table
tar_target(tableSignal, makeTableGeoLinSignal(geoHDI, geoGDP, geoGrow, geoGini,
geoTrad, geoSurv, geoTight, geoInd,
linHDI, linGDP, linGrow, linGini,
linTrad, linSurv, linTight, linInd)),
#### Review ####
# files
tar_target(fileReview, "review/mainReview.xlsx", format = "file"),
tar_target(fileMethods, "review/methods.csv", format = "file"),
# load review
tar_target(review, loadReview(fileReview, fileMethods)),
# fit random effects models to retrieve corrected analysis-level proportions
tar_target(rM1, fitReviewMLM(review, outcome = "ControlNI")),
tar_target(rM2, fitReviewMLM(review, outcome = "method_RegionalFixedEffects")),
tar_target(rM3, fitReviewMLM(review, outcome = "method_Distance")),
tar_target(rM4, fitReviewMLM(review, outcome = "method_SharedCulturalHistory")),
tar_target(rM5, fitReviewMLM(review, outcome = "method_Other")),
# posterior samples
tar_target(postRM1, as_draws_array(rM1, variable = "^b_", regex = TRUE)),
tar_target(postRM2, as_draws_array(rM2, variable = "^b_", regex = TRUE)),
tar_target(postRM3, as_draws_array(rM3, variable = "^b_", regex = TRUE)),
tar_target(postRM4, as_draws_array(rM4, variable = "^b_", regex = TRUE)),
tar_target(postRM5, as_draws_array(rM5, variable = "^b_", regex = TRUE)),
# fit article-level models
tar_target(yearArticle, fitYearArticle(review)),
tar_target(ifArticle, fitIFArticle(review)),
# fit analysis-level models
tar_target(yearAnalysis, fitYearAnalysis(review)),
tar_target(ifAnalysis, fitIFAnalysis(review)),
# plot review summaries
tar_target(plotReview1, plotReviewArticle(review, yearArticle, ifArticle)),
tar_target(plotReview2, plotReviewAnalysis(review, yearAnalysis, ifAnalysis,
postRM1, postRM2, postRM3, postRM4, postRM5)),
#### Simulation ####
# files
tar_target(fileContinent, "data/countryData/continent.csv", format = "file"),
tar_target(fileLangFam, "data/countryData/langFamily.xlsx", format = "file"),
tar_target(fileGenetic, "data/geneticDistance/alldata.dta", format = "file"),
# continent data (https://datahub.io/JohnSnowLabs/country-and-continent-codes-list#data)
tar_target(continent, read.csv(fileContinent, na.strings = "")),
# language family data (from glottolog)
tar_target(langFam, read_xlsx(fileLangFam)),
# genetic distances
tar_target(geneticDistances, loadGeneticDistances(fileGenetic, iso)),
# geographic and linguistic covariance matrices
tar_target(simGeoCov, loadSimCovMat(fileGeo, continent, iso, langFam)),
tar_target(simLinCov, loadSimCovMat(fileLin, continent, iso, langFam)),
# initialise brms models
tar_target(brmsInitial1, setupBrms(simData_simLinCov_0.8_0.8_0$simData[[1]], simLinCov, type = "spatial")),
tar_target(brmsInitial2, setupBrms(simData_simLinCov_0.8_0.8_0$simData[[1]], simLinCov, type = "linguistic")),
tar_target(brmsInitial3, setupBrms(simData_simLinCov_0.8_0.8_0$simData[[1]], simLinCov, type = "both")),
# sim iterations
tar_target(iter, 100),
# simulation
simulationTargets,
# combine
tar_combine(olsModel1_simGeoCov, simulationTargets$olsModel1[1:36], command = dplyr::bind_rows(!!!.x)),
tar_combine(olsModel1_simLinCov, simulationTargets$olsModel1[37:72], command = dplyr::bind_rows(!!!.x)),
tar_combine(olsModel2_simGeoCov, simulationTargets$olsModel2[1:36], command = dplyr::bind_rows(!!!.x)),
tar_combine(olsModel2_simLinCov, simulationTargets$olsModel2[37:72], command = dplyr::bind_rows(!!!.x)),
tar_combine(olsModel3_simGeoCov, simulationTargets$olsModel3[1:36], command = dplyr::bind_rows(!!!.x)),
tar_combine(olsModel3_simLinCov, simulationTargets$olsModel3[37:72], command = dplyr::bind_rows(!!!.x)),
tar_combine(olsModel4_simGeoCov, simulationTargets$olsModel4[1:36], command = dplyr::bind_rows(!!!.x)),
tar_combine(olsModel4_simLinCov, simulationTargets$olsModel4[37:72], command = dplyr::bind_rows(!!!.x)),
tar_combine(olsModel5_simGeoCov, simulationTargets$olsModel5[1:36], command = dplyr::bind_rows(!!!.x)),
tar_combine(olsModel5_simLinCov, simulationTargets$olsModel5[37:72], command = dplyr::bind_rows(!!!.x)),
tar_combine(olsModel6_simGeoCov, simulationTargets$olsModel6[1:36], command = dplyr::bind_rows(!!!.x)),
tar_combine(olsModel6_simLinCov, simulationTargets$olsModel6[37:72], command = dplyr::bind_rows(!!!.x)),
tar_combine(conleyModel1_simGeoCov, simulationTargets$conleyModel1[1:36], command = dplyr::bind_rows(!!!.x)),
tar_combine(conleyModel1_simLinCov, simulationTargets$conleyModel1[37:72], command = dplyr::bind_rows(!!!.x)),
tar_combine(conleyModel2_simGeoCov, simulationTargets$conleyModel2[1:36], command = dplyr::bind_rows(!!!.x)),
tar_combine(conleyModel2_simLinCov, simulationTargets$conleyModel2[37:72], command = dplyr::bind_rows(!!!.x)),
tar_combine(brmsModel1_simGeoCov, simulationTargets$brmsModel1[1:36], command = dplyr::bind_rows(!!!.x)),
tar_combine(brmsModel1_simLinCov, simulationTargets$brmsModel1[37:72], command = dplyr::bind_rows(!!!.x)),
tar_combine(brmsModel2_simGeoCov, simulationTargets$brmsModel2[1:36], command = dplyr::bind_rows(!!!.x)),
tar_combine(brmsModel2_simLinCov, simulationTargets$brmsModel2[37:72], command = dplyr::bind_rows(!!!.x)),
tar_combine(brmsModel3_simGeoCov, simulationTargets$brmsModel3[1:36], command = dplyr::bind_rows(!!!.x)),
tar_combine(brmsModel3_simLinCov, simulationTargets$brmsModel3[37:72], command = dplyr::bind_rows(!!!.x)),
# tables of simulation results
tar_target(tableSim1, makeTableSimAll(olsModel1_simGeoCov, olsModel2_simGeoCov, olsModel3_simGeoCov, olsModel4_simGeoCov,
olsModel5_simGeoCov, olsModel6_simGeoCov, conleyModel1_simGeoCov, conleyModel2_simGeoCov,
brmsModel1_simGeoCov, brmsModel2_simGeoCov, brmsModel3_simGeoCov)),
tar_target(tableSim2, makeTableSimAll(olsModel1_simLinCov, olsModel2_simLinCov, olsModel3_simLinCov, olsModel4_simLinCov,
olsModel5_simLinCov, olsModel6_simLinCov, conleyModel1_simLinCov, conleyModel2_simLinCov,
brmsModel1_simLinCov, brmsModel2_simLinCov, brmsModel3_simLinCov)),
# plot simulation results
# false positive rates
tar_target(plotSim1, plotSimInd(olsModel1_simGeoCov, olsModel2_simGeoCov, olsModel3_simGeoCov, olsModel4_simGeoCov,
olsModel5_simGeoCov, olsModel6_simGeoCov, conleyModel1_simGeoCov, conleyModel2_simGeoCov,
brmsModel1_simGeoCov, brmsModel2_simGeoCov, brmsModel3_simGeoCov,
type = "spatial", file = "figures/simIndGeo.pdf")),
tar_target(plotSim2, plotSimInd(olsModel1_simLinCov, olsModel2_simLinCov, olsModel3_simLinCov, olsModel4_simLinCov,
olsModel5_simLinCov, olsModel6_simLinCov, conleyModel1_simLinCov, conleyModel2_simLinCov,
brmsModel1_simLinCov, brmsModel2_simLinCov, brmsModel3_simLinCov,
type = "cultural phylogenetic", file = "figures/simIndLin.pdf")),
tar_target(plotSim3, plotSimAll(olsModel1_simGeoCov, olsModel2_simGeoCov, olsModel3_simGeoCov, olsModel4_simGeoCov,
olsModel5_simGeoCov, olsModel6_simGeoCov, conleyModel1_simGeoCov, conleyModel2_simGeoCov,
brmsModel1_simGeoCov, brmsModel2_simGeoCov, brmsModel3_simGeoCov,
type = "spatial", file = "figures/simAllGeo.pdf")),
tar_target(plotSim4, plotSimAll(olsModel1_simLinCov, olsModel2_simLinCov, olsModel3_simLinCov, olsModel4_simLinCov,
olsModel5_simLinCov, olsModel6_simLinCov, conleyModel1_simLinCov, conleyModel2_simLinCov,
brmsModel1_simLinCov, brmsModel2_simLinCov, brmsModel3_simLinCov,
type = "cultural phylogenetic", file = "figures/simAllLin.pdf")),
# power analyses
tar_target(plotPowerGeo0.1, plotPower(olsModel1_simGeoCov, olsModel2_simGeoCov, olsModel3_simGeoCov, olsModel4_simGeoCov,
olsModel5_simGeoCov, olsModel6_simGeoCov, conleyModel1_simGeoCov, conleyModel2_simGeoCov,
brmsModel1_simGeoCov, brmsModel2_simGeoCov, brmsModel3_simGeoCov,
r = 0.1, type = "spatial", file = "figures/powerGeo0.1.pdf")),
tar_target(plotPowerGeo0.3, plotPower(olsModel1_simGeoCov, olsModel2_simGeoCov, olsModel3_simGeoCov, olsModel4_simGeoCov,
olsModel5_simGeoCov, olsModel6_simGeoCov, conleyModel1_simGeoCov, conleyModel2_simGeoCov,
brmsModel1_simGeoCov, brmsModel2_simGeoCov, brmsModel3_simGeoCov,
r = 0.3, type = "spatial", file = "figures/powerGeo0.3.pdf")),
tar_target(plotPowerGeo0.5, plotPower(olsModel1_simGeoCov, olsModel2_simGeoCov, olsModel3_simGeoCov, olsModel4_simGeoCov,
olsModel5_simGeoCov, olsModel6_simGeoCov, conleyModel1_simGeoCov, conleyModel2_simGeoCov,
brmsModel1_simGeoCov, brmsModel2_simGeoCov, brmsModel3_simGeoCov,
r = 0.5, type = "spatial", file = "figures/powerGeo0.5.pdf")),
tar_target(plotPowerLin0.1, plotPower(olsModel1_simLinCov, olsModel2_simLinCov, olsModel3_simLinCov, olsModel4_simLinCov,
olsModel5_simLinCov, olsModel6_simLinCov, conleyModel1_simLinCov, conleyModel2_simLinCov,
brmsModel1_simLinCov, brmsModel2_simLinCov, brmsModel3_simLinCov,
r = 0.1, type = "cultural phylogenetic", file = "figures/powerLin0.1.pdf")),
tar_target(plotPowerLin0.3, plotPower(olsModel1_simLinCov, olsModel2_simLinCov, olsModel3_simLinCov, olsModel4_simLinCov,
olsModel5_simLinCov, olsModel6_simLinCov, conleyModel1_simLinCov, conleyModel2_simLinCov,
brmsModel1_simLinCov, brmsModel2_simLinCov, brmsModel3_simLinCov,
r = 0.3, type = "cultural phylogenetic", file = "figures/powerLin0.3.pdf")),
tar_target(plotPowerLin0.5, plotPower(olsModel1_simLinCov, olsModel2_simLinCov, olsModel3_simLinCov, olsModel4_simLinCov,
olsModel5_simLinCov, olsModel6_simLinCov, conleyModel1_simLinCov, conleyModel2_simLinCov,
brmsModel1_simLinCov, brmsModel2_simLinCov, brmsModel3_simLinCov,
r = 0.5, type = "cultural phylogenetic", file = "figures/powerLin0.5.pdf")),
#### Replications ####
# files
tar_target(fileAlesina, "data/replications/Alesina2013/tradPloughUse.xlsx", format = "file"),
tar_target(fileBeck1, "data/replications/Beck2003/AppendixTable10.xlsx", format = "file"),
tar_target(fileBeck2, "data/replications/Beck2005/Table1.xlsx", format = "file"),
tar_target(fileBockstette1, "data/replications/Bockstette2002/AppendixTable1.xlsx", format = "file"),
tar_target(fileBockstette2, "data/replications/Bockstette2002/Data_Extract_From_World_Development_Indicators.xlsx", format = "file"),
tar_target(fileEasterly1, "data/replications/Easterly2003/Acemoglu et al. 2001 Appendix Table A2.xlsx", format = "file"),
tar_target(fileEasterly2, "data/replications/Easterly2003/wgidataset.xlsx", format = "file"),
tar_target(fileEasterly3, "data/replications/Easterly2007/AppendixA.xlsx", format = "file"),
tar_target(fileEasterly4, "data/replications/Easterly2007/WIID2C.xls", format = "file"),
tar_target(fileFincher, "data/replications/Fincher2008/suppData.xlsx", format = "file"),
tar_target(fileGelfand1, "data/replications/Gelfand2011/pathogens.xlsx", format = "file"),
tar_target(fileGelfand2, "data/replications/Gelfand2011/tightnessTable1.xlsx", format = "file"),
tar_target(fileGelfand3, "data/replications/Gelfand2011/2005-esi-all-countries.xls", format = "file"),
tar_target(fileGelfand4, "data/replications/Gelfand2011/WorldBank_API_NY.GNP.PCAP.CD_DS2_en_csv_v2_3358861.csv", format = "file"),
tar_target(fileGelfand5, "data/replications/Gelfand2011/tuberculosis.csv", format = "file"),
tar_target(fileInglehart, "data/replications/Inglehart2000/API_SL.IND.EMPL.ZS_DS2_en_csv_v2_3478718.csv", format = "file"),
tar_target(fileKnack, "data/replications/Knack1997/DataAppendix.xlsx", format = "file"),
tar_target(fileSkidmore1, "data/replications/Skidmore2002/emdat_public_2021_11_30_query_uid-kUNKpe.xlsx", format = "file"),
tar_target(fileSkidmore2, "data/replications/Skidmore2002/pwt56_forweb.xls", format = "file"),
tar_target(fileSkidmore3, "data/replications/Skidmore2002/link.csv", format = "file"),
tar_target(fileSkidmore4, "data/replications/Skidmore2002/API_AG.LND.TOTL.K2_DS2_en_csv_v2_3359379.csv", format = "file"),
# Adamczyk 2009
tar_target(adamczykData, loadDataAdamczyk2009(wvs, iso)),
tar_target(adamczykM1a, fitModelAdamczyk2009(adamczykData, linCov, control = "none")),
tar_target(adamczykM1b, fitModelAdamczyk2009(adamczykData, linCov, control = "spatial")),
tar_target(adamczykM1c, fitModelAdamczyk2009(adamczykData, linCov, control = "cultural")),
tar_target(adamczykM1d, fitModelAdamczyk2009(adamczykData, linCov, control = "both")),
tar_target(adamczykSlope1a, posterior_samples(adamczykM1a, pars = "b_countrySurv")[,1]),
tar_target(adamczykSlope1b, posterior_samples(adamczykM1b, pars = "b_countrySurv")[,1]),
tar_target(adamczykSlope1c, posterior_samples(adamczykM1c, pars = "b_countrySurv")[,1]),
tar_target(adamczykSlope1d, posterior_samples(adamczykM1d, pars = "b_countrySurv")[,1]),
tar_target(adamczykCond1a, conditional_effects(adamczykM1a)[["countrySurv"]]),
tar_target(adamczykCond1b, conditional_effects(adamczykM1b)[["countrySurv"]]),
tar_target(adamczykCond1c, conditional_effects(adamczykM1c)[["countrySurv"]]),
tar_target(adamczykCond1d, conditional_effects(adamczykM1d)[["countrySurv"]]),
tar_target(adamczykSA1, getSpatialAutocorrelation1000km(adamczykM1b, adamczykData)),
tar_target(adamczykSignal1, getCulturalPhylogeneticSignal(adamczykM1c)),
tar_target(adamczykRatio1b, getRatioEffectSize(adamczykM1a, adamczykM1b)),
tar_target(adamczykRatio1c, getRatioEffectSize(adamczykM1a, adamczykM1c)),
# Alesina 2013
tar_target(alesinaData, loadDataAlesina2013(fileAlesina, iso)),
tar_target(alesinaM1a, fitModelAlesina2013(alesinaData, linCov, control = "none")),
tar_target(alesinaM1b, fitModelAlesina2013(alesinaData, linCov, control = "spatial")),
tar_target(alesinaM1c, fitModelAlesina2013(alesinaData, linCov, control = "cultural")),
tar_target(alesinaM1d, fitModelAlesina2013(alesinaData, linCov, control = "both")),
tar_target(alesinaSlope1a, posterior_samples(alesinaM1a, pars = "b_tradPloughMean")[,1]),
tar_target(alesinaSlope1b, posterior_samples(alesinaM1b, pars = "b_tradPloughMean")[,1]),
tar_target(alesinaSlope1c, posterior_samples(alesinaM1c, pars = "b_tradPloughMean")[,1]),
tar_target(alesinaSlope1d, posterior_samples(alesinaM1d, pars = "b_tradPloughMean")[,1]),
tar_target(alesinaCond1a, conditional_effects(alesinaM1a)[["tradPloughMean"]]),
tar_target(alesinaCond1b, conditional_effects(alesinaM1b)[["tradPloughMean"]]),
tar_target(alesinaCond1c, conditional_effects(alesinaM1c)[["tradPloughMean"]]),
tar_target(alesinaCond1d, conditional_effects(alesinaM1d)[["tradPloughMean"]]),
tar_target(alesinaSA1, getSpatialAutocorrelation1000km(alesinaM1b, alesinaData)),
tar_target(alesinaSignal1, getCulturalPhylogeneticSignal(alesinaM1c)),
tar_target(alesinaRatio1b, getRatioEffectSize(alesinaM1a, alesinaM1b)),
tar_target(alesinaRatio1c, getRatioEffectSize(alesinaM1a, alesinaM1c)),
# Beck 2003
tar_target(beckData1, loadDataBeck2003(fileBeck1, iso)),
tar_target(beckM1a, fitModelBeck2003(beckData1, linCov, control = "none")),
tar_target(beckM1b, fitModelBeck2003(beckData1, linCov, control = "spatial")),
tar_target(beckM1c, fitModelBeck2003(beckData1, linCov, control = "cultural")),
tar_target(beckM1d, fitModelBeck2003(beckData1, linCov, control = "both")),
tar_target(beckSlope1a, posterior_samples(beckM1a, pars = "b_logSettlerMortality")[,1]),
tar_target(beckSlope1b, posterior_samples(beckM1b, pars = "b_logSettlerMortality")[,1]),
tar_target(beckSlope1c, posterior_samples(beckM1c, pars = "b_logSettlerMortality")[,1]),
tar_target(beckSlope1d, posterior_samples(beckM1d, pars = "b_logSettlerMortality")[,1]),
tar_target(beckCond1a, conditional_effects(beckM1a)[["logSettlerMortality"]]),
tar_target(beckCond1b, conditional_effects(beckM1b)[["logSettlerMortality"]]),
tar_target(beckCond1c, conditional_effects(beckM1c)[["logSettlerMortality"]]),
tar_target(beckCond1d, conditional_effects(beckM1d)[["logSettlerMortality"]]),
tar_target(beckSA1, getSpatialAutocorrelation1000km(beckM1b, beckData1)),
tar_target(beckSignal1, getCulturalPhylogeneticSignal(beckM1c)),
tar_target(beckRatio1b, getRatioEffectSize(beckM1a, beckM1b)),
tar_target(beckRatio1c, getRatioEffectSize(beckM1a, beckM1c)),
# Beck 2005
tar_target(beckData2, loadDataBeck2005(fileBeck2, iso)),
tar_target(beckM2a, fitModelBeck2005(beckData2, linCov, control = "none")),
tar_target(beckM2b, fitModelBeck2005(beckData2, linCov, control = "spatial")),
tar_target(beckM2c, fitModelBeck2005(beckData2, linCov, control = "cultural")),
tar_target(beckM2d, fitModelBeck2005(beckData2, linCov, control = "both")),
tar_target(beckSlope2a, posterior_samples(beckM2a, pars = "b_SME250")[,1]),
tar_target(beckSlope2b, posterior_samples(beckM2b, pars = "b_SME250")[,1]),
tar_target(beckSlope2c, posterior_samples(beckM2c, pars = "b_SME250")[,1]),
tar_target(beckSlope2d, posterior_samples(beckM2d, pars = "b_SME250")[,1]),
tar_target(beckCond2a, conditional_effects(beckM2a)[["SME250"]]),
tar_target(beckCond2b, conditional_effects(beckM2b)[["SME250"]]),
tar_target(beckCond2c, conditional_effects(beckM2c)[["SME250"]]),
tar_target(beckCond2d, conditional_effects(beckM2d)[["SME250"]]),
tar_target(beckSA2, getSpatialAutocorrelation1000km(beckM2b, beckData2)),
tar_target(beckSignal2, getCulturalPhylogeneticSignal(beckM2c)),
tar_target(beckRatio2b, getRatioEffectSize(beckM2a, beckM2b)),
tar_target(beckRatio2c, getRatioEffectSize(beckM2a, beckM2c)),
# Bockstette 2002
tar_target(bockstetteData, loadDataBockstette2002(fileBockstette1, fileBockstette2, iso)),
tar_target(bockstetteM1a, fitModelBockstette2002(bockstetteData, linCov, control = "none")),
tar_target(bockstetteM1b, fitModelBockstette2002(bockstetteData, linCov, control = "spatial")),
tar_target(bockstetteM1c, fitModelBockstette2002(bockstetteData, linCov, control = "cultural")),
tar_target(bockstetteM1d, fitModelBockstette2002(bockstetteData, linCov, control = "both")),
tar_target(bockstetteSlope1a, posterior_samples(bockstetteM1a, pars = "b_Statehist5")[,1]),
tar_target(bockstetteSlope1b, posterior_samples(bockstetteM1b, pars = "b_Statehist5")[,1]),
tar_target(bockstetteSlope1c, posterior_samples(bockstetteM1c, pars = "b_Statehist5")[,1]),
tar_target(bockstetteSlope1d, posterior_samples(bockstetteM1d, pars = "b_Statehist5")[,1]),
tar_target(bockstetteCond1a, conditional_effects(bockstetteM1a)[["Statehist5"]]),
tar_target(bockstetteCond1b, conditional_effects(bockstetteM1b)[["Statehist5"]]),
tar_target(bockstetteCond1c, conditional_effects(bockstetteM1c)[["Statehist5"]]),
tar_target(bockstetteCond1d, conditional_effects(bockstetteM1d)[["Statehist5"]]),
tar_target(bockstetteSA1, getSpatialAutocorrelation1000km(bockstetteM1b, bockstetteData)),
tar_target(bockstetteSignal1, getCulturalPhylogeneticSignal(bockstetteM1c)),
tar_target(bockstetteRatio1b, getRatioEffectSize(bockstetteM1a, bockstetteM1b)),
tar_target(bockstetteRatio1c, getRatioEffectSize(bockstetteM1a, bockstetteM1c)),
# Easterly 2003
tar_target(easterlyData1, loadDataEasterly2003(fileEasterly1, fileEasterly2, iso)),
tar_target(easterlyM1a, fitModelEasterly2003(easterlyData1, linCov, control = "none")),
tar_target(easterlyM1b, fitModelEasterly2003(easterlyData1, linCov, control = "spatial")),
tar_target(easterlyM1c, fitModelEasterly2003(easterlyData1, linCov, control = "cultural")),
tar_target(easterlyM1d, fitModelEasterly2003(easterlyData1, linCov, control = "both")),
tar_target(easterlySlope1a, posterior_samples(easterlyM1a, pars = "b_institIndex")[,1]),
tar_target(easterlySlope1b, posterior_samples(easterlyM1b, pars = "b_institIndex")[,1]),
tar_target(easterlySlope1c, posterior_samples(easterlyM1c, pars = "b_institIndex")[,1]),
tar_target(easterlySlope1d, posterior_samples(easterlyM1d, pars = "b_institIndex")[,1]),
tar_target(easterlyCond1a, conditional_effects(easterlyM1a)[["institIndex"]]),
tar_target(easterlyCond1b, conditional_effects(easterlyM1b)[["institIndex"]]),
tar_target(easterlyCond1c, conditional_effects(easterlyM1c)[["institIndex"]]),
tar_target(easterlyCond1d, conditional_effects(easterlyM1d)[["institIndex"]]),
tar_target(easterlySA1, getSpatialAutocorrelation1000km(easterlyM1b, easterlyData1)),
tar_target(easterlySignal1, getCulturalPhylogeneticSignal(easterlyM1c)),
tar_target(easterlyRatio1b, getRatioEffectSize(easterlyM1a, easterlyM1b)),
tar_target(easterlyRatio1c, getRatioEffectSize(easterlyM1a, easterlyM1c)),
# Easterly 2007
tar_target(easterlyData2, loadDataEasterly2007(fileEasterly3, fileEasterly4, iso)),
tar_target(easterlyM2a, fitModelEasterly2007(easterlyData2, linCov, control = "none")),
tar_target(easterlyM2b, fitModelEasterly2007(easterlyData2, linCov, control = "spatial")),
tar_target(easterlyM2c, fitModelEasterly2007(easterlyData2, linCov, control = "cultural")),
tar_target(easterlyM2d, fitModelEasterly2007(easterlyData2, linCov, control = "both")),
tar_target(easterlySlope2a, posterior_samples(easterlyM2a, pars = "b_LWHEATSUGAR")[,1]),
tar_target(easterlySlope2b, posterior_samples(easterlyM2b, pars = "b_LWHEATSUGAR")[,1]),
tar_target(easterlySlope2c, posterior_samples(easterlyM2c, pars = "b_LWHEATSUGAR")[,1]),
tar_target(easterlySlope2d, posterior_samples(easterlyM2d, pars = "b_LWHEATSUGAR")[,1]),
tar_target(easterlyCond2a, conditional_effects(easterlyM2a)[["LWHEATSUGAR"]]),
tar_target(easterlyCond2b, conditional_effects(easterlyM2b)[["LWHEATSUGAR"]]),
tar_target(easterlyCond2c, conditional_effects(easterlyM2c)[["LWHEATSUGAR"]]),
tar_target(easterlyCond2d, conditional_effects(easterlyM2d)[["LWHEATSUGAR"]]),
tar_target(easterlySA2, getSpatialAutocorrelation1000km(easterlyM2b, easterlyData2)),
tar_target(easterlySignal2, getCulturalPhylogeneticSignal(easterlyM2c)),
tar_target(easterlyRatio2b, getRatioEffectSize(easterlyM2a, easterlyM2b)),
tar_target(easterlyRatio2c, getRatioEffectSize(easterlyM2a, easterlyM2c)),
# Fincher 2008
tar_target(fincherData, loadDataFincher2008(fileFincher, iso)),
tar_target(fincherM1a, fitModelFincher2008(fincherData, linCov, control = "none")),
tar_target(fincherM1b, fitModelFincher2008(fincherData, linCov, control = "spatial")),
tar_target(fincherM1c, fitModelFincher2008(fincherData, linCov, control = "cultural")),
tar_target(fincherM1d, fitModelFincher2008(fincherData, linCov, control = "both")),
tar_target(fincherSlope1a, posterior_samples(fincherM1a, pars = "b_pathPrevHistorical")[,1]),
tar_target(fincherSlope1b, posterior_samples(fincherM1b, pars = "b_pathPrevHistorical")[,1]),
tar_target(fincherSlope1c, posterior_samples(fincherM1c, pars = "b_pathPrevHistorical")[,1]),
tar_target(fincherSlope1d, posterior_samples(fincherM1d, pars = "b_pathPrevHistorical")[,1]),
tar_target(fincherCond1a, conditional_effects(fincherM1a)[["pathPrevHistorical"]]),
tar_target(fincherCond1b, conditional_effects(fincherM1b)[["pathPrevHistorical"]]),
tar_target(fincherCond1c, conditional_effects(fincherM1c)[["pathPrevHistorical"]]),
tar_target(fincherCond1d, conditional_effects(fincherM1d)[["pathPrevHistorical"]]),
tar_target(fincherSA1, getSpatialAutocorrelation1000km(fincherM1b, fincherData)),
tar_target(fincherSignal1, getCulturalPhylogeneticSignal(fincherM1c)),
tar_target(fincherRatio1b, getRatioEffectSize(fincherM1a, fincherM1b)),
tar_target(fincherRatio1c, getRatioEffectSize(fincherM1a, fincherM1c)),
# Gelfand 2011
tar_target(gelfandData, loadDataGelfand2011(fileGelfand1, fileGelfand2, fileGelfand3, fileGelfand4, fileGelfand5, iso)),
tar_target(gelfandM1a, fitModelGelfand2011(gelfandData, linCov, control = "none")),
tar_target(gelfandM1b, fitModelGelfand2011(gelfandData, linCov, control = "spatial")),
tar_target(gelfandM1c, fitModelGelfand2011(gelfandData, linCov, control = "cultural")),
tar_target(gelfandM1d, fitModelGelfand2011(gelfandData, linCov, control = "both")),
tar_target(gelfandSlope1a, posterior_samples(gelfandM1a, pars = "b_DISCAS")[,1]),
tar_target(gelfandSlope1b, posterior_samples(gelfandM1b, pars = "b_DISCAS")[,1]),
tar_target(gelfandSlope1c, posterior_samples(gelfandM1c, pars = "b_DISCAS")[,1]),
tar_target(gelfandSlope1d, posterior_samples(gelfandM1d, pars = "b_DISCAS")[,1]),
tar_target(gelfandCond1a, conditional_effects(gelfandM1a)[["DISCAS"]]),
tar_target(gelfandCond1b, conditional_effects(gelfandM1b)[["DISCAS"]]),
tar_target(gelfandCond1c, conditional_effects(gelfandM1c)[["DISCAS"]]),
tar_target(gelfandCond1d, conditional_effects(gelfandM1d)[["DISCAS"]]),
tar_target(gelfandSA1, getSpatialAutocorrelation1000km(gelfandM1b, gelfandData)),
tar_target(gelfandSignal1, getCulturalPhylogeneticSignal(gelfandM1c)),
tar_target(gelfandRatio1b, getRatioEffectSize(gelfandM1a, gelfandM1b)),
tar_target(gelfandRatio1c, getRatioEffectSize(gelfandM1a, gelfandM1c)),
# Inglehart 2000
tar_target(inglehartData, loadDataInglehart2000(fileInglehart, wvs, iso)),
tar_target(inglehartM1a, fitModelInglehart2000(inglehartData, linCov, control = "none")),
tar_target(inglehartM1b, fitModelInglehart2000(inglehartData, linCov, control = "spatial")),
tar_target(inglehartM1c, fitModelInglehart2000(inglehartData, linCov, control = "cultural")),
tar_target(inglehartM1d, fitModelInglehart2000(inglehartData, linCov, control = "both")),
tar_target(inglehartSlope1a, posterior_samples(inglehartM1a, pars = "b_indust")[,1]),
tar_target(inglehartSlope1b, posterior_samples(inglehartM1b, pars = "b_indust")[,1]),
tar_target(inglehartSlope1c, posterior_samples(inglehartM1c, pars = "b_indust")[,1]),
tar_target(inglehartSlope1d, posterior_samples(inglehartM1d, pars = "b_indust")[,1]),
tar_target(inglehartCond1a, conditional_effects(inglehartM1a)[["indust"]]),
tar_target(inglehartCond1b, conditional_effects(inglehartM1b)[["indust"]]),
tar_target(inglehartCond1c, conditional_effects(inglehartM1c)[["indust"]]),
tar_target(inglehartCond1d, conditional_effects(inglehartM1d)[["indust"]]),
tar_target(inglehartSA1, getSpatialAutocorrelation1000km(inglehartM1b, inglehartData)),
tar_target(inglehartSignal1, getCulturalPhylogeneticSignal(inglehartM1c)),
tar_target(inglehartRatio1b, getRatioEffectSize(inglehartM1a, inglehartM1b)),
tar_target(inglehartRatio1c, getRatioEffectSize(inglehartM1a, inglehartM1c)),
# Knack 1997
tar_target(knackData, loadDataKnack1997(fileKnack, iso)),
tar_target(knackM1a, fitModelKnack1997(knackData, linCov, control = "none")),
tar_target(knackM1b, fitModelKnack1997(knackData, linCov, control = "spatial")),
tar_target(knackM1c, fitModelKnack1997(knackData, linCov, control = "cultural")),
tar_target(knackM1d, fitModelKnack1997(knackData, linCov, control = "both")),
tar_target(knackSlope1a, posterior_samples(knackM1a, pars = "b_Trust")[,1]),
tar_target(knackSlope1b, posterior_samples(knackM1b, pars = "b_Trust")[,1]),
tar_target(knackSlope1c, posterior_samples(knackM1c, pars = "b_Trust")[,1]),
tar_target(knackSlope1d, posterior_samples(knackM1d, pars = "b_Trust")[,1]),
tar_target(knackCond1a, conditional_effects(knackM1a)[["Trust"]]),
tar_target(knackCond1b, conditional_effects(knackM1b)[["Trust"]]),
tar_target(knackCond1c, conditional_effects(knackM1c)[["Trust"]]),
tar_target(knackCond1d, conditional_effects(knackM1d)[["Trust"]]),
tar_target(knackSA1, getSpatialAutocorrelation1000km(knackM1b, knackData)),
tar_target(knackSignal1, getCulturalPhylogeneticSignal(knackM1c)),
tar_target(knackRatio1b, getRatioEffectSize(knackM1a, knackM1b)),
tar_target(knackRatio1c, getRatioEffectSize(knackM1a, knackM1c)),
# Skidmore 2002
tar_target(skidmoreData, loadDataSkidmore2002(fileSkidmore1, fileSkidmore2, fileSkidmore3, fileSkidmore4, iso)),
tar_target(skidmoreM1a, fitModelSkidmore2002(skidmoreData, linCov, control = "none")),
tar_target(skidmoreM1b, fitModelSkidmore2002(skidmoreData, linCov, control = "spatial")),
tar_target(skidmoreM1c, fitModelSkidmore2002(skidmoreData, linCov, control = "cultural")),
tar_target(skidmoreM1d, fitModelSkidmore2002(skidmoreData, linCov, control = "both")),
tar_target(skidmoreSlope1a, posterior_samples(skidmoreM1a, pars = "b_logDisastersPerLandArea")[,1]),
tar_target(skidmoreSlope1b, posterior_samples(skidmoreM1b, pars = "b_logDisastersPerLandArea")[,1]),
tar_target(skidmoreSlope1c, posterior_samples(skidmoreM1c, pars = "b_logDisastersPerLandArea")[,1]),
tar_target(skidmoreSlope1d, posterior_samples(skidmoreM1d, pars = "b_logDisastersPerLandArea")[,1]),
tar_target(skidmoreCond1a, conditional_effects(skidmoreM1a)[["logDisastersPerLandArea"]]),
tar_target(skidmoreCond1b, conditional_effects(skidmoreM1b)[["logDisastersPerLandArea"]]),
tar_target(skidmoreCond1c, conditional_effects(skidmoreM1c)[["logDisastersPerLandArea"]]),
tar_target(skidmoreCond1d, conditional_effects(skidmoreM1d)[["logDisastersPerLandArea"]]),
tar_target(skidmoreSA1, getSpatialAutocorrelation1000km(skidmoreM1b, skidmoreData)),
tar_target(skidmoreSignal1, getCulturalPhylogeneticSignal(skidmoreM1c)),
tar_target(skidmoreRatio1b, getRatioEffectSize(skidmoreM1a, skidmoreM1b)),
tar_target(skidmoreRatio1c, getRatioEffectSize(skidmoreM1a, skidmoreM1c)),
# effect size ratio analyses
tar_target(effSizeRatioModel1, fitEffSizeRatioModel(bf(effRatio ~ corAt1000km),
list(adamczykRatio1b, alesinaRatio1b, beckRatio1b, beckRatio2b,
bockstetteRatio1b, easterlyRatio1b, easterlyRatio2b, fincherRatio1b,
gelfandRatio1b, inglehartRatio1b, knackRatio1b, skidmoreRatio1b),
list(adamczykSA1, alesinaSA1, beckSA1, beckSA2, bockstetteSA1,
easterlySA1, easterlySA2, fincherSA1, gelfandSA1, inglehartSA1,
knackSA1, skidmoreSA1),
list(adamczykSignal1, alesinaSignal1, beckSignal1, beckSignal2,
bockstetteSignal1, easterlySignal1, easterlySignal2, fincherSignal1,
gelfandSignal1, inglehartSignal1, knackSignal1, skidmoreSignal1))),
tar_target(effSizeRatioModel2, fitEffSizeRatioModel(bf(effRatio ~ signal),
list(adamczykRatio1c, alesinaRatio1c, beckRatio1c, beckRatio2c,
bockstetteRatio1c, easterlyRatio1c, easterlyRatio2c, fincherRatio1c,
gelfandRatio1c, inglehartRatio1c, knackRatio1c, skidmoreRatio1c),
list(adamczykSA1, alesinaSA1, beckSA1, beckSA2, bockstetteSA1,
easterlySA1, easterlySA2, fincherSA1, gelfandSA1, inglehartSA1,
knackSA1, skidmoreSA1),
list(adamczykSignal1, alesinaSignal1, beckSignal1, beckSignal2,
bockstetteSignal1, easterlySignal1, easterlySignal2, fincherSignal1,
gelfandSignal1, inglehartSignal1, knackSignal1, skidmoreSignal1))),
# table of deviations from original analyses
tar_target(tableDeviations, makeTableDeviations()),
# table of replication results
tar_target(tableReplications, makeTableReplications(list(adamczykSlope1a, alesinaSlope1a, beckSlope1a, beckSlope2a,
bockstetteSlope1a, easterlySlope1a, easterlySlope2a, fincherSlope1a,
gelfandSlope1a, inglehartSlope1a, knackSlope1a, skidmoreSlope1a),
list(adamczykSlope1b, alesinaSlope1b, beckSlope1b, beckSlope2b,
bockstetteSlope1b, easterlySlope1b, easterlySlope2b, fincherSlope1b,
gelfandSlope1b, inglehartSlope1b, knackSlope1b, skidmoreSlope1b),
list(adamczykSlope1c, alesinaSlope1c, beckSlope1c, beckSlope2c,
bockstetteSlope1c, easterlySlope1c, easterlySlope2c, fincherSlope1c,
gelfandSlope1c, inglehartSlope1c, knackSlope1c, skidmoreSlope1c),
list(adamczykSlope1d, alesinaSlope1d, beckSlope1d, beckSlope2d,
bockstetteSlope1d, easterlySlope1d, easterlySlope2d, fincherSlope1d,
gelfandSlope1d, inglehartSlope1d, knackSlope1d, skidmoreSlope1d))),
# plot results of replications
tar_target(plotReplications1, plotReplicationResults1(list(adamczykSlope1a, adamczykSlope1b, adamczykSlope1c, adamczykSlope1d,
alesinaSlope1a, alesinaSlope1b, alesinaSlope1c, alesinaSlope1d,
beckSlope1a, beckSlope1b, beckSlope1c, beckSlope1d,
beckSlope2a, beckSlope2b, beckSlope2c, beckSlope2d,
bockstetteSlope1a, bockstetteSlope1b, bockstetteSlope1c, bockstetteSlope1d,
easterlySlope1a, easterlySlope1b, easterlySlope1c, easterlySlope1d,
easterlySlope2a, easterlySlope2b, easterlySlope2c, easterlySlope2d,
fincherSlope1a, fincherSlope1b, fincherSlope1c, fincherSlope1d,
gelfandSlope1a, gelfandSlope1b, gelfandSlope1c, gelfandSlope1d,
inglehartSlope1a, inglehartSlope1b, inglehartSlope1c, inglehartSlope1d,
knackSlope1a, knackSlope1b, knackSlope1c, knackSlope1d,
skidmoreSlope1a, skidmoreSlope1b, skidmoreSlope1c, skidmoreSlope1d))),
tar_target(plotReplications2, plotReplicationResults2(list(adamczykM1c$data, alesinaM1c$data, beckM1c$data,
beckM2c$data, bockstetteM1c$data, easterlyM1c$data,
easterlyM2c$data, fincherM1c$data, gelfandM1c$data,
inglehartM1c$data, knackM1c$data, skidmoreM1c$data),
list(adamczykCond1a, adamczykCond1b, adamczykCond1c, adamczykCond1d,
alesinaCond1a, alesinaCond1b, alesinaCond1c, alesinaCond1d,
beckCond1a, beckCond1b, beckCond1c, beckCond1d,
beckCond2a, beckCond2b, beckCond2c, beckCond2d,
bockstetteCond1a, bockstetteCond1b, bockstetteCond1c, bockstetteCond1d,
easterlyCond1a, easterlyCond1b, easterlyCond1c, easterlyCond1d,
easterlyCond2a, easterlyCond2b, easterlyCond2c, easterlyCond2d,
fincherCond1a, fincherCond1b, fincherCond1c, fincherCond1d,
gelfandCond1a, gelfandCond1b, gelfandCond1c, gelfandCond1d,
inglehartCond1a, inglehartCond1b, inglehartCond1c, inglehartCond1d,
knackCond1a, knackCond1b, knackCond1c, knackCond1d,
skidmoreCond1a, skidmoreCond1b, skidmoreCond1c, skidmoreCond1d))),
tar_target(plotReplications3, plotReplicationResults3(list(adamczykM1b, alesinaM1b, beckM1b, beckM2b, bockstetteM1b,
easterlyM1b, easterlyM2b, fincherM1b, gelfandM1b, inglehartM1b,
knackM1b, skidmoreM1b),
list(adamczykData, alesinaData, beckData1, beckData2, bockstetteData,
easterlyData1, easterlyData2, fincherData, gelfandData, inglehartData,
knackData, skidmoreData))),
tar_target(plotReplications4, plotReplicationResults4(list(adamczykM1c, alesinaM1c, beckM1c, beckM2c, bockstetteM1c,
easterlyM1c, easterlyM2c, fincherM1c, gelfandM1c, inglehartM1c,
knackM1c, skidmoreM1c))),
tar_target(plotReplications5, plotReplicationResults5(effSizeRatioModel1, effSizeRatioModel2,
list(adamczykRatio1b, alesinaRatio1b, beckRatio1b, beckRatio2b,
bockstetteRatio1b, easterlyRatio1b, easterlyRatio2b, fincherRatio1b,
gelfandRatio1b, inglehartRatio1b, knackRatio1b, skidmoreRatio1b),
list(adamczykRatio1c, alesinaRatio1c, beckRatio1c, beckRatio2c,
bockstetteRatio1c, easterlyRatio1c, easterlyRatio2c, fincherRatio1c,
gelfandRatio1c, inglehartRatio1c, knackRatio1c, skidmoreRatio1c),
list(adamczykSA1, alesinaSA1, beckSA1, beckSA2, bockstetteSA1,
easterlySA1, easterlySA2, fincherSA1, gelfandSA1, inglehartSA1,
knackSA1, skidmoreSA1),
list(adamczykSignal1, alesinaSignal1, beckSignal1, beckSignal2,
bockstetteSignal1, easterlySignal1, easterlySignal2, fincherSignal1,
gelfandSignal1, inglehartSignal1, knackSignal1, skidmoreSignal1))),
#### Manuscript ####
tar_render(manuscript, "manuscript.Rmd"),
#### Vignette ####
tar_render(vignette, "vignette.Rmd"),
#### Session Info ####
tar_target(sessionInfo, writeLines(capture.output(sessionInfo()), "sessionInfo.txt"))
)