Hi
I am using the following code to construct a scatter plot:
twoway (scatter beta alpha, title("Regression Tests of UIP"), mlabel(ID)) (lfit beta alpha), ytitle(Beta) legend(lab(1 "Beta"))
However I keep getting error message: mlabel: operator invalid
Any ideas? The code works if I drop the title:
twoway (scatter beta alpha, title("My Title"), mlabel(ID)) (lfit beta alpha), ytitle(Beta) legend(lab(1 "Beta"))
----------------------- copy starting from the next line -----------------------
[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input byte ID float(beta alpha) str11 country byte developed float group_median
23 1.8362274 -.54704875 "Hungary" 0 .6501096
9 .4778549 .10170976 "China" 0 .6501096
37 1.2196035 -.498645 "Mexico" 0 .6501096
42 -.58203423 .29589716 "Philippines" 0 .6501096
36 -.0781569 .04942717 "Malaysia" 0 .6501096
46 1.1002984 -.7458544 "SA" 0 .6501096
45 -.9582992 .50124466 "Russia" 0 .6501096
47 .004715125 .01044181 "Saudi" 0 .6501096
22 .337076 -.01110824 "HK" 0 .6501096
26 .963553 -.6590986 "Indonesia" 0 .6501096
8 -.8042764 .3144665 "Chile" 0 .6501096
32 .8671937 -.03975229 "Kuwait" 0 .6501096
10 -.4385346 .3023163 "Colombia" 0 .6501096
5 .9690037 -.4535788 "Brazil" 0 .6501096
15 .7705156 .0395709 "Egypt" 0 .6501096
12 .52970374 .09511489 "Czech" 0 .6501096
41 .9279866 .05789427 "Peru" 0 .6501096
25 .9379643 -.22651567 "India" 0 .6501096
48 .6910229 .1001157 "Singapore" 1 .9087965
44 .4672258 -.18966088 "Portugal" 1 .9087965
59 .9863901 1.3020502 "UK" 1 .9087965
4 1.462029 .006443781 "Belgium" 1 .9087965
2 .3531039 .14569756 "Australia" 1 .9087965
20 1.7001376 .27322334 "Germany" 1 .9087965
29 .7537184 -.15440215 "Italy" 1 .9087965
21 -.10167068 .2361137 "Greece" 1 .9087965
30 .9087965 .19136943 "Japan" 1 .9087965
3 2.0533354 .26389042 "Austria" 1 .9087965
53 1.742693 .3639724 "Switzerland" 1 .9087965
54 .4521819 -.10904413 "Taiwan" 1 .9087965
39 1.5855486 -.1498644 "Norway" 1 .9087965
31 1.3172716 .05321888 "Korea" 1 .9087965
7 1.2979743 -.07605615 "Canada" 1 .9087965
27 .9888381 .8458133 "Ireland" 1 .9087965
52 -.099385 .02396096 "Sweden" 1 .9087965
40 .9744889 .1189683 "NZ" 1 .9087965
19 .7592626 -.03824935 "France" 1 .9087965
51 .19100054 .1868916 "Spain" 1 .9087965
43 -.03935108 .3513617 "Poland" 1 .9087965
I am using the following code to construct a scatter plot:
twoway (scatter beta alpha, title("Regression Tests of UIP"), mlabel(ID)) (lfit beta alpha), ytitle(Beta) legend(lab(1 "Beta"))
However I keep getting error message: mlabel: operator invalid
Any ideas? The code works if I drop the title:
twoway (scatter beta alpha, title("My Title"), mlabel(ID)) (lfit beta alpha), ytitle(Beta) legend(lab(1 "Beta"))
----------------------- copy starting from the next line -----------------------
[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input byte ID float(beta alpha) str11 country byte developed float group_median
23 1.8362274 -.54704875 "Hungary" 0 .6501096
9 .4778549 .10170976 "China" 0 .6501096
37 1.2196035 -.498645 "Mexico" 0 .6501096
42 -.58203423 .29589716 "Philippines" 0 .6501096
36 -.0781569 .04942717 "Malaysia" 0 .6501096
46 1.1002984 -.7458544 "SA" 0 .6501096
45 -.9582992 .50124466 "Russia" 0 .6501096
47 .004715125 .01044181 "Saudi" 0 .6501096
22 .337076 -.01110824 "HK" 0 .6501096
26 .963553 -.6590986 "Indonesia" 0 .6501096
8 -.8042764 .3144665 "Chile" 0 .6501096
32 .8671937 -.03975229 "Kuwait" 0 .6501096
10 -.4385346 .3023163 "Colombia" 0 .6501096
5 .9690037 -.4535788 "Brazil" 0 .6501096
15 .7705156 .0395709 "Egypt" 0 .6501096
12 .52970374 .09511489 "Czech" 0 .6501096
41 .9279866 .05789427 "Peru" 0 .6501096
25 .9379643 -.22651567 "India" 0 .6501096
48 .6910229 .1001157 "Singapore" 1 .9087965
44 .4672258 -.18966088 "Portugal" 1 .9087965
59 .9863901 1.3020502 "UK" 1 .9087965
4 1.462029 .006443781 "Belgium" 1 .9087965
2 .3531039 .14569756 "Australia" 1 .9087965
20 1.7001376 .27322334 "Germany" 1 .9087965
29 .7537184 -.15440215 "Italy" 1 .9087965
21 -.10167068 .2361137 "Greece" 1 .9087965
30 .9087965 .19136943 "Japan" 1 .9087965
3 2.0533354 .26389042 "Austria" 1 .9087965
53 1.742693 .3639724 "Switzerland" 1 .9087965
54 .4521819 -.10904413 "Taiwan" 1 .9087965
39 1.5855486 -.1498644 "Norway" 1 .9087965
31 1.3172716 .05321888 "Korea" 1 .9087965
7 1.2979743 -.07605615 "Canada" 1 .9087965
27 .9888381 .8458133 "Ireland" 1 .9087965
52 -.099385 .02396096 "Sweden" 1 .9087965
40 .9744889 .1189683 "NZ" 1 .9087965
19 .7592626 -.03824935 "France" 1 .9087965
51 .19100054 .1868916 "Spain" 1 .9087965
43 -.03935108 .3513617 "Poland" 1 .9087965
Comment