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.
Imposing nonlinear constraint in moptimize()I am trying to find the coefficients of a system of linear regression equations defined as y = b*X +…
Getting error while creating interaction dummy with year and another variableHello, I'm trying to create distance and time interaction dummy variables with my sample dataset gi…
correlation analysisHi, For small study/hypothesis generating work sometimes it is recommended to do correlation analys…
Creating Dummy Variable r(109) errorHi Everyone, I am trying to solve r(109) error after used the following code. Could someone please…
Merging issue with using data since the variables cannot uniquely identify observationsHello, This is my master data. My master is repeated cross section. Code: * Example generated by -…
Subscribe to:
Post Comments (Atom)
0 Response to Labeling a single observation on a scatter plot.
Post a Comment