Download and Install RegiStream for Stata

Option 1: Install via Net Install

To quickly install RegiStream directly from our website, use the following command in your Stata console:

net install registream, from("https://registream.com/install/stata") replace

This command will download and install the latest version of RegiStream, including all necessary .ado and .sthlp files.

Verification and Uninstall

To verify the installation, run the following command in the Stata console.

which autolabel

To uninstall the RegiStream package, run the following command in the Stata console.

ado uninstall registream

A Note About Data Files

By default, RegiStream will store data files in your system's user home directory. This enables seamless sharing of label data across projects and programming languages like Stata, R, and Python. The default storage locations are:

If you are working on a secure system that does not have a standard user home directory (e.g., MONA or other high-security environments), you will need to specify a custom directory for RegiStream to store the required files. You can do this by setting the global variable $registream_dir, at the beginning of your code:

global registream_dir "path/to/custom/directory"

Replace "path/to/custom/directory" with the actual path where you want RegiStream to store the data files.

Option 2: Install via SSC (Coming Soon)

Soon, you will be able to install RegiStream directly from the SSC repository:

ssc install registream

Stay tuned for updates on the SSC release!

Option 3: Manual Download for Offline Installation

If you are working on an offline server or a high-security environment (e.g., MONA), you can manually download the RegiStream package as a zip file and transfer it to the secure system.

Download ZIP

After downloading, to install the package manually, follow these steps:

  1. Unzip the downloaded file: registream_stata.zip on you local system.
  2. Next, transfer all the files into your secure server system through the inbox.
  3. Now in Stata (on the secure system), run the following commands, and look at the outputs
  4. sysdir
    adopath
    • If you have a PERSONAL path to ado files, and you can access it (not the case in our MONA tests) you should be able to just create a folder inside it (naming it registream) and move all the files from your inbox folder to this new folder.
    • Otherwise, create a new folder at a preferred location e.g.
      /path-to-your-favorite-folder/stata_packages/registream
      , and move all the files from your inbox folder to this new folder.
  5. Now, at the beginning of each session in Stata (or if you find a better solution, let us know), run the following command to add the new folder to the Stata's ado path:
    adopath + "/path-to-your-favorite-folder/stata_packages/registream"

Verification and Uninstall

To verify the installation, run the following command in the Stata console.

which autolabel

If you do not get an error, everything worked smoothly.

To uninstall the RegiStream package, simply delete the registream folder from your secure system.

A Note About Data Files

Once the RegiStream package is installed, you will also need the data files. Due to the 10MB file size limit for secure environments like MONA, the data files are split into multiple smaller downloads. You can download each file and transfer them to the secure system.

Note: Each file in the data directories is under 10MB to comply with the upload limits on secure systems like MONA.

Since secure systems may not have a standard user home directory, you will need to create a custom directory for RegiStream data. You can choose any location, but we recommend creating a folder named registream. Within this folder, create subfolders for each data type you download. For example:

# create the following directories for registream data 
path-to-your-favorite-folder/registream
path-to-your-favorite-folder/registream/autolabel_keys

It is important that the folder names match exactly as indicated (e.g., scb_variables_swe). Once the CSV files are in the appropriate folders, RegiStream will automatically recognize and use them when you run your code.

If you do not place the data files in the default directories, i.e.

Then, for each Stata session, you need to set the global variable $registream_dir to specify the custom path where the path-to-your-favorite-folder/registream folder is located:

global registream_dir "path-to-your-favorite-folder/registream"

Replace "path-to-your-favorite-folder/registream" with the actual path where you created the registream folder and its subfolders.

Example Usage Instructions

Here are some examples of how to use RegiStream to label your datasets in Stata:

Label All Variables:
autolabel variables, domain(scb) lang(eng)

This command labels all variables in your dataset using the SCB domain in English.

Set All Value Labels:
autolabel values, domain(scb) lang(swe)

This command sets value labels for all variables using the SCB domain in Swedish.

Label Specified Variables:
autolabel variables ku*ink yrkarbtyp, domain(scb) lang(eng) exclude(ku3ink)

This command labels the specified variables (using wildcard asterisk to get all ku*ink variables), excluding ku3ink, using the SCB domain in English.

Label Specified Variables (with Suffix):
autolabel variables ku*ink yrkarbtyp, domain(scb) lang(eng) exclude(ku3ink) suffix("_lbl")

This command labels the variables as in the previous example, but stores the results in new variables with the suffix "_lbl".

Set Specified Value Labels:
autolabel values kon, domain(scb) lang(eng)

This command applies value labels to the variable kon, using the SCB domain in English.

Lookup Variable in the Domain Data:
autolabel lookup carb random_var yrkarbtyp kaross, domain(scb) lang(eng)

This displays the labels, definitions, and value labels (if applicable) for the variables carb, yrkarbtyp, and kaross from the SCB domain in English. The variable random_var does not exist in the domain, so a warning is returned at the end.