Hello everyone.
I am trying to get descriptive tables for my PhD thesis, but I would like very specific ones (not with mean, sd, min, max etc). Also, I would like to export them to Latex.
As you can see it's a panel database with data on victims of terrorism per countries per years. I would like to obtain two descriptive tables from that.
with the total number of attacks in 1990, the total number of victims in 1990 etc... Without any distinction of countries.
with data on north countries on the upper side and data on south countries below.
Thank you very much for your future help,
Have a good day,
Killian
I am trying to get descriptive tables for my PhD thesis, but I would like very specific ones (not with mean, sd, min, max etc). Also, I would like to export them to Latex.
- Tables construction
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int year str59 Origin float(WoundedQuinq_or VictimsQuinq_or TotalVictims_or AttacksQuinq_or WeapBombQuinq_or TargViolPolQuinq_or TargReligQuinq_or PropvalueQuinq_or) 1990 "Afghanistan" 192 138 330 22 20 1 0 2235000 1995 "Afghanistan" 464 151 615 80 45 3 4 0 2000 "Afghanistan" 148 87 235 21 15 1 0 0 2005 "Afghanistan" 816 724 1540 254 166 0 7 -891 2010 "Afghanistan" 5405 4448 9853 1694 905 0 43 121981 2015 "Afghanistan" 17729 15216 32945 5692 3460 6 61 -122989.96 2017 "Afghanistan" 13472 12329 25801 3542 1562 4 73 591991 1990 "Albania" 0 0 0 0 0 0 0 0 1995 "Albania" 0 2 2 7 4 0 0 0 2000 "Albania" 124 39 163 57 33 0 1 0 2005 "Albania" 0 0 0 4 3 0 0 0 2010 "Albania" 0 0 0 1 1 0 0 0 2015 "Albania" 2 1 3 3 3 0 0 -198 2017 "Albania" 0 0 0 6 5 0 0 3299802 1990 "Algeria" 0 0 0 0 0 0 0 0 1995 "Algeria" 491 828 1319 497 48 1 7 5444000 2000 "Algeria" 5314 6631 11945 915 363 2 21 0 2005 "Algeria" 1147 2202 3349 525 161 0 3 -99 2010 "Algeria" 1663 1145 2808 595 370 0 1 -891 2015 "Algeria" 437 302 739 191 132 0 0 -2970 2017 "Algeria" 21 30 51 25 14 0 0 -693 1990 "American Samoa" 0 0 0 0 0 0 0 0 1995 "American Samoa" 0 0 0 0 0 0 0 0 2000 "American Samoa" 0 0 0 0 0 0 0 0 2005 "American Samoa" 0 0 0 0 0 0 0 0 2010 "American Samoa" 0 0 0 0 0 0 0 0 2015 "American Samoa" 0 0 0 0 0 0 0 0 2017 "American Samoa" 0 0 0 0 0 0 0 0 1990 "Andorra" 0 0 0 0 0 0 0 0 1995 "Andorra" 0 0 0 0 0 0 0 0 2000 "Andorra" 0 0 0 0 0 0 0 0 2005 "Andorra" 0 0 0 0 0 0 0 0 2010 "Andorra" 0 0 0 0 0 0 0 0 2015 "Andorra" 0 0 0 0 0 0 0 0 2017 "Andorra" 0 0 0 0 0 0 0 0 1990 "Angola" 181 363 544 38 18 0 2 273000 1995 "Angola" 430 423 853 284 205 7 1 10010000 2000 "Angola" 410 678 1088 75 14 1 0 1.20e+07 2005 "Angola" 534 1083 1617 68 6 0 3 0 2010 "Angola" 0 2 2 1 0 0 0 0 2015 "Angola" 7 4 11 2 0 0 0 0 2017 "Angola" 0 0 0 2 0 0 0 0 1990 "Anguilla" 0 0 0 0 0 0 0 0 1995 "Anguilla" 0 0 0 0 0 0 0 0 2000 "Anguilla" 0 0 0 0 0 0 0 0 2005 "Anguilla" 0 0 0 0 0 0 0 0 2010 "Anguilla" 0 0 0 0 0 0 0 0 2015 "Anguilla" 0 0 0 0 0 0 0 0 2017 "Anguilla" 0 0 0 0 0 0 0 0 1990 "Antigua and Barbuda" 0 0 0 0 0 0 0 0 1995 "Antigua and Barbuda" 0 0 0 1 0 0 0 0 2000 "Antigua and Barbuda" 0 0 0 0 0 0 0 0 2005 "Antigua and Barbuda" 0 0 0 0 0 0 0 0 2010 "Antigua and Barbuda" 0 0 0 0 0 0 0 0 2015 "Antigua and Barbuda" 0 0 0 0 0 0 0 0 2017 "Antigua and Barbuda" 0 0 0 0 0 0 0 0 1990 "Argentina" 70 34 104 221 176 0 7 1862500 1995 "Argentina" 498 120 618 114 85 0 5 1100000 2000 "Argentina" 15 4 19 47 20 0 0 0 2005 "Argentina" 1 0 1 3 3 0 1 0 2010 "Argentina" 0 0 0 4 4 0 0 -198 2015 "Argentina" 2 0 2 10 8 0 0 -297 2017 "Argentina" 2 0 2 3 1 0 0 0 1990 "Armenia" 27 6 33 7 6 0 0 810060 1995 "Armenia" 170 103 273 76 29 0 0 100000 2000 "Armenia" 21 12 33 6 4 0 0 0 2005 "Armenia" 0 1 1 4 2 0 0 0 2010 "Armenia" 0 1 1 2 1 0 0 0 2015 "Armenia" 1 0 1 1 0 0 0 0 2017 "Armenia" 2 6 8 4 1 0 0 -198 1990 "Aruba" 0 0 0 0 0 0 0 0 1995 "Aruba" 0 0 0 0 0 0 0 0 2000 "Aruba" 0 0 0 0 0 0 0 0 2005 "Aruba" 0 0 0 0 0 0 0 0 2010 "Aruba" 0 0 0 0 0 0 0 0 2015 "Aruba" 0 0 0 0 0 0 0 0 2017 "Aruba" 0 0 0 0 0 0 0 0 1990 "Australia" 22 1 23 7 4 1 0 20000 1995 "Australia" 12 4 16 17 6 0 1 0 2000 "Australia" 26 2 28 20 10 0 0 112000 2005 "Australia" 0 0 0 3 0 0 1 0 2010 "Australia" 0 0 0 6 2 0 1 60000 2015 "Australia" 7 4 11 10 0 0 2 -693 2017 "Australia" 1 2 3 23 1 0 18 -982 1990 "Austria" 52 7 59 15 9 0 0 0 1995 "Austria" 10 2 12 28 17 0 1 12000 2000 "Austria" 7 6 13 18 10 0 0 0 2005 "Austria" 0 0 0 0 0 0 0 0 2010 "Austria" 9 1 10 12 0 0 1 0 2015 "Austria" 2 0 2 2 0 0 0 -99 2017 "Austria" 0 0 0 3 0 0 0 334992 1990 "Azerbaijan" 27 6 33 7 6 0 0 810060 1995 "Azerbaijan" 277 302 579 94 34 0 0 100000 2000 "Azerbaijan" 0 3 3 5 2 0 0 0 2005 "Azerbaijan" 10 1 11 6 2 0 0 0 2010 "Azerbaijan" 15 6 21 5 3 0 2 0 2015 "Azerbaijan" 1 0 1 3 1 0 2 7560 2017 "Azerbaijan" 1 1 2 2 2 0 0 0 1990 "Bahamas" 0 0 0 0 0 0 0 0 1995 "Bahamas" 0 0 0 0 0 0 0 0 end
- The first table would look like this:
AttacksQuinq_or | VictimsQuinq_or | WoundedQuinq_or | WeapBombQuinq_or | TargViolPolQuinq_or | TargReligQuinq_or | PropvalueQuinq_or | |
1990 | |||||||
1995 | |||||||
2000 | |||||||
2005 | |||||||
2010 | |||||||
2015 | |||||||
2017 |
- The second table would differenciate according to countries level of development (North and South countries). Basically my "North countries" are definied such as those having a GNI per capita above the High income threshold from the World Bank, while "South countries" are those below the medium to lower GNI per capita threshold. This would look like:
AttacksQuinq_or | VictimsQuinq_or | WoundedQuinq_or | WeapBombQuinq_or | TargViolPolQuinq_or | TargReligQuinq_or | PropvalueQuinq_or | ||
NORTH | 1990 | |||||||
NORTH | 1995 | |||||||
NORTH | 2000 | |||||||
NORTH | 2005 | |||||||
NORTH | 2010 | |||||||
NORTH | 2015 | |||||||
NORTH | 2017 | |||||||
SOUTH | 1990 | |||||||
SOUTH | 1995 | |||||||
SOUTH | 2000 | |||||||
SOUTH | 2005 | |||||||
SOUTH | 2010 | |||||||
SOUTH | 2015 | |||||||
SOUTH | 2017 |
2. Export these tables to LatexThen I would like to export these tables to latex. I know how to do it with "classic" descriptive stats (ie mean sd etc) but not with this kind of tables.
Thank you very much for your future help,
Have a good day,
Killian
Comment