Stata Setup File 

Page Contents

[1] File Specifications
[2] Infile Command
[3] Value Label Definitions
[4] Missing Values
[5] Save Outfile



Section 1: File Specifications

   This section assigns local macros to the necessary files.

   Please edit:

        "raw-datafile-name" ==> The name of data file downloaded from ICPSR
        "dictionary-filename" ==> The name of the dictionary file downloaded.
        "stata-datafile" ==> The name you wish to call your Stata data file.
        "my data" ==> The label you wish to assign to your data file (optional).


   Note:  We assume that the raw data, dictionary, and DDS (this do file) all
          reside in the same directory (or folder).  If that is not the case
          you will need to include paths as well as filenames in the macros.


********************************************************/


[1]

local raw_data "raw-datafile-name"
local dict "dictionary-filename"
local outfile "stata-datafile"
label data "My Data"


/********************************************************


Section 2: Infile Command


This section reads the raw data into Stata format.  If Section 1 was defined
properly, there should be no reason to modify this section.  These macros
should inflate automatically.


**********************************************************/


[2]

infile using `dict', using (`raw_data') clear


/*********************************************************


Section 3: Value Label Definitions

This section defines labels for the individual values of each variable.
We suggest that users do not modify this section.


**********************************************************/


[3]

label data "CAPITAL PUNISHMENT IN THE UNITED STATES, 1973-1993, Part 0001"


#delimit ;

label define V1        6512 "ICPSR Study Number" ;

label define V2        1 "July 1995 release" ;

label define V3        1 "Part one" ;

label define V8        1 "Male" 2 "Female" ;

label define V9        1 "White" 2 "Black"
                       3 "American Indian or Alaskan Native"
                       4 "Asian or Pacific Islander" 5 "Other" ;

label define V10       1 "Hispanic" 2 "Non-Hispanic" 3 "Not known"
                       9 "Unknown" ;

label define V11       1 "January" 2 "February" 3 "March" 4 "April" 5 "May"
                       6 "June" 7 "July" 8 "August" 9 "September"
                       10 "October" 11 "November" 12 "December" 99 "Unknown" ;

label define V13       1 "Murder" 5 "Kidnapping or abduction"
                       6 "Forcible or attempted rape" 10 "Robbery"
                       12 "Aggravated assault"
                       17 "Hit and run driving with bodily injury"
                       21 "Burglary" 22 "Arson" 29 "Stolen property"
                       99 "No 3rd capital offense" ;

label define V14       1 "Murder" 5 "Kidnapping or abduction"
                       6 "Forcible or attempted rape" 10 "Robbery"
                       12 "Aggravated assault"
                       17 "Hit and run driving with bodily injury"
                       21 "Burglary" 22 "Arson" 29 "Stolen property"
                       99 "No 2nd capital offense" ;

label define V15       1 "Murder" 5 "Kidnapping or abduction"
                       6 "Forcible or attempted rape" 10 "Robbery"
                       12 "Aggravated assault"
                       17 "Hit and run driving with bodily injury"
                       21 "Burglary" 22 "Arson" 29 "Stolen property" ;

label define V16       1 "Married" 2 "Divorced or separated" 3 "Widowed"
                       4 "Never married" 9 "Unknown" ;

label define V17       1 "7th grade or less" 2 "8th grade" 3 "9th grade"
                       4 "10th grade" 5 "11th grade"
                       6 "12th grade (GED included)" 7 "1st year of college"
                       8 "2nd year" 9 "3rd year" 10 "4th year"
                       11 "More than 4 years of college" 12 "Not known"
                       99 "Unknown" ;

label define V18       1 "Not under sent - no charges pending"
                       2 "Not under sentence - charges pending"
                       3 "Under sentence - on probation"
                       4 "Under sentence - on parole"
                       5 "Under sentence - on escape"
                       6 "Under sentence - imprisoned"
                       7 "Under sentence - other"
                       8 "Unknown(from questionnaire" 9 "Unknown" ;

label define V19       1 "Yes - Continue with item 10b"
                       2 "No - Skip to item 11" 3 "Unknown"
                       9 "Unknown - Skip to item 11" ;

label define V20       1 "Yes - Murder" 2 "Yes - Involuntary manslaughter"
                       3 "Yes - Vehicular manslaughter"
                       4 "Yes - Attempted murder" 5 "Yes - Other" 6 "No"
                       7 "Unknown" 8 "Yes - Manslaughter"
                       9 "Yes - Voluntary manslaughter" 99 "Inapplicable" ;

label define V21       1 "January" 2 "February" 3 "March" 4 "April" 5 "May"
                       6 "June" 7 "July" 8 "August" 9 "September"
                       10 "October" 11 "November" 12 "December" 99 "Unknown" ;

label define V22       99 "Unknown" ;

