Skip to primary content
Skip to secondary content

StataTex Blog

Tips for Stata, Latex and other useful resources for applied economists

Main menu

  • Home
  • |
  • All things…
  • Stata
  • LaTeX
  • |
  • Twitter
  • LinkedIn
  • |
  • General resources
  • About

Category Archives: CollTipStata

#StataTip: variable lists selected by “*” select all variables. To select all but a few (e.g. “year”) write –ds year, not– and get all variables but the one specified (results stored in local `r(varlist)’)

Posted on June 16, 2022 by Jan Sauermann
Posted in CollTipStata

#StataTip: use missing(VAR)==1 to condition on variable VAR being missing

Posted on June 13, 2022 by Jan Sauermann
Reply
Posted in CollTipStata | Leave a reply

#StataTip: use –set varabbrev off– to only allow full variable names in your Stata code (and no abbreviations)

Posted on February 18, 2022 by Jan Sauermann
Reply
Posted in CollTipStata | Leave a reply

#StataTip: use inlist(VAR,a,b,c,…,y)==1 to condition on numerical a, b, c, etc. Works also for string variables!

Posted on November 19, 2021 by Jan Sauermann
Reply
Posted in CollTipStata | Leave a reply

#Statatip: use inrange(VAR,MIN,MAX)==1 to condition on MIN<=VAR<=MAX

Posted on November 19, 2021 by Jan Sauermann
Reply
Posted in CollTipStata | Leave a reply

#Statatip: always define your Stata version in your do-file with e.g. “version 17” – this can be crucial for replicating results later

Posted on October 8, 2021 by Jan Sauermann
Reply
Posted in CollTipStata | Leave a reply

#StataTip: use –which name_ado_file– to show from which folder Stata calls the .ado-file

Posted on September 1, 2021 by Jan Sauermann
Reply
Posted in CollTipStata | Leave a reply

SUBSCRIBE TO EMAIL UPDATES


Tags

beamertex bibtex data cleaning dates descriptives do-file export figures format Formatting import Latex local log loop macro OSX Overlay pdf quotation marks references regression Stata stata2latex strings Tables time and dates time information variables Word

StataTeX Blog on Twitter

Tweets by StataTexBlog

POPULAR POSTS

  • Create duplicate observations in Stata For certain cleaning jobs, it can be useful to duplicat...
  • Remove blanks from string variables in Stata Identify and remove blank space in Stata's string varia...
  • Overlaying histograms in Stata For analysing data and comparing distributions, I often...
  • Routine to export tables from Stata to LaTeX When it comes to exporting regression tables from Stata...
  • Add date, month or year to your LaTeX document Including the current date in your LaTeX document is qu...
  • Strikethrough text in LaTeX Strikethrough text with LaTeX
  • Export summary statistics to LaTeX The ado-file --sutex-- (has to be installed by typing -...
  • Displaying numbers in Stata: commas, decimals, and decimal places There is an easy way to change commas to decimals and v...
  • Include Stata figures in Latex Just found an easy way to include figures from Stata in...
  • Multiple Stata Windows on OS X Ever wondered how to run regressions on different datas...

Privacy Policy Proudly powered by WordPress