If you are looking for software to use, go to Huajun Software Park! software release
Location: front pageTutorial strategyTutorialComputer software tutorials How does Stata...

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

Author: dim sum Date: 2020-12-28

STATA
STATA-17.0 official version

science tools Storage: 856.71MB Time: 2022-04-18

Software introduction: Stata official version is a very excellent practical science statistics software. Stata official version is powerful, efficient and professional, and provides data analysis...

Download now

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