I looking at the relation between years of education and vaccine skepticism across countries. I want to label just one country, France. But am unable to. I tried labeling all countries on the graph and even that fails. The Country variable is a string variable. I'm not sure what's going on here.
Code:
reg Safety School_Years
gen country1 = "France" if Country=="France"
scatter Safety School_Years || lfit Safety School_Years, mlabel(country1) legend(off) ytitle("% not agreeing that vaccines are safe")
*Labelling all countries - also failing
scatter Safety School_Years || lfit Safety School_Years, mlabel(Country) legend(off) ytitle("% not agreeing that vaccines are safe")
Related Posts with Labeling a single observation on a scatter plot.
Issue Installing PyStataHello! I'm launching Stata from Jupyter notebook (using Anaconda) on a Mac. I'm following this guid…
Options starting with "no" doesn't work, bug or feature?I am defining a program that has non-required options. When the option starts with "no", it doesn't …
Creating different variables for firm-yearHi Statlist community, I have a dataset where I have different institutional investors for each yea…
Chow test statisticHi everyone! I tried doing a chow test using -test- and the following command: Code: . suest Brahmi…
Options starting with "no" doesn't work, bug or feature?I am defining a program that has non-required options. When the option starts with "no", it doesn't …
Subscribe to:
Post Comments (Atom)
0 Response to Labeling a single observation on a scatter plot.
Post a Comment