> ## Documentation Index
> Fetch the complete documentation index at: https://docs.domino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Stata

Stata® statistical software provides all the features you need for data science and inference–data manipulation, exploration, visualization, statistics, reporting, and reproducibility.

Stata has the following versions:

* Basic Edition (BE)

* Standard Edition (SE)

* Multiprocessor Edition (MP)

<Note>
  To learn more about Stata, see [Stata features](https://www.stata.com/features/), [Stata benefits](https://www.stata.com/why-use-stata/), and [compare versions of Stata](https://www.stata.com/products/which-stata-is-right-for-me/).
</Note>

## Get data from license file

To use a Stata workspace in Domino you must have a valid Stata license file. The license from Stata comes in a PDF file. You need the following data from this file:

* Licensed software version (either `MP`, `SE`, or `BE`)

* Serial number (12-digit number)

* Code (series of nine 4-character codes)

* Authorization (4-character code)

## Create a license file

1. Open the Stata Environment in Domino.

2. Right-click the background and go to **applications > shells > bash**.

3. Go to the Stata program directory:

   ```shell theme={null}
   cd /usr/local/stata
   ```

4. As superuser, run the Stata init program:

   ```shell theme={null}
   sudo ./stinit
   ```

5. Follow the prompts to enter the serial number, code, and authorization.

6. Follow the additional prompts to enter the organization name and location.

   <Note>
     These values are not validated and can be your company name and headquarters location.
   </Note>

Completing this process generates the Stata license file `stata.lic` in the `stata` directory. Copy the contents of this file to a safe location.

## Create Environment

1. When you create a Domino workspace Environment for Stata, use the following custom base image:

   ```
   quay.io/domino/stata:17
   ```

2. Update the Dockerfile instructions with the following Docker commands.

   ```dockerfile theme={null}
   ENV STATA_VERSION="MP"
   RUN apply-license “<url_to_license_file>”
   ```

   Ensure the `STATA_VERSION` matches the customers' licensed version. The version must be `MP`, `SE`, or `BE`.

3. Paste the following code into the Environments pluggable workspace properties.

   ```yaml theme={null}
   stata:
       title: "Stata"
       iconUrl: "https://raw.githubusercontent.com/dominodatalab/partner-resources/main/assets/workspaces/stata/statamp.png"
       start: [ "/opt/domino/workspaces/stata/start" ]
       httpProxy:
           port: 8080
           internalPath: "/{{ownerUsername}}/{{projectName}}/{{sessionPathComponent}}/{{runId}}/#/?username=domino&password=domino"
           rewrite: false
           requireSubdomain: false
   ```

   See the following for more resources:

   * [Stata Support Center](https://www.stata.com/support/)

   * [Stata Documentation](https://www.stata.com/features/documentation/)

   * [Stata Training](https://www.stata.com/learn/)

   * [Stata Examples and Datasets](https://www.stata.com/links/examples-and-datasets/)

   * [PyStata—Python and Stata](https://www.stata.com/python/pystata18/)
