Difference between revisions of "Applications/Stata"

From HPC
Jump to: navigation , search
m
(Application Details)
 
(3 intermediate revisions by one other user not shown)
Line 3: Line 3:
  
 
* Description : Stata is a commercial statistical package, which provides a complete solution for data analysis, data management, and graphics.   
 
* Description : Stata is a commercial statistical package, which provides a complete solution for data analysis, data management, and graphics.   
* Versions : Stata/SE 14.1.0  
+
* Versions : Stata/SE/14.1.0, Stata/SE/15.0, Stata/SE/17.0
* Module names : stata/SE/14.1.0
+
* Module names : stata/SE/14.1.0, stata/SE/15.0, stata/SE/17.0
* License: University of Hull, Viper usage is restricted to two concurrent seats. When using Stata/SE on Viper you '''must''' request the appropriate license either from the command line (''interactive session'') or as part of your batch script (''batch mode''), [[Interactive|see below]]:
+
* License: University of Hull, Viper usage is restricted to two concurrent seats. When using Stata/SE on Viper you '''must''' request the appropriate license either from the command line (''interactive session'') or as part of your batch script (''batch mode''), [[#Interactive|see below]]:
 
 
  
 
== License ==
 
== License ==
Line 138: Line 137:
 
* [http://www.stata.com/ http://www.stata.com/]
 
* [http://www.stata.com/ http://www.stata.com/]
  
{|
+
{{Licensepagenav}}
|style="width:5%; border-width: 0" | [[File:icon_home.png]]
 
|style="width:95%; border-width: 0" |
 
* [[Main_Page|Home]]
 
* [[Applications|Application support]]
 
* [[General|General]]
 
* [[Training|Training]]
 
* [[Programming|Programming support]]
 
|-
 
|}
 

Latest revision as of 19:56, 1 June 2023

Application Details

  • Description : Stata is a commercial statistical package, which provides a complete solution for data analysis, data management, and graphics.
  • Versions : Stata/SE/14.1.0, Stata/SE/15.0, Stata/SE/17.0
  • Module names : stata/SE/14.1.0, stata/SE/15.0, stata/SE/17.0
  • License: University of Hull, Viper usage is restricted to two concurrent seats. When using Stata/SE on Viper you must request the appropriate license either from the command line (interactive session) or as part of your batch script (batch mode), see below:

License

There are two licenses for Stata/SE that have been made available on Viper. In order to ensure correct license usage, it is important to request a license as detailed in the usage examples below. If no licenses are available, a job will be held pending until a license becomes available, with squeue showing a pend reason of (Licenses):

               JOBID     PARTITION NAME       USER     ST       TIME  NODES NODELIST(REASON)
               2521112   compute   Statajob4  username PD       0:00      1 (Licenses)
               2531111   compute   Statajob3  username PD       0:00      1 (Licenses)
               2531110   compute   Statajob2  username R        2:48      1 c171
               2531109   compute   Statajob1  username R        4:48      1 c171

You can check on current license usage by running the following command:

[username@login01 ~]$ scontrol show lic
LicenseName=statase
    Total=2 Used=1 Free=1 Remote=no

Usage Examples

Executables

Executable Description
stata-se Non-graphical Stata/SE designed for large databases, which can be used interactively through the terminal, or be used to run tasks automatically with the batch flag -b and a Stata do file.
stata Non-graphical Stata/IC which is the standard version of Stata. Note: For better performance and support for larger databases, stata-se should be used.
xstata-se Graphical version of Stata/SE, which can be used interactively in a similar working environment to Windows and Mac versions.
xstata Graphical version of Stata/IC which is the standard version of Stata. Note: For better performance and support for larger databases, xstata-se should be used.

Interactive

When running Stata/SE interactively, it is important to request the appropriate license by starting an interactive session in the following way:

[username@login01 ~]$ interactive -L statase:1

Interactive with full graphical interface:

[username@login01 ~]$ interactive -L statase:1
salloc: Granted job allocation 289661
Job ID 289661 connecting to c174, please wait...
Last login: Thu Jan 26 12:59:11 2017 from 10.254.5.246
[username@c174 ~]$ module add stata/SE/14.1.0
[username@c174 ~]$ xstata-se

Xstata-se.PNG

Interactive with command line only:

[username@login01 ~]$ interactive -L statase:1
salloc: Granted job allocation 289663
Job ID 289663 connecting to c170, please wait...
Last login: Thu Jan 26 12:59:11 2017 from 10.254.5.246
[username@c170 ~]$ stata-se

  ___  ____  ____  ____  ____ (R)
 /__    /   ____/   /   ____/
___/   /   /___/   /   /___/   14.1   Copyright 1985-2015 StataCorp LP
  Statistics/Data Analysis            StataCorp
                                      4905 Lakeway Drive
     Special Edition                  College Station, Texas 77845 USA
                                      800-STATA-PC        http://www.stata.com
                                      979-696-4600        [mailto:stata@stata.com stata@stata.com]
                                      979-696-4601 (fax)

50-user Stata network license expires 14 Nov 2017:
       Serial number:  #############
         Licensed to:  HULL IT
                       University of Hull

Notes:
      1.  Unicode is supported; see help unicode_advice.
      2.  Maximum number of variables is set to 5000; see help set_maxvar.

.

Batch Submission

#!/bin/bash
#SBATCH -J Stata           # Job name, you can change it to whatever you want
#SBATCH -N 1               # Number of nodes (for Stata/SE should be always one)
#SBATCH -o %N.%j.out       # Standard output will be written here
#SBATCH -e %N.%j.err       # Standard error will be written here
#SBATCH -p compute         # Slurm partition, where you want the job to be queued 
#SBATCH -L statase:1       # Use 1 Stata/SE license (this MUST be included in State/SE job scripts 
module purge
module add stata/SE/14.1.0
 
stata-se -b do testid.do
[username@login01 ~]$ sbatch STATAtest.job
Submitted batch job 289529

Test Program

Below is a test example Stata batch file for submission to VIPER called testit.do

clear*
set rmsg on
set obs 1000000
forval n = 1/10 {
g i`n' = runiform()
}
g dv = rbinomial(1,.3)
memory

qui logit dv i*

qui xtmixed dv i*

*with bootstrap:
qui bs, reps(1000): logit dv i*

Further Information





Special License Applications | Main Page | Further Topics