1850 Slave Sample Data Setup

Is anyone familiar with how to upload the 1850 IPUMS slave sample data? When I attempt to run the do file following the instructions provided, I receive an error stating that the “file does not contain dictionary.” Anyone have any additional resources or knowledge on how to upload this dataset in Stata or R?

Hi Raheem,

I replied to your question through email, but want to follow up on your forum post so that other users who also have difficulty accessing the Slave PUMS data can refer here.

To input the data into Stata, you need to download the 1850 Flat Sample from the data download page (slave1850_1.dat.Z) and extract the file using a decompression program (we recommend 7-Zip for Windows and The Unarchiver for Mac). This will give you a slave1850_1.dat file. You will then need to download both the slavepums.do and slavepums.dct files and put all three files into a single folder. Then, open Stata and set the working directory to that folder and run the .do file. The .dct file is your data dictionary and the .dat file contains your data.

With a few minor edits, this procedure will also work for inputting any of the other Slave samples into Stata. For the 1850 and 1860 samples, you will need to edit the .dct file so that the first line refers to the correct .dat file. The file is currently configured to input the 1850 Flat Sample (slave1850_1.dat). For example, if you are looking to input the 1860 Flat Sample, you will want to change this reference to “slave1860_1.dat”. This can be done in any text editor such as Notepad. No edits to the .dct file are required for either the 1860 auxiliary file or the 1850 full count file. However, the full count “slave1850.do” file does require users to edit the preamble to provide the path for the .dct and .dat files as well as provide a location for the resulting Stata formatted (.dta) file to be saved.

The download page also includes command files for inputting the data into SAS and SPSS, though no command files are available for inputting the .dat files into R.

Thank you! This worked.