Hi, I have this variable lugnac_depart, which is the result of three variables.
. tab lugnac_depart
Departament |
o de |
Nacimiento | Freq. Percent Cum.
------------+-----------------------------------
._._11 | 163,490 69.54 69.54
._13_11 | 1,549 0.66 70.20
._15_11 | 10,876 4.63 74.82
._17_11 | 2,404 1.02 75.85
._18_11 | 570 0.24 76.09
._19_11 | 616 0.26 76.35
._20_11 | 917 0.39 76.74
._23_11 | 1,357 0.58 77.32
._25_11 | 12,520 5.33 82.64
._27_11 | 344 0.15 82.79
._41_11 | 2,281 0.97 83.76
._44_11 | 347 0.15 83.91
._47_11 | 1,047 0.45 84.35
._50_11 | 1,506 0.64 84.99
._52_11 | 1,097 0.47 85.46
._54_11 | 1,487 0.63 86.09
._5_11 | 2,248 0.96 87.05
._63_11 | 846 0.36 87.41
._66_11 | 519 0.22 87.63
._68_11 | 5,031 2.14 89.77
._70_11 | 704 0.30 90.07
._73_11 | 7,062 3.00 93.07
._76_11 | 2,227 0.95 94.02
._81_11 | 179 0.08 94.10
._85_11 | 309 0.13 94.23
._86_11 | 149 0.06 94.29
._88_11 | 40 0.02 94.31
._8_11 | 1,525 0.65 94.96
._91_11 | 90 0.04 95.00
._94_11 | 19 0.01 95.00
._95_11 | 54 0.02 95.03
._97_11 | 23 0.01 95.04
._99_11 | 33 0.01 95.05
1_._11 | 10,440 4.44 99.49
2_._11 | 144 0.06 99.55
3_._11 | 173 0.07 99.63
4_._11 | 109 0.05 99.67
5_._11 | 66 0.03 99.70
6_._11 | 705 0.30 100.00
------------+-----------------------------------
Total | 235,103 100.00
I am trying to label it, but I am getting an error after running this line of code:
By the way, I am changing the dots in the names of the categries with 0
label var lugnac_depart "Departamento de Nacimiento"
label define lugnac_departl 0_5_11 "Antioquia" /*
*/ 0_8_11 "Atlántico" /*
*/ 0_0_11 "Bogotá D.C" /*
*/ 0_13_11 "Bolivar" /*
*/ 0_15_11 "Boyacá" /*
*/ 0_17_11 "Caldas" /*
*/ 0_18_11 "Caquetá" /*
*/ 0_19_11 "Cauca" /*
*/ 0_20_11 "Cesar" /*
*/ 0_23_11 "Córdoba" /*
*/ 0_25_11 "Cundinamarca"/*
*/ 0_27_11 "Choco" /*
*/ 0_41_11 "Huila" /*
*/ 0_44_11 "La Guajira" /*
*/ 0_47_11 "Magdalena" /*
*/ 0_50_11 "Meta" /*
*/ 0_52_11 "Nariño" /*
*/ 0_54_11 "Norte de Santander" /*
*/ 0_63_11 "Quindio" /*
*/ 0_66_11 "Risaralda" /*
*/ 0_68_11 "Santander" /*
*/ 0_70_11 "Sucre" /*
*/ 0_73_11 "Tolima" /*
*/ 0_76_11 "Valle del Cauca" /*
*/ 0_81_11 "Arauca" /*
*/ 0_85_11 "Casanare" /*
*/ 0_86_11 "Putumayo" /*
*/ 0_88_11 "San Andres" /*
*/ 0_91_11"Amazonas" /*
*/ 0_94_11 "Guainia" /*
*/ 0_95_11 "Guaviare" /*
*/ 0_97_11 "Vaupes" /*
*/ 0_99_11 "Vichada" /*
*/ 1_0_11 "Venezuela" /*
*/ 2_0_11 "Estados Unidos" /*
*/ 3_0_11 "Ecuador" /*
*/ 4_0_11 "España" /*
*/ 5_0_11 "Perú" /*
*/ 6_0_11 "Otro"
label value lugnac_depart lugnac_departl
The error I am gettin is the error 198: invalid syntax
Can anyone help me?
. tab lugnac_depart
Departament |
o de |
Nacimiento | Freq. Percent Cum.
------------+-----------------------------------
._._11 | 163,490 69.54 69.54
._13_11 | 1,549 0.66 70.20
._15_11 | 10,876 4.63 74.82
._17_11 | 2,404 1.02 75.85
._18_11 | 570 0.24 76.09
._19_11 | 616 0.26 76.35
._20_11 | 917 0.39 76.74
._23_11 | 1,357 0.58 77.32
._25_11 | 12,520 5.33 82.64
._27_11 | 344 0.15 82.79
._41_11 | 2,281 0.97 83.76
._44_11 | 347 0.15 83.91
._47_11 | 1,047 0.45 84.35
._50_11 | 1,506 0.64 84.99
._52_11 | 1,097 0.47 85.46
._54_11 | 1,487 0.63 86.09
._5_11 | 2,248 0.96 87.05
._63_11 | 846 0.36 87.41
._66_11 | 519 0.22 87.63
._68_11 | 5,031 2.14 89.77
._70_11 | 704 0.30 90.07
._73_11 | 7,062 3.00 93.07
._76_11 | 2,227 0.95 94.02
._81_11 | 179 0.08 94.10
._85_11 | 309 0.13 94.23
._86_11 | 149 0.06 94.29
._88_11 | 40 0.02 94.31
._8_11 | 1,525 0.65 94.96
._91_11 | 90 0.04 95.00
._94_11 | 19 0.01 95.00
._95_11 | 54 0.02 95.03
._97_11 | 23 0.01 95.04
._99_11 | 33 0.01 95.05
1_._11 | 10,440 4.44 99.49
2_._11 | 144 0.06 99.55
3_._11 | 173 0.07 99.63
4_._11 | 109 0.05 99.67
5_._11 | 66 0.03 99.70
6_._11 | 705 0.30 100.00
------------+-----------------------------------
Total | 235,103 100.00
I am trying to label it, but I am getting an error after running this line of code:
By the way, I am changing the dots in the names of the categries with 0
label var lugnac_depart "Departamento de Nacimiento"
label define lugnac_departl 0_5_11 "Antioquia" /*
*/ 0_8_11 "Atlántico" /*
*/ 0_0_11 "Bogotá D.C" /*
*/ 0_13_11 "Bolivar" /*
*/ 0_15_11 "Boyacá" /*
*/ 0_17_11 "Caldas" /*
*/ 0_18_11 "Caquetá" /*
*/ 0_19_11 "Cauca" /*
*/ 0_20_11 "Cesar" /*
*/ 0_23_11 "Córdoba" /*
*/ 0_25_11 "Cundinamarca"/*
*/ 0_27_11 "Choco" /*
*/ 0_41_11 "Huila" /*
*/ 0_44_11 "La Guajira" /*
*/ 0_47_11 "Magdalena" /*
*/ 0_50_11 "Meta" /*
*/ 0_52_11 "Nariño" /*
*/ 0_54_11 "Norte de Santander" /*
*/ 0_63_11 "Quindio" /*
*/ 0_66_11 "Risaralda" /*
*/ 0_68_11 "Santander" /*
*/ 0_70_11 "Sucre" /*
*/ 0_73_11 "Tolima" /*
*/ 0_76_11 "Valle del Cauca" /*
*/ 0_81_11 "Arauca" /*
*/ 0_85_11 "Casanare" /*
*/ 0_86_11 "Putumayo" /*
*/ 0_88_11 "San Andres" /*
*/ 0_91_11"Amazonas" /*
*/ 0_94_11 "Guainia" /*
*/ 0_95_11 "Guaviare" /*
*/ 0_97_11 "Vaupes" /*
*/ 0_99_11 "Vichada" /*
*/ 1_0_11 "Venezuela" /*
*/ 2_0_11 "Estados Unidos" /*
*/ 3_0_11 "Ecuador" /*
*/ 4_0_11 "España" /*
*/ 5_0_11 "Perú" /*
*/ 6_0_11 "Otro"
label value lugnac_depart lugnac_departl
The error I am gettin is the error 198: invalid syntax
Can anyone help me?
Comment