Dear Stata Users,
I am trying to reduce the gap between the categories of my over variable (Country). In the graph below I get a huge gap between Estonia Belgium and Belgium Sweden, because Estonia==2. Belgium==4, Sweden==6, The 2 countries with codes 3 and 5 have no data for variable distance2 and hence the gap. Is there a workaround in stripplot without having to recode the labels of the Country variable.
Thank you in advance.
I am trying to reduce the gap between the categories of my over variable (Country). In the graph below I get a huge gap between Estonia Belgium and Belgium Sweden, because Estonia==2. Belgium==4, Sweden==6, The 2 countries with codes 3 and 5 have no data for variable distance2 and hence the gap. Is there a workaround in stripplot without having to recode the labels of the Country variable.
Code:
preserve local N = _N expand 2 gen byte new = _n > `N' replace Country1 = 10 if new clonevar distance2 = distance replace distance2 = 4500 if distance2>4500 gen outliers = distance > 4500 stripplot distance2 if survey==3 , pctile(5) vertical box(barw(0.8)) center over(Country1) yla(0(1000)4000 4500 "outliers") ms(none) legend(off) separate(outliers) xla(1 "Italy" 2 "Estonia" 4 "Belgium" 6 "Sweden" 7 "Germany" 8 "Hungary" 9 "Spain" 10 "all") restore

Comment