libname sasin "C:\Users\jennifer\Documents\Fast Track\arrest_final_data"; libname key "C:\Users\jennifer\Documents\Fast Track"; *libname sasin "E:\arrest_final_data"; *libname key "C:\Documents and Settings\Jennifer Godwin\My Documents\Jennifer\Fast Track"; data key; set key.newkey; keep site tcid cohort treatmnt norm; run; proc sort;by site tcid;run; *create adjudication date level dataset ; proc sort data=sasin.clean_court_records_2009;by site tcid jcd8s; data one; set sasin.clean_court_records_2009; count=0; retain count; do i=1 to _n_; count=count+1; end; run; data two; set one; if site="DURH" and tcid="0037" and count=54 then count=55; if site="DURH" and tcid="0068" and count=129 then count=128; if site="DURH" and tcid="0072" and count=141 then count=140; if site="DURH" and tcid="0428" and count=427 then count=429; if site="DURH" and tcid="0428" and count=428 then count=429; if site="DURH" and tcid="0751" and count=605 then count=606; if site="DURH" and tcid="1456" and count=936 then count=935; if site="DURH" and tcid="1600" and count=1006 then count=1005; if site="DURH" and tcid="1600" and count=1011 then count=1010; if site="DURH" and tcid="1600" and count=1012 then count=1010; if site="DURH" and tcid="2084" and count=1111 then count=1110; if site="DURH" and tcid="2084" and count=1112 then count=1110; if site="DURH" and tcid="2084" and count=1114 then count=1113; if site="DURH" and tcid="2084" and count=1115 then count=1113; if site="DURH" and tcid="2525" and count=1232 then count=1233; if site="DURH" and tcid="2635" and count=1267 then count=1266; if site="PENN" and tcid="0249" and count=2811 then count=2812; if site="PENN" and tcid="0330" and count=2860 then count=2859; if site="PENN" and tcid="0330" and count=2861 then count=2859; if site="PENN" and tcid="0330" and count=2862 then count=2859; gr18_date_a=mdy(9,1,2008); if cohort="2" then gr18_date_a=mdy(9,1,2009); if cohort="3" then gr18_date_a=mdy(9,1,2010); gr17_date_a=mdy(9,1,2007); if cohort="2" then gr17_date_a=mdy(9,1,2008); if cohort="3" then gr17_date_a=mdy(9,1,2009); gr16_date_a=mdy(9,1,2006); if cohort="2" then gr16_date_a=mdy(9,1,2007); if cohort="3" then gr16_date_a=mdy(9,1,2008); gr15_date_a=mdy(9,1,2005); if cohort="2" then gr15_date_a=mdy(9,1,2006); if cohort="3" then gr15_date_a=mdy(9,1,2007); gr14_date_a=mdy(9,1,2004); if cohort="2" then gr14_date_a=mdy(9,1,2005); if cohort="3" then gr14_date_a=mdy(9,1,2006); gr13_date_a=mdy(9,1,2003); if cohort="2" then gr13_date_a=mdy(9,1,2004); if cohort="3" then gr13_date_a=mdy(9,1,2005); gr12_date_a=mdy(9,1,2002); if cohort="2" then gr12_date_a=mdy(9,1,2003); if cohort="3" then gr12_date_a=mdy(9,1,2004); gr11_date_a=mdy(9,1,2001); if cohort="2" then gr11_date_a=mdy(9,1,2002); if cohort="3" then gr11_date_a=mdy(9,1,2003); gr10_date_a=mdy(9,1,2000); if cohort="2" then gr10_date_a=mdy(9,1,2001); if cohort="3" then gr10_date_a=mdy(9,1,2002); gr9_date_a=mdy(9,1,1999); if cohort="2" then gr9_date_a=mdy(9,1,2000); if cohort="3" then gr9_date_a=mdy(9,1,2001); gr8_date_a=mdy(9,1,1998); if cohort="2" then gr8_date_a=mdy(9,1,1999); if cohort="3" then gr8_date_a=mdy(9,1,2000); gr7_date_a=mdy(9,1,1997); if cohort="2" then gr7_date_a=mdy(9,1,1998); if cohort="3" then gr7_date_a=mdy(9,1,1999); gr6_date_a=mdy(9,1,1996); if cohort="2" then gr6_date_a=mdy(9,1,1997); if cohort="3" then gr6_date_a=mdy(9,1,1998); gr5_date_a=mdy(9,1,1995); if cohort="2" then gr5_date_a=mdy(9,1,1996); if cohort="3" then gr5_date_a=mdy(9,1,1997); gr4_date_a=mdy(9,1,1994); if cohort="2" then gr4_date_a=mdy(9,1,1995); if cohort="3" then gr4_date_a=mdy(9,1,1996); gr3_date_a=mdy(9,1,1993); if cohort="2" then gr3_date_a=mdy(9,1,1994); if cohort="3" then gr3_date_a=mdy(9,1,1995); gr2_date_a=mdy(9,1,1992); if cohort="2" then gr2_date_a=mdy(9,1,1993); if cohort="3" then gr2_date_a=mdy(9,1,1994); if jcd8s=gr2_date_a and jcd8s=gr3_date_a and jcd8s=gr4_date_a and jcd8s=gr5_date_a and jcd8s=gr6_date_a and jcd8s=gr7_date_a and jcd8s=gr8_date_a and jcd8s=gr9_date_a and jcd8s=gr10_date_a and jcd8s=gr11_date_a and jcd8s=gr12_date_a and jcd8s=gr13_date_a and jcd8s=gr14_date_a and jcd8s=gr15_date_a and jcd8s=gr16_date_a and jcd8s=gr17_date_a then grade=17; adj_study_yr=grade+1; c=1; label data_source="data source of adj record" count="adjudication record id number" adj_study_yr="study year corresponding to adjudication date"; run; data two; set two; drop gr2_date_a gr3_date_a gr4_date_a gr5_date_a gr6_date_a gr7_date_a gr8_date_a gr9_date_a gr10_date_a gr11_date_a gr12_date_a gr13_date_a gr14_date_a gr15_date_a gr16_date_a gr17_date_a gr18_date_a grade mo8 mo14 mo24 mo34 mo44 mo54 mo64 mo74 mo84 mo94 mo104 sitecode total yr8 yr14 yr24 yr34 yr44 yr54 yr64 yr74 yr84 yr94 yr104 j _FREQ_ _TYPE_ day8 day14 day24 day34 day44 day54 day64 day74 day84 day94 day104 i id max_yr jcd4; run; proc sort data=two;by site tcid; proc means data=two noprint; by site tcid;var c; output out=test sum=total;run; proc sort;by site tcid; proc sort data=two;by site tcid; proc means data=two noprint; by site tcid; where jcd9="skip" and jcd15="skip"; var c; output out=skip sum=total_skip;run; proc sort;by site tcid; data test4; merge test skip; by site tcid; if total_skip=. then total_skip=0; run; proc sort;by site tcid; data three; merge two test4; by site tcid; run; *number of records equals number of no arrest records; data four1; set three; if total=total_skip; jcd8="skip"; jcd5=0; run; proc sort;by site tcid; data four1; set four1; by site tcid; if first.tcid; run; data four2; set three; if total>total_skip; if jcd9="skip" and jcd15="skip" then delete; run; data five; set four1 four2; if site="PENN" and tcid="2821" and jcd9="skip" then delete; if jcd8="mm/mm/mm" then jcd8="nad"; if jcd8="nad" then jcd7=0; if jcd8 not in ("nad","skip") then jcd7=1; rename count=adj_id; drop total total_skip c _freq_ _type_; run; data sasin.jcd_unscored_adj; set five; run; *creates dataset of first offenses; data data0; set one; if jcd9 ne "skip"; offense=1; keep site tcid cohort jcd6 jcd8 jcd9-jcd11 jcd12r jcd13-jcd16 jcd17r jcd18 jcd12 count offense date data_source adj_study_yr jcd109-jcd152; run; *creates dataset of second thru tenth offenses; %macro off (num1=, num2=); data data&num1.; set one; if jcd&num1.9 ne "skip"; offense=&num2.; keep site tcid cohort jcd6 jcd8 jcd&num1.9 jcd&num2.0 jcd&num2.1 jcd&num2.2r jcd&num2.3-jcd&num2.6 jcd&num2.7r jcd&num2.8 jcd&num2.2 count offense date data_source adj_study_yr jcd109-jcd152; run; data data&num1.; set data&num1.; rename jcd&num1.9=jcd9; rename jcd&num2.0=jcd10; rename jcd&num2.1=jcd11; rename jcd&num2.2r=jcd12r; rename jcd&num2.2=jcd12; rename jcd&num2.3=jcd13; rename jcd&num2.4=jcd14; rename jcd&num2.5=jcd15; rename jcd&num2.6=jcd16; rename jcd&num2.7r=jcd17r; rename jcd&num2.8=jcd18; run; %mend; %off (num1=1, num2=2); %off (num1=2, num2=3); %off (num1=3, num2=4); %off (num1=4, num2=5); %off (num1=5, num2=6); %off (num1=6, num2=7); %off (num1=7, num2=8); %off (num1=8, num2=9); %off (num1=9, num2=10); *SCORED DATASET; *first create an offense level dataset; *omit offenses for which adjudication and arrest data are missing; *assign study year to each offense based on arrest date ; *count is the variable that links the offenses from the same adjudication record together; *offense is the variable that numbers all the offenses within the same adjudication record; *if offense date is missing but adjudication date is not assign an offense data based on site average length between adjudication and offense date; data all_offenses; set data0 data1 data2 data3 data4 data5 data6 data7 data8 data9; *recode count for adjudication dates with more than 10 offenses; if site="DURH" and tcid="0037" and count=54 then do ;count=55;offense=offense+10;end; if site="DURH" and tcid="0068" and count=129 then do ;count=128;offense=offense+10;end; if site="DURH" and tcid="0072" and count=141 then do ;count=140;offense=offense+10;end; if site="DURH" and tcid="0428" and count=427 then do ;count=429;offense=offense+10;end; if site="DURH" and tcid="0428" and count=428 then do ;count=429;offense=offense+20;end; if site="DURH" and tcid="0751" and count=605 then do ;count=606;offense=offense+10;end; if site="DURH" and tcid="1456" and count=936 then do ;count=935;offense=offense+10;end; if site="DURH" and tcid="1600" and count=1006 then do ; count=1005;offense=offense+10;end; if site="DURH" and tcid="1600" and count=1011 then do ;count=1010;offense=offense+10;end; if site="DURH" and tcid="1600" and count=1012 then do ;count=1010;offense=offense+20;end; if site="DURH" and tcid="2084" and count=1111 then do ;count=1110;offense=offense+30;end; if site="DURH" and tcid="2084" and count=1112 then do ;count=1110;offense=offense+40;end; if site="DURH" and tcid="2084" and count=1114 then do ;count=1113;offense=offense+10;end; if site="DURH" and tcid="2084" and count=1115 then do ;count=1113;offense=offense+20;end; if site="DURH" and tcid="2525" and count=1232 then do ;count=1233;offense=offense+10;end; if site="DURH" and tcid="2635" and count=1267 then do ;count=1266;offense=offense+10;end; if site="PENN" and tcid="0249" and count=2811 then do ;count=2812;offense=offense+10;end; if site="PENN" and tcid="0330" and count=2860 then do ;count=2859;offense=offense+10;end; if site="PENN" and tcid="0330" and count=2861 then do ;count=2859;offense=offense+20;end; if site="PENN" and tcid="0330" and count=2862 then do ;count=2859;offense=offense+30;end; month_o=substr(jcd14,1,2); day_o=substr(jcd14,4,2); year_o=substr(jcd14,7,4); month_a=substr(jcd8,1,2); day_a=substr(jcd8,4,2); year_a=substr(jcd8,7,4); if jcd14 not in ("mm/mm/mm","skip") then jcd14s=mdy(month_o,day_o,year_o); if jcd14 in ("mm/mm/mm","skip") then jcd14s=.; if jcd8 not in ("mm/mm/mm","nad") then jcd8s=mdy(month_a,day_a,year_a); if jcd8 in ("mm/mm/mm","nad") then jcd8s=.; if jcd8s=. and jcd14s=. then delete; *average number of days between adj date and offense date by site among offenses with nonmissing dates; *replace missing offense arrest data with a site average; *juvenile; *durh=87; *nash=74; *penn=52; *wash=182; *adult; *durh=186; *nash=104; *penn=125; *wash=227; if jcd6 ne "adult" and site="DURH" and jcd14s=. then jcd14s=jcd8s-87; if jcd6 ne "adult" and site="NASH" and jcd14s=. then jcd14s=jcd8s-74; if jcd6 ne "adult" and site="PENN" and jcd14s=. then jcd14s=jcd8s-52; if jcd6 ne "adult" and site="WASH" and jcd14s=. then jcd14s=jcd8s-182; if jcd6="adult" and site="DURH" and jcd14s=. then jcd14s=jcd8s-186; if jcd6="adult" and site="NASH" and jcd14s=. then jcd14s=jcd8s-104; if jcd6="adult" and site="PENN" and jcd14s=. then jcd14s=jcd8s-125; if jcd6="adult" and site="WASH" and jcd14s=. then jcd14s=jcd8s-227; gr18_date_a=mdy(9,1,2008); if cohort="2" then gr18_date_a=mdy(9,1,2009); if cohort="3" then gr18_date_a=mdy(9,1,2010); gr17_date_a=mdy(9,1,2007); if cohort="2" then gr17_date_a=mdy(9,1,2008); if cohort="3" then gr17_date_a=mdy(9,1,2009); gr16_date_a=mdy(9,1,2006); if cohort="2" then gr16_date_a=mdy(9,1,2007); if cohort="3" then gr16_date_a=mdy(9,1,2008); gr15_date_a=mdy(9,1,2005); if cohort="2" then gr15_date_a=mdy(9,1,2006); if cohort="3" then gr15_date_a=mdy(9,1,2007); gr14_date_a=mdy(9,1,2004); if cohort="2" then gr14_date_a=mdy(9,1,2005); if cohort="3" then gr14_date_a=mdy(9,1,2006); gr13_date_a=mdy(9,1,2003); if cohort="2" then gr13_date_a=mdy(9,1,2004); if cohort="3" then gr13_date_a=mdy(9,1,2005); gr12_date_a=mdy(9,1,2002); if cohort="2" then gr12_date_a=mdy(9,1,2003); if cohort="3" then gr12_date_a=mdy(9,1,2004); gr11_date_a=mdy(9,1,2001); if cohort="2" then gr11_date_a=mdy(9,1,2002); if cohort="3" then gr11_date_a=mdy(9,1,2003); gr10_date_a=mdy(9,1,2000); if cohort="2" then gr10_date_a=mdy(9,1,2001); if cohort="3" then gr10_date_a=mdy(9,1,2002); gr9_date_a=mdy(9,1,1999); if cohort="2" then gr9_date_a=mdy(9,1,2000); if cohort="3" then gr9_date_a=mdy(9,1,2001); gr8_date_a=mdy(9,1,1998); if cohort="2" then gr8_date_a=mdy(9,1,1999); if cohort="3" then gr8_date_a=mdy(9,1,2000); gr7_date_a=mdy(9,1,1997); if cohort="2" then gr7_date_a=mdy(9,1,1998); if cohort="3" then gr7_date_a=mdy(9,1,1999); gr6_date_a=mdy(9,1,1996); if cohort="2" then gr6_date_a=mdy(9,1,1997); if cohort="3" then gr6_date_a=mdy(9,1,1998); gr5_date_a=mdy(9,1,1995); if cohort="2" then gr5_date_a=mdy(9,1,1996); if cohort="3" then gr5_date_a=mdy(9,1,1997); gr4_date_a=mdy(9,1,1994); if cohort="2" then gr4_date_a=mdy(9,1,1995); if cohort="3" then gr4_date_a=mdy(9,1,1996); gr3_date_a=mdy(9,1,1993); if cohort="2" then gr3_date_a=mdy(9,1,1994); if cohort="3" then gr3_date_a=mdy(9,1,1995); gr2_date_a=mdy(9,1,1992); if cohort="2" then gr2_date_a=mdy(9,1,1993); if cohort="3" then gr2_date_a=mdy(9,1,1994); if jcd14s=gr2_date_a and jcd14s=gr3_date_a and jcd14s=gr4_date_a and jcd14s=gr5_date_a and jcd14s=gr6_date_a and jcd14s=gr7_date_a and jcd14s=gr8_date_a and jcd14s=gr9_date_a and jcd14s=gr10_date_a and jcd14s=gr11_date_a and jcd14s=gr12_date_a and jcd14s=gr13_date_a and jcd14s=gr14_date_a and jcd14s=gr15_date_a and jcd14s=gr16_date_a and jcd14s=gr17_date_a then grade=17; arr_study_yr=grade+1; c=1; if jcd15 in ("NA","_","bn","c","none") then jcd15="na"; if jcd15 not in ("n","na","skip") then do ;off=jcd15;sev=jcd17r;end; if jcd15 in ("n","na","skip") then do; off=jcd9;sev=jcd12r;end; *delete probation violation offenses due to inconsistencies across sites; if off="F._Probation_Violation_Out_of_County" then delete; if off="f_prob_out_of_county" then delete; if off="M._Probation_Violation" then delete; if off="M._Probation_Violation_Out_of_County" then delete; if off="m_probation_violation" then delete; if off="out_of_county" then delete; if off="parole_violation" then delete; if off="poration_violation" then delete; if off="prob._violation" then delete; if off="prob._violation_(out_of_county)" then delete; if off="probation_revocation" then delete; if off="probation_revocation_hearing" then delete; if off="probation_violation" then delete; if off="probation_violation" then delete; if off="Probation_Violation" then delete; if off="probation_violation/all_previous_charges_nolle_prossed_to_go_to_federal_co" then delete; if off="viol_of_probation" then delete; if off="violaiton_of_probation" then delete; if off="violated_probation" then delete; if off="violatin_of_probation" then delete; if off="violation_conditions_of_release" then delete; if off="violation_of_porbation" then delete; if off="violation_of_post_release_supervision" then delete; if off="violation_of_probation" then delete; if off="violation_of_probation_six_counts" then delete; if off="violation_of_probation_three_counts" then delete; if off="violation_of_school_based_probation" then delete; if off="violation_of_school_probation" then delete; if off="conditions_of_probation" then delete; if off="revocation_of_probation" then delete; *traffic violations; traffic=0; if off="allow_unauth_minor_to_oper" then traffic=1; if off="allow_unlicense_to_drive" then traffic=1; if off="alter/remove_motor_vehicle_serial_number" then traffic=1; if off="alter_auto_tag" then traffic=1; if off="altered_reg._tag" then traffic=1; if off="altered_title_or_plate" then traffic=1; if off="altering,_forging_license_plates_belonging_to_other_vehicle" then traffic=1; if off="altering_auto_tags" then traffic=1; if off="altering_auto_title_and_registration" then traffic=1; if off="auto_tag_switching" then traffic=1; if off="brake_equipment_violation" then traffic=1; if off="careless_driving" then traffic=1; if off="certification_of_inspection" then traffic=1; if off="crossing_street_or_hwy_complete_stop_required" then traffic=1; if off="defect_equip" then traffic=1; if off="defective_equipment" then traffic=1; if off="defective_license" then traffic=1; if off="defective_tail_lamp" then traffic=1; if off="defective_tail_lignt" then traffic=1; if off="defective_taillamp" then traffic=1; if off="defective_wheels/front_suspension" then traffic=1; if off="defective_windshield" then traffic=1; if off="display_plate_card_in_improper_vehicle" then traffic=1; if off="disregard_stop_sign" then traffic=1; if off="disregard_to_traffic_control_device" then traffic=1; if off="disregard_traffic_control_device" then traffic=1; if off="disregard_traffic_lane" then traffic=1; if off="disregard_traffic_sign" then traffic=1; if off="dr_unregist_veh" then traffic=1; if off="driv_while_oper_priv_susp_or_revoked" then traffic=1; if off="driv_while_opera_priv_susp_or_revoked" then traffic=1; if off="drive_mv_no_registration" then traffic=1; if off="drive_w/_license_revoked" then traffic=1; if off="drive_with_license_revoked" then traffic=1; if off="driver_required_to_be_licensed" then traffic=1; if off="drivers_required_to_be_licensed" then traffic=1; if off="driving_a_safe_speed" then traffic=1; if off="driving_at_safe_speed" then traffic=1; if off="driving_at_unsafe_speed" then traffic=1; if off="driving_left_of_center" then traffic=1; if off="driving_left_of_the_center_of_the_highway" then traffic=1; if off="driving_on_a_revoked_license" then traffic=1; if off="driving_on_revoked_license" then traffic=1; if off="driving_on_revoled_license" then traffic=1; if off="driving_on_roads_laned_for_traffic" then traffic=1; if off="driving_on_suspended_license" then traffic=1; if off="driving_on_suspended_license_more_than_once" then traffic=1; if off="driving_speed" then traffic=1; if off="driving_speed_>_110_mph_in_55_mph_zone_&_danger_to_public_safety" then traffic=1; if off="driving_under_suspension" then traffic=1; if off="driving_unregistered_vehicle" then traffic=1; if off="driving_vehicle_at_safe_speed" then traffic=1; if off="driving_vehicle_of_safe_speed" then traffic=1; if off="driving_w/_suspended_license_2nd" then traffic=1; if off="driving_w/o_a_license" then traffic=1; if off="driving_w/out_2_headlamps" then traffic=1; if off="driving_while_lic_suspended" then traffic=1; if off="driving_while_susp_3rd" then traffic=1; if off="driving_while_suspended" then traffic=1; if off="driving_while_suspended_3rd" then traffic=1; if off="driving_while_suspended_or_provoked" then traffic=1; if off="driving_with_a_suspended_license" then traffic=1; if off="driving_with_suspended_license" then traffic=1; if off="driving_without_a_license" then traffic=1; if off="driving_wo_ins" then traffic=1; if off="driving_wo_lic" then traffic=1; if off="driving_wo_lic_3rd" then traffic=1; if off="driving_wo_license" then traffic=1; if off="driving_wrong_side_of_roadway" then traffic=1; if off="duties_at_stop_sign" then traffic=1; if off="duty_of_driver_on_approach_of_emergency_vehicle" then traffic=1; if off="dwlr" then traffic=1; if off="DWLS" then traffic=1; if off="dwls_1st" then traffic=1; if off="dwls_2nd" then traffic=1; if off="DWLS_2nd_degree" then traffic=1; if off="DWLS_3rd" then traffic=1; if off="efective_tail_lamp" then traffic=1; if off="exceed_35_mph_in_urban_dist_21_mph" then traffic=1; if off="exceed_35_mph_in_urban_dist_26_mph" then traffic=1; if off="exceed_35_mph_in_urban_district_by_20_mph" then traffic=1; if off="exceed_55_mile_per_hour_in_other_location_by_21_miles_per_hour" then traffic=1; if off="exceed_55_miles_per_hour" then traffic=1; if off="exceed_55_mph_by_10_mph" then traffic=1; if off="exceed_55_mph_by_23_mph" then traffic=1; if off="exceed_55_mph_by_32_mph" then traffic=1; if off="exceed_55_mph_in_other_location_by_18mph" then traffic=1; if off="exceed_max_speed_by_29mph" then traffic=1; if off="exceed_max_speed_lim_by_13_mph" then traffic=1; if off="exceeded_max_speed" then traffic=1; if off="exceeding_maximum_speed_limit_by_12" then traffic=1; if off="exceeding_maximum_speed_limit_by_17" then traffic=1; if off="Exceeding_Safe_Speed" then traffic=1; if off="exceeding_speed_limit" then traffic=1; if off="exceeds_55_mph_in_other_loc_by_21_mph" then traffic=1; if off="exp._reg._card/tag" then traffic=1; if off="exp._tags/registration" then traffic=1; if off="exp/_no_inspection_sticker" then traffic=1; if off="exp/no_insp_sticker" then traffic=1; if off="exp/no_inspection_sticker" then traffic=1; if off="exp/no_insurance" then traffic=1; if off="exp_motor_veh_lic" then traffic=1; if off="exp_reg_card/tag" then traffic=1; if off="exp_reg_tag" then traffic=1; if off="exp_reg_tag/card" then traffic=1; if off="expired/_no_inspection_sticker" then traffic=1; if off="expired_inspection_sticker" then traffic=1; if off="expired_lic" then traffic=1; if off="expired_license" then traffic=1; if off="expired_mot_veh_lic" then traffic=1; if off="expired_reg" then traffic=1; if off="expired_registration_card/_tag" then traffic=1; if off="expired_veh_lic" then traffic=1; if off="fail_burn_headlamps" then traffic=1; if off="fail_heed_light_or_siren" then traffic=1; if off="fail_obey_traffic_signs" then traffic=1; if off="fail_opey_traffic" then traffic=1; if off="fail_reduce_speed" then traffic=1; if off="fail_renew_expired_reg" then traffic=1; if off="fail_stop/red_lt" then traffic=1; if off="fail_stop_red_light" then traffic=1; if off="fail_stop_sign" then traffic=1; if off="fail_stop_stopsign" then traffic=1; if off="fail_stop_yield" then traffic=1; if off="fail_to_burn_headlamps" then traffic=1; if off="fail_to_display_reg" then traffic=1; if off="fail_to_maintain_safety_belts" then traffic=1; if off="fail_to_obey_stop_or_yield_sign" then traffic=1; if off="fail_to_obey_traffic" then traffic=1; if off="Fail_to_obey_traffic_control_dev" then traffic=1; if off="fail_to_opey_lane" then traffic=1; if off="fail_to_reduce_speed" then traffic=1; if off="fail_to_sgin/carry_reg" then traffic=1; if off="fail_to_sign/carry" then traffic=1; if off="fail_to_sign/carry/_disp_veh" then traffic=1; if off="fail_to_signal" then traffic=1; if off="fail_to_stop/yield" then traffic=1; if off="fail_to_stop_at_red_light" then traffic=1; if off="fail_to_stop_at_stop" then traffic=1; if off="fail_to_stop_at_stop_sign" then traffic=1; if off="fail_to_stop_at_stoplight" then traffic=1; if off="fail_to_stop_red_light" then traffic=1; if off="fail_to_wear_safety" then traffic=1; if off="fail_to_wear_safety_belt" then traffic=1; if off="Fail_to_wear_seat_belt" then traffic=1; if off="fail_to_wear_seatbelt" then traffic=1; if off="fail_to_yeild" then traffic=1; if off="fail_to_yield" then traffic=1; if off="fail_to_yield_at_turn" then traffic=1; if off="fail_to_yield_right" then traffic=1; if off="fail_wear_safety" then traffic=1; if off="Fail_Wear_Seatbelt" then traffic=1; if off="fail_wear_seatbelt" then traffic=1; if off="fail_yield_right_of_way_left_turn" then traffic=1; if off="failed_to_stop_at_steady_red_light" then traffic=1; if off="failing_to_stop_for_police" then traffic=1; if off="failt_to_stop_red_light" then traffic=1; if off="failure_to_display" then traffic=1; if off="failure_to_display_ins_crd" then traffic=1; if off="failure_to_display_reg" then traffic=1; if off="failure_to_stop_at" then traffic=1; if off="failure_to_stop_at_r_l" then traffic=1; if off="failure_to_use_safety_belt_system" then traffic=1; if off="failure_to_wear_safety" then traffic=1; if off="failure_to_wear_seatbelt" then traffic=1; if off="failure_to_yield" then traffic=1; if off="fict/cncl/rev_reg._card/tag" then traffic=1; if off="fict/cncl/rev_reg_card/tag" then traffic=1; if off="fict/cncl_reg_card/tag" then traffic=1; if off="fict/cncl_reg_tag" then traffic=1; if off="fict/cncl_reg_tag/card" then traffic=1; if off="fict/cncl_rev_reg_tag" then traffic=1; if off="fict/cncl_rev_registration_tag" then traffic=1; if off="fict_cncl_rev_reg_tag" then traffic=1; if off="ficticious/_cancelled_registration" then traffic=1; if off="ficticious/_cancelled_registration/_tags" then traffic=1; if off="ficticious/cncl/revoked_registration_card" then traffic=1; if off="ficticious_info/_revoked_registration_card" then traffic=1; if off="fl_renew_expired" then traffic=1; if off="fl_renew_expired_r" then traffic=1; if off="fl_renew_expired_reg" then traffic=1; if off="fl_rew_expired_reg" then traffic=1; if off="flashing_signals" then traffic=1; if off="fld_signal_stops" then traffic=1; if off="fld_sitnal_stop_at" then traffic=1; if off="fld_to_drive_on_right_side_of_road" then traffic=1; if off="fld_to_reg_veh" then traffic=1; if off="fld_to_yield" then traffic=1; if off="fld_to_yield_from_driveway" then traffic=1; if off="fld_to_yield_row_f" then traffic=1; if off="flure_renew_expired_reg" then traffic=1; if off="follow_to_close" then traffic=1; if off="following_to_closely" then traffic=1; if off="following_too_close" then traffic=1; if off="following_too_closely" then traffic=1; if off="glazed/tinted_windows" then traffic=1; if off="headlamps_on_mot_veh" then traffic=1; if off="headlamps_on_motor" then traffic=1; if off="helmet_requirement_(motor)" then traffic=1; if off="I._Exp/No_Inspection_Sticker" then traffic=1; if off="I._Expired/No_Inspection_Sticker" then traffic=1; if off="I._Expired_No_Inspec_Sticker" then traffic=1; if off="I._Fail_Stop_Sign_Flash_Red" then traffic=1; if off="I._Fail_Stop_Sign_Flash_Red_Light" then traffic=1; if off="I._Fail_To_Burn_Headlamps" then traffic=1; if off="I._Fail_To_Reduce_Speed" then traffic=1; if off="I._Fail_To_Stop_@_Stop_Sign_Flash_Red_Light" then traffic=1; if off="I._Fail_To_Wear_Seat_Belt" then traffic=1; if off="I._Fail_To_Wear_Seat_Belt-Driver" then traffic=1; if off="I._Fail_to_Wear_Seat_Belt-Driver" then traffic=1; if off="I._Failure_To_Reduce_Speed" then traffic=1; if off="I._Failure_to_Reduce_Speed" then traffic=1; if off="I._Failure_to_Wear_Seat_Belt-Driver" then traffic=1; if off="I._Rear_Lamp_Violation" then traffic=1; if off="I._Speed_in_Hwy_Work_Zone" then traffic=1; if off="I._Speeding" then traffic=1; if off="I._Speeding_30_Over" then traffic=1; if off="I_Drive_Left_of_Center" then traffic=1; if off="I_Exp/No_Inspection_Sticker" then traffic=1; if off="I_Expired_Inspection_Sticker" then traffic=1; if off="I_Fail_Stop_Stopsign/Flsh_Red_Lt" then traffic=1; if off="I_Fail_to_Burn_Headlamp" then traffic=1; if off="I_Fail_to_Secure_Passanger_>_16" then traffic=1; if off="I_Fail_to_Stop_Steady_Red_Light" then traffic=1; if off="I_fail_to_Stop_Steady_Red_Light" then traffic=1; if off="I_Fail_to_Stop-Steady_Red_Light" then traffic=1; if off="I_Fail_to_Wear_Seatbelt-Driver" then traffic=1; if off="I_fail_to_Wear_Seatbelt-Driver" then traffic=1; if off="I_fwil_to_Wear_Seatbelt-Driver" then traffic=1; if off="I_Speeding" then traffic=1; if off="I_Speeding_in_HWY_Work_Zone" then traffic=1; if off="illegal_operation_of_snowmobile/atv_by_underage" then traffic=1; if off="illegal_operation_of_snowmobile/atv_on_highway" then traffic=1; if off="illegal_parking/stand_or_stop" then traffic=1; if off="illegal_use_of_dealer_lic_plate" then traffic=1; if off="Impede_Traffic" then traffic=1; if off="impede_traffic" then traffic=1; if off="improper_backing" then traffic=1; if off="Improper_Equipment" then traffic=1; if off="Improper_Equipment/Speedometer" then traffic=1; if off="improper_lane_usage" then traffic=1; if off="improper_position_left_turn" then traffic=1; if off="improper_use/switch/altered_plate" then traffic=1; if off="inattention" then traffic=1; if off="inattentive_driving" then traffic=1; if off="ineligible_for_licensing" then traffic=1; if off="int_license,_pass_under_2" then traffic=1; if off="Learner_Permit_Violation" then traffic=1; if off="Learners_Permit_Violation" then traffic=1; if off="learner's_permit_violation" then traffic=1; if off="leaving_unattended_veh_on_hwy" then traffic=1; if off="license/permit_no_supervised_driver_<18" then traffic=1; if off="license/permit_no_supervision_<18" then traffic=1; if off="license_not_in_posession" then traffic=1; if off="license_not_in_possesion" then traffic=1; if off="maximum_speed_limit" then traffic=1; if off="maximum_speed_limits" then traffic=1; if off="meter_violation_and_overtime_parking" then traffic=1; if off="minor_oper_veh_aft" then traffic=1; if off="motorcycle_fail_burn_headlamp" then traffic=1; if off="neg_driving" then traffic=1; if off="neg_driving_1st_degree" then traffic=1; if off="neg_driving_2nd" then traffic=1; if off="negl_driving" then traffic=1; if off="negl_driving_1st" then traffic=1; if off="neglegent_driving" then traffic=1; if off="negligent_driving" then traffic=1; if off="negligent_driving_2nd" then traffic=1; if off="no_bicycle_helmit" then traffic=1; if off="no_dirvers" then traffic=1; if off="no_dirvers_lic" then traffic=1; if off="no_dirvers_license" then traffic=1; if off="no_drivers_lic" then traffic=1; if off="no_drivers_license" then traffic=1; if off="no_driver's_license" then traffic=1; if off="no_insurance" then traffic=1; if off="no_license" then traffic=1; if off="no_mandatory_insurance" then traffic=1; if off="no_motercycle_endorse" then traffic=1; if off="no_motorcycle_endorsement" then traffic=1; if off="no_op._license" then traffic=1; if off="no_op_license" then traffic=1; if off="no_oper_license" then traffic=1; if off="No_Operator_License" then traffic=1; if off="no_operator_license" then traffic=1; if off="No_Operators_License" then traffic=1; if off="no_operators_license" then traffic=1; if off="no_operator's_license" then traffic=1; if off="no_parking_during_certain_hours_-_street_cleaning" then traffic=1; if off="no_splash_aprons" then traffic=1; if off="no_state_inspection" then traffic=1; if off="no_state_license_plate" then traffic=1; if off="no_title_or_registration" then traffic=1; if off="no_valid_dr_lic" then traffic=1; if off="no_valid_drivers_lic" then traffic=1; if off="no_valid_drivers_license" then traffic=1; if off="no_valid_lic" then traffic=1; if off="no_valid_license" then traffic=1; if off="no_valid_op_lice" then traffic=1; if off="no_valid_oper_lic" then traffic=1; if off="no_valid_oper_license" then traffic=1; if off="no_vehicle_insurance" then traffic=1; if off="obedience_to_traffic_control_device" then traffic=1; if off="obscured/illegible_lic_plate" then traffic=1; if off="op_mc_wo_eye_prot/hemet" then traffic=1; if off="op_mot_veh_wo_i" then traffic=1; if off="op_mot_veh_wo_ins" then traffic=1; if off="op_mot_veh_wo_lic" then traffic=1; if off="op_not_veh_wo_ins" then traffic=1; if off="op_veh_w/no_ins" then traffic=1; if off="op_veh_wo_ins" then traffic=1; if off="op_veh_wo_lic" then traffic=1; if off="op_vehicle_no_license" then traffic=1; if off="oper_mot_veh_who_ins" then traffic=1; if off="oper_mot_veh_wo_ins" then traffic=1; if off="oper_not_veh_wo_ins" then traffic=1; if off="oper_veh/vio_restr" then traffic=1; if off="oper_veh_wo_head" then traffic=1; if off="oper_wo_head" then traffic=1; if off="oper_wo_headlamps" then traffic=1; if off="oper_wo_headlights" then traffic=1; if off="operate_motor_vehicle_w/o_a_license" then traffic=1; if off="operate_vehicle_without_required_financial_responsibility" then traffic=1; if off="operated_a_motor_vehicle_w/o_a_license" then traffic=1; if off="operated_a_motor_vehicle_w/o_wearing_seatbelt" then traffic=1; if off="operated_motor_vehicle_w/o_license" then traffic=1; if off="operated_motor_vehicle_without_license" then traffic=1; if off="operating_mv_w/o_ins_or_paying_uninsur_fee" then traffic=1; if off="operating_mv_w/o_operators_license" then traffic=1; if off="operating_veh_w/o_valid_inspection" then traffic=1; if off="operating_wo_headlights" then traffic=1; if off="operation_on_private_property_w/o_consent" then traffic=1; if off="operation_wo_headlamps" then traffic=1; if off="pedacycle_in_business_area" then traffic=1; if off="pedestrian_interference" then traffic=1; if off="pedestrian_subject_to_traffic_regulations" then traffic=1; if off="person_ineligible_for_licensing" then traffic=1; if off="possession_license" then traffic=1; if off="proh/_improper_tury" then traffic=1; if off="proh/improper_turn" then traffic=1; if off="registration_certification_of_title_required" then traffic=1; if off="required_financial_responsibility" then traffic=1; if off="restrictions_on_recreational_spot" then traffic=1; if off="restrictions_on_recreational_spotlight" then traffic=1; if off="seatbelt_violation" then traffic=1; if off="speed_in_excess_45mph" then traffic=1; if off="speedig" then traffic=1; if off="speediing" then traffic=1; if off="speeding" then traffic=1; if off="speeding_(16-20_mph_over)" then traffic=1; if off="speeding_10_mph_ov" then traffic=1; if off="speeding_10_MPH_over" then traffic=1; if off="speeding_10_mph_over" then traffic=1; if off="speeding_11_mph_over" then traffic=1; if off="speeding_11_mpy_over_limit" then traffic=1; if off="speeding_12_mph_over" then traffic=1; if off="speeding_13_MPH_over" then traffic=1; if off="speeding_13_mph_over" then traffic=1; if off="speeding_14_mph_over" then traffic=1; if off="speeding_145_mph_over" then traffic=1; if off="speeding_15_mph_o" then traffic=1; if off="speeding_15_mph_ov" then traffic=1; if off="speeding_15_mph_over" then traffic=1; if off="speeding_16_MPH_over" then traffic=1; if off="speeding_16_mph_over" then traffic=1; if off="speeding_17_mph_over" then traffic=1; if off="speeding_18_mph_over" then traffic=1; if off="speeding_19_mi_over" then traffic=1; if off="speeding_19_MPH_over" then traffic=1; if off="speeding_19_mph_over" then traffic=1; if off="speeding_20_mph_over" then traffic=1; if off="speeding_21_MPH_over" then traffic=1; if off="speeding_21_mph_over" then traffic=1; if off="speeding_22_mph_onver" then traffic=1; if off="speeding_22_MPH_over" then traffic=1; if off="speeding_23_mph_over" then traffic=1; if off="speeding_25_mph_over" then traffic=1; if off="speeding_29_MPH_over" then traffic=1; if off="speeding_29_mph_over" then traffic=1; if off="speeding_30_MPH_over" then traffic=1; if off="speeding_37_mph_over" then traffic=1; if off="speeding_5_mph_onver" then traffic=1; if off="speeding_5_MPH_over" then traffic=1; if off="speeding_5_mph_over" then traffic=1; if off="Speeding_79/65" then traffic=1; if off="speeding_9_MPH_over" then traffic=1; if off="speeding_9_mph_over" then traffic=1; if off="speeding_and_drag_racing" then traffic=1; if off="speeding_exceeding_maximum_speed_by_21_mph" then traffic=1; if off="speeding_too_fast" then traffic=1; if off="Speedinh" then traffic=1; if off="sppeding_10_mph_over" then traffic=1; if off="stand_unattended" then traffic=1; if off="stop_and_yield_sign" then traffic=1; if off="stop_sign_and_yield_signs" then traffic=1; if off="street_sidewalks" then traffic=1; if off="susp_rvoked_licen_2nd" then traffic=1; if off="susp_rvoked_license" then traffic=1; if off="susp_rvoled_license_3rd" then traffic=1; if off="suspended/revosed_dr_license" then traffic=1; if off="suspended/rvoked_license_2nd" then traffic=1; if off="T._Alterted_Reg_Card/Tag" then traffic=1; if off="T._Civil_Revocation_Driver_License" then traffic=1; if off="T._DWLR" then traffic=1; if off="T._Exp._Reg._Card/Tag" then traffic=1; if off="T._Expired_Reg_Card/Tag" then traffic=1; if off="T._Expired_Registration_Card/Tag" then traffic=1; if off="T._Fic/_CNCL/Reg_Reg_Card/Tag" then traffic=1; if off="T._FIC/CNCL/Rev_Reg_Card/_Tag" then traffic=1; if off="T._FIC/CNCL/Rev_Reg_Card/Tag" then traffic=1; if off="T._FIC/CNCL/REV_Reg_Card_Tag" then traffic=1; if off="T._FIC/CNCL/Rev_Reg_Tag" then traffic=1; if off="T._Fic/CNCL/Rev_Reg_Tag" then traffic=1; if off="T._Lic/Permit_No_Supervision_Drive<18" then traffic=1; if off="T._License_Not_in_Possession" then traffic=1; if off="T._No_Operate_Veh_No_INS" then traffic=1; if off="T._No_Operators_License" then traffic=1; if off="T._Operate_Veh_No_Ins" then traffic=1; if off="T._Poss/DISP_Alt/_FIC/_Rev_Driver_License" then traffic=1; if off="T._Reg_Plat_Improp_Attach" then traffic=1; if off="T._Speeding" then traffic=1; if off="T.DWLR" then traffic=1; if off="T_Allow_Unlicensed_to_Drive" then traffic=1; if off="t_Drive/Allow_MV_no_Registration" then traffic=1; if off="T_DWLR" then traffic=1; if off="T_Exp_Reg_Card/Tag" then traffic=1; if off="T_Exp_Reg_card/Tag" then traffic=1; if off="T_Exp_Registration_Card/Tag" then traffic=1; if off="T_Fict/Cncl/Rev_Reg_Card/Tag" then traffic=1; if off="T_Fict/Cncl_Rev_Reg_Card/Tag" then traffic=1; if off="T_Improper_Use_Dealer_Permit/Tag" then traffic=1; if off="T_Improper_use_Dealer_Permit/Tag" then traffic=1; if off="T_License_Not_in_Possession" then traffic=1; if off="T_License_not_in_Possession" then traffic=1; if off="T_No_Operators_License" then traffic=1; if off="T_No_Operators_license" then traffic=1; if off="T_Operate_Veh_no_Ins" then traffic=1; if off="T_Operate_Veh_No_Insurance" then traffic=1; if off="T_Speeding" then traffic=1; if off="T_Window_Tinting_Viol" then traffic=1; if off="T_Wondow_Tinting_Viol" then traffic=1; if off="tail_light_violation" then traffic=1; if off="traffic_citation" then traffic=1; if off="traffic_offense" then traffic=1; if off="traffic_violation" then traffic=1; if off="turning_movements_and_required_signals" then traffic=1; if off="unlawful_driver_restriction" then traffic=1; if off="unlawful_speed_6-9_mph_over" then traffic=1; if off="unregistered_vehicle" then traffic=1; if off="unsafe_movement" then traffic=1; if off="unsafe_pass_yellow_line" then traffic=1; if off="unsafe_passing" then traffic=1; if off="Use_of_Red_or_Blue_Light" then traffic=1; if off="vehicle_registration" then traffic=1; if off="viol_of_instr_permit" then traffic=1; if off="viol_of_instruct_permit" then traffic=1; if off="viol_of_instruction_lic" then traffic=1; if off="viol_of_instruction_permit" then traffic=1; if off="viol_of_transit/carpool_lane" then traffic=1; if off="viol_of_transit_carpool_lane" then traffic=1; if off="violation_of_learners_permit" then traffic=1; if off="window_tinting" then traffic=1; if off="window_tinting_violation" then traffic=1; if off="wrong_way_on_freeway" then traffic=1; label arr_study_yr="study year corresponding to offense date" jcd14s="SAS date of offense" jcd8s="SAS date of adjudication" offense="id for offense within each adjudication date - adj_id" off="final offense - accounting for reductions during adjudication" sev="final severity code - accounting for reductions during adjudication" traffic="indicator for traffic violations" data_source="data source of adj record" count="adjudication record id number" grade="grade corresponding to offense date" ; drop day_a day_o gr10_date_a gr11_date_a gr12_date_a gr13_date_a gr14_date_a gr15_date_a gr16_date_a gr17_date_a gr18_date_a gr2_date_a gr3_date_a gr4_date_a gr5_date_a gr6_date_a gr7_date_a gr8_date_a gr9_date_a month_a month_o year_a year_o c ; run; data all_offenses; set all_offenses; rename count=adj_id; rename offense=off_id; rename off=offense; run; proc sort;by site tcid; run; data sasin.jcd_unscored_off; set all_offenses; run; data all_offenses; set all_offenses; if traffic=1 then delete; rev_sev=6-sev; run; *create a dataset that only keeps the most severe offense from each arrest; *thus creating an arrest level dataset again; proc sort data=all_offenses;by site tcid cohort adj_id rev_sev; data most_sev_offense; set all_offenses; by site tcid cohort adj_id rev_sev; if first.adj_id; c=1; run; proc sort data=most_sev_offense;by site tcid; *arrests in year 7 or prior; %macro adult_lt8 (sev=); proc means data=most_sev_offense noprint; by site tcid; where grade<7 and sev=&sev. and jcd6="adult"; var c ; output out=adult&sev._7 sum=jcd7al&sev. ; run; data adult&sev._7; set adult&sev._7 ; label jcd7al&sev.="Lifetime Sev &sev. Adult Arrests Yr7" ; keep site tcid jcd7al&sev. ; proc sort;by site tcid;run; %mend; %adult_lt8 (sev=1); %adult_lt8 (sev=2); %adult_lt8 (sev=3); %adult_lt8 (sev=4); %adult_lt8 (sev=5); %macro juven_lt8 (sev=); proc means data=most_sev_offense noprint; by site tcid; where grade<7 and sev=&sev. and jcd6 ne "adult"; var c ; output out=juven&sev._7 sum=jcd7jl&sev. ; run; data juven&sev._7; set juven&sev._7 ; label jcd7jl&sev.="Lifetime Sev &sev. Juvenile Arrests Yr7" ; keep site tcid jcd7jl&sev. ; proc sort;by site tcid;run; %mend; %juven_lt8 (sev=1); %juven_lt8 (sev=2); %juven_lt8 (sev=3); %juven_lt8 (sev=4); %juven_lt8 (sev=5); %macro adult (gr=, yr=, sev=); proc means data=most_sev_offense noprint; by site tcid; where grade=&gr. and sev=&sev. and jcd6="adult"; var c ; output out=adult&sev._&yr. sum=jcd&yr.aa&sev. ; run; data adult&sev._&yr.; set adult&sev._&yr. ; label jcd&yr.aa&sev.="Number of Sev&sev. Adult Arrests in Yr&yr." ; keep site tcid jcd&yr.aa&sev. ; proc sort;by site tcid;run; %mend; %adult (gr=7, yr=8 ,sev=1); %adult (gr=8, yr=9 ,sev=1); %adult (gr=9, yr=10 ,sev=1); %adult (gr=10, yr=11 ,sev=1); %adult (gr=11, yr=12 ,sev=1); %adult (gr=12, yr=13 ,sev=1); %adult (gr=13, yr=14 ,sev=1); %adult (gr=14, yr=15 ,sev=1); %adult (gr=15, yr=16 ,sev=1); %adult (gr=16, yr=17 ,sev=1); %adult (gr=7, yr=8 ,sev=2); %adult (gr=8, yr=9 ,sev=2); %adult (gr=9, yr=10 ,sev=2); %adult (gr=10, yr=11 ,sev=2); %adult (gr=11, yr=12 ,sev=2); %adult (gr=12, yr=13 ,sev=2); %adult (gr=13, yr=14 ,sev=2); %adult (gr=14, yr=15 ,sev=2); %adult (gr=15, yr=16 ,sev=2); %adult (gr=16, yr=17 ,sev=2); %adult (gr=7, yr=8 ,sev=3); %adult (gr=8, yr=9 ,sev=3); %adult (gr=9, yr=10 ,sev=3); %adult (gr=10, yr=11 ,sev=3); %adult (gr=11, yr=12 ,sev=3); %adult (gr=12, yr=13 ,sev=3); %adult (gr=13, yr=14 ,sev=3); %adult (gr=14, yr=15 ,sev=3); %adult (gr=15, yr=16 ,sev=3); %adult (gr=16, yr=17 ,sev=3); %adult (gr=7, yr=8 ,sev=4); %adult (gr=8, yr=9 ,sev=4); %adult (gr=9, yr=10 ,sev=4); %adult (gr=10, yr=11 ,sev=4); %adult (gr=11, yr=12 ,sev=4); %adult (gr=12, yr=13 ,sev=4); %adult (gr=13, yr=14 ,sev=4); %adult (gr=14, yr=15 ,sev=4); %adult (gr=15, yr=16 ,sev=4); %adult (gr=16, yr=17 ,sev=4); %adult (gr=7, yr=8 ,sev=5); %adult (gr=8, yr=9 ,sev=5); %adult (gr=9, yr=10 ,sev=5); %adult (gr=10, yr=11 ,sev=5); %adult (gr=11, yr=12 ,sev=5); %adult (gr=12, yr=13 ,sev=5); %adult (gr=13, yr=14 ,sev=5); %adult (gr=14, yr=15 ,sev=5); %adult (gr=15, yr=16 ,sev=5); %adult (gr=16, yr=17 ,sev=5); %macro juven (gr=, yr=, sev=); proc means data=most_sev_offense noprint; by site tcid; where grade=&gr. and sev=&sev. and jcd6 ne "adult"; var c ; output out=juven&sev._&yr. sum=jcd&yr.ja&sev. ; run; data juven&sev._&yr.; set juven&sev._&yr. ; label jcd&yr.ja&sev.="Number of Sev&sev. juven Arrests in Yr&yr." ; keep site tcid jcd&yr.ja&sev.; proc sort;by site tcid;run; %mend; %juven (gr=7, yr=8 ,sev=1); %juven (gr=8, yr=9 ,sev=1); %juven (gr=9, yr=10 ,sev=1); %juven (gr=10, yr=11 ,sev=1); %juven (gr=11, yr=12 ,sev=1); %juven (gr=12, yr=13 ,sev=1); %juven (gr=13, yr=14 ,sev=1); %juven (gr=14, yr=15 ,sev=1); %juven (gr=15, yr=16 ,sev=1); %juven (gr=16, yr=17 ,sev=1); %juven (gr=7, yr=8 ,sev=2); %juven (gr=8, yr=9 ,sev=2); %juven (gr=9, yr=10 ,sev=2); %juven (gr=10, yr=11 ,sev=2); %juven (gr=11, yr=12 ,sev=2); %juven (gr=12, yr=13 ,sev=2); %juven (gr=13, yr=14 ,sev=2); %juven (gr=14, yr=15 ,sev=2); %juven (gr=15, yr=16 ,sev=2); %juven (gr=16, yr=17 ,sev=2); %juven (gr=7, yr=8 ,sev=3); %juven (gr=8, yr=9 ,sev=3); %juven (gr=9, yr=10 ,sev=3); %juven (gr=10, yr=11 ,sev=3); %juven (gr=11, yr=12 ,sev=3); %juven (gr=12, yr=13 ,sev=3); %juven (gr=13, yr=14 ,sev=3); %juven (gr=14, yr=15 ,sev=3); %juven (gr=15, yr=16 ,sev=3); %juven (gr=16, yr=17 ,sev=3); %juven (gr=7, yr=8 ,sev=4); %juven (gr=8, yr=9 ,sev=4); %juven (gr=9, yr=10 ,sev=4); %juven (gr=10, yr=11 ,sev=4); %juven (gr=11, yr=12 ,sev=4); %juven (gr=12, yr=13 ,sev=4); %juven (gr=13, yr=14 ,sev=4); %juven (gr=14, yr=15 ,sev=4); %juven (gr=15, yr=16 ,sev=4); %juven (gr=16, yr=17 ,sev=4); %juven (gr=7, yr=8 ,sev=5); %juven (gr=8, yr=9 ,sev=5); %juven (gr=9, yr=10 ,sev=5); %juven (gr=10, yr=11 ,sev=5); %juven (gr=11, yr=12 ,sev=5); %juven (gr=12, yr=13 ,sev=5); %juven (gr=13, yr=14 ,sev=5); %juven (gr=14, yr=15 ,sev=5); %juven (gr=15, yr=16 ,sev=5); %juven (gr=16, yr=17 ,sev=5); data missing; set sasin.missing; run; proc sort;by site tcid;run; data all_index; merge key (in=in1) juven1_7 juven1_8 juven1_9 juven1_10 juven1_11 juven1_12 juven1_13 juven1_14 juven1_15 juven1_16 juven1_17 juven2_7 juven2_8 juven2_9 juven2_10 juven2_11 juven2_12 juven2_13 juven2_14 juven2_15 juven2_16 juven2_17 juven3_7 juven3_8 juven3_9 juven3_10 juven3_11 juven3_12 juven3_13 juven3_14 juven3_15 juven3_16 juven3_17 juven4_7 juven4_8 juven4_9 juven4_10 juven4_11 juven4_12 juven4_13 juven4_14 juven4_15 juven4_16 juven4_17 juven5_7 juven5_8 juven5_9 juven5_10 juven5_11 juven5_12 juven5_13 juven5_14 juven5_15 juven5_16 juven5_17 adult1_7 adult1_8 adult1_9 adult1_10 adult1_11 adult1_12 adult1_13 adult1_14 adult1_15 adult1_16 adult1_17 adult2_7 adult2_8 adult2_9 adult2_10 adult2_11 adult2_12 adult2_13 adult2_14 adult2_15 adult2_16 adult2_17 adult3_7 adult3_8 adult3_9 adult3_10 adult3_11 adult3_12 adult3_13 adult3_14 adult3_15 adult3_16 adult3_17 adult4_7 adult4_8 adult4_9 adult4_10 adult4_11 adult4_12 adult4_13 adult4_14 adult4_15 adult4_16 adult4_17 adult5_7 adult5_8 adult5_9 adult5_10 adult5_11 adult5_12 adult5_13 adult5_14 adult5_15 adult5_16 adult5_17 missing ; by site tcid; if in1; array one (*) jcd7jl1 jcd7jl2 jcd7jl3 jcd7jl4 jcd7jl5 jcd8ja1 jcd8ja2 jcd8ja3 jcd8ja4 jcd8ja5 jcd9ja1 jcd9ja2 jcd9ja3 jcd9ja4 jcd9ja5 jcd10ja1 jcd10ja2 jcd10ja3 jcd10ja4 jcd10ja5 jcd11ja1 jcd11ja2 jcd11ja3 jcd11ja4 jcd11ja5 jcd12ja1 jcd12ja2 jcd12ja3 jcd12ja4 jcd12ja5 jcd13ja1 jcd13ja2 jcd13ja3 jcd13ja4 jcd13ja5 jcd14ja1 jcd14ja2 jcd14ja3 jcd14ja4 jcd14ja5 jcd15ja1 jcd15ja2 jcd15ja3 jcd15ja4 jcd15ja5 jcd16ja1 jcd16ja2 jcd16ja3 jcd16ja4 jcd16ja5 jcd17ja1 jcd17ja2 jcd17ja3 jcd17ja4 jcd17ja5 jcd7al1 jcd7al2 jcd7al3 jcd7al4 jcd7al5 jcd8aa1 jcd8aa2 jcd8aa3 jcd8aa4 jcd8aa5 jcd9aa1 jcd9aa2 jcd9aa3 jcd9aa4 jcd9aa5 jcd10aa1 jcd10aa2 jcd10aa3 jcd10aa4 jcd10aa5 jcd11aa1 jcd11aa2 jcd11aa3 jcd11aa4 jcd11aa5 jcd12aa1 jcd12aa2 jcd12aa3 jcd12aa4 jcd12aa5 jcd13aa1 jcd13aa2 jcd13aa3 jcd13aa4 jcd13aa5 jcd14aa1 jcd14aa2 jcd14aa3 jcd14aa4 jcd14aa5 jcd15aa1 jcd15aa2 jcd15aa3 jcd15aa4 jcd15aa5 jcd16aa1 jcd16aa2 jcd16aa3 jcd16aa4 jcd16aa5 jcd17aa1 jcd17aa2 jcd17aa3 jcd17aa4 jcd17aa5 ; do i=1 to dim(one); if one(i)=. then one(i)=0; end; jcd8al1 =jcd7al1+jcd8aa1; jcd9al1 =jcd8al1+jcd9aa1; jcd10al1 =jcd9al1+jcd10aa1; jcd11al1 =jcd10al1+jcd11aa1; jcd12al1 =jcd11al1+jcd12aa1; jcd13al1 =jcd12al1+jcd13aa1; jcd14al1 =jcd13al1+jcd14aa1; jcd15al1 =jcd14al1+jcd15aa1; jcd16al1 =jcd15al1+jcd16aa1; jcd17al1 =jcd16al1+jcd17aa1; jcd8al2 =jcd7al2+jcd8aa2; jcd9al2 =jcd8al2+jcd9aa2; jcd10al2 =jcd9al2+jcd10aa2; jcd11al2 =jcd10al2+jcd11aa2; jcd12al2 =jcd11al2+jcd12aa2; jcd13al2 =jcd12al2+jcd13aa2; jcd14al2 =jcd13al2+jcd14aa2; jcd15al2 =jcd14al2+jcd15aa2; jcd16al2 =jcd15al2+jcd16aa2; jcd17al2 =jcd16al2+jcd17aa2; jcd8al3 =jcd7al3+jcd8aa3; jcd9al3 =jcd8al3+jcd9aa3; jcd10al3 =jcd9al3+jcd10aa3; jcd11al3 =jcd10al3+jcd11aa3; jcd12al3 =jcd11al3+jcd12aa3; jcd13al3 =jcd12al3+jcd13aa3; jcd14al3 =jcd13al3+jcd14aa3; jcd15al3 =jcd14al3+jcd15aa3; jcd16al3 =jcd15al3+jcd16aa3; jcd17al3 =jcd16al3+jcd17aa3; jcd8al4 =jcd7al4+jcd8aa4; jcd9al4 =jcd8al4+jcd9aa4; jcd10al4 =jcd9al4+jcd10aa4; jcd11al4 =jcd10al4+jcd11aa4; jcd12al4 =jcd11al4+jcd12aa4; jcd13al4 =jcd12al4+jcd13aa4; jcd14al4 =jcd13al4+jcd14aa4; jcd15al4 =jcd14al4+jcd15aa4; jcd16al4 =jcd15al4+jcd16aa4; jcd17al4 =jcd16al4+jcd17aa4; jcd8al5 =jcd7al5+jcd8aa5; jcd9al5 =jcd8al5+jcd9aa5; jcd10al5 =jcd9al5+jcd10aa5; jcd11al5 =jcd10al5+jcd11aa5; jcd12al5 =jcd11al5+jcd12aa5; jcd13al5 =jcd12al5+jcd13aa5; jcd14al5 =jcd13al5+jcd14aa5; jcd15al5 =jcd14al5+jcd15aa5; jcd16al5 =jcd15al5+jcd16aa5; jcd17al5 =jcd16al5+jcd17aa5; jcd8jl1 =jcd7jl1+jcd8ja1; jcd9jl1 =jcd8jl1+jcd9ja1; jcd10jl1 =jcd9jl1+jcd10ja1; jcd11jl1 =jcd10jl1+jcd11ja1; jcd12jl1 =jcd11jl1+jcd12ja1; jcd13jl1 =jcd12jl1+jcd13ja1; jcd8jl2 =jcd7jl2+jcd8ja2; jcd9jl2 =jcd8jl2+jcd9ja2; jcd10jl2 =jcd9jl2+jcd10ja2; jcd11jl2 =jcd10jl2+jcd11ja2; jcd12jl2 =jcd11jl2+jcd12ja2; jcd13jl2 =jcd12jl2+jcd13ja2; jcd8jl3 =jcd7jl3+jcd8ja3; jcd9jl3 =jcd8jl3+jcd9ja3; jcd10jl3 =jcd9jl3+jcd10ja3; jcd11jl3 =jcd10jl3+jcd11ja3; jcd12jl3 =jcd11jl3+jcd12ja3; jcd13jl3 =jcd12jl3+jcd13ja3; jcd8jl4 =jcd7jl4+jcd8ja4; jcd9jl4 =jcd8jl4+jcd9ja4; jcd10jl4 =jcd9jl4+jcd10ja4; jcd11jl4 =jcd10jl4+jcd11ja4; jcd12jl4 =jcd11jl4+jcd12ja4; jcd13jl4 =jcd12jl4+jcd13ja4; jcd8jl5 =jcd7jl5+jcd8ja5; jcd9jl5 =jcd8jl5+jcd9ja5; jcd10jl5 =jcd9jl5+jcd10ja5; jcd11jl5 =jcd10jl5+jcd11ja5; jcd12jl5 =jcd11jl5+jcd12ja5; jcd13jl5 =jcd12jl5+jcd13ja5; jcd8jix=jcd8ja1+(jcd8ja2*2)+(jcd8ja3*3)+ (jcd8ja4*4)+(jcd8ja5*5); jcd9jix=jcd9ja1+(jcd9ja2*2)+(jcd9ja3*3)+ (jcd9ja4*4)+(jcd9ja5*5); jcd10jix=jcd10ja1+(jcd10ja2*2)+(jcd10ja3*3)+ (jcd10ja4*4)+(jcd10ja5*5); jcd11jix=jcd11ja1+(jcd11ja2*2)+(jcd11ja3*3)+ (jcd11ja4*4)+(jcd11ja5*5); jcd12jix=jcd12ja1+(jcd12ja2*2)+(jcd12ja3*3)+ (jcd12ja4*4)+(jcd12ja5*5); jcd13jix=jcd13ja1+(jcd13ja2*2)+(jcd13ja3*3)+ (jcd13ja4*4)+(jcd13ja5*5); jcd7jil=jcd7jl1+(jcd7jl2*2)+(jcd7jl3*3)+ (jcd7jl4*4)+(jcd7jl5*5); jcd8jil=jcd8jl1+(jcd8jl2*2)+(jcd8jl3*3)+ (jcd8jl4*4)+(jcd8jl5*5); jcd9jil=jcd9jl1+(jcd9jl2*2)+(jcd9jl3*3)+ (jcd9jl4*4)+(jcd9jl5*5); jcd10jil=jcd10jl1+(jcd10jl2*2)+(jcd10jl3*3)+ (jcd10jl4*4)+(jcd10jl5*5); jcd11jil=jcd11jl1+(jcd11jl2*2)+(jcd11jl3*3)+ (jcd11jl4*4)+(jcd11jl5*5); jcd12jil=jcd12jl1+(jcd12jl2*2)+(jcd12jl3*3)+ (jcd12jl4*4)+(jcd12jl5*5); jcd13jil=jcd13jl1+(jcd13jl2*2)+(jcd13jl3*3)+ (jcd13jl4*4)+(jcd13jl5*5); jcd8aix=jcd8aa1+(jcd8aa2*2)+(jcd8aa3*3)+ (jcd8aa4*4)+(jcd8aa5*5); jcd9aix=jcd9aa1+(jcd9aa2*2)+(jcd9aa3*3)+ (jcd9aa4*4)+(jcd9aa5*5); jcd10aix=jcd10aa1+(jcd10aa2*2)+(jcd10aa3*3)+ (jcd10aa4*4)+(jcd10aa5*5); jcd11aix=jcd11aa1+(jcd11aa2*2)+(jcd11aa3*3)+ (jcd11aa4*4)+(jcd11aa5*5); jcd12aix=jcd12aa1+(jcd12aa2*2)+(jcd12aa3*3)+ (jcd12aa4*4)+(jcd12aa5*5); jcd13aix=jcd13aa1+(jcd13aa2*2)+(jcd13aa3*3)+ (jcd13aa4*4)+(jcd13aa5*5); jcd14aix=jcd14aa1+(jcd14aa2*2)+(jcd14aa3*3)+ (jcd14aa4*4)+(jcd14aa5*5); jcd15aix=jcd15aa1+(jcd15aa2*2)+(jcd15aa3*3)+ (jcd15aa4*4)+(jcd15aa5*5); jcd16aix=jcd16aa1+(jcd16aa2*2)+(jcd16aa3*3)+ (jcd16aa4*4)+(jcd16aa5*5); jcd17aix=jcd17aa1+(jcd17aa2*2)+(jcd17aa3*3)+ (jcd17aa4*4)+(jcd17aa5*5); jcd7ail=jcd7al1+(jcd7al2*2)+(jcd7al3*3)+ (jcd7al4*4)+(jcd7al5*5); jcd8ail=jcd8al1+(jcd8al2*2)+(jcd8al3*3)+ (jcd8al4*4)+(jcd8al5*5); jcd9ail=jcd9al1+(jcd9al2*2)+(jcd9al3*3)+ (jcd9al4*4)+(jcd9al5*5); jcd10ail=jcd10al1+(jcd10al2*2)+(jcd10al3*3)+ (jcd10al4*4)+(jcd10al5*5); jcd11ail=jcd11al1+(jcd11al2*2)+(jcd11al3*3)+ (jcd11al4*4)+(jcd11al5*5); jcd12ail=jcd12al1+(jcd12al2*2)+(jcd12al3*3)+ (jcd12al4*4)+(jcd12al5*5); jcd13ail=jcd13al1+(jcd13al2*2)+(jcd13al3*3)+ (jcd13al4*4)+(jcd13al5*5); jcd14ail=jcd14al1+(jcd14al2*2)+(jcd14al3*3)+ (jcd14al4*4)+(jcd14al5*5); jcd15ail=jcd15al1+(jcd15al2*2)+(jcd15al3*3)+ (jcd15al4*4)+(jcd15al5*5); jcd16ail=jcd16al1+(jcd16al2*2)+(jcd16al3*3)+ (jcd16al4*4)+(jcd16al5*5); jcd17ail=jcd17al1+(jcd17al2*2)+(jcd17al3*3)+ (jcd17al4*4)+(jcd17al5*5); if cohort="2" then do; jcd17aa1=.; jcd17aa2=.; jcd17aa3=.; jcd17aa4=.; jcd17aa5=.; jcd17al1=.; jcd17al2=.; jcd17al3=.; jcd17al4=.; jcd17al5=.; jcd17ja1=.; jcd17ja2=.; jcd17ja3=.; jcd17ja4=.; jcd17ja5=.; jcd17aix=.;jcd17ail=.;end; if cohort="3" then do; jcd16aa1=.; jcd16aa2=.; jcd16aa3=.; jcd16aa4=.; jcd16aa5=.; jcd16al1=.; jcd16al2=.; jcd16al3=.; jcd16al4=.; jcd16al5=.; jcd16ja1=.; jcd16ja2=.; jcd16ja3=.; jcd16ja4=.; jcd16ja5=.; jcd16aix=.; jcd16ail=.; jcd17aa1=.; jcd17aa2=.; jcd17aa3=.; jcd17aa4=.; jcd17aa5=.; jcd17al1=.; jcd17al2=.; jcd17al3=.; jcd17al4=.; jcd17al5=.; jcd17ja1=.; jcd17ja2=.; jcd17ja3=.; jcd17ja4=.; jcd17ja5=.; jcd17aix=.;jcd17ail=.; end; if miss_gr6=1 then do;jcd7jl1=.; jcd7jl2=.; jcd7jl3=.; jcd7jl4=.; jcd7jl5=.;jcd7jil=.; jcd8jl1=.; jcd8jl2=.; jcd8jl3=.; jcd8jl4=.; jcd8jl5=.;jcd8jil=.; jcd9jl1=.; jcd9jl2=.; jcd9jl3=.; jcd9jl4=.; jcd9jl5=.;jcd9jil=.; jcd10jl1=.; jcd10jl2=.; jcd10jl3=.; jcd10jl4=.; jcd10jl5=.;jcd10jil=.; jcd11jl1=.; jcd11jl2=.; jcd11jl3=.; jcd11jl4=.; jcd11jl5=.;jcd11jil=.; jcd12jl1=.; jcd12jl2=.; jcd12jl3=.; jcd12jl4=.; jcd12jl5=.;jcd12jil=.; jcd13jl1=.; jcd13jl2=.; jcd13jl3=.; jcd13jl4=.; jcd13jl5=.;jcd13jil=.; end; if miss_gr7=1 then do;jcd8ja1=.; jcd8ja2=.; jcd8ja3=.; jcd8ja4=.; jcd8ja5=.;jcd8jix=.; jcd8jl1=.; jcd8jl2=.; jcd8jl3=.; jcd8jl4=.; jcd8jl5=.;jcd8jil=.; jcd9jl1=.; jcd9jl2=.; jcd9jl3=.; jcd9jl4=.; jcd9jl5=.;jcd9jil=.; jcd10jl1=.; jcd10jl2=.; jcd10jl3=.; jcd10jl4=.; jcd10jl5=.;jcd10jil=.; jcd11jl1=.; jcd11jl2=.; jcd11jl3=.; jcd11jl4=.; jcd11jl5=.;jcd11jil=.; jcd12jl1=.; jcd12jl2=.; jcd12jl3=.; jcd12jl4=.; jcd12jl5=.;jcd12jil=.; jcd13jl1=.; jcd13jl2=.; jcd13jl3=.; jcd13jl4=.; jcd13jl5=.;jcd13jil=.; end; if miss_gr8=1 then do;jcd9ja1=.; jcd9ja2=.; jcd9ja3=.; jcd9ja4=.; jcd9ja5=.;jcd9jix=.; jcd9jl1=.; jcd9jl2=.; jcd9jl3=.; jcd9jl4=.; jcd9jl5=.;jcd9jil=.; jcd10jl1=.; jcd10jl2=.; jcd10jl3=.; jcd10jl4=.; jcd10jl5=.;jcd10jil=.; jcd11jl1=.; jcd11jl2=.; jcd11jl3=.; jcd11jl4=.; jcd11jl5=.;jcd11jil=.; jcd12jl1=.; jcd12jl2=.; jcd12jl3=.; jcd12jl4=.; jcd12jl5=.;jcd12jil=.; jcd13jl1=.; jcd13jl2=.; jcd13jl3=.; jcd13jl4=.; jcd13jl5=.;jcd13jil=.; end; if miss_gr9=1 then do;jcd10ja1=.; jcd10ja2=.; jcd10ja3=.; jcd10ja4=.; jcd10ja5=.;jcd10jix=.; jcd10jl1=.; jcd10jl2=.; jcd10jl3=.; jcd10jl4=.; jcd10jl5=.;jcd10jil=.; jcd11jl1=.; jcd11jl2=.; jcd11jl3=.; jcd11jl4=.; jcd11jl5=.;jcd11jil=.; jcd12jl1=.; jcd12jl2=.; jcd12jl3=.; jcd12jl4=.; jcd12jl5=.;jcd12jil=.; jcd13jl1=.; jcd13jl2=.; jcd13jl3=.; jcd13jl4=.; jcd13jl5=.;jcd13jil=.; end; if miss_gr10=1 then do;jcd11ja1=.; jcd11ja2=.; jcd11ja3=.; jcd11ja4=.; jcd11ja5=.;jcd11jix=.; jcd11jl1=.; jcd11jl2=.; jcd11jl3=.; jcd11jl4=.; jcd11jl5=.;jcd11jil=.; jcd12jl1=.; jcd12jl2=.; jcd12jl3=.; jcd12jl4=.; jcd12jl5=.;jcd12jil=.; jcd13jl1=.; jcd13jl2=.; jcd13jl3=.; jcd13jl4=.; jcd13jl5=.;jcd13jil=.; end; if miss_gr11=1 then do;jcd12ja1=.; jcd12ja2=.; jcd12ja3=.; jcd12ja4=.; jcd12ja5=.;jcd12jix=.; jcd12jl1=.; jcd12jl2=.; jcd12jl3=.; jcd12jl4=.; jcd12jl5=.;jcd12jil=.; jcd13jl1=.; jcd13jl2=.; jcd13jl3=.; jcd13jl4=.; jcd13jl5=.;jcd13jil=.; end; if miss_gr12=1 then do;jcd13ja1=.; jcd13ja2=.; jcd13ja3=.; jcd13ja4=.; jcd13ja5=.;jcd13jix=.; jcd13jl1=.; jcd13jl2=.; jcd13jl3=.; jcd13jl4=.; jcd13jl5=.;jcd13jil=.; end; label jcd8jix="Sev Wgted Juvenile Arrest Index Yr8" jcd9jix="Sev Wgted Juvenile Arrest Index Yr9" jcd10jix="Sev Wgted Juvenile Arrest Index Yr10" jcd11jix="Sev Wgted Juvenile Arrest Index Yr11" jcd12jix="Sev Wgted Juvenile Arrest Index Yr12" jcd13jix="Sev Wgted Juvenile Arrest Index Yr13" jcd7jil="Lifetime Sev Wgted Juvenile Arrest Index Yr7" jcd8jil="Lifetime Sev Wgted Juvenile Arrest Index Yr8" jcd9jil="Lifetime Sev Wgted Juvenile Arrest Index Yr9" jcd10jil="Lifetime Sev Wgted Juvenile Arrest Index Yr10" jcd11jil="Lifetime Sev Wgted Juvenile Arrest Index Yr11" jcd12jil="Lifetime Sev Wgted Juvenile Arrest Index Yr12" jcd13jil="Lifetime Sev Wgted Juvenile Arrest Index Yr13" jcd8aix="Sev Wgted Adult Arrest Index Yr8" jcd9aix="Sev Wgted Adult Arrest Index Yr9" jcd10aix="Sev Wgted Adult Arrest Index Yr10" jcd11aix="Sev Wgted Adult Arrest Index Yr11" jcd12aix="Sev Wgted Adult Arrest Index Yr12" jcd13aix="Sev Wgted Adult Arrest Index Yr13" jcd14aix="Sev Wgted Adult Arrest Index Yr14" jcd15aix="Sev Wgted Adult Arrest Index Yr15" jcd16aix="Sev Wgted Adult Arrest Index Yr16" jcd17aix="Sev Wgted Adult Arrest Index Yr17" jcd7ail="Lifetime Sev Wgted Adult Arrest Index Yr7" jcd8ail="Lifetime Sev Wgted Adult Arrest Index Yr8" jcd9ail="Lifetime Sev Wgted Adult Arrest Index Yr9" jcd10ail="Lifetime Sev Wgted Adult Arrest Index Yr10" jcd11ail="Lifetime Sev Wgted Adult Arrest Index Yr11" jcd12ail="Lifetime Sev Wgted Adult Arrest Index Yr12" jcd13ail="Lifetime Sev Wgted Adult Arrest Index Yr13" jcd14ail="Lifetime Sev Wgted Adult Arrest Index Yr14" jcd15ail="Lifetime Sev Wgted Adult Arrest Index Yr15" jcd16ail="Lifetime Sev Wgted Adult Arrest Index Yr16" jcd17ail="Lifetime Sev Wgted Adult Arrest Index Yr17" jcd8al1 ="Lifetime Sev 1 Adult Arrests Yr8" jcd9al1 ="Lifetime Sev 1 Adult Arrests Yr9" jcd10al1 ="Lifetime Sev 1 Adult Arrests Yr10" jcd11al1 ="Lifetime Sev 1 Adult Arrests Yr11" jcd12al1 ="Lifetime Sev 1 Adult Arrests Yr12" jcd13al1 ="Lifetime Sev 1 Adult Arrests Yr13" jcd14al1 ="Lifetime Sev 1 Adult Arrests Yr14" jcd15al1 ="Lifetime Sev 1 Adult Arrests Yr15" jcd16al1 ="Lifetime Sev 1 Adult Arrests Yr16" jcd17al1 ="Lifetime Sev 1 Adult Arrests Yr17" jcd8al2 ="Lifetime Sev 2 Adult Arrests Yr8" jcd9al2 ="Lifetime Sev 2 Adult Arrests Yr9" jcd10al2 ="Lifetime Sev 2 Adult Arrests Yr10" jcd11al2 ="Lifetime Sev 2 Adult Arrests Yr11" jcd12al2 ="Lifetime Sev 2 Adult Arrests Yr12" jcd13al2 ="Lifetime Sev 2 Adult Arrests Yr13" jcd14al2 ="Lifetime Sev 2 Adult Arrests Yr14" jcd15al2 ="Lifetime Sev 2 Adult Arrests Yr15" jcd16al2 ="Lifetime Sev 2 Adult Arrests Yr16" jcd17al2 ="Lifetime Sev 2 Adult Arrests Yr17" jcd8al3 ="Lifetime Sev 3 Adult Arrests Yr8" jcd9al3 ="Lifetime Sev 3 Adult Arrests Yr9" jcd10al3 ="Lifetime Sev 3 Adult Arrests Yr10" jcd11al3 ="Lifetime Sev 3 Adult Arrests Yr11" jcd12al3 ="Lifetime Sev 3 Adult Arrests Yr12" jcd13al3 ="Lifetime Sev 3 Adult Arrests Yr13" jcd14al3 ="Lifetime Sev 3 Adult Arrests Yr14" jcd15al3 ="Lifetime Sev 3 Adult Arrests Yr15" jcd16al3 ="Lifetime Sev 3 Adult Arrests Yr16" jcd17al3 ="Lifetime Sev 3 Adult Arrests Yr17" jcd8al4 ="Lifetime Sev 4 Adult Arrests Yr8" jcd9al4 ="Lifetime Sev 4 Adult Arrests Yr9" jcd10al4 ="Lifetime Sev 4 Adult Arrests Yr10" jcd11al4 ="Lifetime Sev 4 Adult Arrests Yr11" jcd12al4 ="Lifetime Sev 4 Adult Arrests Yr12" jcd13al4 ="Lifetime Sev 4 Adult Arrests Yr13" jcd14al4 ="Lifetime Sev 4 Adult Arrests Yr14" jcd15al4 ="Lifetime Sev 4 Adult Arrests Yr15" jcd16al4 ="Lifetime Sev 4 Adult Arrests Yr16" jcd17al4 ="Lifetime Sev 4 Adult Arrests Yr17" jcd8al5 ="Lifetime Sev 5 Adult Arrests Yr8" jcd9al5 ="Lifetime Sev 5 Adult Arrests Yr9" jcd10al5 ="Lifetime Sev 5 Adult Arrests Yr10" jcd11al5 ="Lifetime Sev 5 Adult Arrests Yr11" jcd12al5 ="Lifetime Sev 5 Adult Arrests Yr12" jcd13al5 ="Lifetime Sev 5 Adult Arrests Yr13" jcd14al5 ="Lifetime Sev 5 Adult Arrests Yr14" jcd15al5 ="Lifetime Sev 5 Adult Arrests Yr15" jcd16al5 ="Lifetime Sev 5 Adult Arrests Yr16" jcd17al5 ="Lifetime Sev 5 Adult Arrests Yr17" jcd8jl1 ="Lifetime Sev 1 Juvenile Arrests Yr8" jcd9jl1 ="Lifetime Sev 1 Juvenile Arrests Yr9" jcd10jl1 ="Lifetime Sev 1 Juvenile Arrests Yr10" jcd11jl1 ="Lifetime Sev 1 Juvenile Arrests Yr11" jcd12jl1 ="Lifetime Sev 1 Juvenile Arrests Yr12" jcd13jl1 ="Lifetime Sev 1 Juvenile Arrests Yr13" jcd8jl2 ="Lifetime Sev 2 Juvenile Arrests Yr8" jcd9jl2 ="Lifetime Sev 2 Juvenile Arrests Yr9" jcd10jl2 ="Lifetime Sev 2 Juvenile Arrests Yr10" jcd11jl2 ="Lifetime Sev 2 Juvenile Arrests Yr11" jcd12jl2 ="Lifetime Sev 2 Juvenile Arrests Yr12" jcd13jl2 ="Lifetime Sev 2 Juvenile Arrests Yr13" jcd8jl3 ="Lifetime Sev 3 Juvenile Arrests Yr8" jcd9jl3 ="Lifetime Sev 3 Juvenile Arrests Yr9" jcd10jl3 ="Lifetime Sev 3 Juvenile Arrests Yr10" jcd11jl3 ="Lifetime Sev 3 Juvenile Arrests Yr11" jcd12jl3 ="Lifetime Sev 3 Juvenile Arrests Yr12" jcd13jl3 ="Lifetime Sev 3 Juvenile Arrests Yr13" jcd8jl4 ="Lifetime Sev 4 Juvenile Arrests Yr8" jcd9jl4 ="Lifetime Sev 4 Juvenile Arrests Yr9" jcd10jl4 ="Lifetime Sev 4 Juvenile Arrests Yr10" jcd11jl4 ="Lifetime Sev 4 Juvenile Arrests Yr11" jcd12jl4 ="Lifetime Sev 4 Juvenile Arrests Yr12" jcd13jl4 ="Lifetime Sev 4 Juvenile Arrests Yr13" jcd8jl5 ="Lifetime Sev 5 Juvenile Arrests Yr8" jcd9jl5 ="Lifetime Sev 5 Juvenile Arrests Yr9" jcd10jl5 ="Lifetime Sev 5 Juvenile Arrests Yr10" jcd11jl5 ="Lifetime Sev 5 Juvenile Arrests Yr11" jcd12jl5 ="Lifetime Sev 5 Juvenile Arrests Yr12" jcd13jl5 ="Lifetime Sev 5 Juvenile Arrests Yr13" ; drop jcd14ja1 jcd14ja2 jcd14ja3 jcd14ja4 jcd14ja5 jcd15ja1 jcd15ja2 jcd15ja3 jcd15ja4 jcd15ja5 jcd16ja1 jcd16ja2 jcd16ja3 jcd16ja4 jcd16ja5 jcd17ja1 jcd17ja2 jcd17ja3 jcd17ja4 jcd17ja5 i; run; data all_index2; set all_index; drop miss_gr6-miss_gr12; run; proc sort;by site tcid; data sasin.jcd; set all_index2; run;