= Stata Ado Files = Reusable programs are distributed as '''ado files'''. <> ---- == Overview == Ado files are written in standard Stata and/or [[Stata/Mata|Mata]] syntax. Best practices specify that `foo.ado` should contain a single [[Stata/Programs|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