Data Preparation
Learn about data preparation, data importation, and data inspection for the Braithwaite study.
We'll cover the following
According to Braithwaite, his sample data include
Original Statistical Results Table from Braithwaite, 2006
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 = and R-squared = where
* Robust standard error,
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 1400+ tech skills courses.