Hi,
I am running the following analysis for 18 countries, and I want to make a chart that shows the ORs and 95%CIs for each country. How can I extract the ORs and 95%CIs by country as a list?
copy up to and including the previous line - ----------------
Listed 100 out of 17320 observations
Use the count() option to list more
.
I am running the following analysis for 18 countries, and I want to make a chart that shows the ORs and 95%CIs for each country. How can I extract the ORs and 95%CIs by country as a list?
Code:
levelsof country, local(country) foreach i of local country { ologit happiness i.age if country == `i' }
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long(happiness age country) . 2 22 3 3 8 1 3 14 3 2 15 3 4 15 2 6 4 . 1 17 3 6 23 . . 16 . 7 17 . . 17 1 5 14 . 6 7 1 1 3 2 6 2 . 5 7 . 5 7 1 3 16 . 3 17 . 4 22 4 5 14 2 6 14 . 2 22 2 5 23 2 3 21 3 4 9 1 6 14 2 4 2 2 5 2 3 4 15 . 1 12 2 4 15 . 6 22 3 1 19 . 2 17 1 3 4 1 1 4 2 1 18 . 5 7 2 7 2 2 3 2 2 5 19 . 1 7 . 1 12 2 1 14 . 4 17 2 1 19 2 5 14 1 4 14 1 7 11 4 5 15 3 5 2 . . 14 5 7 19 3 2 8 2 5 14 . 5 6 2 2 16 2 4 18 2 4 4 5 7 4 2 2 14 3 3 8 1 1 16 2 3 13 . 2 22 2 1 4 2 3 14 . 5 12 . . 23 . 7 17 1 1 19 . . 14 1 3 21 . 7 7 4 2 20 1 1 9 . 3 7 . . 8 3 5 23 . 7 6 . 7 7 3 7 9 1 7 8 . 5 7 2 6 14 2 3 15 1 1 14 2 1 18 2 7 23 5 4 2 1 6 14 4 7 19 1 6 5 2 1 14 1 4 11 . 7 7 2 2 14 . 5 17 2 5 14 end label values happiness LS1 label def LS1 1 "Very Happy", modify label def LS1 2 "Somewhat Happy", modify label def LS1 3 "Neither Happy Nor Unhappy", modify label def LS1 4 "Somewhat Unhappy", modify label def LS1 5 "Very Unhappy", modify label values Age WAGE label def WAGE 1 "15-19", modify label def WAGE 2 "20-24", modify label def WAGE 3 "25-29", modify label def WAGE 4 "30-34", modify label def WAGE 5 "35-39", modify label def WAGE 6 "40-44", modify label def WAGE 7 "45-49", modify label values country cn label def cn 2 "Chad", modify label def cn 3 "Gambia", modify label def cn 4 "Ghana", modify label def cn 5 "Guinea Bissau", modify label def cn 6 "Guyana", modify label def cn 7 "Honduras", modify label def cn 8 "Lesotho", modify label def cn 9 "Nepal", modify label def cn 11 "Tonga", modify label def cn 12 "Turkemenistan", modify label def cn 13 "Tuvalu", modify label def cn 14 "Bangladesh", modify label def cn 15 "Congo", modify label def cn 16 "Iraq", modify label def cn 17 "Madagascar", modify label def cn 18 "Palestine", modify label def cn 19 "Sierra Leon", modify label def cn 20 "Suriname", modify label def cn 21 "Togo", modify label def cn 22 "Tunisia", modify label def cn 23 "Zimbabwe", modify
Listed 100 out of 17320 observations
Use the count() option to list more
.
Comment