﻿* Encoding: UTF-8.

*Indice de Percepción de Garantía.

DATASET ACTIVATE ConjuntoDatos1.
RECODE T_P_8_7 T_P_8_9 (1=4) (2=3) (3=2) (4=1) (ELSE=SYSMIS) INTO P8_7REC P8_9REC.
VARIABLE LABELS  P8_7REC 'P8_7 REC' /P8_9REC 'P8_9REC'.
EXECUTE.

COMPUTE In_Garantía=(T_P_8_1 + T_P_8_2 + T_P_8_3 + T_P_8_4 + T_P_8_5 + T_P_8_6 + P8_7REC + P8_9REC).    
EXECUTE.

COMPUTE In_Garantía=(In_Garantía*100)/32.
EXECUTE.

* Agrupación visual.
*In_Garantía.
RECODE  In_Garantía (MISSING=COPY) (LO THRU 50=1) (LO THRU 59.375=2) (LO THRU HI=3) (ELSE=SYSMIS) 
    INTO Indice_PGarantía.
VARIABLE LABELS  Indice_PGarantía 'Indice de Percepción de Garantía'.
FORMATS  Indice_PGarantía (F5.0).
VALUE LABELS  Indice_PGarantía 1 'Baja Garantía' 2 'Garantía Media' 3 'Alta Garantía'.
VARIABLE LEVEL  Indice_PGarantía (ORDINAL).
EXECUTE.

*Indice vulneración de Instituciones

COMPUTE In_Vul_Inst=(T_P_20_1_1 + T_P_20_1_3 + T_P_20_1_4 + T_P_20_2_1 + T_P_20_2_2).
EXECUTE.

COMPUTE In_Vul_Inst=(In_Vul_Inst*100)/30.
EXECUTE.

* Agrupación visual.
*In_Vul_Inst.
RECODE  In_Vul_Inst (MISSING=COPY) (LO THRU 16.6666666666667=1) (LO THRU 20=2) (LO THRU HI=3) 
    (ELSE=SYSMIS) INTO Indice_Vul_Institu.
VARIABLE LABELS  Indice_Vul_Institu 'Indice de Vulneración de Instituciones'.
FORMATS  Indice_Vul_Institu (F5.0).
VALUE LABELS  Indice_Vul_Institu 1 'Baja vulneración' 2 'Vulneración media' 3 'Alta vulneración'.
VARIABLE LEVEL  Indice_Vul_Institu (ORDINAL).
EXECUTE.

*Indice permisividad violencia genero

COMPUTE Ind_Permi=(T_P_18_1 + T_P_18_2 + T_P_18_3 + T_P_18_4 + T_P_18_5).
EXECUTE.

COMPUTE Ind_Permis=(Ind_Permi*100)/20.
EXECUTE.

* Agrupación visual.
*Ind_Permis.
RECODE  Ind_Permis (MISSING=COPY) (LO THRU 55=1) (LO THRU 70=2) (LO THRU HI=3) (ELSE=SYSMIS) INTO 
    Ind_P_Viogen.
VARIABLE LABELS  Ind_P_Viogen 'Indice de permisividad violencia de genero'.
FORMATS  Ind_P_Viogen (F5.0).
VALUE LABELS  Ind_P_Viogen 1 'Bajo' 2 'Medio' 3 'Alto'.
VARIABLE LEVEL  Ind_P_Viogen (ORDINAL).
EXECUTE.




