Dear all,
I am trying to add confidence intervals to a graph dot showing the mean value of anti-immigrant attitudes for each country.
Based on cross-sectional data including 28 countries, i generated the following example dataset consisting of the mean value of anti-immigrant attitudes for each country.
The graph dot attached shows the mean value of anti-immigrant attitudes (dots) over countries (categorial axis presented vertically) and is based on the following command

My question is, how to add confidence intervals to the graph dot for each country mean of anti-immigrant attitudes similar to the attached graph

Source: Masood, M., Aggarwal, A. & Reidpath, D.D. Effect of national culture on BMI: a multilevel analysis of 53 countries. BMC Public Health 19, 1212 (2019). https://doi.org/10.1186/s12889-019-7536-0
This post is related to a previous post: https://www.statalist.org/forums/for...ls#post1595946 (see #10)
I would be very grateful for any help.
Best regards
Amelie
I am trying to add confidence intervals to a graph dot showing the mean value of anti-immigrant attitudes for each country.
Based on cross-sectional data including 28 countries, i generated the following example dataset consisting of the mean value of anti-immigrant attitudes for each country.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float antmi str2 cntry 5.179465 "AT" 4.4687862 "BE" 5.980606 "BG" 3.984998 "CH" 5.756306 "CY" 6.139078 "CZ" 4.171445 "DE" 4.239356 "DK" 5.185469 "EE" 3.9809716 "ES" 3.886236 "FI" 4.790751 "FR" 4.1734457 "GB" 4.947642 "HR" 6.218821 "HU" 3.810525 "IE" 2.7447665 "IS" 5.511042 "IT" 4.952845 "LT" 4.521533 "LV" 4.1681414 "NL" 3.972714 "NO" 4.316811 "PL" 3.811007 "PT" 5.703016 "RS" 3.627834 "SE" 5.487343 "SI" 6.264863 "SK" end
Code:
. graph dot antmi, over (cntry, sort(1)descending) /// > yline (5.09, lcolor(gray) lpattern(dash)) /// > ytitle ("Anti-Immigrant Attitudes over country")
Source: Masood, M., Aggarwal, A. & Reidpath, D.D. Effect of national culture on BMI: a multilevel analysis of 53 countries. BMC Public Health 19, 1212 (2019). https://doi.org/10.1186/s12889-019-7536-0
This post is related to a previous post: https://www.statalist.org/forums/for...ls#post1595946 (see #10)
I would be very grateful for any help.
Best regards
Amelie
Comment