Economics Pedagogy#
+Both Python and Stata have been used to teach economics to students of all levels, from the beginner to the graduate students. They both have their advantages and disadvantages, some of which are discussed below.
+Learning Curve#
+Students who have little to no experience in coding often find Stata’s command-line interface easier to install and use. However, students with more experience in coding may be more familiar with Python and thus find that easier to use. At the end of the day, different students could find either of the softwares easier to learn, and the software you choose to use should consider the level of the students in your class.
+Accessibility#
+Both Python and Jupyter notebooks are free and easily accessible, while Stata must be purchased. If your students do not have an instituional license for Stata, it may be more inclusive to use Python to avoid placing an undue financial burden on students.
+Cloud Computing#
+With the great integration between Jupyter Notebooks and Cloud Computing provided by tools such as Google Colab, it is possible to easily share your Jupyter notebooks with all your students and have them run your code in real time. To share your Stata .do
files with students, it may be best to upload them to a Google Drive folder and have your students download and run them locally. Students may then run into issues if they haven’t locally installed all the packages/updated all computer paths in your code. These issues are avoided if you use a virtual environment where everyone has access to the same resources, such as Google Colab (more details can be found on Colab’s welcome page).
Autograding#
+In both languages, you can view and grade the final output of student code. However, Stata .do
files do not have any features to automatically grade the intermediate steps student take towards a solution. Python has a package called Otter Grader, designed to help you grade the output of various code cells in Jupyter notebooks. Using Otter Grader, you can create various test cells that have their corresponding solutions and relevant tests. The package provides tests that are both visible to and hidden from students, enabling you to both guide students on the right track and check for correctness as necessary.
Several UC Berkeley classes, including Econ 148: Data Science for Economists, use Otter Grader along with Gradescope to automatically grade thousands of student submissions at once. However, you do not need a Gradescope license to use Otter Grader, Otter is a free package that can be used by anyone without any cost. Please look at the Otter tutorial for more information.
+Textbooks#
+While both Python and Stata have economics-specific textbooks, their styles and formats may differ. For Stata, the books are often traditional print books, such as An Introduction to Modern Econometrics Using Stata. Students may be required to purchase a physical or digital copy of these textbooks in order to use them.
+Meanwhile, Python textbooks may be found online for free. For example, consider the online textbooks Coding for Economists, Causal Inference for The Brave and True, or Economic Networks. These textbooks may often include interactive code snippets that the students can try running on their own, and corresponding githubs where the students can see how the textbook was written. Such open access to the material offers greater reproducibility, an advantage over Stata.
+