Software

Stata to R Reference / Stata 转 R 参考手册

A searchable bilingual reference for Stata users working in R

Browse Stata–R comparisons by subject, command or R package. English and Chinese editions share the same examples, with a language switch on each chapter. The reference accompanies tidystata and is separate from the introductory textbook.

tidystata

This R package (formerly statart) combines Stata-inspired features with tidyverse-style operations for exploring and preparing data:

  • tab() and fre() return frequency tables as data frames.
  • summ() and tabstat() return summary statistics.
  • codebook(), variables(), misstable(), and pwcorr() inspect variables, missing values, and correlations.
  • isid(), assert(), and s_merge() check keys and merge data.
  • Row calculations, std(), as_dummy(), panel lags, and binning help prepare variables.
  • findit() gives the R equivalent of a Stata command.

Coming from Stata? See Coming from Stata. Install the development version with pak::pak("socimh/tidystata").