Hello everyone,
I would like to add a quadratic fit to a scatter plot that have different circles colors by a specific categorical variable. I found the sepscatter command very helpful to generate this type of scatter, but it does not accept the "twoway qfitci" command.
Actually, I know that we can do that using the "twoway qfitci" command and adding a scatter plot to each category of the variable of interest using the "|| scatter" option. But the problem is that I am weighting the scatter by a certain variable, and it seems that adding multiple scatters makes circles' size comparable only within each category of the variable not between categories. This is why I would like to use sepscatter command. I would highly appreciate your help.
I am giving an example here with the auto dataset
I would like to add a quadratic fit to a scatter plot that have different circles colors by a specific categorical variable. I found the sepscatter command very helpful to generate this type of scatter, but it does not accept the "twoway qfitci" command.
Actually, I know that we can do that using the "twoway qfitci" command and adding a scatter plot to each category of the variable of interest using the "|| scatter" option. But the problem is that I am weighting the scatter by a certain variable, and it seems that adding multiple scatters makes circles' size comparable only within each category of the variable not between categories. This is why I would like to use sepscatter command. I would highly appreciate your help.
I am giving an example here with the auto dataset
Code:
sysuse auto, clear
Code:
sepscatter price weight , separate( foreign ) msymbol(oh oh) ytitle("price") xtitle("weight") legend(off)

Comment