From the course: Advanced and Specialized Statistics with Stata
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Graphing by groups - Stata Tutorial
From the course: Advanced and Specialized Statistics with Stata
Graphing by groups
Let's examine how we can graph by groups. Stata can quickly graph over multiple groups using the by option. While similar effects can be achieved with the if condition this usually takes a lot more code. The by option avoids this problem and makes visual data exploration faster and more efficient. Here's an example of a graph that was made using the by option. This graph consists of many smaller sub-graphs that repeat the command over the sub-groups specified with by. It's a great way to do a lot of graphical analysis quickly. The graph also uses several visual options that we'll explore in this session. The Stata option that we're going to use in this session is the by option which can be used with any Stata graph. The by option will repeat the requested Stata graph for each value of the viable list specified in the by option, and yes you can specify multiple variables. The by option also has a series of sub-options…
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)
Changing the look of markers4m 50s
-
(Locked)
Changing graph colors5m 31s
-
(Locked)
Graphing by groups5m 45s
-
(Locked)
Controlling legends5m 46s
-
(Locked)
Adding text and textboxes6m 43s
-
(Locked)
Sizing graphs4m 13s
-
(Locked)
Combining graphs4m 50s
-
(Locked)
How to use jitter4m 37s
-
(Locked)
How to draw custom functions3m 19s
-
(Locked)
Challenge: More on visualization techniques55s
-
(Locked)
Solution: More on visualization techniques3m 55s
-
(Locked)
-
-
-
-
-
-