Skip to content

BITSS/RforStata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

R for Stata Users

An R Tutorial for Stata Users

Introduction

If you look through the applied economics journals that require data and code sharing, you'll find that the majority of work is done in Stata. But maybe R is on the rise. It is free, after all.

Thanks to Bob Muenchen and John Ricco. You may also find this translation of Mostly Harmless Econometrics into a few languages useful. Oscar Torres-Reyna's slides are great, too.

List of Commands

Data Cleaning

  • use (load data)
  • drop
  • keep
  • drop if
  • keep if
  • gen
  • replace
  • rename
  • sort
  • egen
  • foreach

Reshaping

  • append
  • merge
  • reshape
  • collapse

Regressions

  • regress y x
  • outreg/estout
  • regress y x, robust
  • ivreg y x (z), 2sls
  • xi: reg y x i.z / areg y x, absorb(z) / xtreg y x, fe
  • regress y x, cluster (z)

Plotting

There are too many

  • scatter
  • histogram
  • choropleth

About

An R Tutorial for Stata Users

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors