next up previous contents
Next: Assign MCD-group IDs to Up: A Formal Checklist Previous: Load the datasets

Create the MCD-group Units

 

  1. Generate a common list of precincts and MCDs from PL94-171.

    This information comes from the PL94-171 dataset and is extracted using a small SAS program. The template for this file is named mcdpr-xx.sas. Copy, rename, and edit this file before executing in SAS. This program takes precinct-level data from the PL9417xx.ssd file and outputs a text file named xx.mcd. xx.mcd contains two columns: MCD i.d. and precinct i.d. Both columns have the county ID concatenated onto the mcd or precinct code. This step also generates a SAS version of precinct-level PL94-171 information named mcdpr-ok.sd2.

  2. Scan the xx.mcd file for problems.

    View the text file list just produced and check for any problems. This includes alphabetical characters, blanks, or non-standard record lengths. Note any problems in README.xx and adjust subsequent procedures accordingly.

  3. Generate MCD-groups using plvdkey.exe.  

    Run the MS-DOS executable plvdkey.exe with the file xx.mcd as an argument. (This is an original C++ program we wrote and is included in our distribution.) This will result in two additional files: an MCD-group list text file named xx.mg, a log file from the run named xx.mgl, and a one-line statistical result file named xx.mgs.

  4. Inspect the xx.mgl file.

    This file provides valuable information about the formation of the MCD-groups, and if something went wrong it is likely to show up here. Document any anomalies in README.xx, and contact plvdkey.exe author Kenneth Benoit if something seriously wrong occurred.

  5. Delete the unzipped copy of pl9417OK.sd2.

    We are finished with this large data file. Since we have a zipped copy, we may delete it (after making sure the zipped version exists).

  6. [Optional] Create a plvdkey.exe list of MCD Group exceptions.

    If you were stalled at the handmatch, because of an inability to match precincts in a county that plvdkey.exe split into more than one MCD-group, then you must complete this step.

    An exceptions file .mge may be created as an additional input to plvdkey.exe to override the computer calculated assignment of multiple MCD-groups in a county. When plvdkey.exe is run, it automatically looks for an exceptions list file of county codes that should never be split into more than one MCD-group. The format for these files is simply a single line per county, where the line contains the county's census number. The name of this file should always have the same root filename as the input .mcd file, and a .mge extension.

What should be left over:





mcdpr-ok.sas.
SAS program to extract precinct-level records from pl9417OK.sd2 and write them to text file ok.mcd.
mcdpr-ok.sd2.
SAS version of the precinct-level records extracted from PL94-171; contains precinct and MCD codes (no data).
ok.mcd.
List of MCD and precinct codes.
[ok.mge]
List of counties to never split up.
ok.mg.
List of MCD-groups.
ok.mgl.
Log file from plvdkey.exe.
ok.mgs.
Statistics from MCD-group creation.
REMOVED: PL94171OK.sd2.


next up previous contents
Next: Assign MCD-group IDs to Up: A Formal Checklist Previous: Load the datasets
Copyright © 1997-2004 [ROAD Home] Questions? Contact the ROAD webmaster.