How to use Stata - An introduction to how Stata uses polylines to connect scattered points

Time: 2020-12-28Source: Huajun Software TutorialAuthor: dim sum

Recently, many friends have asked me how to use polylines to connect scattered points in Stata. Then I will introduce to you how to use polylines to connect scattered points in Stata. Friends in need, please come and take a look below. Content.

First, right-click on the chart area and change the chart type to Scatter with Smooth Line and Data Markers

Stata screenshot

After entering, just select the corresponding module.

Check the effect (OK)

Or use the command twoway (scatter y x) (lfit y x)

"lfit" means "linear fit" (linear fitting), and the shape is a straight line. If you want to draw a quadratic regression curve on the scatter plot at the same time, directly change "lfit" to "qfit", (quadratic fitting) , the shape is a curve.

Stata screenshot

The above is the editor's introduction to Stata's method of connecting scattered points with polylines. Friends in need should not miss it.

Related articles更多>>

Popular recommendations