Show pageOld revisionsBacklinksFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Stata ====== The following example can be used as a job script for running Stata jobs: <code bash> #!/bin/bash #SBATCH --job-name=my_stata_job #SBATCH --time=0-01:00:00 #SBATCH --partition=regular #SBATCH --ntasks=1 #SBATCH --mem=2gb module add StataSE/17 stata-se -b do my_stata_file.do </code> Note that the university currently only has a license for Stata/SE, which is limited to a single CPU. Therefore, always use ''%%--ntasks=1%%'' in the job script to request a single core; requesting more cores will not improve the performance. The input file for Stata, called ''%%my_stata_file.do%%'' in the previous job script, should be a Stata do file that contains all Stata commands. For example, it could look like: <code stata my_stata_file.do> sysuse auto, clear summarize graph twoway (scatter mpg weight) (lfit mpg weight) graph export plot.ps, replace </code> This script loads the Automobile dataset that is installed with Stata, prints a summary about the dataset, creates a graph and finally exports this graph to the output file ''%%plot.ps%%''. Log In