Stata
From FarmShare
(Difference between revisions)
Line 30: | Line 30: | ||
... | ... | ||
</pre> | </pre> | ||
+ | |||
+ | # Interactive Sessions | ||
+ | ## Terminal Mode | ||
+ | To start an interactive session, load one of the modules and run either <code>stata-se</code> (or <code>stata-mp</code>) to start the terminal-mode version of the application: | ||
<pre> | <pre> | ||
$ module load stata-se | $ module load stata-se | ||
$ which stata-se | $ which stata-se | ||
+ | /farmshare/software/non-free/stata-se/16/stata-se | ||
$ stata-se | $ stata-se | ||
Line 47: | Line 52: | ||
</pre> | </pre> | ||
- | + | ## Desktop Mode | |
- | + | If you connect using X11 for remote display, you can run either or <code>xtata-se</code> (or <code>xstata-mp</code>) to start the desktop (graphical) version of the application: | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | </ | + | |
- | |||
- | |||
- | |||
- | |||
- | |||
<pre> | <pre> | ||
- | + | $ ssh -Y sunetid@rice.stanford.edu | |
- | + | rice $ module load stata-se | |
- | module load | + | rice $ xstata-se & |
- | + | ||
</pre> | </pre> | ||
- | + | # Non-interactive jobs | |
- | < | + | You can also run Stata non-interactively using the <code>do</code> command, producing a <code>.log</code> file containing results: |
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
<pre> | <pre> | ||
- | + | $ module load stata-se | |
+ | $ cat test.do | ||
sysuse auto | sysuse auto | ||
describe | describe | ||
+ | $ stata -b do test.do | ||
+ | $ cat test.log | ||
+ | Contains data from /farmshare/software-prod/non-free/stata-se/16/ado/base/a/aut | ||
+ | > o.dta | ||
+ | obs: 74 1978 Automobile Data | ||
+ | vars: 12 13 Apr 2018 17:45 | ||
+ | ... | ||
</pre> | </pre> | ||
- | + | Or, submit a batch job to run on one of the compute nodes: | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | |||
<pre> | <pre> | ||
- | + | $ module load stata-se | |
- | $ module load | + | $ sbatch --wrap='stata -b do test.do' |
- | + | ||
- | $ | + | |
- | + | ||
</pre> | </pre> | ||
- | + | You can also write and submit a traditional Slurm job script. | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + |
Revision as of 13:06, 3 March 2020
Stata/SE and Stata/MP versions 14, 15, and 16 are available on FarmShare:
$ module help statase % module spider stata ---------------------------------------------------------------------------- stata-mp: ---------------------------------------------------------------------------- Description: Integrated statistical software package for data analysis, data management, and graphics. Versions: stata-mp/14.2 stata-mp/15 stata-mp/16 ... ---------------------------------------------------------------------------- stata-se: ---------------------------------------------------------------------------- Description: Integrated statistical software package for data analysis, data management, and graphics. Versions: stata-se/14.2 stata-se/15 stata-se/16 ...
- Interactive Sessions
- Terminal Mode
To start an interactive session, load one of the modules and run either stata-se
(or stata-mp
) to start the terminal-mode version of the application:
$ module load stata-se $ which stata-se /farmshare/software/non-free/stata-se/16/stata-se $ stata-se ___ ____ ____ ____ ____ (R) /__ / ____/ / ____/ ___/ / /___/ / /___/ 16.1 Copyright 1985-2019 StataCorp LLC 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)
- Desktop Mode
If you connect using X11 for remote display, you can run either or xtata-se
(or xstata-mp
) to start the desktop (graphical) version of the application:
$ ssh -Y sunetid@rice.stanford.edu rice $ module load stata-se rice $ xstata-se &
- Non-interactive jobs
You can also run Stata non-interactively using the do
command, producing a .log
file containing results:
$ module load stata-se $ cat test.do sysuse auto describe $ stata -b do test.do $ cat test.log Contains data from /farmshare/software-prod/non-free/stata-se/16/ado/base/a/aut > o.dta obs: 74 1978 Automobile Data vars: 12 13 Apr 2018 17:45 ...
Or, submit a batch job to run on one of the compute nodes:
$ module load stata-se $ sbatch --wrap='stata -b do test.do'
You can also write and submit a traditional Slurm job script.