Difference between revisions of "Applications/Stata"

From HPC
Jump to: navigation , search
(Usage Examples)
(Usage Examples)
Line 8: Line 8:
  
 
== Usage Examples ==
 
== Usage Examples ==
 +
=== Interactive ===
 +
When running Stata/SE interactively, it is important to request the appropriate license by starting an interactive session in the following way:
 +
<pre style="background-color: #000000; color: white; border: 2px solid black; font-family: monospace, sans-serif;">
 +
[username@login01 ~]$ interactive -L statase:1
 +
</pre>
 +
 +
Interactive with full graphical interface:
 +
<pre style="background-color: #000000; color: white; border: 2px solid black; font-family: monospace, sans-serif;">
 +
[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 ~]$ module add stata/SE/14.1.0
 +
[username@c170 ~]$ xstata-se
 +
</pre>
 +
 +
Interactive with command line only:
 +
<pre style="background-color: #000000; color: white; border: 2px solid black; font-family: monospace, sans-serif;">
 +
[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        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.
 +
 +
.
 +
</pre>
  
 
=== Batch Submission ===
 
=== Batch Submission ===

Revision as of 17:41, 16 March 2017

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
  • Module names : stata/SE/14.1.0
  • License: University of Hull, restricted to two concurrent seats

Usage Examples

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 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 ~]$ module add stata/SE/14.1.0
[username@c170 ~]$ xstata-se

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