label define V23       1 "January" 2 "February" 3 "March" 4 "April" 5 "May"
                       6 "June" 7 "July" 8 "August" 9 "September"
                       10 "October" 11 "November" 12 "December" 99 "Unknown" ;

label define V24       99 "Unknown" ;

label define V25       1 "January" 2 "February" 3 "March" 4 "April" 5 "May"
                       6 "June" 7 "July" 8 "August" 9 "September"
                       10 "October" 11 "November" 12 "December" 99 "Unknown" ;

label define V26       99 "Unknown" ;

label define V27       1 "Under sent of death - cont with item b"
                       2 "Death sent removed - skip to items c & d"
                       9 "Unknown" ;

label define V28       1 "Yes, on escape - cont with 14b(2)"
                       2 "Yes, at a mental hosp - cont with 14b(2)"
                       3 "No - NO FURTHER INFO FOR THIS INMATE" 9 "Unknown" ;

label define V29       1 "January" 2 "February" 3 "March" 4 "April" 5 "May"
                       6 "June" 7 "July" 8 "August" 9 "September"
                       10 "October" 11 "November" 12 "December"
                       99 "Not applicable or unknown" ;

label define V30       99 "Not applicable or unknown" ;

label define V31       1 "Executed - Enter date, skip to Q15"
                       2 "Other deceased - Enter date, skip to Q16"
                       3 "Capital sent declared unconstitutional"
                       4 "Sentence commuted"
                       5 "Conviction affirmed, sent overturned"
                       6 "Conviction and sentence overturned" 7 "Other"
                       8 "Info not available at this office" 9 "Unknown" ;

label define V32       1 "January" 2 "February" 3 "March" 4 "April" 5 "May"
                       6 "June" 7 "July" 8 "August" 9 "September"
                       10 "October" 11 "November" 12 "December"
                       99 "Not applicable or unknown" ;

label define V33       99 "Not applicable or unknown" ;

label define V34       1 "Under new sentence - Cont with Q.14d2"
                       2 "Awaiting retrial to determine guilt"
                       3 "Awaiting resent only (guilt affirmed)"
                       4 "Found not guilty in retrial"
                       5 "All charges on capital offense dropped" 
                       6 "Other"
                       7 "No action since removal fr sent of death"
                       8 "Information not available at this office"
                       9 "Unknown" ;

label define V35       900 "Discharged by court order" 901 "Executed"
                       902 "Incompetent to stand trial"
                       903 "Killed attempting escape" 904 "Life sentence"
                       905 "Murdered by another inmate" 906 "Natural death"
                       907 "On death row in Nevada" 908 "Out on bond"
                       909 "On probation" 910 "Suicide" 911 "Writ"
                       912 "Immigration and Naturalization Service"
                       999 "Unknown" ;

label define V36       1 "Lethal injection" 2 "Electrocution" 3 "Lethal gas"
                       4 "Hanging" 5 "Firing squad" 6 "Other"
                       9 "Not applicable" ;

label define V37       1 "Natural causes" 2 "Suicide"
                       3 "Murdered by another inmate" 4 "Other"
                       9 "Not applicable or unknown" ;



#delimit cr


/***************************************************************************


Section 4: Missing Values


 This section will replace numeric missing values (i.e., -9) with generic
 system missing ".".  By default the code in this section is commented out.
 Users wishing to apply the generic missing values should remove the comment
 at the beginning and end of this section.  Note that Stata allows you to
 specify up to 27 unique missing value codes.


****************************************************************/


[4]

/*

replace V5 = . if (V5 == 0)
replace V10 = . if (V10 == 9)
replace V11 = . if (V11 == 99)
replace V13 = . if (V13 == 99)
replace V14 = . if (V14 == 99)
replace V16 = . if (V16 == 9)
replace V17 = . if (V17 == 99)
replace V18 = . if (V18 == 9)
replace V19 = . if (V19 == 9)
replace V20 = . if (V20 == 99)
replace V21 = . if (V21 == 99)
replace V22 = . if (V22 == 99)
replace V23 = . if (V23 == 99)
replace V24 = . if (V24 == 99)
replace V25 = . if (V25 == 99)
replace V26 = . if (V26 == 99)
replace V27 = . if (V27 == 9)
replace V28 = . if (V28 == 9)
replace V29 = . if (V29 == 99)
replace V30 = . if (V30 == 99)
replace V31 = . if (V31 == 9)
replace V32 = . if (V32 == 99)
replace V33 = . if (V33 == 99)
replace V34 = . if (V34 == 9)
replace V35 = . if (V35 == 999)
replace V36 = . if (V36 == 9)
replace V37 = . if (V37 == 9)


*/

/********************************************************************


Section 5: Save Outfile


  This section saves out a Stata system format file.  There is no reason to
  modify it if the macros in Section 1 were specified correctly.


*********************************************************************/


[5]

save `outfile', replace