-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReplicationCode
More file actions
35 lines (32 loc) · 1.73 KB
/
ReplicationCode
File metadata and controls
35 lines (32 loc) · 1.73 KB
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
###########################################################################################
############## REPLICATION CODE #########################################################
############## KRISTOPHER JORDAN #########################################################
############## MASTER THESIS #########################################################
############## SPRING 2016 #########################################################
############## 23th May 2016 #########################################################
###########################################################################################
library(survival)
library(mgcv)
# IMPORT DATA
replicationdata <- read.csv("replicationdata.csv", header=TRUE, sep=";")
#### HYPOTHESIS 1 ####
HYP1 <- coxph(Surv(Time1, Time2, Event) ~
Wsizefactor*Ssizeimpfactor
+TypeOfConflictEx+TypeOfConflictstate
+TypeOfConflictinternal+ TypeOfConflictinternationalized
+IntensityLevel1+IntensityLevel2+
+tt(GDPpcST)+ecogrowth + log(pop1) +as.factor(decade)
+domestic2+domestic2lag
+gender +pspline(startage, df = 3)
+IrregularEntry
+ prevtimesinoffice
+cluster(id), data=replicationdata)
###########################################################################################
#### HYPOTHESIS 2 ####
HYP2 <- coxph(Surv(Time1, Time2, Event) ~
(JW_Boss+JW_Strongman)*TypeOfConflict
+IntensityLevel1+IntensityLevel2
+gender+ecogrowth+tt(GDPpcST)
+domestic2+domestic2lag
+log(pop1) +as.factor(decade)
+cluster(id), data=replicationdata)