/********************************************************************************************** INSTITUTO NACIONAL PARA LA EVALUACIÓN DE LA EDUCACIÓN DIRECCIÓN GENERAL PARA LA INTEGRACIÓN Y ANÁLISIS DE INFORMACIÓN *********************************************************************************************** NOMBRE DEL PROGRAMA: AR03_PEMn.SAS ----------------------------------------------------------------------------------------------- DESCRIPCIÓN DEL PROGRAMA: Sintaxis utilizada para generar los valores de las tablas del indicador AR03b Se obtienen los valores anuales a precios corrientes y a precios constantes para el periodo 2008-2017. Es importante tener en cuenta que durante este periodo hubo cambios en algunas de las variables utilizadas para los cálculos, por lo tanto, a continuación se presenta un esquema general en donde se indica los años en los que dichas variables son similares. Año Variables | Actividad_Institucional Objeto_del_Gasto Finalidad-funci_n-subfunci_n | Estructura Programática 2008 x x x x 2009 o x x x 2010 o x x x 2011 o o x x 2012 o o o o 2013 o o o o 2014 o o o o 2015 o o o o 2016 o o o o 2017 o o o o Así, por ejemplo, la variable Actividad_Institucional en 2008 permite identificar "Servicios de educación básica y normal en el D.F." dentro del Ramo 25, sin embargo, de 2009 a 2014 dicha variable cambio de tal manera que es posible identificar por separado "Servicios de educación básica en el D.F." y "Servicios de educación normal en el D.F.". En el caso de Objeto_del_Gasto, se encontró que a partir de 2011 cambio el Clasificador por Objeto de Gasto para la Administración Pública Federal, por lo tanto, las claves antes y después de dicho año son distintas. Algo parecido sucedió con las variables Finalidad-funci_n-subfunci_n debido a que a partir de 2012 cambio la Clasificación Funcional. ----------------------------------------------------------------------------------------------- NOMBRE Y DESCRIPCIÓN DE ARCHIVOS DE ENTRADA: 1. Cuenta Pública Federal 2008-2017 (Base de datos anual). SHCP(2018) Unidad: Programa presupuestario (Pp) Descargar bases de http://www.transparenciapresupuestaria.gob.mx/es/PTP/Datos_Abiertos 2.1 Indice Nacional de Precios Productor Base junio 2012 para Servicios Educativos. INEGI(2018) 2.2 2. Indice Nacional de Precios al Consumidor Base julio 2018. INEGI(2018) ----------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- INSTRUCCIONES: 1. Generar una carpeta que contenga las bases de datos de la Cuenta Pública Federal de 2008 a 2014 en formato excel (xlsx). 2. Modificar las líneas de comando "%let path= ;" de acuerdo con la ruta o directorio de la carpeta que contiene las bases anteriores. 3. Modificar las líneas de comando "%let arch= ;" de acuerdo con la ruta o directorio de la carpeta destino de los archivos de salida. 4. Ejecutar el programa. ********************************************************************************************* ELABORADO POR: Eduardo Ángeles Méndez Fecha: 2016/mar/03 Adscripción: Dirección de Indicadores Educativos. Subdirección de Integración de Información Social y Económica. ÚLTIMA MODIFICACIÓN: 2019/feb/22 ***********************************************************************************************/ %let path=D:\eangeles\Documents\2015\Julio\BD_cuenta publica 08-14\; %let arch=D:\eangeles\Documents\2016\Marzo\AR03 tablas SAS; libname cp "&path"; options symbolgen mcompilenote=all; %macro cpimport(año=) / minoperator; %if &año. in 2008 2009 2010 2011 2012 %then %do; proc import datafile="&path.\Cuenta_Publica_&año..xlsx" out=cp.cp&año dbms=xlsx replace; getnames=yes; run; %end; %else %if &año in 2013 2014 %then %do; proc import datafile="&path.\Cuenta_Publica_&año._RA.xlsx" out=cp.cp&año dbms=xlsx replace; getnames=yes; run; %end; %else %if &año in 2015 %then %do; proc import datafile="&path.\Cuenta_Publica_&año._GF.xlsx" out=cp.cp&año dbms=xlsx replace; getnames=yes; run; %end; %else %if &año in 2016 %then %do; proc import datafile="&path.\cuenta_publica_&año._gf_ecd_epe.xlsx" out=cp.cp&año dbms=xlsx replace; getnames=yes; run; %end; %else %if &año in 2017 %then %do; proc import datafile="&path.\cuenta_publica_&año._gf_ecd_epe.xlsx" out=cp.cp&año dbms=xlsx replace; getnames=yes; run; %end; %mend; /* %cpimport(año=2008) %cpimport(año=2009) %cpimport(año=2010) %cpimport(año=2011) %cpimport(año=2012) %cpimport(año=2013) %cpimport(año=2014) %cpimport(año=2015) %cpimport(año=2016) %cpimport(año=2017) */ %macro gastofed(año=,precios=,indice=) / minoperator; %if &indice=inpp %then %do; /*Deflactores anuales, INPP Base junio 2012=100*/ %let ip08=0.829471121; %let ip09=0.873561621; %let ip10=0.913137162; %let ip11=0.952766791; %let ip12=1.003557375; %let ip13=1.057685306; %let ip14=1.104260916; %let ip15=1.153239303; %let ip16=1.202653334; %let ip17=1; %end; %else %if &indice=inpc %then %do; /*Deflactores anuales, INPC 2012*/ %let ip08=0.846924953; %let ip09=0.891789593; %let ip10=0.928858859; %let ip11=0.960508607; %let ip12=1; %let ip13=1.038063898; %let ip14=1.079779713; %let ip15=1.109156645; %let ip16=1.140453804; %let ip17=1.209353817; %end; proc sql noprint; select distinct memname into :list separated by ' ' from dictionary.tables where libname='CP'; quit; %if &año.= or &precios.= %then %do; %put ERROR: Valor ausente en año y/o precios.; %end; %else %if not(CP&año in &list) %then %do; %put ERROR: Base de datos cp&año. no encontrada.; %end; %else %if not(&precios in constantes corrientes) %then %do; %put ERROR: Especificar precios corrientes o constantes.; %end; %else %do; /*Identificar el gasto federal destinado para educación en la base, para cada año del periodo 2008-2014*/ data gfedu&año.; set cp.cp&año.; %if &año.=2008 %then %do; if Descripci_n_de_la_Actividad_Inst in ('Servicios de educación básica y normal en el D.F.') then Actividad_Institucional = 5; %end; %if &año in 2008 2009 2010 2011 %then %do; ciclo1=ciclo+0; Entidad_Federativa1=Entidad_Federativa+0; actins=Actividad_Institucional; ent_r25=Programa_Presupuestario+0; dent_r25=Descripci_n_de_Programa_Presupue; %if &año in 2009 2010 2011 %then %do; ent_r25=substr(Programa_Presupuestario,2,2); dent_r25=scan(Descripci_n_de_Programa_Presupue,2,"")||''||scan(Descripci_n_de_Programa_Presupue,3,"")||''||scan(Descripci_n_de_Programa_Presupue,4,""); %end; if ramo = 25 then ent_r25=9; if ramo = 25 then dent_r25='Distrito Federal'; ejercido=ejercido/1000000; ejercido1=ejercido/1000000; %if &precios.=corrientes %then %do; ejercido=ejercido/1; %end; %else %if &año.=2008 %then %do; ejercido1=ejercido/&ip08.; %end; %else %if &año.=2009 %then %do; ejercido1=ejercido/&ip09.; %end; %else %if &año.=2010 %then %do; ejercido1=ejercido/&ip10.; %end; %else %if &año.=2011 %then %do; ejercido1=ejercido/&ip11.; %end; /*Debido al cambio en el Clasificador por Objeto de Gasto a partir de 2011 las claves seleccionadas son distintas*/ %if &año.=2011 %then %do; capitulo=substr(Objeto_del_Gasto,8,1)+0; capitulo1=substr(Objeto_del_Gasto,8,2)+0; capitulo2=substr(Objeto_del_Gasto,8,3)+0; if Objeto_del_Gasto in (83101 83102 83106 83108 83109 83110 83111 83112 83112 83113 83114 83115 83116 83117) then capitulo=1; /*Capítulo de tranferencias que tiene conceptos por servicios personales*/ %end; /*Para antes de 2011 estas son las claves de gasto que se seleccionaban*/ %else %do; capitulo=substr(Objeto_del_Gasto,9,1)+0; capitulo1=substr(Objeto_del_Gasto,9,2)+0; capitulo2=substr(Objeto_del_Gasto,9,3)+0; if Objeto_del_Gasto in (8401 8402 8406 8407 8408 8409 8410 8411 8412 8413 8415 8416 8417 4301 4311 4312 4313 4319 4320 4321 4322 4323 4324 4325 4326 4330 4331 4332 4333 4334 4335 4336) then capitulo=1; /*Capítulo de tranferencias que tiene conceptos por servicios personales, clasificación 2008*/ %end; /*Para considerar al Ramo 25 en el FAEB*/ if ramo = 25 then actins=3; if tipo_de_gasto in (0 1 5 7) & capitulo = 1 then tipo=1; /*Corriente*/ if tipo_de_gasto in (0 1 5 7) & capitulo ^= 1 then tipo=1; /*Corriente*/ if tipo_de_gasto in (2 3 6 8 9) then tipo=2; /*Inversión*/ if tipo_de_gasto in (0 1 7) & capitulo = 1 then gasto=1; /*Servicios personales*/ /*Corriente*/ if tipo_de_gasto in (0 1 7) & capitulo ^= 1 then gasto=2; /*Otros*/ /*Corriente*/ if tipo_de_gasto = 2 then gasto=3; /*Gasto diferente obra pública*/ /*Inversión*/ if tipo_de_gasto = 3 then gasto=4; /*Gasto obra pública*/ /*Inversión*/ if tipo_de_gasto = 8 then gasto=5; /*Gasto de inversión por concepto de gastos indirectos de programas de subsidios*/ /*Inversión*/ %if &año=2011 %then %do; if tipo_de_gasto in (0 1 7) & capitulo=1 then gasto1=1; /*Servicios personales*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=4 & capitulo1 in (43) then gasto1=2; /*Subsidios y transferencias*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=2 & Objeto_del_Gasto not in (26106) then gasto1=3; /*Gastos de operación*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=3 & Objeto_del_Gasto not in (32902 39908 39910) & capitulo2 not in (391 394 395 396 397) then gasto1=3; /*Gastos de operación*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo not in (1 4 2 3) then gasto1=4; /*Otros*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=4 & capitulo1 not in (43) then gasto1=4; /*Otros*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=2 & Objeto_del_Gasto in (26106) then gasto1=4; /*Otros*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=3 & (Objeto_del_Gasto in (32902 39908 39910) | capitulo2 in (391 394 395 396 397)) then gasto1=4; /*Otros*/ /*Corriente*/ if ramo=25 & tipo_de_gasto in (0 1 7) & capitulo in (2 3 4) then gasto1=4; /*Otros*/ /*Corriente*/ if tipo_de_gasto = 2 then gasto1=5; /**/ /*Inversión*/ if tipo_de_gasto = 3 then gasto1=5; /**/ /*Inversión*/ if tipo_de_gasto = 8 then gasto1=5; /**/ /*Inversión*/ %end; %else %do; if tipo_de_gasto in (0 1 7) & capitulo=1 then gasto1=1; /*Servicios personales*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=4 & capitulo1 in (41 42) then gasto1=2; /*Subsidios y transferencias*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=2 & Objeto_del_Gasto^=2607 then gasto1=3; /*Gastos de operación*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=3 & (capitulo1^=39 | Objeto_del_Gasto^=3212) then gasto1=3; /*Gastos de operación*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo not in (1 4 2 3) then gasto1=4; /*Otros*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=4 & capitulo1 not in (41 42) then gasto1=4; /*Otros*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=2 & Objeto_del_Gasto=2607 then gasto1=4; /*Otros*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=3 & (capitulo1=39 | Objeto_del_Gasto=3212) then gasto1=4; /*Otros*/ /*Corriente*/ if ramo=25 & tipo_de_gasto in (0 1 7) & capitulo in (2 3 4 8) then gasto1=4; /*Otros*/ /*Corriente*/ if tipo_de_gasto = 2 then gasto1=5; /**/ /*Inversión*/ if tipo_de_gasto = 3 then gasto1=5; /**/ /*Inversión*/ if tipo_de_gasto = 8 then gasto1=5; /**/ /*Inversión*/ %end; if Finalidad = 2 & funci_n = 0 & subfunci_n in (1:9) then edu = 1; /*Programas federales*/ if ramo = 11 & Finalidad = 1 & funci_n = 8 & subfunci_n = 3 then edu = 1; /*Programas federales*/ if Finalidad = 3 & funci_n = 7 & subfunci_n in (1:4) then edu = 1; /*Programas federales*/ if ramo = 25 & Finalidad = 2 & funci_n = 0 & subfunci_n in (1:9) then edu = 1; /*Programas federales*/ if ramo = 25 & Finalidad = 1 & funci_n = 8 & subfunci_n = 3 then edu = 1; /*Programas federales*/ if ramo = 33 & Actividad_Institucional in (3 9 10 11 12) & Finalidad = 2 & funci_n = 0 & subfunci_n in (1:9) then edu = 2; /*Programas de gasto federalizado*/ if ramo = 33 & Actividad_Institucional = 14 & Finalidad = 2 & funci_n = 3 & subfunci_n = 3 then edu = 2; /*Programas de gasto federalizado*/ if ramo = 25 & Modalidad_del_Programa_presupues = "E" & Programa_Presupuestario in (1 3 4) then edu = 2; /*Programas de gasto federalizado*/ if Finalidad = 2 & funci_n = 0 & subfunci_n =1 then niv = 201; /*Básica*/ if Finalidad = 2 & funci_n = 0 & subfunci_n =2 then niv = 202; /*Media superior*/ if Finalidad = 2 & funci_n = 0 & subfunci_n =3 then niv = 203; /*Superior*/ if Finalidad = 2 & funci_n = 0 & subfunci_n =4 then niv = 204; /*Posgrado*/ if Finalidad = 2 & funci_n = 0 & subfunci_n =5 then niv = 205; /*Educación para adultos*/ if Finalidad = 2 & funci_n = 0 & subfunci_n =8 then niv = 208; /*Apoyo en servicios educativos concurrentes*/ if Finalidad = 2 & funci_n = 0 & subfunci_n =9 then niv = 209; /*Otros servicios educativos y actividades inherentes*/ if Finalidad = 3 & funci_n = 7 & subfunci_n =1 then niv = 371; /*Investigación científica*/ if Finalidad = 3 & funci_n = 7 & subfunci_n =2 then niv = 372; /*Desarrollo tecnológico*/ if Finalidad = 3 & funci_n = 7 & subfunci_n =3 then niv = 373; /*Servicios científicos y tecnológicos*/ if Finalidad = 3 & funci_n = 7 & subfunci_n =4 then niv = 374; /*Fomento del desarrollo científico y tecnológico*/ if Finalidad = 2 & funci_n = 0 & subfunci_n = 7 then niv = 207; /*Deporte y recreación*/ if Finalidad = 2 & funci_n = 0 & subfunci_n = 6 then niv = 206; /*Cultura*/ if ramo = 11 & Finalidad = 1 & funci_n = 8 & subfunci_n = 3 then niv = 183; /*Función pública*/ if ramo = 25 & Finalidad = 1 & funci_n = 8 & subfunci_n = 3 then niv = 183; /*Función pública*/ if ramo = 33 & Actividad_Institucional = 14 & Finalidad = 2 & funci_n = 3 & subfunci_n = 3 then niv = 233; /*Desarrollo regional*/ /*FAFEF*/ if ramo = 33 & Actividad_Institucional = 14 & Finalidad = 2 & funci_n = 3 & subfunci_n = 3 then ejercido = ejercido * 0.10; /*Desarrollo regional*/ /*FAFEF*/ if ramo = 33 & Actividad_Institucional = 14 & Finalidad = 2 & funci_n = 3 & subfunci_n = 3 then ejercido1 = ejercido1 * 0.10; /*Desarrollo regional*/ /*FAFEF*/ if niv in (206 207) then Destino_gasto='Deporte, recreación y cultura'; /*Deporte, recreción y cultura*/ if niv=201 then Destino_gasto='Básica '; /*Básica*/ if niv=202 then Destino_gasto='Media Superior '; /*Media Superior*/ if niv=203 then Destino_gasto='Superior '; /*Superior*/ if niv=204 then Destino_gasto='Posgrado '; /*Posgrado*/ if niv=205 then Destino_gasto='Educación para adultos '; /*Educación para adultos*/ if niv in (371 372 373 374) then Destino_gasto='Ciencia y tecnología '; /*Ciencia y tecnología*/ if niv in (208 209 183 233) then Destino_gasto='Otros'; /*Otros*/ if niv=201 then Destino_gasto2='Básica '; /*Básica*/ if niv=202 then Destino_gasto2='Media Superior '; /*Media Superior*/ if niv=203 then Destino_gasto2='Superior '; /*Superior*/ if niv=204 then Destino_gasto2='Posgrado '; /*Posgrado*/ if niv=205 then Destino_gasto2='Educación para adultos '; /*Educación para adultos*/ if niv in (208 209) then Destino_gasto2='Otros '; /*Otros*/ run; %end; /*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ %else %if &año in 2012 2013 2014 2015 2016 2017 %then %do; %if &año in 2016 2017 %then %do; ciclo1=ciclo+0; ejercido=monto_ejercicio+0; finalidad=gpo_funcional+0; capitulo=substr(id_objeto_del_gasto,8,1)+0; capitulo1=substr(id_objeto_del_gasto,8,2)+0; /*Para identificar 4500 pensiones y jubilaciones*/ capitulo2=substr(id_objeto_del_gasto,8,3)+0; actins=id_ai; Actividad_Institucional=id_ai; ejercido=ejercido/1000000; ejercido1=ejercido/1000000; cve_pp=id_ramo||id_modalidad||id_pp; Unidad_Responsable=ID_UR; Descripci_n_de_Unidad_Responsabl=DESC_UR; Objeto_del_Gasto=ID_OBJETO_DEL_GASTO; Descripci_n_de_Objeto_del_Gasto=DESC_OBJETO_DEL_GASTO; DESCRIPCI_N_DE_LA_ENTIDAD_FEDERA=ENTIDAD_FEDERATIVA; ENTIDAD_FEDERATIVA1=ID_ENTIDAD_FEDERATIVA; RAMO=ID_RAMO; Descripci_n_de_Ramo=DESC_RAMO; DESCRIPCI_N_DE_LA_ACTIVIDAD_INST=DESC_AI; Modalidad_del_Programa_presupues=ID_MODALIDAD; Descripci_n_de_la_modalidad_del=DESC_MODALIDAD; Programa_Presupuestario=ID_PP; Descripci_n_de_Programa_Presupue=DESC_PP; %if &precios=corrientes %then %do; ejercido=ejercido/1; %end; %else %if &año=2016 %then %do; ejercido1=ejercido/&ip16.; %end; %else %if &año=2017 %then %do; ejercido1=ejercido/&ip17.; %end; /*Debido al cambio en el Clasificador por Objeto de Gasto a partir de 2011 las claves seleccionadas son distintas*/ if id_objeto_del_gasto in (83101 83102 83106 83108 83109 83110 83111 83112 83113 83114 83115 83116) then capitulo=1; /*Capítulo de tranferencias que tiene conceptos por servicios personales*/ if id_id_ramo = 25 then actins=3; if id_tipogasto in (0 1 5 7) & capitulo = 1 then tipo=1; /*Corriente*/ if id_tipogasto in (0 1 5 7) & capitulo ^= 1 then tipo=1; /*Corriente*/ if id_tipogasto in (2 3 6 8 9) then tipo=2; /*Inversión*/ if id_tipogasto in (0 1 7) & capitulo = 1 then gasto=1; /*Servicios personales*/ /*Corriente*/ if id_tipogasto in (0 1 7) & capitulo ^= 1 then gasto=2; /*Otros*/ /*Corriente*/ if id_tipogasto = 2 then gasto=3; /*Gasto diferente obra pública*/ /*Inversión*/ if id_tipogasto = 3 then gasto=4; /*Gasto obra pública*/ /*Inversión*/ if id_tipogasto = 8 then gasto=5; /*Gasto de inversión por concepto de gastos indirectos de programas de subsidios*/ /*Inversión*/ if id_tipogasto in (0 1 7) & capitulo=1 then gasto1=1; /*Servicios personales*/ /*Corriente*/ if id_ramo^=25 & id_tipogasto in (0 1 7) & capitulo=4 & capitulo1 in (43) then gasto1=2; /*Subsidios y transferencias*/ /*Corriente*/ if id_ramo^=25 & id_tipogasto in (0 1 7) & capitulo=2 & id_objeto_del_gasto not in (26106) then gasto1=3; /*Gastos de operación*/ /*Corriente*/ if id_ramo^=25 & id_tipogasto in (0 1 7) & capitulo=3 & id_objeto_del_gasto not in (32902 39908 39910) & capitulo2 not in (391 394 395 396 397) then gasto1=3; /*Gastos de operación*/ /*Corriente*/ if id_ramo^=25 & id_tipogasto in (0 1 7) & capitulo not in (1 4 2 3) then gasto1=4; /*Otros*/ /*Corriente*/ if id_ramo^=25 & id_tipogasto in (0 1 7) & capitulo=4 & capitulo1 not in (43) then gasto1=4; /*Otros*/ /*Corriente*/ if id_ramo^=25 & id_tipogasto in (0 1 7) & capitulo=2 & id_objeto_del_gasto in (26106) then gasto1=4; /*Otros*/ /*Corriente*/ if id_ramo^=25 & id_tipogasto in (0 1 7) & capitulo=3 & (id_objeto_del_gasto in (32902 39908 39910) | capitulo2 in (391 394 395 396 397)) then gasto1=4; /*Otros*/ /*Corriente*/ if id_ramo=25 & id_tipogasto in (0 1 7) & capitulo in (2 3 4 8) then gasto1=4; /*Otros*/ /*Corriente*/ if id_tipogasto = 2 then gasto1=5; /**/ /*Inversión*/ if id_tipogasto = 3 then gasto1=5; /**/ /*Inversión*/ if id_tipogasto = 8 then gasto1=5; /**/ /*Inversión*/ if Finalidad = 2 & id_funcion = 5 & id_subfuncion in (1:6) then edu = 1; /*Programas federales*/ if id_ramo = 11 & Finalidad = 1 & id_funcion = 3 & id_subfuncion = 4 then edu = 1; /*Programas federales*/ if Finalidad = 2 & id_funcion = 4 & id_subfuncion in (1:2) then edu = 1; /*Programas federales*/ if Finalidad = 3 & id_funcion = 8 & id_subfuncion in (1:4) then edu = 1; /*Programas federales*/ if id_ramo = 25 & Finalidad = 2 & id_funcion = 5 & id_subfuncion in (1:6) then edu = 1; /*Programas federales*/ if id_ramo = 25 & Finalidad = 1 & id_funcion = 3 & id_subfuncion = 4 then edu = 1; /*Programas federales*/ if id_ramo = 33 & id_ai in (3 7 8) & Finalidad = 2 & id_funcion = 5 & id_subfuncion in (1:6) then edu = 2; /*Programas de gasto federalizado*/ if id_ramo = 33 & id_ai = 10 & Finalidad = 2 & id_funcion = 2 & id_subfuncion =7 then edu = 2; /*Programas de gasto federalizado*/ if id_ramo = 25 & ID_MODALIDAD = "E" & ID_PP in (1 3 4) then edu = 2; /*Programas de gasto federalizado*/ if Finalidad = 2 & id_funcion = 5 & id_subfuncion =1 then niv = 251; /*Básica*/ if Finalidad = 2 & id_funcion = 5 & id_subfuncion =2 then niv = 252; /*Media superior*/ if Finalidad = 2 & id_funcion = 5 & id_subfuncion =3 then niv = 253; /*Superior*/ if Finalidad = 2 & id_funcion = 5 & id_subfuncion =4 then niv = 254; /*Posgrado*/ if Finalidad = 2 & id_funcion = 5 & id_subfuncion =5 then niv = 255; /*Educación para adultos*/ if Finalidad = 2 & id_funcion = 5 & id_subfuncion =6 then niv = 256; /*Otros servicios educativos y actividades inherentes*/ if Finalidad = 3 & id_funcion = 8 & id_subfuncion =1 then niv = 381; /*Investigación científica*/ if Finalidad = 3 & id_funcion = 8 & id_subfuncion =2 then niv = 382; /*Desarrollo tecnológico*/ if Finalidad = 3 & id_funcion = 8 & id_subfuncion =3 then niv = 383; /*Servicios científicos y tecnológicos*/ if Finalidad = 3 & id_funcion = 8 & id_subfuncion =4 then niv = 384; /*Innovación*/ if Finalidad = 2 & id_funcion = 4 & id_subfuncion = 1 then niv = 241; /*Deporte y recreación*/ if Finalidad = 2 & id_funcion = 4 & id_subfuncion = 2 then niv = 242; /*Cultura*/ if id_ramo = 11 & Finalidad = 1 & id_funcion = 3 & id_subfuncion = 4 then niv = 134; /*Función pública*/ if id_ramo = 25 & Finalidad = 1 & id_funcion = 3 & id_subfuncion = 4 then niv = 134; /*Función pública*/ if id_ramo = 33 & id_ai = 10 & Finalidad = 2 & id_funcion = 2 & id_subfuncion = 7 then niv = 227; /*Desarrollo regional*/ /*FAFEF*/ if id_ramo = 33 & id_ai = 10 & Finalidad = 2 & id_funcion = 2 & id_subfuncion = 7 then ejercido = ejercido * 0.10; /*Desarrollo regional*/ /*FAFEF*/ if id_ramo = 33 & id_ai = 10 & Finalidad = 2 & id_funcion = 2 & id_subfuncion = 7 then ejercido1 = ejercido1 * 0.10; /*Desarrollo regional*/ /*FAFEF*/ if niv in (241 242) then Destino_gasto='Deporte, recreación y cultura'; /*Deporte, recreción y cultura*/ if niv=251 then Destino_gasto='Básica '; /*Básica*/ if niv=252 then Destino_gasto='Media Superior '; /*Media Superior*/ if niv=253 then Destino_gasto='Superior '; /*Superior*/ if niv=254 then Destino_gasto='Posgrado '; /*Posgrado*/ if niv=255 then Destino_gasto='Educación para adultos '; /*Educación para adultos*/ if niv in (381 382 383 384) then Destino_gasto='Ciencia y tecnología '; /*Ciencia y tecnología*/ if niv in (256 134 227) then Destino_gasto='Otros'; /*Otros*/ if niv=251 then Destino_gasto2='Básica '; /*Básica*/ if niv=252 then Destino_gasto2='Media Superior '; /*Media Superior*/ if niv=253 then Destino_gasto2='Superior '; /*Superior*/ if niv=254 then Destino_gasto2='Posgrado '; /*Posgrado*/ if niv=255 then Destino_gasto2='Educación para adultos '; /*Educación para adultos*/ if niv=256 then Destino_gasto2='Otros '; /*Otros*/ run; %end; %else %do; %if &año in 2014 2015 %then %do; ejercido=ejercicio+0; finalidad=Grupo_Funcional+0; %end; ciclo1=ciclo+0; Entidad_Federativa1=Entidad_Federativa+0; capitulo=substr(Objeto_del_Gasto,8,1)+0; capitulo1=substr(Objeto_del_Gasto,8,2)+0; /*Para identificar 4500 pensiones y jubilaciones*/ capitulo2=substr(Objeto_del_Gasto,8,3)+0; actins=Actividad_Institucional; ejercido=ejercido/1000000; ejercido1=ejercido/1000000; cve_pp=ramo||Modalidad_del_Programa_presupues||Programa_Presupuestario; %if &precios=corrientes %then %do; ejercido=ejercido/1; %end; %else %if &año=2012 %then %do; ejercido1=ejercido/&ip12.; %end; %else %if &año=2013 %then %do; ejercido1=ejercido/&ip13.; %end; %else %if &año=2014 %then %do; ejercido1=ejercido/&ip14.; %end; %else %if &año=2015 %then %do; ejercido1=ejercido/&ip15.; %end; /*Debido al cambio en el Clasificador por Objeto de Gasto a partir de 2011 las claves seleccionadas son distintas*/ if Objeto_del_Gasto in (83101 83102 83106 83108 83109 83110 83111 83112 83113 83114 83115 83116) then capitulo=1; /*Capítulo de tranferencias que tiene conceptos por servicios personales*/ if ramo = 25 then actins=3; if tipo_de_gasto in (0 1 5 7) & capitulo = 1 then tipo=1; /*Corriente*/ if tipo_de_gasto in (0 1 5 7) & capitulo ^= 1 then tipo=1; /*Corriente*/ if tipo_de_gasto in (2 3 6 8 9) then tipo=2; /*Inversión*/ if tipo_de_gasto in (0 1 7) & capitulo = 1 then gasto=1; /*Servicios personales*/ /*Corriente*/ if tipo_de_gasto in (0 1 7) & capitulo ^= 1 then gasto=2; /*Otros*/ /*Corriente*/ if tipo_de_gasto = 2 then gasto=3; /*Gasto diferente obra pública*/ /*Inversión*/ if tipo_de_gasto = 3 then gasto=4; /*Gasto obra pública*/ /*Inversión*/ if tipo_de_gasto = 8 then gasto=5; /*Gasto de inversión por concepto de gastos indirectos de programas de subsidios*/ /*Inversión*/ if tipo_de_gasto in (0 1 7) & capitulo=1 then gasto1=1; /*Servicios personales*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=4 & capitulo1 in (43) then gasto1=2; /*Subsidios y transferencias*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=2 & Objeto_del_Gasto not in (26106) then gasto1=3; /*Gastos de operación*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=3 & Objeto_del_Gasto not in (32902 39908 39910) & capitulo2 not in (391 394 395 396 397) then gasto1=3; /*Gastos de operación*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo not in (1 4 2 3) then gasto1=4; /*Otros*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=4 & capitulo1 not in (43) then gasto1=4; /*Otros*/ /*Corriente*/ if r1amo^=25 & tipo_de_gasto in (0 1 7) & capitulo=2 & Objeto_del_Gasto in (26106) then gasto1=4; /*Otros*/ /*Corriente*/ if ramo^=25 & tipo_de_gasto in (0 1 7) & capitulo=3 & (Objeto_del_Gasto in (32902 39908 39910) | capitulo2 in (391 394 395 396 397)) then gasto1=4; /*Otros*/ /*Corriente*/ if ramo=25 & tipo_de_gasto in (0 1 7) & capitulo in (2 3 4 8) then gasto1=4; /*Otros*/ /*Corriente*/ if tipo_de_gasto = 2 then gasto1=5; /**/ /*Inversión*/ if tipo_de_gasto = 3 then gasto1=5; /**/ /*Inversión*/ if tipo_de_gasto = 8 then gasto1=5; /**/ /*Inversión*/ if Finalidad = 2 & funci_n = 5 & subfunci_n in (1:6) then edu = 1; /*Programas federales*/ if ramo = 11 & Finalidad = 1 & funci_n = 3 & subfunci_n = 4 then edu = 1; /*Programas federales*/ if Finalidad = 2 & funci_n = 4 & subfunci_n in (1:2) then edu = 1; /*Programas federales*/ if Finalidad = 3 & funci_n = 8 & subfunci_n in (1:4) then edu = 1; /*Programas federales*/ if ramo = 25 & Finalidad = 2 & funci_n = 5 & subfunci_n in (1:6) then edu = 1; /*Programas federales*/ if ramo = 25 & Finalidad = 1 & funci_n = 3 & subfunci_n = 4 then edu = 1; /*Programas federales*/ if ramo = 33 & Actividad_Institucional in (3 7 8) & Finalidad = 2 & funci_n = 5 & subfunci_n in (1:6) then edu = 2; /*Programas de gasto federalizado*/ if ramo = 33 & Actividad_Institucional = 10 & Finalidad = 2 & funci_n = 2 & subfunci_n =7 then edu = 2; /*Programas de gasto federalizado*/ if ramo = 25 & Modalidad_del_Programa_presupues = "E" & Programa_Presupuestario in (1 3 4) then edu = 2; /*Programas de gasto federalizado*/ if Finalidad = 2 & funci_n = 5 & subfunci_n =1 then niv = 251; /*Básica*/ if Finalidad = 2 & funci_n = 5 & subfunci_n =2 then niv = 252; /*Media superior*/ if Finalidad = 2 & funci_n = 5 & subfunci_n =3 then niv = 253; /*Superior*/ if Finalidad = 2 & funci_n = 5 & subfunci_n =4 then niv = 254; /*Posgrado*/ if Finalidad = 2 & funci_n = 5 & subfunci_n =5 then niv = 255; /*Educación para adultos*/ if Finalidad = 2 & funci_n = 5 & subfunci_n =6 then niv = 256; /*Otros servicios educativos y actividades inherentes*/ if Finalidad = 3 & funci_n = 8 & subfunci_n =1 then niv = 381; /*Investigación científica*/ if Finalidad = 3 & funci_n = 8 & subfunci_n =2 then niv = 382; /*Desarrollo tecnológico*/ if Finalidad = 3 & funci_n = 8 & subfunci_n =3 then niv = 383; /*Servicios científicos y tecnológicos*/ if Finalidad = 3 & funci_n = 8 & subfunci_n =4 then niv = 384; /*Innovación*/ if Finalidad = 2 & funci_n = 4 & subfunci_n = 1 then niv = 241; /*Deporte y recreación*/ if Finalidad = 2 & funci_n = 4 & subfunci_n = 2 then niv = 242; /*Cultura*/ if ramo = 11 & Finalidad = 1 & funci_n = 3 & subfunci_n = 4 then niv = 134; /*Función pública*/ if ramo = 25 & Finalidad = 1 & funci_n = 3 & subfunci_n = 4 then niv = 134; /*Función pública*/ if ramo = 33 & Actividad_Institucional = 10 & Finalidad = 2 & funci_n = 2 & subfunci_n = 7 then niv = 227; /*Desarrollo regional*/ /*FAFEF*/ if ramo = 33 & Actividad_Institucional = 10 & Finalidad = 2 & funci_n = 2 & subfunci_n = 7 then ejercido = ejercido * 0.10; /*Desarrollo regional*/ /*FAFEF*/ if ramo = 33 & Actividad_Institucional = 10 & Finalidad = 2 & funci_n = 2 & subfunci_n = 7 then ejercido1 = ejercido1 * 0.10; /*Desarrollo regional*/ /*FAFEF*/ if niv in (241 242) then Destino_gasto='Deporte, recreación y cultura'; /*Deporte, recreción y cultura*/ if niv=251 then Destino_gasto='Básica '; /*Básica*/ if niv=252 then Destino_gasto='Media Superior '; /*Media Superior*/ if niv=253 then Destino_gasto='Superior '; /*Superior*/ if niv=254 then Destino_gasto='Posgrado '; /*Posgrado*/ if niv=255 then Destino_gasto='Educación para adultos '; /*Educación para adultos*/ if niv in (381 382 383 384) then Destino_gasto='Ciencia y tecnología '; /*Ciencia y tecnología*/ if niv in (256 134 227) then Destino_gasto='Otros'; /*Otros*/ if niv=251 then Destino_gasto2='Básica '; /*Básica*/ if niv=252 then Destino_gasto2='Media Superior '; /*Media Superior*/ if niv=253 then Destino_gasto2='Superior '; /*Superior*/ if niv=254 then Destino_gasto2='Posgrado '; /*Posgrado*/ if niv=255 then Destino_gasto2='Educación para adultos '; /*Educación para adultos*/ if niv=256 then Destino_gasto2='Otros '; /*Otros*/ run; %end; %end; %end; %mend gastofed; %gastofed(año=2008,precios=constantes,indice=inpc) %gastofed(año=2009,precios=constantes,indice=inpc) %gastofed(año=2010,precios=constantes,indice=inpc) %gastofed(año=2011,precios=constantes,indice=inpc) %gastofed(año=2012,precios=constantes,indice=inpc) %gastofed(año=2013,precios=constantes,indice=inpc) %gastofed(año=2014,precios=constantes,indice=inpc) %gastofed(año=2015,precios=constantes,indice=inpc) %gastofed(año=2016,precios=constantes,indice=inpc) %gastofed(año=2017,precios=constantes,indice=inpc) %macro historico (pf=) / minoperator; %let y=%eval(&pf-2007); %do i=1 %to &y; proc sql noprint; select distinct memname into :list separated by ' ' from dictionary.tables where libname='WORK' ; quit; %if not(PROOF in &list) %then %do; data proof (keep= ciclo1 gasto1 Objeto_del_Gasto Descripci_n_de_Objeto_del_Gasto Entidad_Federativa1 Descripci_n_de_la_entidad_federa Actividad_Institucional Descripci_n_de_la_Actividad_Inst ramo Unidad_Responsable Descripci_n_de_Unidad_Responsabl niv Modalidad_del_Programa_presupues Programa_Presupuestario Descripci_n_de_Programa_Presupue Destino_gasto Descripci_n_de_Ramo ejercido ejercido1 Descripci_n_de_Ramo edu tipo Descripci_n_de_la_modalidad_del Destino_gasto2 solicitud); set gfedu2008; if niv^=.; run; %end; %else %do; %let x=%eval(2007+&i); data proof (keep= ciclo1 gasto1 Objeto_del_Gasto Descripci_n_de_Objeto_del_Gasto Entidad_Federativa1 Descripci_n_de_la_entidad_federa Actividad_Institucional Descripci_n_de_la_Actividad_Inst ramo Unidad_Responsable Descripci_n_de_Unidad_Responsabl niv Modalidad_del_Programa_presupues Programa_Presupuestario Descripci_n_de_Programa_Presupue Destino_gasto Descripci_n_de_Ramo ejercido ejercido1 Descripci_n_de_Ramo edu tipo Descripci_n_de_la_modalidad_del Destino_gasto2 solicitud); set proof gfedu&x; if niv^=.; run; %end; %end; %mend; %historico(pf=2017) /* 3 FAEB 7 9 10 FAM 8 11 12 FAETA 5 SEBDF */ data proof; set proof; if edu=1 and ramo=11 and Modalidad_del_Programa_presupues="B" and Programa_Presupuestario in (1 2 3) then Principal="Producción y distribución de libros y materiales educativos"; else if edu=2 and Modalidad_del_Programa_presupues="I" and Actividad_Institucional in (3) then Principal="FONE"; else if edu=2 and Modalidad_del_Programa_presupues="I" and Actividad_Institucional in (7 9 10) then Principal="FAM"; else if edu=2 and Modalidad_del_Programa_presupues="I" and Actividad_Institucional in (8 11 12) then Principal="FAETA"; else if edu=2 and ramo=25 and Actividad_Institucional in (5) then Principal="Servicios de educación básica en el D.F."; else if edu=1 and ramo=11 and Modalidad_del_Programa_presupues="S" and Programa_Presupuestario=72 then Principal="PROSPERA Programa de Inclusión Social"; else if edu=1 and ramo in (11 25) and Modalidad_del_Programa_presupues in ("S" "E") and Programa_Presupuestario in (221) then Principal="Escuelas de Tiempo Completo"; else if edu=1 and ramo in (11) and Modalidad_del_Programa_presupues in ("U") and Programa_Presupuestario in (1) then Principal="Escuelas de Tiempo Completo"; else if edu=1 and ramo=11 and Programa_Presupuestario in (62 63 66 22 84 90 322 384 390) then Principal="Educación Inicial y Básica Comunitaria"; else if edu=1 and ramo=11 and Modalidad_del_Programa_presupues="U" and Programa_Presupuestario in (6) then Principal="Subsidios para organismos descentralizados estatales"; else if edu=1 and ramo in (11 25) and Modalidad_del_Programa_presupues in ("S" "E" "U") and Programa_Presupuestario in (108 243 6 908 945 18) then Principal="Programa Nacional de Becas"; else if edu=1 and ramo=11 and Programa_Presupuestario in (7 8) then Principal="Servicios de Educación Media Superior"; else Principal="Otros "; run; %macro tablas (Destino_gasto=) / minoperator; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.1-1 GFE corrientes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido; WHERE ejercido>0; CLASS ciclo1 ramo Descripci_n_de_Ramo &Destino_gasto niv; by ciclo1; keylabel sum=''; keylabel all="Total"; TABLE ramo*Descripci_n_de_Ramo ALL, (&Destino_gasto=[label=''] ALL)*(ejercido=[label='']) /BOX="Ramo/Descripción del ramo" INDENT=3 RTS=12 misstext='-'; title 'AR03b.1-1 Gasto federal ejercido en educación, cultura, deporte, ciencia y tecnología por ramo y destino de los recursos (millones de pesos a precios corrientes)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.1-2 GFE corrientes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido; WHERE ejercido>0; CLASS ciclo1 ramo Descripci_n_de_Ramo &Destino_gasto niv edu ; keylabel sum=''; keylabel all="Subtotal"; TABLE ciclo1, edu*(&Destino_gasto=[label=''] ALL)*(ejercido=[label='']) /BOX="Año" INDENT=3 RTS=12 misstext='-'; title 'AR03b.1-2 Gasto federal ejercido en educación, cultura, deporte, ciencia y tecnología según tipo de programa presupuestario y destino (millones de pesos a precios corrientes)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.1-2.1 GFE constantes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido1; WHERE ejercido1>0; CLASS ciclo1 ramo Descripci_n_de_Ramo &Destino_gasto niv edu ; keylabel sum=''; keylabel all="Subtotal"; TABLE ciclo1, edu*(&Destino_gasto=[label=''] ALL)*(ejercido1=[label='']) /BOX="Año" INDENT=3 RTS=12 misstext='-'; title 'AR03b.1-2 Gasto federal ejercido en educación, cultura, deporte, ciencia y tecnología según tipo de programa presupuestario y destino (millones de pesos a precios de 2012)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.1-A1 GFE corrientes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido; WHERE ejercido>0 and edu=1; by ciclo1; CLASS ciclo1 ramo Descripci_n_de_Ramo &Destino_gasto niv edu gasto1 tipo; keylabel sum=''; keylabel all="Subtotal"; TABLE &Destino_gasto, tipo*(gasto1=[label=''] ALL)*(ejercido=[label='']) /BOX="Año" INDENT=3 RTS=12 misstext='-'; title 'AR03b.1-A1 Gasto en programas federales ejercido en educación, cultura, deporte, ciencia y tecnología según destino y tipo de gasto (millones de pesos a precios corrientes)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.1-A1.1 GFE constantes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido1; WHERE ejercido1>0 and edu=1; by ciclo1; CLASS ciclo1 ramo Descripci_n_de_Ramo &Destino_gasto niv edu gasto1 tipo; keylabel sum=''; keylabel all="Subtotal"; TABLE &Destino_gasto, tipo*(gasto1=[label=''] ALL)*(ejercido1=[label='']) /BOX="Año" INDENT=3 RTS=12 misstext='-'; title 'AR03b.1-A1.1 Gasto en programas federales ejercido en educación, cultura, deporte, ciencia y tecnología según destino y tipo de gasto (millones de pesos a precios de 2012)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.1-A3 GFE PF corrientes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido; WHERE ejercido>0 and edu=1; by ciclo1; CLASS ciclo1 ramo Modalidad_del_Programa_presupues Descripci_n_de_la_modalidad_del niv edu gasto1 tipo; keylabel sum=''; keylabel all="Subtotal"; TABLE Modalidad_del_Programa_presupues*Descripci_n_de_la_modalidad_del, tipo*(gasto1=[label=''] ALL)*(ejercido=[label='']) /BOX="Año" INDENT=3 RTS=12 misstext='-'; title 'AR03b.1-A3 Gasto ejercido en educación, cultura, deporte, ciencia y tecnología a traves de PF según modalidad y tipo de gasto (millones de pesos a precios corrientes)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.1-A3.1 GFE PF constantes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido1; WHERE ejercido1>0 and edu=1; by ciclo1; CLASS ciclo1 ramo Modalidad_del_Programa_presupues Descripci_n_de_la_modalidad_del niv edu gasto1 tipo; keylabel sum=''; keylabel all="Subtotal"; TABLE Modalidad_del_Programa_presupues*Descripci_n_de_la_modalidad_del, tipo*(gasto1=[label=''] ALL)*(ejercido1=[label='']) /BOX="Año" INDENT=3 RTS=12 misstext='-'; title 'AR03b.1-A3.1 Gasto ejercido en educación, cultura, deporte, ciencia y tecnología a traves de PF según modalidad y tipo de gasto (millones de pesos a precios de 2012)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.1-A2 GFE corrientes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido; WHERE ejercido>0 and edu=2; by ciclo1; CLASS ciclo1 ramo Descripci_n_de_Ramo Descripci_n_de_la_Actividad_Inst &Destino_gasto niv edu gasto1 tipo; keylabel sum=''; keylabel all="Subtotal"; TABLE Descripci_n_de_Ramo*Descripci_n_de_la_Actividad_Inst*&Destino_gasto, tipo*(gasto1=[label=''] ALL)*(ejercido=[label='']) /BOX="Año" INDENT=3 RTS=12 misstext='-'; title 'AR03b.1-A2 Gasto federalizado ejercido en educación según destino y tipo de gasto (millones de pesos a precios corrientes)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.1-A2.1 GFE constantes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido1; WHERE ejercido1>0 and edu=2; by ciclo1; CLASS ciclo1 ramo Descripci_n_de_Ramo Descripci_n_de_la_Actividad_Inst &Destino_gasto niv edu gasto1 tipo; keylabel sum=''; keylabel all="Subtotal"; TABLE Descripci_n_de_Ramo*Descripci_n_de_la_Actividad_Inst*&Destino_gasto, tipo*(gasto1=[label=''] ALL)*(ejercido1=[label='']) /BOX="Año" INDENT=3 RTS=12 misstext='-'; title 'AR03b.1-A2.1 Gasto federalizado ejercido en educación según destino y tipo de gasto (millones de pesos a precios de 2012)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.1-A3 GFE corrientes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido; WHERE ejercido>0; by ciclo1; CLASS ciclo1 ramo Modalidad_del_Programa_presupues Descripci_n_de_la_modalidad_del Programa_Presupuestario Descripci_n_de_Programa_Presupue &Destino_gasto niv; keylabel sum=''; keylabel all="Total"; TABLE ramo*Modalidad_del_Programa_presupues*Descripci_n_de_la_modalidad_del*Programa_Presupuestario*Descripci_n_de_Programa_Presupue, (&Destino_gasto=[label=''] ALL)*(ejercido=[label='']) /BOX="Programa presupuestario" INDENT=3 RTS=12 misstext='-'; title 'AR03b.1-A3 Programas presupuestarios para educación, cultura, deporte, ciencia y tecnología (2016)(millones de pesos a precios corrientes)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.2-1 GFEO corrientes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido; WHERE ejercido>0 and niv in (251 252 255 201 202 205); CLASS ciclo1 &Destino_gasto niv edu tipo gasto1; keylabel sum=''; keylabel all="Subtotal"; TABLE edu*&Destino_gasto*tipo*gasto1, (ciclo1=[label=''])*(ejercido=[label='']) /BOX="Tipo de gasto" INDENT=3 RTS=12 misstext='-'; title 'AR03b.2-1 Gasto federal ejercido en educación obligatoria por tipo de gasto y tipo de programa (millones de pesos a precios corrientes)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.2-1.1 GFEO constantes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido1; WHERE ejercido1>0 and niv in (251 252 255 201 202 205); CLASS ciclo1 &Destino_gasto niv edu tipo gasto1; keylabel sum=''; keylabel all="Subtotal"; TABLE edu*&Destino_gasto*tipo*gasto1, (ciclo1=[label=''])*(ejercido1=[label='']) /BOX="Tipo de gasto" INDENT=3 RTS=12 misstext='-'; title 'AR03b.2-1.1 Gasto federal ejercido en educación obligatoria por tipo de gasto y tipo de programa (millones de pesos a precios de 2012)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.2-A1 GFE corrientes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido; WHERE ejercido>0 and niv in (251 252 255 201 202 205); by ciclo1; CLASS ciclo1 ramo Modalidad_del_Programa_presupues Descripci_n_de_la_modalidad_del Programa_Presupuestario Descripci_n_de_Programa_Presupue &Destino_gasto niv; keylabel sum=''; keylabel all="Total"; TABLE ramo*Modalidad_del_Programa_presupues*Descripci_n_de_la_modalidad_del*Programa_Presupuestario*Descripci_n_de_Programa_Presupue, (&Destino_gasto=[label=''] ALL)*(ejercido=[label='']) /BOX="Programa presupuestario" INDENT=3 RTS=12 misstext='-'; title 'AR03b.2-A1 Programas presupuestarios de educación obligatoria (millones de pesos a precios corrientes)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.3-1 GFEO corrientes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido; WHERE ejercido>0 and niv in (251 252 255 201 202 205); CLASS ciclo1 &Destino_gasto niv edu tipo gasto1 Descripci_n_de_la_Actividad_Inst Entidad_Federativa1 Descripci_n_de_la_entidad_federa; by ciclo1; keylabel sum=''; keylabel all="Subtotal"; TABLE Entidad_Federativa1*Descripci_n_de_la_entidad_federa, edu*(&Destino_gasto=[label=''])*(Descripci_n_de_la_Actividad_Inst=[label=''])*(ejercido=[label='']) /BOX="Entidad federativa" INDENT=3 RTS=12 misstext='-'; title 'AR03b.3-1 Gasto federal ejercido en educación obligatoria por entidad federativa y tipo de programa (millones de pesos a precios corrientes)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.3-1.1 GFEO constantes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido1; WHERE ejercido1>0 and niv in (251 252 255 201 202 205); CLASS ciclo1 &Destino_gasto niv edu tipo gasto1 Descripci_n_de_la_Actividad_Inst Entidad_Federativa1 Descripci_n_de_la_entidad_federa; by ciclo1; keylabel sum=''; keylabel all="Subtotal"; TABLE Entidad_Federativa1*Descripci_n_de_la_entidad_federa, edu*(&Destino_gasto=[label=''])*(Descripci_n_de_la_Actividad_Inst=[label=''])*(ejercido1=[label='']) /BOX="Entidad federativa" INDENT=3 RTS=12 misstext='-'; title 'AR03b.3-1.1 Gasto federal ejercido en educación obligatoria por entidad federativa y tipo de programa (millones de pesos a precios de 2012)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.3-A1 GFEO corrientes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido; WHERE ejercido>0 and niv in (251 252 255 201 202 205) and edu=1; CLASS ramo ciclo1 &Destino_gasto niv edu tipo gasto1 Modalidad_del_Programa_presupues Programa_Presupuestario Descripci_n_de_Programa_Presupue Entidad_Federativa1 Descripci_n_de_la_entidad_federa; by ciclo1; keylabel sum=''; keylabel all="Subtotal"; TABLE Entidad_Federativa1*Descripci_n_de_la_entidad_federa, edu*(&Destino_gasto=[label=''])*(ramo=[label=''])*(Modalidad_del_Programa_presupues=[label=''])*(Programa_Presupuestario=[label=''])*(Descripci_n_de_Programa_Presupue=[label=''])*(ejercido=[label='']) /BOX="Entidad federativa" INDENT=3 RTS=12 misstext='-'; title 'AR03b.3-A1 Gasto federal ejercido en educación obligatoria por entidad federativa y tipo de programa (millones de pesos a precios corrientes)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.3-A1.1 GFEO constantes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido1; WHERE ejercido1>0 and niv in (251 252 255 201 202 205) and edu=1; CLASS ramo ciclo1 &Destino_gasto niv edu tipo gasto1 Modalidad_del_Programa_presupues Programa_Presupuestario Descripci_n_de_Programa_Presupue Entidad_Federativa1 Descripci_n_de_la_entidad_federa; by ciclo1; keylabel sum=''; keylabel all="Subtotal"; TABLE Entidad_Federativa1*Descripci_n_de_la_entidad_federa, edu*(&Destino_gasto=[label=''])*(ramo=[label=''])*(Modalidad_del_Programa_presupues=[label=''])*(Programa_Presupuestario=[label=''])*(Descripci_n_de_Programa_Presupue=[label=''])*(ejercido1=[label='']) /BOX="Entidad federativa" INDENT=3 RTS=12 misstext='-'; title 'AR03b.3-A1.1 Gasto federal ejercido en educación obligatoria por entidad federativa y tipo de programa (millones de pesos a precios de 2012)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.3-2 GFEO constantes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido1; WHERE ejercido1>0 and niv in (251 201) and edu=2; CLASS ciclo1 &Destino_gasto niv edu gasto1 Descripci_n_de_la_Actividad_Inst Descripci_n_de_Programa_Presupue Entidad_Federativa1 Descripci_n_de_la_entidad_federa; by ciclo1; keylabel sum=''; keylabel all="Subtotal"; TABLE Entidad_Federativa1*Descripci_n_de_la_entidad_federa, (edu=[label=''])*(ciclo1=[label=''])*(Descripci_n_de_la_Actividad_Inst=[label=''])*(Descripci_n_de_Programa_Presupue=[label=''])*(gasto1=[label=''])*(ejercido1=[label='']) /BOX="Entidad federativa" INDENT=3 RTS=12 misstext='-'; title 'AR03b.3-2 Gasto ejercido del Fondo de Aportaciones para la Nómina Educativa y Gasto Operativo (FONE), participación porcentual y crecimiento real anual por entidad federativa'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.2-A2 GFE corrientes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido; WHERE ejercido>0 and niv in (201 202 251 252) and ciclo1 in (2008 2009 2010 2011 2012 2013 2014 2015 2016 2017); CLASS ciclo1 ramo Modalidad_del_Programa_presupues Programa_Presupuestario Descripci_n_de_Programa_Presupue &Destino_gasto niv; keylabel sum=''; keylabel all="Total"; TABLE ramo*Modalidad_del_Programa_presupues*Programa_Presupuestario*Descripci_n_de_Programa_Presupue, (&Destino_gasto=[label=''] ALL)*(ciclo1=[label=''])*(ejercido=[label='']) /BOX="Programa presupuestario" INDENT=3 RTS=12 misstext='-'; title 'AR03b.2-A2 Retrospectiva sobre los principales programas presupuestarios de educación básica y media superior (millones de pesos a precios corrientes)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.2-A2.1 GFE constantes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido1; WHERE ejercido1>0 and ciclo1 in (2008 2009 2010 2011 2012 2013 2014 2015 2016 2017); CLASS ciclo1 ramo Modalidad_del_Programa_presupues Programa_Presupuestario Descripci_n_de_Programa_Presupue &Destino_gasto niv; keylabel sum=''; keylabel all="Total"; TABLE ramo*Modalidad_del_Programa_presupues*Programa_Presupuestario*Descripci_n_de_Programa_Presupue, (&Destino_gasto=[label=''] ALL)*(ciclo1=[label=''])*(ejercido1=[label='']) /BOX="Programa presupuestario" INDENT=3 RTS=12 misstext='-'; title 'AR03b.2-A2.1 Retrospectiva sobre los principales programas presupuestarios de educación básica y media superior (millones de pesos a precios de 2012)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.2-3 GFE corrientes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido; WHERE ejercido>0 and niv in (201 251) and ciclo1 in (2008 2009 2010 2011 2012 2013 2014 2015 2016 2017); CLASS ciclo1 ramo Modalidad_del_Programa_presupues Programa_Presupuestario Descripci_n_de_Programa_Presupue &Destino_gasto niv principal edu; keylabel sum=''; keylabel all="Total"; TABLE edu*principal,(&Destino_gasto=[label=''])*(ciclo1=[label=''])*(ejercido=[label='']) /BOX="Programa presupuestario" INDENT=3 RTS=12 misstext='-'; title 'AR03b.2-3 Retrospectiva sobre los principales programas presupuestarios de educación básica (millones de pesos corrientes)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.2-3.1 GFE constantes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido1; WHERE ejercido1>0 and niv in (201 251) and ciclo1 in (2008 2009 2010 2011 2012 2013 2014 2015 2016 2017); CLASS ciclo1 ramo Modalidad_del_Programa_presupues Programa_Presupuestario Descripci_n_de_Programa_Presupue &Destino_gasto niv principal edu; keylabel sum=''; keylabel all="Total"; TABLE edu*principal,(&Destino_gasto=[label=''])*(ciclo1=[label=''])*(ejercido1=[label='']) /BOX="Programa presupuestario" INDENT=3 RTS=12 misstext='-'; title 'AR03b.2-3.1 Retrospectiva sobre los principales programas presupuestarios de educación básica (millones de pesos a precios de 2012)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.2-4 GFE corrientes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido; WHERE ejercido>0 and niv in (202 252) and ciclo1 in (2008 2009 2010 2011 2012 2013 2014 2015 2016 2017); CLASS ciclo1 ramo Modalidad_del_Programa_presupues Programa_Presupuestario Descripci_n_de_Programa_Presupue &Destino_gasto niv principal edu; keylabel sum=''; keylabel all="Total"; TABLE edu*principal,(&Destino_gasto=[label=''])*(ciclo1=[label=''])*(ejercido=[label='']) /BOX="Programa presupuestario" INDENT=3 RTS=12 misstext='-'; title 'AR03b.2-4 Retrospectiva sobre los principales programas presupuestarios de educación media superior (millones de pesos corrientes)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.2-4.1 GFE constantes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido1; WHERE ejercido1>0 and niv in (202 252) and ciclo1 in (2008 2009 2010 2011 2012 2013 2014 2015 2016 2017); CLASS ciclo1 ramo Modalidad_del_Programa_presupues Programa_Presupuestario Descripci_n_de_Programa_Presupue &Destino_gasto niv principal edu; keylabel sum=''; keylabel all="Total"; TABLE edu*principal,(&Destino_gasto=[label=''])*(ciclo1=[label=''])*(ejercido1=[label='']) /BOX="Programa presupuestario" INDENT=3 RTS=12 misstext='-'; title 'AR03b.2-4.1 Retrospectiva sobre los principales programas presupuestarios de educación media superior (millones de pesos a precios de 2012)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\solicitud3_constantes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido1; WHERE ejercido1>0 and niv in (202 252) and ciclo1 in (2008 2009 2010 2011 2012 2013 2014 2015 2016 2017); CLASS ciclo1 ramo Modalidad_del_Programa_presupues Programa_Presupuestario Descripci_n_de_Programa_Presupue &Destino_gasto niv principal edu Descripci_n_de_Unidad_Responsabl; keylabel sum=''; keylabel all="Total"; TABLE principal*Descripci_n_de_Unidad_Responsabl,(&Destino_gasto=[label=''])*(ciclo1=[label=''])*(ejercido1=[label='']) /BOX="Programa presupuestario" INDENT=3 RTS=12 misstext='-'; title 'AR03b.2-4.1 Retrospectiva sobre los principales programas presupuestarios de educación media superior (millones de pesos a precios de 2012)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; ODS Listing CLOSE; ODS TAGSETS.EXCELXP file="&arch\AR03b.2-5 GFE corrientes.xls" style=styles.Excel; ods tagsets.ExcelXP options(embedded_titles='yes' sheet_name=''); PROC TABULATE DATA=proof; VAR ejercido; WHERE ejercido>0 and niv in (201 251 202 252) and ciclo1 in (2017); CLASS ciclo1 ramo Modalidad_del_Programa_presupues Programa_Presupuestario Descripci_n_de_Programa_Presupue gasto1 niv principal edu; keylabel sum=''; keylabel all="Total"; TABLE edu*principal,(gasto1=[label=''])*(ejercido=[label='']) /BOX="Programa presupuestario" INDENT=3 RTS=12 misstext='-'; title 'AR03b.2-5 Gasto federal ejercido en los principales programas presupuestarios de educación obligatoria según tipo de gasto (millones de pesos corrientes)'; RUN; ODS tagsets.ExcelXP close; ODS Listing; %mend; /* Destino_gasto - Educación integral Destino_gasto2 - Sólo educación */ %tablas(Destino_gasto=Destino_gasto) /**** FIN DEL PROGRAMA ****/