Readme.coding.txt
Sanford C. Gordon and Gregory A. Huber
Wednesday, February 7, 2007

*******************************************************
** DATA	DESCRIPTION AND INSTRUCTIONS FOR ACQUISITION **									
*******************************************************

We received twelve SPSS .sav files from the Kansas Sentencing Commission. Six concern aspects of the crime, trial, and disposition:

	KSFY98.sav
	KSFY99.sav
	KSFY00.sav
	KSFY01.sav
	KSFY02.sav
	KSFY03.sav

These files contained the following information, which We requested and received from the KSC database: 

Kansas Sentencing Guidelines Journal Entry of Judgment
I. Case identifying information
	Court O.R.I Number
	K.B.I. Number
	County
	Court Case Number
	Sentencing Judge
	Sentencing Date
	Type of Counsel
	Type of Trial
	Date of Conviction
	Pre-Trial Status of Offender
II. Criminal history classification
	Offenders Overall Criminal History Classification as Found by the Courts, Nondrug
	Offenders Overall Criminal History Classification as Found by the Courts, drug
	Objection to Criminal History?
	If yes, by:
	Courts Ruling on Objection
III. Current conviction information
	Name of Primary Offense of Conviction, Count No.
	Name of Primary Offense of Conviction, Date of Offense
	K.S.A. Title, section, subsections (along with attempt/ conspiracy/solicitation qualifiers)
	Grade of Offense
	Offense Severity Level (along with nondrug, drug, offgrid, and nongrid qualifiers)
	Case Tracking Number
	Presumptive Sentencing Range, standard
	Presumptive Sentencing Range, aggravated
	Presumptive Sentencing Range, mitigated
	Presumptive prison
	Presumptive probation
	Border box
	Sentence imposed: Prison (with all Life, Hard, Death qualifiers)
	County Jail: Days, months (for misdemeanor or non-grid)
	County Jail: Days, months (followed by DOC custody for fourth or subsequent DUI)
	Standard probation for: (with number of months qualifers)
	Extended probation under KSA 21-4611(c)(5) for ___ months
	Underlying prison term is ___ months
	Guideline range imposed
	Was crime sexually motivated?
	Special rule applicable to sentence, if any (along with qualifiers)
	Postrelease supervision time
	Probation to: (Court services, community corrections)
	County Jail time imposed as a condition of probation, in days
	Assignment to correctional conservation camp (days, mens camp, womens camp)
IV. Departure information
	Type of departure (along with downward durational, downward dispositional, upward durational, upward dispositional, postrelease supervision for sex offenses qualifiers)
	Reasons cited for departure
V. Other conditions
	General/Special conditions of probation
	Costs ordered (restitution, court costs, fines, total)
VI. Recap of sentence
	Total period of confinement in DOC
	Standard probation period (along with qualifiers)
	Postrelease period (along with qualifiers)
	Prior cases to which current sentence is to run concurrent or consecutive (along with qualifiers)
	Sentence begins date
	Dates of jail credit earned
	Total days of jail credit earned
	Maximum good time credit
	Motion for new trial denied
	Motion for judgment of acquittal denied
Kansas Sentencing Guidelines Journal Entry of Judgment Supplemental Page
(for additional counts)
	Same fields as III (above), plus:
	Concurrent (plus to counts qualifier)
	Consecutive

TO REPLICATE OUR ANALYSIS, PLACE THESE FILES IN THE "coding\Raw Data" SUBDIRECTORY, AND CONVERT TO STATA .DTA FORMAT.

Subsequently, we requested and received six datafiles describing defendant race, gender, and birthdate, indexed by case ID:

	KSFY98datademo.sav
	KSFY99datademo.sav
	KSFY00datademo.sav
	KSFY01datademo.sav
	KSFY02datademo.sav
	KSFY03datademo.sav

TO REPLICATE OUR ANALYSIS, PLACE THESE FILES IN THE "coding\demographics" SUBDIRECTORY, AND CONVERT TO STATA .DTA FORMAT.

**************************************************************
** Data Acquisition 					    **
**************************************************************

Researchers seeking to acquire these data in order to fully replicate this study should contact the Kansas Sentencing Commission. Requests for data may be made formally online, at 

http://www.kansas.gov/ksc/datarequest.shtml.

Indicate that you are requesting to access the data provided to Gordon and Huber from Gordon.


***************************************************************
** Recoding Raw Sentencing and Defendant Demographic Data    **
***************************************************************

The primary do file "recode sentences.do" assembles the data into active_ks_sentences.dta, the primary dataset for our regression analysis. The file proceeds in part by calling sub-do file to conduct tasks. 

NOTE 1: The sub-do files should not be run independently. 

NOTE 2: Some of these do files exceed the memory limits of Stata's do file editor for older versions of Stata, and must be read in a separate text editor.

"Recode sentences.do" does the following:

1. Calls "Compress and append data.do"
This do file takes the six raw data files on crimes, generates a year variable for each, compresses the data for storage efficiency, appends the files into QJPS_activekssentences.dta, and attaches data labels.

2. Opens tbl_sentences_all, then:
	a) Creates variables establishing which guideline regime applies for each count.
	b) Runs "topcount.do". This codes the guideline minimum, maximum, and presumptive sentences for the top count of the conviction, as well as dummy variables describing whether the offense falls into the "border box" region of the sentencing guideline grid, and whether there is presumptive probation described on the sentencing grid.
	c) Runs "addcount.do", which codes guideline minimum, maximum, and presumptive sentencing for additional counts as per Kansas statutes (KSA 21-4702(b)(5)) and the KSC Desk Reference Manual.
	d) Runs "bboxprobandlabel.do", which codes dummy variables for border box and presumptive probation on the additional counts, as well as labeling the additional count variables.

3. Generates variables denoting number of convictions, procedural characteristics of the trial, crime characteristics

4. Calls "appenddemographicdata.do", which assembles the demographic data into KSdemogdata1998to2003.dta.

5. Merges sentencing data with defendant demographic data, then creates useful variables on defendant demographics.

6. Codes additional crime characteristics

7. Codes the total prison time

8. Calculates judicial discretion pre-Gould, post-Gould, and interim (see do file for more detailed description), using the rules governing statutory maximum sentences for single and multicount cases.

9. Drops judges for which we have few cases.

10. Merges with info on judge's district and division

11. Labels variables

12. saves QJPS_activekssentences.dta.

The comments at the end of the do file summarize special rules governing sentences.
