Stata | |
Author: | William Gould[1] |
Developer: | StataCorp |
Latest Release Version: | 18.0 |
Programming Language: | C |
Operating System: | Windows, macOS, Linux |
License: | Proprietary |
Stata ([2], alternatively, occasionally stylized as STATA[3] [4]) is a general-purpose statistical software package developed by StataCorp for data manipulation, visualization, statistics, and automated reporting. It is used by researchers in many fields, including biomedicine, economics, epidemiology, and sociology.[5]
Stata was initially developed by Computing Resource Center in California and the first version was released in 1985.[6] In 1993, the company moved to College Station, Texas and was renamed Stata Corporation, now known as StataCorp. A major release in 2003 included a new graphics system and dialog boxes for all commands. Since then, a new version has been released once every two years.[7] The current version is Stata 18, released in April 2023.[8]
From its creation, Stata has always employed an integrated command-line interface. Starting with version 8.0, Stata has included a graphical user interface which uses menus and dialog boxes to give access to many built-in commands. The dataset can be viewed or edited in spreadsheet format. From version 11 on, other commands can be executed while the data browser or editor is opened.
Until the release of version 16,[9] Stata could only open a single dataset at any one time. Stata allows for flexibility with assigning data types to data. Its compress
command automatically reassigns data to data types that take up less memory without loss of information. Stata utilizes integer storage types which occupy only one or two bytes rather than four, and single-precision (4 bytes) rather than double-precision (8 bytes) is the default for floating-point numbers.
Stata's data format is always tabular in format. Stata refers to the columns of tabular data as variables.
Stata can import data in a variety of formats. This includes ASCII data formats (such as CSV or databank formats) and spreadsheet formats (including various Excel formats).
Stata's proprietary file formats have changed over time, although not every Stata release includes a new dataset format. Every version of Stata can read all older dataset formats, and can write both the current and most recent previous dataset format, using the saveold
command.[10] Thus, the current Stata release can always open datasets that were created with older versions, but older versions cannot read newer format datasets.
Stata can read and write SAS XPORT format datasets natively, using the fdause and fdasave commands.
Some other econometric applications, including gretl, can directly import Stata file formats.
The development of Stata began in 1984, initially by William (Bill) Gould and later by Sean Becketti. The software was originally intended to compete with statistical programs for personal computers such as SYSTAT and MicroTSP. Stata was written, then as now, in the C programming language, initially for PCs running the DOS operating system. The first version was released in 1985 with 44 commands.
append | dir | infile | plot | spool | |
beep | do | input | query | summarize | |
by | drop | label | regress | tabulate | |
capture | erase | list | rename | test | |
confirm | exit | macro | replace | type | |
convert | expand | merge | run | use | |
correlate | format | modify | save | ||
count | generate | more | set | ||
describe | help | outfile | sort |
There have been 17 major releases of Stata between 1985 and 2021, and additional code and documentation updates between major releases. In its early years, extra sets of Stata programs were sometimes sold as "kits" or distributed as Support Disks. With the release of Stata 6 in 1999, update
s began to be delivered to users via the web. The initial release of Stata was for the DOS operating system. Since then, versions of Stata have been released for systems running Unix variants like Linux distributions, Windows, and MacOS. All Stata files are platform-independent.
Hundreds of commands have been added to Stata in its 37-year history.[11] [12] Certain developments have proved to be particularly important and continue to shape the user experience today, including extensibility, platform independence, and the active user community.
The program
command was implemented in Stata 1.2, giving users the ability to add their own commands.[13] ado-files followed in Stata 2.1, allowing a user-written program to be automatically loaded into memory. Many user-written ado-files are submitted to the Statistical Software Components Archive hosted by Boston College. StataCorp added an ssc
command to allow community-contributed programs to be added directly within Stata.[14] More recent editions of Stata allow users to call Python scripts using commands, as well as allowing Python IDEs like Jupyter Notebooks to import Stata commands.[15] Although Stata does not support R natively, there are user-written extensions to use R scripts in Stata.[16]
A number of important developments were initiated by Stata's active user community. The Stata Technical Bulletin, which often contains user-created commands, was introduced in 1991 and issued six times a year. It was relaunched in 2001 as the peer-reviewed Stata Journal, a quarterly publication containing descriptions of community-contributed commands and tips for the effective use of Stata. In 1994, a listserv began as a hub for users to collaboratively solve coding and technical issues; in 2014, it was converted into a web forum. In 1995, Statacorp began organizing user and developer conferences that meet annually. Only the annual Stata Conference held in the United States is hosted by StataCorp. Other user group meetings are held annually in the United States (the Stata Conference), the UK, Germany, and Italy, and less frequently in several other countries. Local Stata distributors host User Group meetings in their own countries.
Version | Release date | Select new or enhanced features | |
---|---|---|---|
1.0 | January 1985 |
| |
1.1 | February 1985 |
| |
1.2 | May 1985 |
| |
1.3 | August 1985 |
| |
1.4 | August 1986 |
| |
1.5 | February 1987 |
| |
2.0 | June 1988 |
| |
2.1 | September 1990 |
| |
3.0 | March 1992 |
| |
3.1 | August 1993 |
| |
4.0 | January 1995 |
| |
5.0 | October 1996 |
| |
6.0 | January 1999 |
| |
7.0 | December 2000 |
| |
8.0 | January 2003 |
| |
8.1 | July 2003 |
| |
8.2 | October 2003 |
| |
9.0 | April 2005 |
| |
9.1 | September 2005 | ||
9.2 | April 2006 | ||
10.0 | June 2007 |
| |
10.1 | August 2008 | ||
11.0 | July 2009 |
| |
11.1 | June 2010 | ||
11.2 | March 2011 | ||
12.0 | July 2011 |
| |
12.1 | January 2012 | ||
13.0 | June 2013 |
| |
13.1 | October 2013 | ||
14.0 | April 2015 |
| |
14.1 | October 2015 | ||
14.2 | September 2016 | ||
15.0 | June 2017 |
| |
15.1 | November 2017 | ||
16.0 | June 2019 |
| |
16.1 | February 2020 | ||
17.0 | April 2021 |
| |
18.0 | April 2023 |
|
There are four builds of Stata: Stata/MP, Stata/SE, Stata/BE, and Numerics by Stata.[17] Whereas Stata/MP allows for built-in parallel processing of certain commands, Stata/SE and Stata/BE are bottlenecked and limit usage to only one single core.[18] Stata/MP runs certain commands about 2.4 times faster, roughly 60% of theoretical maximum efficiency, when running parallel processes on four CPU cores compared to SE or BE versions. Numerics by Stata allows for web integration of Stata commands.
SE and BE versions differ in the amount of memory datasets may utilize. Though Stata/MP can store 10 to 20 billion observations and up to 120,000 variables, Stata/SE and Stata/BE store up to 2.14 billion observations and handle 32,767 variables and 2,048 variables respectively. The maximum number of independent variables in a model is 65,532 variables in Stata/MP, 10,998 variables in Stata/SE, and 798 variables in Stata/BE.
The pricing and licensing of Stata depends on its intended use: business, government/nonprofit, education, or student. Single user licenses are either renewable annually or perpetual. Other license types include a single license for use by concurrent users, a site license, volume single user for bulk pricing, or a student lab.[19]
The following set of commands revolve around simple data management.[20]
describe // Describes the dataset and associated variablessummarize // Summary information about numerical variables
codebook make foreign // Summary information about the make (string) and foreign (numeric) variables
browse if missing(rep78) // Browse only observations with missing data for variable rep78list make if missing(rep78) // List makes of the cars with missing data for variable rep78
The next set of commands move onto descriptive statistics.
tabulate foreign // One-way frequency table for variable foreigntabulate rep78 foreign, row // Two-way frequency table for variables rep78 and foreign
summarize mpg if foreign
" sign tests for equality)by foreign, sort: summarize mpg // As above, but using the "by" prefix.tabulate foreign, summarize(mpg) // As above, but using the tabulate command.
A simple hypothesis test:
Graphing data:
Linear regression: