From the course: Introduction to Stata
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Scatterplots and fitted lines - Stata Tutorial
From the course: Introduction to Stata
Scatterplots and fitted lines
- Scatterplots and lines of best fit are a great way to visualize bivariate relationships. I often use these types of plots to explore functional form between two variables. However, when creating these plots, we should take care with very large datasets, especially scatterplots don't work too well. If you have a data set with millions of observations, then very often all you'll see is one giant blob of data points. Lines of best fit work better with any sample size, but remember they are subject to the constraints that you set. For example, linear fits may not always be appropriate. In this session, we'll explore how to construct scatterplots and what kind of visual best fit options are available on Stata. The commands I will introduce in this session are the scatter command, which cause a scatterplot, lfit, which stands for linear fit, and produces linear fits, qfit, which stands for quadratic fit, and fits quadratics,…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Introduction to graph commands5m 50s
-
(Locked)
Bar graphs and dot charts5m 25s
-
(Locked)
Distributional analysis (graphical)5m 12s
-
(Locked)
Pie charts3m 44s
-
(Locked)
Scatterplots and fitted lines5m 10s
-
(Locked)
Contour plots3m 22s
-
(Locked)
Geographic maps5m 49s
-
(Locked)
Graphing in Stata: Challenge56s
-
(Locked)
Graphing in Stata: Solution3m 42s
-
(Locked)
-
-
-
-
-
-