Hi All,
Sorry if this is a really basic question, but I've searched and looked at the help files, and I can't seem to figure this out. I would like to overlay a line (defined by a function) on a scatter plot in Stata 13.1. Here's a reproducible sample:
Now, for example, if I were trying to just fit the regression line I would use
But if I try to do something with function to overlay a line defined by an equation:
It doesn't actually give me the line defined by the function.
Thank you in advance for your help!
Vincent
Sorry if this is a really basic question, but I've searched and looked at the help files, and I can't seem to figure this out. I would like to overlay a line (defined by a function) on a scatter plot in Stata 13.1. Here's a reproducible sample:
Code:
clear set more off input c y i 46 60 14 31 45 14 61 75 14 58 80 22 43 65 22 73 95 22 70 100 30 55 85 30 85 115 30 end graph twoway (scatter c y)
Code:
graph twoway (scatter c y) (lfit c y)
Code:
graph twoway (scatter c y) (function y = 0.6*x+10)
Thank you in advance for your help!
Vincent
Comment