STaTa

Warning

The stata site licence only allows 4 consecutive cores per job. Meaning batch jobs cant use more than 4 cores. Please DO NOT request more than 4 cores as the additional cores will not be used, lowering your efficiency.

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


Interactive usage

After connecting to Stanage (see Establishing a SSH connection), start an interactive session with the following command:

srun --pty bash -i

STaTa can be loaded with the command:

module load Stata/18

After this any of the STAR commands can be run from the terminal prompt. The available commands can be obtained using:

stata -h

Batch usage

The following is an example batch submission script, my_job.sh, to run the executable stata. The script requests 4 cores with a runtime of 5 minutes and 1 GB of memory.

Stata script hello_world.do :

disp "Hello world"

Batch script my_job.sh :

#!/bin/bash
#SBATCH --job-name=stata_test
#SBATCH --cpus-per-task=4
#SBATCH --mem=1000
#SBATCH --output=output_stata_4.%j.out
#SBATCH --time=00:05:00
#SBATCH --mail-user=a.person@sheffield.ac.uk
#SBATCH --mail-type=ALL

module load stata/18.0
stata -b hello_world.do

The job is submitted to the queue by typing:

$ sbatch my_job.sh

Installation notes

Installation method

This section is primarily for administrators of the system. STaTa has been installed using the default Easybuild config files.

Build logs and test reports can be found in $EBROOTSTATA/easybuild with a given module loaded.

The stata license was added manually by following the instructions here.


Testing

Testing was performed using the above example.

Direct dependencies for latest version of Stata