Differences between revisions 4 and 6 (spanning 2 versions)
Revision 4 as of 2023-06-09 12:56:38
Size: 1422
Comment:
Revision 6 as of 2025-10-24 14:46:09
Size: 1419
Comment: Rewrite
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Reusable programs for the Stata programming language are distributed as '''ado files'''. Reusable programs are distributed as '''ado files'''.
Line 13: Line 13:
Ado files are written in the typical syntax of the Stata programming language. Ado files are written in standard Stata and/or [[Stata/Mata|Mata]] syntax.
Line 15: Line 15:
The convention is for `foo.ado` to contain a single [[Stata/Programs|program]] named `foo`. Best practices specify that `foo.ado` should contain a single [[Stata/Programs|program]] named `foo`.
Line 17: Line 17:
--- ----
Line 21: Line 21:
== Installing Ado Files == == Installation ==
Line 27: Line 27:
The `search` command provides an API to a database including: The `-search-` command provides an API to a database that includes:
Line 34: Line 34:
The latter two often go hand-in-hand. Many ado files are available for discovery by the `search` command, and then can be relatively simply installed by selecting the relevent options. Many ado files are available for discovery here. Instructions for installation are provided inline.
Line 40: Line 40:
The Boston College Statistical Software Components (SSC) archive is structured so that ado files can be installed automatically like packages. The `ssc` command can be used as the 'package manager'. The Boston College Statistical Software Components (SSC) archive is structured so that ado files can be installed like packages. The `-ssc-` command can be used as the 'package manager'.
Line 46: Line 46:
By default, these Ado files are installed to `C:\ado\plus`. To double check this, run the `sysdir` command. (`OLDPLACE` is the location used in Stata version 6 and older. `PLUS` has been used since.)

To install into a different location, such as `PERSONAL`, try:

{{{
net set ado PERSONAL
ssc install fre
}}}
By default, the command installs ado files to `C:\ado\plus`. This is configurable in two ways; run the `-sysdir-` command to view the current settings. Note that the `OLDPLACE` variable is the location used up to Stata version 6. The `PLUS` variable has been used since then.
 * These variables can be overwritten. Try: `sysdir set PLUS E:\ado\plus`.
 * The variable selected for installation can be switched. Try: `net set ado PERSONAL`.

Stata Ado Files

Reusable programs are distributed as ado files.


Overview

Ado files are written in standard Stata and/or Mata syntax.

Best practices specify that foo.ado should contain a single program named foo.


Installation

User-Submitted Programs

The -search- command provides an API to a database that includes:

  • the Stata user manual
  • FAQs and blogs hosted on www.stata.com
  • articles from the Stata Journal
  • user-submitted additions to Stata

Many ado files are available for discovery here. Instructions for installation are provided inline.

SSC

The Boston College Statistical Software Components (SSC) archive is structured so that ado files can be installed like packages. The -ssc- command can be used as the 'package manager'.

ssc install fre

By default, the command installs ado files to C:\ado\plus. This is configurable in two ways; run the -sysdir- command to view the current settings. Note that the OLDPLACE variable is the location used up to Stata version 6. The PLUS variable has been used since then.

  • These variables can be overwritten. Try: sysdir set PLUS E:\ado\plus.

  • The variable selected for installation can be switched. Try: net set ado PERSONAL.


CategoryRicottone

Stata/AdoFiles (last edited 2025-10-24 14:46:09 by DominicRicottone)