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.
Tabulate a variable to include a value for which there are no observationsHi, I am trying to tabulate a variable & then use matcell/matrow to build an output table with …
Difference-in-difference with categorical outcome variableHi everyone, I want to use the Diff command in Stata to run a propensity score matching diff-in-dif…
Creating ratio variable from two independent variables for panel dataHi all. I am using educational attainment data and I have data on female tertiary enrolment(%), male…
Generate random numbers with specific mean and standard deviation within a rangeHello, I am using STATA 14 and would like to generate some random numbers that have a specific mean …
All characters of a variable are not displayed when I import the excel data. only 1st 27 characters are shown. Please HELP!For example "AgeofPersonAnsweringtheQuest" , only AgeofPersonAnsweringtheQues is displayed when I im…
Subscribe to:
Post Comments (Atom)
0 Response to Labeling a single observation on a scatter plot.
Post a Comment