Translating Stata to R

Welcome. This website is for Stata users who are interested in learning R. But it could also be useful for those going the other way around. We provide side-by-side code snippets for common tasks in both Stata and R, so that users have a dictionary for navigating across the two languages.

There are two main pages (βœŒοΈπŸ“„) on the site:

  1. Data wrangling (πŸ—„πŸ§Ή) with data.table
  2. Regression analysis (πŸ’»πŸ“ˆ) with fixest

There are other great packages that work well and are easy to use, but data.table and fixest are blazingly fast (πŸƒπŸ»πŸ’¨) and highly powerful (πŸ’ͺ🏻😎). Plus, they are flexible (πŸ‘Œβœ¨) and can help you avoid R's "package overload". Depending on what you do in Stata, you might even be able to cut back, going from three packagesβ€”reghdfe, estout, and gtoolsβ€”to just two.

See the icons in the top right corner for various site options. You can search for keywords or commands, change the theme to light or dark mode to suit your preferences, and go to the underlying GitHub repoopen in new window where all the source code is located. Please let us know if you have suggestions or spot any errors.