Finding and Installing New Commands or User-Written Programs in Stata

Stata has a system to disseminate user-written programs that lets it grow continuously. So actually, there are a tremendous number of user-written programs for Stata available which, once installed, act just like official Stata commands. This article will show you how to find, install and update new commands or user-written programs in Stata.

Finding User-Written Programs

If you know the name of the program you want to use, you can go directly to Installing User-Written Programs. However, it’s much more common to know what you want to do without knowing what program (if any) can do it. This is a job for Stata’s findit command.

For example, suppose you wanted to diagnose the collinearity of some variables, and you know that collin command can do it. So, type:

findit collin

The result is a tremendous amount of information. You can click on each package to view a very brief description for selecting the suitable package, for example here package st 0004 2.

Installing User-Written Programs

If you identified the package you can install it by clicking on its link, namely “click here to install”, for example package st0004_2 above for collin command.

Now, the collin command is ready to use.

You must only type the right command for using it as we try here the collin command, for indicating the collinearity diagnostics of some variables in Stata.

If you know the name of the package you want to install, for example the package ice, you can install it by typing:

ssc install ice

The package ice with tis commands is now ready to use.

Updating User-Written Programs

While few user-written programs are updated as frequently as ice, it’s still important to get the latest versions of any user-written programs you install. And, the easiest way to automatically update all of your user-written programs is to type:

adoupdate, update

The latest versions of all of your user-written programs are now updated.

One thought on “Finding and Installing New Commands or User-Written Programs in Stata

Leave a Reply

Your email address will not be published.