Revision as of 11:43, 5 April 2018 by Admin (talk | contribs)
Jump to: navigation, search

ieboilstart is used help the user to set settings recommended to set at the top of do-files and to harmonize settings in the beginning of do-files between users.

Disclaimer: The only way to make sure that the code behave identical for two users in Stata is to for the users to run the same version of Stata on the same computer set up. Due to technical reasons, it is impossible to guarantee that different types of Stata (version number, Small/IC/SE/MP or PC/Mac/Linux) work exactly the same in every possible context. This command does not guarantee against any version discrepancies, it is solely a collection of common practices to reduce the risk of the same code running differently on different computers. See more details below.

This article is means to describe use cases, work flow and the reasoning used when developing the commands. For instructions on how to use the command specifically in Stata and for a complete list of the options available, see the help files by typing help ieboilstart in Stata. This command is a part of the package ietoolkit, to install all the commands in this package including this command, type ssc install ietoolkit in Stata.

Intended use cases

This command is intended to be run at the beginning of a do-file. If your project consist of many do-files being run from a master do-file, then you do not need to run this command from every do-file. Only run this command at the top of master do-files that run many other do-files and run this command at the top of do-files that includes randomization. Randomization is the one thing that is most sensitive to different version in Stata as the randomization algorithm is often updated between each version of Stata.


These instructions are meant to help you understand how to use the command. For technical instructions on how to implement the command in Stata see the help files by typing help ieboilstart in Stata.

Important note on version

In order to set the correctly set the version two steps are required. You must first run the command and then on the row immediately after wards call one of the returned values. The reason for this is that you cannot set the version for a user inside the command. All version settings done inside a command are reverted once the command come to an end. See the code below:

iebolstart, version(14.0)

Reasoning used during development

The settings set by ieboilstart are divided into three groups. Version settings, memory settings and other settings. The memory settings are all set to Stata's recommended values and the version settings are discussed above. The other commands are discussed here.

set more off

The set more setting in Stata tells Stata to either pause or keep running when the outputted results reaches the end of the result window. If more is set to on, then the user has to tell Stata to resume the pause each time this happens that can be hundreds of times in a large project. ieboilstart sets more to permanently off. Otherwise this setting defaults back to on each time Stata is restarted.

pause on

ieboilstart sets pause on, meaning that you can use Stata's pause command. This is a great de-bugging tool. Type help pause in Stata for more details.

set varabbrev off

The default in Stata is to allow variable abbreviation (varabbrev). This means that if you have a variable called harvest then you can use that variable by just typing harv unless no other variable starts with the letters h, a, r, and v. Copy and paste the code below and run it in Stata to see for yourself.

set obs 100
set varabbrev on

//Generate a tomato harvest variable and sum it using variable abbreviation
generate harvest_tomato  = uniform()
summarize harv

//Generate a potato harvest variable and try to sum it using variable abbreviation
generate harvest_potato = uniform()
summarize harv

Using variable abbreviation is prone to strange errors, especially when several people collaborate on code, so therefore we recommend that variable abbreviation is turned off.

Back to Parent

This article is part of the topic ietoolkit