The Office of Population Research at Princeton University

August 20, 2008


Administration
Faculty
Staff
Students
Jobs


Projects
Seminars
Working Papers


Prospective  Students
Programs
Courses
Course Schedule


Data Archive
Library
Pop Index


Calendar


CRCW
CHW
CMD
PUM
OPR Mail
OPR Mail - New

Search

 

User-Written and Stata Journal Programs

Stata Journal is a printed journal that contained articles written by StataCorp, Stata users, and others. These articles include Stata programs (ado-files) which are freely available for downloading at the Stata and other web sites. These programs, when installed, effectively add new sets of commands to Stata.

A user-written program comes with new Stata commands accompanied by help files and sample data sets. Among many useful STB commands are:

  • "inequal" (program sg30, STB volume 23) which calculates various inequality measures.
  • The pair of programs, "modl" and "modltbl" (program sg73, STB volume 40) which simplify making a succinct, single page summary table for up to six separate estimation results.
  • "dups", which checks for duplicate observations (dm53 program from STB 41)
  • "ds3" a very powerful version of the "describe" command

This document shows how to search, download, and install user-written programs.

How to install user-written programs

The easiest way to install user-written programs is to go to type "net search" and the command name in Stata (i.e., net search ds3) wich will display:

ds3 from http://fmwww.bc.edu/RePEc/bocode/d
    'DS3': module to describe variables in memory / ds3 lists variable names
    in a compact format (or optionally, in / the same format as describe). It
    is a variant on official Stata's / ds. It is proposed as an improved
    version of the author's ds2. / (Note: ds5, archived elsewhere on
You can then click on the "ds3 from...." line which will pop up a new window. In this new window you can click on several options to view and install the program.

Another way is to go to the Help menu and click on "SJ and User Written Programs." A window will pop up with more options allowing you to either search for files, or to click your way through menus to find them. Once you find the file you want, click on "Click here to install" and it will be installed for you. Sometimes there is a sample .do file available, if you want this, click on the link.

You should note that when you are using the UNIX version, the files will be installed in your own account. Other users/accounts will not have access to them. In the case of the Networked version , you will have access to the files only on the machine you were using when you installed them.

How to Uninstall STB programs

The following example shows how to uninstall SJ and user-written programs.

To uninstall the "sg30" package, use "ado uninstall" command:
    . ado uninstall ds3
package ds3 from http://fmwww.bc.edu/repec/bocode/d
      'DS3': module to describe variables in memory

(package uninstalled)

Then, to make sure it is uninstalled:

    . help ds3
help for ds3 not found
try help contents or search ds3

top
Mail: Office of Population Research, Princeton University, Wallace Hall, Princeton NJ 08544
Phone: (609) 258-4870  •  Fax: (609) 258-1039  •  Email: webmaster@opr.princeton.edu