STATA: Tips

A. Colin Cameron, Dept. of Economics, Univ. of Calif. - Davis

This September 1999 help sheet gives information on


STATA OVERVIEW

Stata commands are easy to use if built in to Stata.
See  http://www.stata.com/info/capabilities/ for a summary.
Also see Stata 6 reference manual [R} Estimation Commands for quick complete summary
and Stata 6 Users Guide ch.29 Overview of Model Estimation in Stata.

Many standard nonlinear cross-section estimators are included.

Strengths of Stata include extensive use of robust standard errors using the sandwich form (A-inv*B*A-inv) of the variance matrix, use of weights to obtain valid standard errors from complex survey design, and good graphics. And the manual is good at detailing the methods used.

Stata is not so oriented towards nonlinear models if they fall outside the generalized linear models class.
Gaps in Stata include little generalized method of moments (unless linear or unless in formulation suitable for generalized estimating equationms) and discrete choice models beyond multinomial logit.

Stata is difficult to program in if you move away from these.
Stata provides many template programs to modify, but modification can require quite some time learning the program.
 

STATA SPECIAL COMMANDS

In using Stata the following commands are often needed

clear      to clear existing data (especially needed if using Stata interactively)
log close   to close the log file

capture    to have a command run even if error message
e.g. capture log close  will work even if no log output file is open

#delimit for lengthy commands that span more than one line

matrix  see Stata 6 Users Guide ch.17 and [R] matrix

programming  see Stata 6 Users Guide ch.21 and [R] program

estimation and post estimation commands  see Stata 6 Users Guide ch.23

Using Stata programming and matrices etc. requires a lot of learning of syntax.
 

For further information on how to use Stata go to
   http://www.econ.ucdavis.edu/faculty/cameron/stata/stata.html