*--------------------------------------------------------------------------------------------- desc ***************************Potential Y-vars******************************** /* Response - if PF even responded Right_Data - gave us right data Unsuitable_Data Refusal - if refusal to share (=0 if two out of three requests granted) What data was given: Data_Type Data_Ethnicity Data_Nationality (look into this one?) Days_Complete Late */ ***********************Potential X-vars********************************** /* *Total_Population *population structure - Pop* *crime rates - Total_Offences *Police Force funding - Fund_total *Police Force workforce *Officers_All_0316 *PoliceStaff_0316 *PCSO_0316 *BME_Police_Total *BME_PCOS_Total *Total_Admin *migration flows - Foreign_Mig_In, Foreign_Mig_Out, Internal_Mig_in, Internal_Mid_Out *migrant stock - NonUK_Born, UK_born *info on continent of birth *ethnic composition - White Mixed Asian Black Other_Ethnic *religion - Christian, Buddhist, Hindu, Jewish, Muslim, Sikh, other_rel, no_rel, no_info_rel *economic activity - NSSEC* / dinc_head / unem_rate_1664 */ *---------------------------------------------------------------------------------------------- *If all three requests we made were granted (i.e. including data by nationality) gen All_Data=1 if Data_Type==1 & Data_Ethnicity==1 & Data_Nationality==1 replace All_Data=0 if Data_Type==0 | Data_Ethnicity==0 | Data_Nationality==0 *If "Any_Data" was shared gen Any_Data=1 if Data_Type==1 | Data_Ethnicity==1 | Data_Nationality==1 replace Any_Data=0 if Any_Data==. *Total Police Force size bysort PF_no: gen total_police = Officers_All_0316 + PoliceStaff_0316 + PCSO_0316 *Net migration measures bysort PF_no: gen Net_For_Mig = Foreign_Mig_In - Foreign_Mig_Out bysort PF_no: gen Net_Int_Mig = Internal_Mig_In - Internal_Mid_Out *Working age population bysort PF_no: gen Pop_WorkAge = Pop_16_17 + Pop_18_19 + Pop_20_24 + Pop_25_29 + Pop_30_44 + Pop_45_59 + Pop_60_64 *All Police workforce (Officers, Police Staff, PCOS) *Note that Admin is a subgroup of those listed above (singled out as they process FOIs) bysort PF_no: gen total_PF_force = Officers_All_0316 + PoliceStaff_0316 + PCSO_0316 *All ethnic minority within Police Forces bysort PF_no: gen total_PF_ethnic = BME_Police_Total + BME_PCOS_Total *religious, non-Christian population gen Rel_NonC= Buddhist + Hindu + Jewish + Muslim + Sikh + other_rel *Scale some variables by population (i.e. all will be per inhabitant) # delimit ; foreach x in Pop_WorkAge Net_For_Mig Net_Int_Mig Total_Offences NonUK_Born Pop_0_4 Pop_5_7 Pop_8_9 Pop_10_14 Pop_15 Pop_16_17 Pop_18_19 Pop_20_24 Pop_25_29 Pop_30_44 Pop_45_59 Pop_60_64 Pop_65_74 Pop_75_84 Pop_85_89 Pop_90 White Mixed Asian Black Other_Ethnic UK_born RoI_born OtherEurope_born Africa_born Asia_born Amer_Carr_born Antar_born NSSEC_1674_Manag NSSEC_1674_Lman NSSEC_1674_Interm NSSEC_1674_OwnB NSSEC_1674_Lsuperv NSSEC_1674_SemiRoutine NSSEC_1674_Routine NSSEC_1674_Unem Christian Buddhist Hindu Jewish Muslim Sikh other_rel no_rel Rel_NonC Fund_total Officers_All_0316 PoliceStaff_0316 PCSO_0316 Total_Admin total_police HateCrime_14_15 Racist_Incid_14_15{; gen spop_`x'= `x'/Total_Population*100; } ; # delimit cr *Scale new variables for PLOS ONE revision by population (i.e. all will be per inhabitant) # delimit ; foreach x in BME_Police_Male BME_Police_Female BME_Police_Total BME_PCOS_Male BME_PCOS_Female BME_PCOS_Total PCOS_Admin Police_Staff_Admin Police_Officer_Admin Fund_Core Fund_Rule1 Fund_DCLG Fund_LCounTax Violencewithinjury Violencewithoutinjury Vehicleoffences Theftfromtheperson Shoplifting Sexualoffences Robbery Publicorderoffences Possessionofweaponsoffences Nondomesticburglary Homicide Fraudoffences Drugoffences Domesticburglary Criminaldamageandarson Bicycletheft {; gen spop_`x'= `x'/Total_Population*100; } ; # delimit cr *Mixed Asian Black Other_Ethnic *RoI_born OtherEurope_born Africa_born Asia_born Amer_Carr_born Antar_born *Buddhist Hindu Jewish Muslim Sikh *Scale some variables by size of the Police Force workforce foreach y in Total_Offences total_PF_ethnic Total_Admin{ gen spf_`y' = `y'/total_PF_force*100 } *Funding per 10,000 of population gen Fund_total_p10k = spop_Fund_total*100 sum spop* sum spf*