Difference between revisions of "Stata"

From UFRC
Jump to navigation Jump to search
m (Text replacement - "#uppercase" to "uc")
 
(2 intermediate revisions by 2 users not shown)
Line 21: Line 21:
  
 
<!--Modules-->
 
<!--Modules-->
==Required Modules==
+
==Environment Modules==
[[Modules|modules documentation]]
+
Run <code>module spider {{#var:app}}</code> to find out what environment modules are available for this application.
===Serial===
 
 
 
*{{#lowercase:{{#var:app}}}}
 
 
==System Variables==
 
==System Variables==
 
* HPC_{{uc:{{#var:app}}}}_DIR - installation directory
 
* HPC_{{uc:{{#var:app}}}}_DIR - installation directory
Line 51: Line 48:
 
===Ado-files===
 
===Ado-files===
 
Stata uses ado-files to add programability to Stata. Ado-files extend the functionality of Stata by adding new functions. Some ado-files are provided by Stata and are already installed, others can be downloaded from various sources. To use an ado-file, it needs to be in on of several special locations. These locations can be found using the sysdir command within Stata:
 
Stata uses ado-files to add programability to Stata. Ado-files extend the functionality of Stata by adding new functions. Some ado-files are provided by Stata and are already installed, others can be downloaded from various sources. To use an ado-file, it needs to be in on of several special locations. These locations can be found using the sysdir command within Stata:
 +
<div class="mw-collapsible mw-collapsed" style="width:70%; padding: 5px; border: 1px solid gray;">
 +
''Expand this section to view sample sysdir result.''
 +
<div class="mw-collapsible-content" style="padding: 5px;">
 
  . sysdir
 
  . sysdir
 
     STATA:  /apps/stata/stata13/
 
     STATA:  /apps/stata/stata13/
Line 58: Line 58:
 
     PERSONAL:  ~/ado/personal/
 
     PERSONAL:  ~/ado/personal/
 
     OLDPLACE:  ~/ado/
 
     OLDPLACE:  ~/ado/
 
+
</div></div>
 
In addition, Stata will also look in the current directory.  
 
In addition, Stata will also look in the current directory.  
  

Latest revision as of 15:23, 5 January 2023

Description

Stata website  

Stata statistical software is a complete, integrated statistical software package that provides everything you need for data analysis, data management, and graphics.

Environment Modules

Run module spider Stata to find out what environment modules are available for this application.

System Variables

  • HPC_STATA_DIR - installation directory
  • HPC_STATA_BIN - executable program directory

How To Run

Graphical interface

To use the graphical interface for Stata, you will need to ensure X11 forwarding is enabled and connect via the GUI nodes. The GUI Programs page has general instructions for setting this up.

Once connected, use "module load stata" to setup Stata and one of the following commands to launch the version of Stata you wish to run:

xstata - the default version
xstata-mp - the multi-processor version (Licensed for up to 8-cores)
xstata-se - the special edition

Note that the "x" here indicates X11, the method used to present the graphical interface to the user.

Batch system and interactive text-based

When Stata is run through the batch system or interactively in the text only mode, the "x" is not needed, and the commands to open the different versions are:

stata - the default version
stata-mp - the multi-processor version (Licensed for up to 8-cores)
stata-se - the special edition

See below for a PBS script example for submitting to the batch system.

Ado-files

Stata uses ado-files to add programability to Stata. Ado-files extend the functionality of Stata by adding new functions. Some ado-files are provided by Stata and are already installed, others can be downloaded from various sources. To use an ado-file, it needs to be in on of several special locations. These locations can be found using the sysdir command within Stata:

Expand this section to view sample sysdir result.

. sysdir
   STATA:  /apps/stata/stata13/
   BASE:  /apps/stata/stata13/ado/base/
   SITE:  /apps/stata/ado/
   PLUS:  ~/ado/plus/
   PERSONAL:  ~/ado/personal/
   OLDPLACE:  ~/ado/

In addition, Stata will also look in the current directory.

Users cannot add ado-files to any of the /apps/stata/ directories, but should instead add ado-files to one of the ~/ado directories (note that the "~" character is shorthand for your home directory-- /home/$USER/), or in the directory where they are executing stata.

If you know of an ado-file that you think will be broadly used by UF researchers, and it would make sense to install it for everyone to be able to use, please open a support request, and the Research Computing staff can add it to one of the /apps/stata/ directories.