OPEN C:\Users\Shei\Desktop\EPH\2003\03\individual_t303.WF1
'OPEN C:\Users\Shei\Desktop\2003\03\individual_t403.WF1
'OPEN C:\Users\Shei\Desktop\INDICES.WF1
'Para unirla, corrí el programa y luego desde el archivo del tercer trimestre 2003 hice PROC/APPEND to current page/seleccione individual_t403 y listo
'OCUPACIÓN PRINCIPAL
series ocup=0
ocup = @val(pp04d_cod)
' tipo de empleo
series  job
smpl if @mid(@str(ocup), 3, 1) = "3"
' Completar la variable con: 
job=@val(@left(@str(ocup),3))
smpl @all
' Sexo
series hombre=0
hombre=ch04=1
'estado civil
series married=0
married=ch07=2
'show hombre ch04
' Horas trabajadas
series horas=0
smpl if PP03C=1 and pp3e_tot=40
horas=1
smpl @all
' full time
smpl if PP03C=1 and pp3e_tot>40 and pp3e_tot<168
horas=2
smpl @all
'show horas PP03C pp3e_tot
'BENEFICIOS
series beneficios
beneficios=pp07f1=1 or pp07f2=1 or pp07f3=1 or pp07f4=1
'HIJOS
Series a_hijo=0
a_hijo=@sumsby(componente=3, codusu)
'EDUCACIÓN
series educ =0
educ= @val(ch14)
series a_educ=0
'Primario
smpl if ch12=2 and ch13=2 and educ=1
a_educ=1
smpl @all
smpl if ch12=2 and ch13=2 and educ=2
a_educ=2
smpl @all
smpl if ch12=2 and ch13=2 and educ=3
a_educ=3
smpl @all
smpl if ch12=2 and ch13=2 and educ=4
a_educ=4
smpl @all
smpl if ch12=2 and ch13=2 and educ=5
a_educ=5
smpl @all
smpl if ch12=2 and ch13=2 and educ=6
a_educ=6
smpl @all
smpl if ch12=2 and ch13=1
a_educ=6
smpl @all
smpl if ch12=2 and ch13=2 and educ=>7 and educ<90
a_educ=6
smpl @all
'EGB
smpl if ch12=3 and ch13=2 and educ=1
a_educ=1
smpl @all
smpl if ch12=3 and ch13=2 and educ=2
a_educ=2
smpl @all
smpl if ch12=3 and ch13=2 and educ=3
a_educ=3
smpl @all
smpl if ch12=3 and ch13=2 and educ=4
a_educ=4
smpl @all
smpl if ch12=3 and ch13=2 and educ=5
a_educ=5
smpl @all
smpl if ch12=3 and ch13=2 and educ=6
a_educ=6
smpl @all
smpl if ch12=3 and ch13=2 and educ=7
a_educ=7
smpl @all
smpl if ch12=3 and ch13=2 and educ=8
a_educ=8
smpl @all
smpl if ch12=3 and ch13=2 and educ=9
a_educ=9
smpl @all
smpl if ch12=3 and ch13=1
a_educ=9
smpl @all
smpl if ch12=3 and ch13=2 and educ=>10 and educ<90
a_educ=9
smpl @all
'Secundario
smpl if ch12=4 and ch13=2 and educ=0
a_educ=6
smpl @all
smpl if ch12=4 and ch13=2 and educ=1
a_educ=7
smpl @all
smpl if ch12=4 and ch13=2 and educ=2
a_educ=8
smpl @all
smpl if ch12=4 and ch13=2 and educ=3
a_educ=9
smpl @all
smpl if ch12=4 and ch13=2 and educ=4
a_educ=10
smpl @all
smpl if ch12=4 and ch13=2 and educ=5
a_educ=11
smpl @all
smpl if ch12=4 and ch13=2 and educ=6
a_educ=12
smpl @all
smpl if ch12=4 and ch13=1
a_educ=12
smpl @all
smpl if ch12=4 and ch13=2 and educ=99
a_educ=6
smpl @all
smpl if ch12=4 and ch13=2 and educ=>7 and educ<90
a_educ=12
smpl @all
''Polimodal
smpl if ch12=5 and ch13=2 and educ=0
a_educ=9
smpl @all
smpl if ch12=5 and ch13=2 and educ=1
a_educ=10
smpl @all
smpl if ch12=5 and ch13=2 and educ=2
a_educ=11
smpl @all
smpl if ch12=5 and ch13=2 and educ=3
a_educ=12
smpl @all
smpl if ch12=5 and ch13=1
a_educ=12
smpl @all
smpl if ch12=5 and ch13=2 and educ=99
a_educ=9
smpl @all
smpl if ch12=5 and ch13=2 and educ=>4 and educ<90
a_educ=12
smpl @all
'Terciario
smpl if ch12=6 and ch13=2 and educ=0
a_educ=12
smpl @all
smpl if ch12=6 and ch13=2 and educ=1
a_educ=13
smpl @all
smpl if ch12=6 and ch13=2 and educ=2
a_educ=14
smpl @all
smpl if ch12=6 and ch13=2 and educ=3
a_educ=15
smpl @all
smpl if ch12=6 and ch13=1
a_educ=15
smpl @all
smpl if ch12=6 and ch13=2 and educ=99
a_educ=12
smpl @all
smpl if ch12=6 and ch13=2 and educ=>4 and educ<90
a_educ=15
smpl @all
''Universitario
smpl if ch12=7 and ch13=2 and educ=0
a_educ=12
smpl @all
smpl if ch12=7 and ch13=2 and educ=1
a_educ=13
smpl @all
smpl if ch12=7 and ch13=2 and educ=2
a_educ=14
smpl @all
smpl if ch12=7 and ch13=2 and educ=3
a_educ=15
smpl @all
smpl if ch12=7 and ch13=2 and educ=4
a_educ=16
smpl @all
smpl if ch12=7 and ch13=2 and educ=5
a_educ=17
smpl @all
smpl if ch12=7 and ch13=1
a_educ=17
smpl @all
smpl if ch12=7 and ch13=2 and educ=99
a_educ=12
smpl @all
smpl if ch12=7 and ch13=2 and educ=>6 and educ<90
a_educ=18
smpl @all
'Posgrado
smpl if ch12=8 and ch13=2 and educ=0
a_educ=15
smpl @all
smpl if ch12=8 and ch13=2 and educ=1
a_educ=18
smpl @all
smpl if ch12=8 and ch13=2 and educ=2
a_educ=19
smpl @all
smpl if ch12=8 and ch13=1
a_educ=19
smpl @all
smpl if ch12=8 and ch13=2 and educ=99
a_educ=15
smpl @all
smpl if ch12=8 and ch13=2 and educ=>3 and educ<90
a_educ=20
smpl @all
'show ch12 ch13 educ a_educ
'EDUC^2
series a2_educ=0
a2_educ=a_educ^2
'EDAD^2
series ch062=0
'show ch06
'show ch062
ch062=ch06^2
smpl @all if p21>0
'INGRESO
'show p21
series lp21=0
lp21=log(p21)
show lp21
smpl if ch06=>18 and ch06<65 and a_hijo>2 and ch12<9
'EXPERIENCIA
series exper=0
exper = ch06 - a_educ- 6
show ch06 a_educ exper
'PONDERACIÓN
series sump=0
sump = @sum (pondera)
series psump=0
psump= pondera / sump
series pch06=0
pch06=ch06*psump
series pp21=0
pp21=p21*psump
series plp21=0
plp21=lp21*psump
series pocup=0
pocup= ocup*psump
series pjob=0
pjob=job*psump
series phombre=0
phombre=hombre*psump
series pmarried=0
pmarried=married*psump
series phoras=0
phoras=horas*psump
series pbeneficios=0
pbeneficios=beneficios*psump
series pa_hijo=0
pa_hijo=a_hijo*psump
series pa_educ=0
pa_educ=a_educ*psump
'show a_educ psump sump pondera
equation reg1.ls p21 n2003 exper a_educ ch062
equation reg2.ls lp21 n2003 exper a_educ ch062
stop
OPEN C:\Users\Shei\Desktop\MIO\FACULTAD\COMPUTACION\EPH\2004\01\individual_t104
'OPEN C:\Users\Shei\Desktop\MIO\FACULTAD\COMPUTACION\EPH\2004\02\individual_t204
'OPEN C:\Users\Shei\Desktop\MIO\FACULTAD\COMPUTACION\EPH\2004\03\individual_t304
'OPEN C:\Users\Shei\Desktop\MIO\FACULTAD\COMPUTACION\EPH\2004\04\individual_t404
'OCUPACIÓN PRINCIPAL
series ocup=0
ocup = @val(pp04d_cod)
' tipo de empleo
series  job
smpl if @mid(@str(ocup), 3, 1) = "3"
' Completar la variable con: 
job=@val(@left(@str(ocup),3))
smpl @all
' Sexo
series hombre=0
hombre=ch04=1
'estado civil
series married=0
married=ch07=2
'show hombre ch04
' Horas trabajadas
series horas=0
smpl if PP03C=1 and pp3e_tot=40
horas=1
smpl @all
' full time
smpl if PP03C=1 and pp3e_tot>40 and pp3e_tot<168
horas=2
smpl @all
'show horas PP03C pp3e_tot
'BENEFICIOS
series beneficios
beneficios=pp07f1=1 or pp07f2=1 or pp07f3=1 or pp07f4=1
'HIJOS
Series a_hijo=0
a_hijo=@sumsby(componente=3, codusu)
'EDUCACIÓN
series educ =0
educ= @val(ch14)
series a_educ=0
'Primario
smpl if ch12=2 and ch13=2 and educ=1
a_educ=1
smpl @all
smpl if ch12=2 and ch13=2 and educ=2
a_educ=2
smpl @all
smpl if ch12=2 and ch13=2 and educ=3
a_educ=3
smpl @all
smpl if ch12=2 and ch13=2 and educ=4
a_educ=4
smpl @all
smpl if ch12=2 and ch13=2 and educ=5
a_educ=5
smpl @all
smpl if ch12=2 and ch13=2 and educ=6
a_educ=6
smpl @all
smpl if ch12=2 and ch13=1
a_educ=6
smpl @all
smpl if ch12=2 and ch13=2 and educ=>7 and educ<90
a_educ=6
smpl @all
'EGB
smpl if ch12=3 and ch13=2 and educ=1
a_educ=1
smpl @all
smpl if ch12=3 and ch13=2 and educ=2
a_educ=2
smpl @all
smpl if ch12=3 and ch13=2 and educ=3
a_educ=3
smpl @all
smpl if ch12=3 and ch13=2 and educ=4
a_educ=4
smpl @all
smpl if ch12=3 and ch13=2 and educ=5
a_educ=5
smpl @all
smpl if ch12=3 and ch13=2 and educ=6
a_educ=6
smpl @all
smpl if ch12=3 and ch13=2 and educ=7
a_educ=7
smpl @all
smpl if ch12=3 and ch13=2 and educ=8
a_educ=8
smpl @all
smpl if ch12=3 and ch13=2 and educ=9
a_educ=9
smpl @all
smpl if ch12=3 and ch13=1
a_educ=9
smpl @all
smpl if ch12=3 and ch13=2 and educ=>10 and educ<90
a_educ=9
smpl @all
'Secundario
smpl if ch12=4 and ch13=2 and educ=0
a_educ=6
smpl @all
smpl if ch12=4 and ch13=2 and educ=1
a_educ=7
smpl @all
smpl if ch12=4 and ch13=2 and educ=2
a_educ=8
smpl @all
smpl if ch12=4 and ch13=2 and educ=3
a_educ=9
smpl @all
smpl if ch12=4 and ch13=2 and educ=4
a_educ=10
smpl @all
smpl if ch12=4 and ch13=2 and educ=5
a_educ=11
smpl @all
smpl if ch12=4 and ch13=2 and educ=6
a_educ=12
smpl @all
smpl if ch12=4 and ch13=1
a_educ=12
smpl @all
smpl if ch12=4 and ch13=2 and educ=99
a_educ=6
smpl @all
smpl if ch12=4 and ch13=2 and educ=>7 and educ<90
a_educ=12
smpl @all
''Polimodal
smpl if ch12=5 and ch13=2 and educ=0
a_educ=9
smpl @all
smpl if ch12=5 and ch13=2 and educ=1
a_educ=10
smpl @all
smpl if ch12=5 and ch13=2 and educ=2
a_educ=11
smpl @all
smpl if ch12=5 and ch13=2 and educ=3
a_educ=12
smpl @all
smpl if ch12=5 and ch13=1
a_educ=12
smpl @all
smpl if ch12=5 and ch13=2 and educ=99
a_educ=9
smpl @all
smpl if ch12=5 and ch13=2 and educ=>4 and educ<90
a_educ=12
smpl @all
'Terciario
smpl if ch12=6 and ch13=2 and educ=0
a_educ=12
smpl @all
smpl if ch12=6 and ch13=2 and educ=1
a_educ=13
smpl @all
smpl if ch12=6 and ch13=2 and educ=2
a_educ=14
smpl @all
smpl if ch12=6 and ch13=2 and educ=3
a_educ=15
smpl @all
smpl if ch12=6 and ch13=1
a_educ=15
smpl @all
smpl if ch12=6 and ch13=2 and educ=99
a_educ=12
smpl @all
smpl if ch12=6 and ch13=2 and educ=>4 and educ<90
a_educ=15
smpl @all
''Universitario
smpl if ch12=7 and ch13=2 and educ=0
a_educ=12
smpl @all
smpl if ch12=7 and ch13=2 and educ=1
a_educ=13
smpl @all
smpl if ch12=7 and ch13=2 and educ=2
a_educ=14
smpl @all
smpl if ch12=7 and ch13=2 and educ=3
a_educ=15
smpl @all
smpl if ch12=7 and ch13=2 and educ=4
a_educ=16
smpl @all
smpl if ch12=7 and ch13=2 and educ=5
a_educ=17
smpl @all
smpl if ch12=7 and ch13=1
a_educ=17
smpl @all
smpl if ch12=7 and ch13=2 and educ=99
a_educ=12
smpl @all
smpl if ch12=7 and ch13=2 and educ=>6 and educ<90
a_educ=18
smpl @all
'Posgrado
smpl if ch12=8 and ch13=2 and educ=0
a_educ=15
smpl @all
smpl if ch12=8 and ch13=2 and educ=1
a_educ=18
smpl @all
smpl if ch12=8 and ch13=2 and educ=2
a_educ=19
smpl @all
smpl if ch12=8 and ch13=1
a_educ=19
smpl @all
smpl if ch12=8 and ch13=2 and educ=99
a_educ=15
smpl @all
smpl if ch12=8 and ch13=2 and educ=>3 and educ<90
a_educ=20
smpl @all
show ch12 ch13 educ a_educ
smpl if ch06=>18 and ch06<65 and a_hijo>2 and p21>0 and ch12<9
'INGRESO
show p21
series lp21=0
show lp21
lp21=log(p21)
show lp21
'EXPERIENCIA
series exper
exper = ch06 - a_educ- 6
'show ch06 a_educ exper
'PONDERACIÓN
series sump=0
sump = @sum (pondera)
series psump=0
psump= pondera / sump
series pp21=0
pp21=p21*psump
series plp21=0
plp21=lp21*psump
series pocup=0
pocup= ocup*psump
series pjob=0
pjob=job*psump
series phombre=0
phombre=hombre*psump
series pmarried=0
pmarried=married*psump
series phoras=0
phoras=horas*psump
series pbeneficios=0
pbeneficios=beneficios*psump
series pa_hijo=0
pa_hijo=a_hijo*psump
series pa_educ=0
pa_educ=a_educ*psump
'show a_educ psump sump pondera
'equation reg1.ls lp21 n2003
