Homework 2: Merging and T-Tests

Total Page:16

File Type:pdf, Size:1020Kb

Homework 2: Merging and T-Tests

IR 611 Professor Graham Spring 2014 Homework 2: Merging and T-tests Tips for Part 1

1. What you were doing in homework 1 was prepping a dataset to be merged with other datasets. In order to merge two datasets together, the following things must be true: 1. Each dataset must have the same unit ID variable and the same time variable (e.g. both datasets must have gwno and year). 2. Each dataset must be sorted by these variables before they can be merged. In country-year data, use the command: “sort gwno year” to sort the data by gwno and year.

2. We will talk about other types of merges, but in this assignment we are doing a 1:1 merge. Take a look at this resource to help you get going: http://www.ssc.wisc.edu/sscc/pubs/sfr-combine.htm

3. Your merge command will probably look like this: merge 1:1 gwno year using “my second dataset”

Recommended publications