Skip to Main Content

Economics: Coding

Library resources available to support the Department of Economics program

Overview

Upper-level courses, economists, and many business careers use statistical software to organize, analyze, and visualize data. This guide provides resources to help you learn and improve your skills in the most common software: Stata, R, and Python.

Learn to use statistical software

Books

Stata

R

Python

Accessing Stata & Stata Files

  • All BYU Library and WVB computers have Stata downloaded automatically.  Note that files saved on the hard drive will be deleted when the user logs out. 
  • To use BYU’s Stata subscription on your own computer or from home, go to cloudapps.byu.edu, log in, and search for Stata. Note that running this version of Stata can be slow and cumbersome.
  • Save files you want to access in Stata in Box, BYU's cloud storage platform.  This allows you to use them on campus or from home.

Troubleshooting Code

General

If you’re not sure why the code isn’t working, read through it carefully and watch for small mistakes like misspellings, incorrect formatting, missing characters, or extra spaces.  Still having issues? Schedule an appointment with Maggie or a meeting with the Econ TAs.

Stata

  • Use the "help" command along with the command you are using. For example help generate to view the Stata documentation.

  • When reading Stata’s help documentation, the syntax is as follows: regular text is required within the command, italics represent code that the user must input, (parenthesis) represent separate parts of the code, [brackets] are optional additions to the code

R

  • Access the R command documentation by running a question mark before the command name.  For example, ?merge.
  • R packages and commands often come with vignettes, which are helpful examples that demonstrate how the package can be applied and adapted.

Python

  • Search the Python documentation.  
  • There are many support resources for Python, so a Google search of the command or error is often a quick solution.

Additional Stata Resources

Knowing the basic syntax of Stata will help immensely in the long run. Find the tutorial style (video, instruction set, website) that works best for your learning strategy.  Try a Google search of anything that doesn’t make sense. 

Beginner


Intermediate


Advanced

Economics Librarian

Profile Photo
Maggie Marchant
Contact:
(801) 422-3924