Data Preparation

Learn about data preparation, data importation, and data inspection for the Braithwaite study.

According to Braithwaite, his sample data include 296296 MIDsMilitarized Interstate Dispute between 1993 and 2001. To replicate his statistical results, we first conduct necessary data preparation, such as acquiring his replication data and program files, importing data into R, and inspecting and understanding imported data.

Original Statistical Results Table from Braithwaite, 2006

VariableVariable Coeff.Coeff. Z.scoreZ.score
Territory 1.624* 3.83
Resources 0.984* 2.22
Mountain 0.026* 3.55
Forrest -0.012 -1.78
Ocean -0.601 -1.07
Vital border -0.809* -2.03
Size of states 0.136 1.21
Peace years -0.040* -3.93
Constant 4.496* 2.69

Here, N = 296296 and R-squared = 0.150.15 where
* Robust standard error, p<0.05.p<0.05.

Import data into R

Before we import the dataset into R, we should first remove all objects from the workspace and set the working directory to the location where we saved the Braithwaite data file. We then load the foreign package, import the dataset with the read.dta() function, and assign the imported data file to a new data object called mid.

Get hands-on with 1200+ tech skills courses.