Hi,

I would like to create a scatterplot including a linear regression line. The x-axis should be ordinally scalled from AAA to B- (variable ratingscale) and the y-axis should be continuously scaled based on the dependent variable (variable yieldreduction). Besides I would like to add a specific country to every tickmark in the scatterplot.

My code is the following:
Code:
regress yieldreduction rating
This is my dataset:
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str11 country float yieldreduction byte rating str4 ratingscale byte categorie
"Germany"     -.01201  1 "AAA"   1
"France"       -.0226  3 "AA+"   2
"Netherlands" -.01678  1 "AA"    3
"Belgium"     -.02124  3 "AA-"   4
"Austria"     -.01845  2 "A+"    5
"Finland"     -.01426  2 "A"     6
"Spain"        -.0372  7 "A-"    7
"Italy"       -.03752  9 "BBB+"  8
"Portugal"    -.02977  9 "BBB"   9
"Ireland"     -.02216  5 "BBB-" 10
"Greece"      -.06422 14 "BB+"  11
""                  .  . "BB"   12
""                  .  . "BB-"  13
""                  .  . "B+"   14
end


Thank you in advance!