Programs for Stata

I have written several programs for the Stata statistical package, which are freely available for your use. I have tested them and believe that they are free of errors, but make no guarantees.

All of these programs are available from the Statistical Software Components archive (SSC), hosted at Boston College by Kit Baum. This means that they can be installed automatically in Stata. From the Stata command line, type

. ssc describe pkgname

Where pkgname is the name of the package you want. This will display a description of the package from SSC, along with options for automatic installation.

Package Name Package
Help File
mktab A program to create tables of “journal-style” regression output. mktab estimates one or more regression-type models, and prints the results in tab- (or other) delimited format for importation into a spreadsheet or word-processor. This facilitates creating tables in “journal-article” format, i.e. with standard errors in parentheses below parameter estimates, significance flagged, and so on.
The program also has options to create output in LaTeX format and as a set of HTML tables.
screen shot
survwgt This program performs two functions related to survey sampling weights. First, it creates replicate weights, which are employed in replication- based strategies for variance estimation (balanced repeated replication and the survey jackknife). Second, it performs post-stratification, raking, and non-response adjustments to survey sampling weights. screen shot
svr The svr (SurVey Replication) suite of commands analyze complex survey data using replication methods for variance estimation. The available methods are balanced repeated replication (BRR) and several versions of survey jackknife (JK1, JK2, and JKn), which are an alternative to the Taylor series linearization methods available in Stata’s svy commands. The suite includes commands to estimate means, totals, and ratios; regression-style models (including OLS, logit, probit, ordered logit & probit, etc.); cross-tabulations; and correlations, as well as a command to produce replication-based variance estimates for any command that accepts weights. screen shot
oprobpr oprobpr estimates an ordered dependent variable model on a continuous X variable and an optional set of covariates, then lists and graphs the predicted probabilities from this model against the X variable, holding the covariates constant. Optionally, quadratic or quadratic and cubic terms can be added to the model, as well as interaction terms between X and one or more other covariates. This command has been completely reworked to take advantage of the much-improved version 8 graphics. screen shot
corr_svy This program produces linearization-based significance calculations for correlation coefficients. It is the equivalent of the nonexistant Stata command svycorr. screen shot
tablecol This program is a wrapper program for the Stata command table that adds column percentages to the output. Essentially this provides the functionality of the column option of the tabulate command. screen shot
The fastcd package contains the Stata command 'c', a utility that automates the process of changing directories within Stata. The command allows you to build a database of commonly-used directory paths, and to associate a short mnemonic code with each. screen shot
catgraph This program plots the mean levels of a variable against another variable, optionally separately for categories a third variable. This is helpful for plotting, for example, mean democratic vote against year, by region. This command was written under Stata version 7, so does not take advantage of the much-improved version 8 graphics. screen shot
log2do2 This program extracts the command lines from a Stata text-format log, creating a file of syntax (i.e., a do file). The program recognizes commands as lines in the log that begin with a period followed by a blank space. It also recognizes commands that are wrapped over multiple lines by Stata, and command that appear within foreach and forvalues loops. log2do2 uses the Stata 7 file command to read and write the file. The program is designed to preserve references to local macros in command lines. screen shot
Nate Dot
Nate Dash